python 2 to python 3 youtube video
#1
https://www.youtube.com/watch?v=8qxKYnAsNuU
Python 2to3 - Convert your Python 2 to Python 3 automatically!

- C:\Users\pearc\Desktop\temp\main.py (original)
+++ C:\Users\pearc\Desktop\temp\main.py (refactored)
@@ -8,15 +8,15 @@
 genre_id = None

 if 'id' in params:
-    media_id = urllib.unquote_plus(params["id"])
+    media_id = urllib.parse.unquote_plus(params["id"])
 if 'name' in params:
-    name = urllib.unquote_plus(params["name"])
+    name = urllib.parse.unquote_plus(params["name"])
 if 'mode' in params:
     mode = int(params["mode"])
 if 'type' in params:
-    stream_type = urllib.unquote_plus(params["type"])
+    stream_type = urllib.parse.unquote_plus(params["type"])
 if 'genre_id' in params:
-    genre_id = urllib.unquote_plus(params["genre_id"])
+    genre_id = urllib.parse.unquote_plus(params["genre_id"])

 if mode is None:
     main_menu()
RefactoringTool: Files that were modified:
RefactoringTool: C:\Users\pearc\Desktop\temp\main.py

you will need to run it like this
C:\Users\pearc\AppData\Local\Programs\Python\Python38>python.exe C:\Users\pearc\AppData\Local\Programs\Python\Python38\Tools\scripts\2to3.py -w C:\Users\pearc\Desktop\temp\globals.py
Reply

Logout Mark Read Team Forum Stats Members Help
python 2 to python 3 youtube video0