Error confusing a newbie
Wayne Topa
wtopa at dmcom.net
Sat Dec 11 10:57:00 EST 1999
Subject: Re: Error confusing a newbie
Date: Sat, Dec 11, 1999 at 02:39:29AM -0800
In reply to:Keith Dart
Quoting Keith Dart(kdart at pacbell.net):
>| On Fri, 10 Dec 1999, Wayne Topa wrote:
>|
>| Your script is definitely being interpreted by a command shell, and not
>| the python interpreter. Why this is happening is hard to tell from the
>| information given. In any case, that is not really a python
>| problem.
I think it may a problem concerning python, but it might be that I
I am doing something wrong, again. Note:
VT2 root-Deb-Slink:/program/Python# nicinfo.py
eth0: sent 82658432 bytes; received 14218741 bytes
ppp0: sent 57164 bytes; received 113488 bytes
dummy0: sent 0 bytes; received 0 bytes
lo: sent 25350775 bytes; received 25350775 bytes
VT2 root-Deb-Slink:/program/Python# grep /usr/bin nicinfo.py
#!/usr/bin/env python
VT2 root-Deb-Slink:/program/Python# platform.py
Linux-2.2.12-i586-with-debian-2.1
VT2 root-Deb-Slink:/program/Python# grep /usr/bin platform.py
#!/usr/bin/python
VT2 root-Deb-Slink:/program/Python# net_time.py
import: Unable to connect to X server () [No such file or directory].
from: can't read /var/spool/mail/DateTime.
././net_time.py: line 7: syntax error near unexpected token `open(''
././net_time.py: line 7: `input = open('/var/log/totalppp', 'r')'
VT2 root-Deb-Slink:/program/Python# grep /usr/bin net_time.py
#!/usr/bin/python
And changing it back to /usr/bin/env python, doesn't work either.
VT2 root-Deb-Slink:/program/Python# net_time.py
import: Unable to connect to X server () [No such file or directory].
from: can't read /var/spool/mail/DateTime.
././net_time.py: line 7: syntax error near unexpected token `open(''
././net_time.py: line 7: `input = open('/var/log/totalppp', 'r')'
VT2 root-Deb-Slink:/program/Python# grep /usr/bin net_time.py
#!/usr/bin/env python
>|
>| I notice you are invoking the script without a "./". That is, as
Yes, I am guilty! Have been doing this for years and only got burned
once :-( , so far.
>|
>| Perhaps you have another net_time.py script that is in your PATH?
>|
No other net_time.py, and I have, as you see, moved it over with all my
other python scripts, now. I only 'wish' it was something as simple
as that. nicinfo.py and platform.py are in this Dir, are the only
copies on the system.
I don't understand 'what' shell is giving me the
"/var/spool/mail/DateTime" error, when that is not anywhere in my
program?
I guess that I can always run it in a bash script like
'python net_time.py', which seem sort of odd tho.
Well thanks for the try, anyway! If I ever find out what the problem
is I will let you all know.
Many Thanks
Wayne
--
Computers can never replace human stupidity.
_______________________________________________________
More information about the Python-list
mailing list