LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-08-2020, 09:35 AM   #1
susja
Member
 
Registered: May 2011
Posts: 125

Rep: Reputation: 1
Upgrade Python 2.7 to 3.8


My team has a lot of scripts written in Python 2.7. Now we have to upgrade it to Python 3.8. I found this link https://pythonconverter.com/#creators and it worked for me. Unfortunately my company policy does not allow to use on-line tools hence I have to come up with other solution. Go into each script and modify it manually … would be very time consuming operation. Could you propose other way of conversion? Maybe some other tool or script or anything that would allow me do conversion automatically … or almost automatically?
Thanks
 
Old 04-08-2020, 09:44 AM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555

Automated Python 2 to 3 code translation is part of Python itself:

https://docs.python.org/2/library/2to3.html
https://docs.python.org/3.8/library/2to3.html

 
Old 04-08-2020, 02:50 PM   #3
susja
Member
 
Registered: May 2011
Posts: 125

Original Poster
Rep: Reputation: 1
Please never mind.
I am all set now.
Using 2to3 executable did the job for me

Last edited by susja; 04-12-2020 at 11:56 AM. Reason: More information
 
  


Reply

Tags
python3



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 03:03 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
WineX, python-gnome, and python-gtk DrD Fedora 0 08-03-2004 12:11 PM
install python 2.3 ,necssary to remove python 2.2 ngan_yine Linux - Newbie 7 12-28-2003 04:07 PM
Try Python, O'reilly Learning Python haknot Programming 5 02-15-2002 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration