Re: [Tutor] Swampy: No module name World

2014-06-01 Thread Steven D'Aprano
On Sun, Jun 01, 2014 at 08:33:37PM -0500, Charles Agriesti wrote: > from swampy.World import World > world = World() > > ImportError: No module name World > > These scripts run with no problem as long as the file location is the > python27 folder. But not from outside the folder. Where does swa

[Tutor] Swampy: No module name World

2014-06-01 Thread Charles Agriesti
from swampy.World import World world = World() ImportError: No module name World These scripts run with no problem as long as the file location is the python27 folder. But not from outside the folder. Other modules, like math, import with no problem from other locations import math from math i

Re: [Tutor] gnupg within a for loop

2014-06-01 Thread Danny Yoo
> Thanks Danny, that was spot on. I actually used os.chdir to change to > the base directory (which I assigned to a variable) just before the open > statement. I don't know if that's 'pythonically' correct but it seemed > like a simple way to do it. Again, thank you for helping me fix this. I am

Re: [Tutor] gnupg within a for loop

2014-06-01 Thread Alan Gauld
On 01/06/14 17:22, Wolfgang Maier wrote: The really basic thing is that os.listdir returns the file names it finds in the specified directory, but that does not include the path to the file again. So the first element of unencrypted in your case is just 'file1' and that doesn't seem to exist in

Re: [Tutor] cgi.FieldStorage() causing thread.error: can't allocate lock

2014-06-01 Thread Danny Yoo
On Sun, Jun 1, 2014 at 10:44 AM, Danny Yoo wrote: > Hi Shal, > > You may want to report a bug on Python's bug tracker. What you're > seeing is unusual enough to warrant sending a bug report upstream. > Visit: > > http://bugs.python.org/ > > and send a report. In the report, please include al

Re: [Tutor] gnupg within a for loop

2014-06-01 Thread Wolfgang Maier
Adam Gold gmx.com> writes: > > I start with the following which can be used to encrypt a single file > (assume I have the indentations correct in the actual code, I can't seem > to modify the wrapping with my email client): > > phrase = '12345' > cipher = 'AES256' > gpg = gnupg.GPG(gnupghome='

Re: [Tutor] cgi.FieldStorage() causing thread.error: can't allocate lock

2014-06-01 Thread Danny Yoo
Hi Shal, You may want to report a bug on Python's bug tracker. What you're seeing is unusual enough to warrant sending a bug report upstream. Visit: http://bugs.python.org/ and send a report. In the report, please include all the information you've shown us here, and hopefully someone ther

Re: [Tutor] gnupg within a for loop

2014-06-01 Thread Danny Yoo
Hi Adam, Ah; I've seen this before. Make sure the file name is either relative to current working directory, or make the file name absolute. What's happening is that os.listdir() is giving you file names that are relative to the base directory you've passed it, but open() doesn't know about the

Re: [Tutor] gnupg within a for loop

2014-06-01 Thread Jim Byrnes
On 06/01/2014 07:01 AM, Adam Gold wrote: Hi there. I'm trying to do the following using python 3: create a list from all files in a particular directory, then loop over that list symmetrically encrypting each file using the gnupg module (note, for the moment I'm embedding the passphrase in the c

[Tutor] gnupg within a for loop

2014-06-01 Thread Adam Gold
Hi there. I'm trying to do the following using python 3: create a list from all files in a particular directory, then loop over that list symmetrically encrypting each file using the gnupg module (note, for the moment I'm embedding the passphrase in the code while obviously in practice it would ha

Re: [Tutor] cgi.FieldStorage() causing thread.error: can't allocate lock

2014-06-01 Thread Alan Gauld
On 01/06/14 08:05, SABARWAL, SHAL wrote: Folks, Appreciate any more insight into this problem. ? The error occurs not frequently, and would still like to understand and resolve it. The calling application(applicationCode.py) has a basic - form = cgi.FieldStorage() I have attached cgi.py, mi

Re: [Tutor] cgi.FieldStorage() causing thread.error: can't allocate lock

2014-06-01 Thread SABARWAL, SHAL
Folks, Appreciate any more insight into this problem. ? The error occurs not frequently, and would still like to understand and resolve it. Thanks Shal From: SABARWAL, SHAL Sent: Wednesday, May 28, 2014 5:07 PM To: 'tutor@python.org' Subject: RE: cgi.FieldStorage() causing thread.error: can't all