serial I/O install fail -- DLL not found
Just starting with Python. Installed: Python 2.7 pywin32-214.win32-py2.7.exe pyserial-2.5.win32.exe on a Home WinXP SP3 Toshiba laptop with 2GB memory. Open Python and try to do simple I/O test and can't even get past first line. Transcript below. You will see that __name__ is defined as '__main__" but path is not defined. Could this be due to creating the folder holding the Python.exe being on the E: drive or for some other obscure reason? The DOS path environmental variable includes: e:\Program Files\Python27 Thanks in advance for for any help. **transcript* Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> from uspp import * Traceback (most recent call last): File "", line 1, in File "E:\Python27\lib\uspp.py", line 189, in from SerialPort_win import * File "E:\Python27\lib\SerialPort_win.py", line 54, in from win32file import * File "E:\Python27\lib\win32file.py", line 12, in __load() File "E:\Python27\lib\win32file.py", line 10, in __load mod = imp.load_dynamic(__name__, path) ImportError: DLL load failed: The specified module could not be found. >>> path Traceback (most recent call last): File "", line 1, in NameError: name 'path' is not defined >>> __name__ '__main__' >>> -- http://mail.python.org/mailman/listinfo/python-list
Re: serial I/O install fail -- DLL not found
Thank you, Ian. You put your finger on the problem. As I thrashed around earlier, I had installed serial i/o pieces before the clean install pieces of pywin32-214.win32-py2.7.exe pyserial-2.5.win32.exe I did a complete de-install and re-install. Now the serial i/o is functioning -- I'm still stumbling along with the typical mistakes of a 'newbie'. Thanks again. Chas. -- http://mail.python.org/mailman/listinfo/python-list
Re: a question about the #prefix of sys.argv
On Jun 2, 8:50 am, Aldarion <[EMAIL PROTECTED]> wrote: > On 6月2日, 上午8时05分, Peter Otten <[EMAIL PROTECTED]> wrote: > > > Aldarion wrote: > > > for the little script > > > #egg.py > > > import sys > > > for k,v in enumerate(sys.argv): > > > print k,v > > > > it ignores the part after # on linux > > > below is the running output on windows and linux. no clue here. > > > This has nothing to do with python, it's the shell that treats the # and > > everything that follows as a comment. > > > $ ./listargs.py alpha #beta > > 0 ./listargs.py > > 1 alpha > > > But you can escape it: > > > $ ./listargs.py alpha \#beta > > 0 ./listargs.py > > 1 alpha > > 2 #beta > > > $ ./listargs.py alpha '#beta' > > 0 ./listargs.py > > 1 alpha > > 2 #beta > > > Peter > > thanks everyone for the quickly reply, i see now. Thank you Aldarion for your post. -- http://mail.python.org/mailman/listinfo/python-list