Re: Using modules from Debian "python3-..." packages with locally compiled Python 3.3

2012-05-08 Thread Edward C. Jones
Terry Reedy said: > Question 1: if you use the .pth method, do you get the same result? (I expect you will, but good to > check.) Recompiled Pyhton 3.3 without the SITEPATH change. Same result: > python3.3 Python 3.3.0a3 (default, May 8 2012, 19:57:45) [GCC 4.6.3] on linux Type "help", "cop

Re: Using modules from Debian "python3-..." packages with locally compiled Python 3.3

2012-05-08 Thread Terry Reedy
On 5/8/2012 3:13 PM, Edward C. Jones wrote: I use up-to-date Debian testing (wheezy), amd64 architecture. I downloaded, compiled and installed Python 3.3.0 alpha 3 (from python.org) using "altinstall". Debian wheezy comes with python3.2 (and 2.6 and 2.7). I installed the Debian package "python3-b

Using modules from Debian "python3-..." packages with locally compiled Python 3.3

2012-05-08 Thread Edward C. Jones
I use up-to-date Debian testing (wheezy), amd64 architecture. I downloaded, compiled and installed Python 3.3.0 alpha 3 (from python.org) using "altinstall". Debian wheezy comes with python3.2 (and 2.6 and 2.7). I installed the Debian package "python3-bs4" (BeautifulSoup4 for Python3). Note: De

Re: using modules

2010-09-06 Thread Terry Reedy
On 9/6/2010 12:55 PM, Sal Lopez wrote: The following code runs OK under 3.1: @filename=cats_and_dogs.py #!/usr/bin/python def make_sound(animal): print(animal + ' says ' + sounds[animal]) sounds = { "cat": "meow", "dog": "woof" } for i in sounds.keys(): make_sound(i) # output: # d

Re: using modules

2010-09-06 Thread Richard Thomas
On Sep 6, 5:55 pm, Sal Lopez wrote: > The following code runs OK under 3.1: > > @filename=cats_and_dogs.py > > #!/usr/bin/python > > def make_sound(animal): >     print(animal + ' says ' + sounds[animal]) > > sounds = { "cat": "meow", "dog": "woof" } > > for i in sounds.keys(): >     make_sound(i)

using modules

2010-09-06 Thread Sal Lopez
The following code runs OK under 3.1: @filename=cats_and_dogs.py #!/usr/bin/python def make_sound(animal): print(animal + ' says ' + sounds[animal]) sounds = { "cat": "meow", "dog": "woof" } for i in sounds.keys(): make_sound(i) # output: # dog says woof # cat says meow When I move t

Re: using modules in destructors

2008-10-28 Thread MRAB
On Oct 27, 5:40 pm, Scott David Daniels <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > It seems to me that deleting local instances before imported modules > > would solve the problem. Is it not possible for the interpreter to get > > this right? Or are there cases where this would break

Re: using modules in destructors

2008-10-27 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: It seems to me that deleting local instances before imported modules would solve the problem. Is it not possible for the interpreter to get this right? Or are there cases where this would break stuff. It seems rather unpythonic for the __del__() method to become unpredic

Re: using modules in destructors

2008-10-25 Thread [EMAIL PROTECTED]
It seems to me that deleting local instances before imported modules would solve the problem. Is it not possible for the interpreter to get this right? Or are there cases where this would break stuff. It seems rather unpythonic for the __del__() method to become unpredictable at exit. -- http://ma

Re: using modules in destructors

2008-10-24 Thread Michele Simionato
This is expected behavior (see http://www.python.org/doc/essays/cleanup) but it is definitely a wart of Python. The best advice I can give you is *never* use __del__. There are alternatives, such as the with statement, weak references or atexit. See for instance http://code.activestate.com/recipes

using modules in destructors

2008-10-24 Thread [EMAIL PROTECTED]
Hi i have i have a class that makes temp folders to do work in. it keeps track of them, so that in the __del__() it can clean them up. ideally if the user of the module still has objects left at the end of their program, they should be automatically cleaned up. in my destructor i had a call to shu

Re: strange problem using modules from my own package.

2007-02-08 Thread krishnakant Mane
On 09/02/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Friday 9/2/2007 02:10, you wrote: > > Please keep posting on the list - you'll reach a whole lot of people > there... sorry, I had just hit the reply button and did not notice that python-list was not there. >my crystal ball I can see t

Re: strange problem using modules from my own package.

2007-02-08 Thread Gabriel Genellina
At Friday 9/2/2007 02:10, you wrote: Please keep posting on the list - you'll reach a whole lot of people there... On 09/02/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: It's a bit hard to tell from your description - would be better if you had copied the exact error messages. But the over

Re: strange problem using modules from my own package.

2007-02-08 Thread Gabriel Genellina
En Thu, 08 Feb 2007 18:40:39 -0300, krishnakant Mane <[EMAIL PROTECTED]> escribió: > I found a very strange kind of behaviour in python with my own package. > I created a package in which there were 4 modules and one __init__.py > file > I created the entire project in eclipse (pydev). > it wo

strange problem using modules from my own package.

2007-02-08 Thread krishnakant Mane
hello all, I found a very strange kind of behaviour in python with my own package. I created a package in which there were 4 modules and one __init__.py file I created the entire project in eclipse (pydev). it works fine there with the ide. but now when I try running the code without eclipse, that

Disabling modules using Modules/Setup

2006-09-08 Thread Ben Weintraub
Hello all, I'm trying to cross-compile Python and I've gotten the compilation working, but I would like to disable many of the modules from building or installing. I've read through the help in Modules/Setup and I see how it can be used to override setup.py for specifying where things are, but I