Python Forum
can anyone help convert to python3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can anyone help convert to python3
#25
That now looks ok.
pi@raspberrypi:~ $ 2to3 -w /home/pi/tracker
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: No changes to /home/pi/tracker/audio.py
RefactoringTool: No changes to /home/pi/tracker/calibration.py
RefactoringTool: No changes to /home/pi/tracker/calibrationGraphics.py
RefactoringTool: No changes to /home/pi/tracker/compass.py
RefactoringTool: No changes to /home/pi/tracker/contacts.py
RefactoringTool: No changes to /home/pi/tracker/graphics.py
RefactoringTool: No changes to /home/pi/tracker/main.py
RefactoringTool: Refactored /home/pi/tracker/pyscope.py
--- /home/pi/tracker/pyscope.py (original)
+++ /home/pi/tracker/pyscope.py (refactored)
@@ -24,7 +24,7 @@
             try:
                 pygame.display.init()
             except pygame.error:
-                print 'Driver: {0} failed.'.format(driver)
+                print('Driver: {0} failed.'.format(driver))
                 continue
             found = True
             break
RefactoringTool: No changes to /home/pi/tracker/resources.py
RefactoringTool: Can't parse /home/pi/tracker/rotate.py: ParseError: bad input:                                                                                                  type=3, value='"""Rotates a point around another centerPoint. Angle is in degree                                                                                                 s. Rotation is counter-clockwise"""', context=('', (2, 0))
RefactoringTool: No changes to /home/pi/tracker/startup.py
RefactoringTool: Files that were modified:
RefactoringTool: /home/pi/tracker/audio.py
RefactoringTool: /home/pi/tracker/calibration.py
RefactoringTool: /home/pi/tracker/calibrationGraphics.py
RefactoringTool: /home/pi/tracker/compass.py
RefactoringTool: /home/pi/tracker/contacts.py
RefactoringTool: /home/pi/tracker/graphics.py
RefactoringTool: /home/pi/tracker/main.py
RefactoringTool: /home/pi/tracker/pyscope.py
RefactoringTool: /home/pi/tracker/resources.py
RefactoringTool: /home/pi/tracker/startup.py
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse /home/pi/tracker/rotate.py: ParseError: bad input:                                                                                                  type=3, value='"""Rotates a point around another centerPoint. Angle is in degree                                                                                                 s. Rotation is counter-clockwise"""', context=('', (2, 0))
pi@raspberrypi:~ $

That now works using Thonny, after using 2to3. when before it would not.
Thanks for all the help.
Reply


Messages In This Thread
can anyone help convert to python3 - by corsasri - Jul-15-2020, 01:34 PM
RE: can anyone help convert to python3 - by corsasri - Jul-17-2020, 07:28 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  convert string into multiple columns in python3 VAN 2 2,844 Sep-26-2020, 11:14 PM
Last Post: scidam
  python3 convert hex to binary 32 bit Mkt 3 4,073 Aug-28-2020, 02:34 PM
Last Post: Mkt
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 5,048 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020