Difference between revisions of "Smart Terminal Convert from 2.7 to 3.6"
Jump to navigation
Jump to search
Russ hensel (talk | contribs) (→Fix) |
Russ hensel (talk | contribs) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= General = | = General = | ||
+ | Not quite sure why I wrote this, but it does document what a conversion entails. | ||
Look at this for general info: | Look at this for general info: | ||
Line 19: | Line 20: | ||
</pre> | </pre> | ||
+ | = Misc = | ||
+ | |||
+ | I have been using () on print for some time but missed some, so fix | ||
= Missing modules = | = Missing modules = | ||
Line 138: | Line 142: | ||
<pre> | <pre> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == pyperclip== | ||
+ | |||
+ | === Fix === | ||
+ | |||
+ | <pre> | ||
+ | File "D:\Russ\0000\spyder_3\SmartTerminal\gui.py", line 22, in <module> | ||
+ | import pyperclip | ||
+ | </pre> | ||
+ | |||
+ | === Not === | ||
+ | |||
+ | <pre> | ||
+ | |||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | <pre> | ||
+ | |||
+ | |||
+ | from Tkinter import * # is added everywhere since a gui assume tkinter namespace | ||
+ | |||
+ | ModuleNotFoundError: No module named 'Tkinter' | ||
+ | |||
+ | from tkinter import * | ||
+ | |||
+ | |||
+ | |||
+ | <> change to != or not( == ) | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | if port is not None: | ||
+ | self.driver.port = port | ||
+ | |||
+ | |||
+ | File "D:\Russ\0000\spyder_3\SmartTerminal\rs232driver2.py", line 102, in __init__ | ||
+ | self.recData = bytearray( "" ) # data that has been recieved. | ||
+ | |||
Latest revision as of 08:15, 18 September 2018
Contents
General[edit]
Not quite sure why I wrote this, but it does document what a conversion entails. Look at this for general info:
Exceptions[edit]
except Exception, ex_arg: change to except Exception as ex_arg:
Misc[edit]
I have been using () on print for some time but missed some, so fix
Missing modules[edit]
Queue[edit]
Fix[edit]
import Queue change to import queue
Not[edit]
C:\Users\Russ>activate python3_spyder3 (python3_spyder3) C:\Users\Russ>conda install queue Fetching package metadata ........... PackageNotFoundError: Package not found: '' Package missing in current win-64 channels: - queue Close matches found; did you mean one of these? queue: queuelib You can search for packages on anaconda.org with anaconda search -t conda queue (python3_spyder3) C:\Users\Russ>pip install queue Collecting queue Could not find a version that satisfies the requirement queue (from versions: ) No matching distribution found for queue (python3_spyder3) C:\Users\Russ>
Serial[edit]
Fix[edit]
(python3_spyder3) C:\Users\Russ>pip install pyserial Collecting pyserial Downloading pyserial-3.3-py2.py3-none-any.whl (189kB) 100% |████████████████████████████████| 194kB 811kB/s Installing collected packages: pyserial Successfully installed pyserial-3.3 (python3_spyder3) C:\Users\Russ>
pymysql[edit]
Fix[edit]
conda install mysql ??? (python3_spyder3) C:\Users\Russ> (python3_spyder3) C:\Users\Russ> (python3_spyder3) C:\Users\Russ>spyder Spyder is already running. If you want to open a new instance, please pass to it the --new-instance option (python3_spyder3) C:\Users\Russ>pip install pyserial Collecting pyserial Downloading pyserial-3.3-py2.py3-none-any.whl (189kB) 100% |████████████████████████████████| 194kB 811kB/s Installing collected packages: pyserial Successfully installed pyserial-3.3 (python3_spyder3) C:\Users\Russ>conda install mysql Fetching package metadata ........... PackageNotFoundError: Package not found: '' Package missing in current win-64 channels: - mysql Close matches found; did you mean one of these? mysql: pymysql You can search for packages on anaconda.org with anaconda search -t conda mysql (python3_spyder3) C:\Users\Russ>conda install pymysql Fetching package metadata ........... Solving package specifications: . Package plan for installation in environment D:\apps\Anaconda\envs\python3_spyder3: The following NEW packages will be INSTALLED: pymysql: 0.7.9-py36_0 Proceed ([y]/n)? y pymysql-0.7.9- 100% |###############################| Time: 0:00:00 1.33 MB/s (python3_spyder3) C:\Users\Russ>
Not[edit]
pyperclip[edit]
Fix[edit]
File "D:\Russ\0000\spyder_3\SmartTerminal\gui.py", line 22, in <module> import pyperclip
Not[edit]
from Tkinter import * # is added everywhere since a gui assume tkinter namespace ModuleNotFoundError: No module named 'Tkinter' from tkinter import * <> change to != or not( == ) if port is not None: self.driver.port = port File "D:\Russ\0000\spyder_3\SmartTerminal\rs232driver2.py", line 102, in __init__ self.recData = bytearray( "" ) # data that has been recieved.