Re: [Tutor] crontab or python mistake

2006-05-26 Thread Alan Gauld
> IOError: [Errno 2] No such file or directory: ' emmssg.txt' > > the emmssg.txt file is in the /root/script directory so i > don't know why it cant find it. The file may be there but crontab isn't. It runs the program as root and root's home directory is /. For this kind of thing you need to

Re: [Tutor] partial string matching in list comprehension?

2006-05-26 Thread Wolfram Kraus
doug shawhan wrote: > I have a series of lists to compare with a list of exclusionary terms. > > > > junkList =["interchange", "ifferen", "thru"] > > The comparison lists have one or more elements, which may or may not > contain the junkList elements somewhere within: > > l = ["My skull hurt

Re: [Tutor] partial string matching in list comprehension?

2006-05-26 Thread Kent Johnson
Wolfram Kraus wrote: > doug shawhan wrote: >> I have a series of lists to compare with a list of exclusionary terms. >> >> >> >> junkList =["interchange", "ifferen", "thru"] >> >> The comparison lists have one or more elements, which may or may not >> contain the junkList elements somewhere withi

Re: [Tutor] partial string matching in list comprehension?

2006-05-26 Thread Wolfram Kraus
Kent Johnson wrote: > Wolfram Kraus wrote: > >>doug shawhan wrote: >> >>>I have a series of lists to compare with a list of exclusionary terms. >>> >>> >>> >>>junkList =["interchange", "ifferen", "thru"] >>> >>>The comparison lists have one or more elements, which may or may not >>>contain the j

Re: [Tutor] crontab or python mistake

2006-05-26 Thread Andreas Kostyrka
Am Freitag, den 26.05.2006, 08:32 +0100 schrieb Alan Gauld: > > > IOError: [Errno 2] No such file or directory: ' emmssg.txt' > > > > > the emmssg.txt file is in the /root/script directory so i > > don't know why it cant find it. > > The file may be there but crontab isn't. It runs the program

Re: [Tutor] Unable to import xxx.pyd

2006-05-26 Thread Andreas Kostyrka
Well, xxx.pyd -> dynamic binary python module on Windows. security value "755" suggests that you are trying to install it on a Linux/Unix host. Sorry, but dynamic binary modules on Linux end in ".so" (every Unix treats that a little bit different, HPUX e.g. uses .sl, etc.) And no, you cannot just

[Tutor] How to import a module which was not in the current working directory?

2006-05-26 Thread linda.s
Hi, How to import a module which was not in the current working directory? Thanks, Linda ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to import a module which was not in the current working directory?

2006-05-26 Thread Kent Johnson
linda.s wrote: > Hi, > How to import a module which was not in the current working directory? This was just discussed on the list: http://mail.python.org/pipermail/tutor/2006-May/047053.html Kent ___ Tutor maillist - Tutor@python.org http://mail.pyth

Re: [Tutor] How to import a module which was not in the current working directory?

2006-05-26 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Linda, You can append your path to include the location of the module. An example of this would be: sys.path.append(r'\\share\somedirectory') linda.s wrote: > Hi, > How to import a module which was not in the current working directory? > Thanks

[Tutor] seg fault from qt

2006-05-26 Thread johnf
Hi, For some reason I have lost qt. I'd like to know what I have to re-install to get python qt lib for SUSE 10.0. When I use YAST I see nothing like python-qt Right now I do import qt I get seg fault John ___ Tutor maillist - Tutor@python.org ht

Re: [Tutor] How to import a module which was not in the current working directory?

2006-05-26 Thread kakada
Hi Linda, Let say you have a tool named convert.py and other module (processing.py) in modules folder. In modules folder create an empty file named __init__.py In convert.py do: from modules import processing.py It would work. da linda.s wrote: > Hi, > How to import a module which was not in t

Re: [Tutor] Download file from the web and store it locally.

2006-05-26 Thread w chun
> You need to step back a bit and get a better understanding of > variables > and functions and how to use them. You are trying to run before you > can walk. >: > You need to sit down and work through which variables you need > and which functions of urllib you need. > > I suspect you only need