Re: [Tutor] using easy_install to download eggs

2009-10-05 Thread Rüdiger Wolf
http://stackoverflow.com/questions/529425/easyinstall-cache-downloaded-files pip (http://pypi.python.org/pypi/pip/) is a drop-in replacement for the easy_install tool and can do that. Just run easy_install pip and set an environment variable PIP_DOWNLOAD_CACHE to the path you want pip to store

Re: [Tutor] using easy_install to download eggs

2009-10-05 Thread Tim Michelsen
Hi, thanks for the hint. pip (http://pypi.python.org/pypi/pip/) is a drop-in replacement for the easy_install tool and can do that. Just run easy_install pip and set an environment variable PIP_DOWNLOAD_CACHE to the path you want pip to store the files. Note that the cache won't work with

Re: [Tutor] using easy_install to download eggs

2009-10-05 Thread Rüdiger Wolf
Snip from PIP http://pypi.python.org/pypi/pip/0.4 Differences From easy_install pip cannot install some packages. Specifically: * It cannot install from eggs. It only installs from source. (Maybe this will be changed sometime, but it's low priority.) If you want to download eggs then you

[Tutor] Using command line tool with python script

2009-10-05 Thread Oleg Oltar
Hi! I want to try to use a command line script with my python application. The task is the following, my database stores some initial data for the script and I need to execute a command line application in a following way: $ application -parameter1 -file1 where file 1 is a file which contains

Re: [Tutor] Using command line tool with python script

2009-10-05 Thread bob gailer
Oleg Oltar wrote: Hi! I want to try to use a command line script with my python application. The task is the following, my database stores some initial data for the script and I need to execute a command line application in a following way: $ application -parameter1 -file1 where file 1 is

Re: [Tutor] Using command line tool with python script

2009-10-05 Thread Kent Johnson
On Mon, Oct 5, 2009 at 10:22 AM, Oleg Oltar oltarase...@gmail.com wrote: os.popen4(application -parameter1 -file temp.txt) I wonder if that possible to execute this script (called application) without writing the file with initial data to the hard disk? If application can take its input from

Re: [Tutor] small program

2009-10-05 Thread Andrius
Bye bye. Regards, Andrius On 04/10/2009, Luke Paireepinart rabidpoob...@gmail.com wrote: On Sun, Oct 4, 2009 at 1:59 PM, Andrius ziniatink...@gmail.com wrote: Very good. Nice to hear that from another 'untouchable'. Must to confirm for your that I'm usually left wing fella, so, if you have

[Tutor] if n == 0 vs if not n

2009-10-05 Thread Sander Sweers
Hi Tutors, I am going through someone's python script and I am seeing a lot of the following boolean checks. if not s == if not n == 0 if b == True if not b == True etc.. All of these can be written without the == notation like if n, if s etc. Now in this case where it is only used as

Re: [Tutor] Using command line tool with python script

2009-10-05 Thread Rüdiger Wolf
On Mon, 05 Oct 2009 12:59 -0400, Kent Johnson ken...@tds.net wrote: On Mon, Oct 5, 2009 at 10:22 AM, Oleg Oltar oltarase...@gmail.com wrote: os.popen4(application -parameter1 -file temp.txt) I wonder if that possible to execute this script (called application) without writing the file

Re: [Tutor] if n == 0 vs if not n

2009-10-05 Thread Vern Ceder
Hi Sander, PEP 8, the Style Guide for Python Code http://www.python.org/dev/peps/pep-0008/ is pretty clear that the shorter version is preferable: if s: if n: if b: if not b: and so on... Cheers, Vern Sander Sweers wrote: Hi Tutors, I am going through someone's python script and I am

Re: [Tutor] Poorly understood error involving class inheritance

2009-10-05 Thread David Perlman
OK, I thought I had this one fixed but it was weirder than I thought. I think I understand what's going on, but I wanted to check with the experts here. I have the following class definition, which does not subclass anything: class oneStim: def __init__(self, time, mods=[], dur=None,

Re: [Tutor] if n == 0 vs if not n

2009-10-05 Thread Sander Sweers
Thanks Wesly/Vern for the replies. On Mon, 2009-10-05 at 21:56 +0200, Luke Paireepinart wrote: if not n == 0 if b == True can be written as if b. However, if not n == 0 can be written as if n != 0 but NOT as if n. The reason why is that 0 is not equivalent to False even though

Re: [Tutor] New to python: some advises for image processing tool

2009-10-05 Thread Wayne
I think you forgot to hit Reply-all, so forwarding on to the list with my response On Mon, Oct 5, 2009 at 11:38 AM, Nicola De Quattro lead.express...@gmail.com wrote: Wayne ha scritto: The most difficult task would be analyzing the image and possibly some of the graph generation. Yes I

Re: [Tutor] small program

2009-10-05 Thread Kent Johnson
This language is not appropriate for this list and I'm sorry to see it used even in a private reply. Let's keep the discussions here polite and respectful. Thanks, Kent On Sun, Oct 4, 2009 at 8:40 AM, Luke Paireepinart rabidpoob...@gmail.com wrote: On Sun, Oct 4, 2009 at 1:59 PM, Andrius

Re: [Tutor] Poorly understood error involving class inheritance

2009-10-05 Thread bob gailer
David Perlman wrote: OK, I thought I had this one fixed but it was weirder than I thought. I think I understand what's going on, but I wanted to check with the experts here. I have the following class definition, which does not subclass anything: class oneStim: def

[Tutor] Which version to start with?

2009-10-05 Thread Nick Hird
What is the best version of python to start out with? I see some discussions on the net about not going to 3.1 but staying with the 2.x releases. But then i see that 3.1 is better if your just starting. Thanks for any insight on which version to go with. -Nick

Re: [Tutor] Poorly understood error involving class inheritance

2009-10-05 Thread Wayne
On Mon, Oct 5, 2009 at 3:41 PM, David Perlman dperl...@wisc.edu wrote: OK, I thought I had this one fixed but it was weirder than I thought. I think I understand what's going on, but I wanted to check with the experts here. I have the following class definition, which does not subclass

Re: [Tutor] Which version to start with?

2009-10-05 Thread Rich Lovely
2009/10/5 Nick Hird nrh...@gmail.com: What is the best version of python to start out with? I see some discussions on the net about not going to 3.1 but staying with the 2.x releases. But then i see that 3.1 is better if your just starting. Thanks for any insight on which version to go with.

Re: [Tutor] Which version to start with?

2009-10-05 Thread Wayne
On Mon, Oct 5, 2009 at 4:24 PM, Nick Hird nrh...@gmail.com wrote: What is the best version of python to start out with? I see some discussions on the net about not going to 3.1 but staying with the 2.x releases. But then i see that 3.1 is better if your just starting. Thanks for any insight

Re: [Tutor] Poorly understood error involving class inheritance

2009-10-05 Thread wesley chun
   def __init__(self, time, mods=[], dur=None, format='%1.2f'):        : The mods that were added to the first instance of oneStim also appear in the second, newly created instance! It appears that what is happening here is that the __init__() method is being parsed by the interpreter once

Re: [Tutor] if n == 0 vs if not n

2009-10-05 Thread wesley chun
I am going through someone's python script and I am seeing a lot of the following boolean checks. if not s == if not n == 0 if b == True if not b == True etc.. All of these can be written without the == notation like if n, if s etc.Now in this case where it is only used as boolean

Re: [Tutor] Which version to start with?

2009-10-05 Thread wesley chun
On Mon, Oct 5, 2009 at 2:24 PM, Nick Hird nrh...@gmail.com wrote: What is the best version of python to start out with? I see some discussions on the net about not going to 3.1 but staying with the 2.x releases. But then i see that 3.1 is better if your just starting. greetings nick!

Re: [Tutor] Poorly understood error involving class inheritance

2009-10-05 Thread Kent Johnson
On Mon, Oct 5, 2009 at 4:41 PM, David Perlman dperl...@wisc.edu wrote: I fixed this by changing it to mods=None and then setting it in the body of the __init__ method.  Works fine now. That is the correct fix. My question is, is this just a quirky misbehavior, or is there a principled

Re: [Tutor] Which version to start with?

2009-10-05 Thread Nick Hird
Thanks all! I think i will install the newly released 2.6.3 and go from there. Its a little intimidating but i guess i gotta jump right in and get my feet wet. Thanks again! -Nick On Mon, Oct 5, 2009 at 5:59 PM, wesley chun wes...@gmail.com wrote: On Mon, Oct 5, 2009 at 2:24 PM, Nick Hird

Re: [Tutor] if n == 0 vs if not n

2009-10-05 Thread Dave Angel
Vern Ceder wrote: div class=moz-text-flowed style=font-family: -moz-fixedHi Sander, PEP 8, the Style Guide for Python Code http://www.python.org/dev/peps/pep-0008/ is pretty clear that the shorter version is preferable: if s: if n: if b: if not b: and so on... Cheers, Vern Sander Sweers

Re: [Tutor] if n == 0 vs if not n

2009-10-05 Thread Vern Ceder
Dave Angel wrote: Now in this case where it is only used as boolean checks which would be the most pythonic way if writing these checks? The shorter version may be preferable, but it doesn't generally give the same results. Without knowing the possible data, these substitutions are not

Re: [Tutor] if n == 0 vs if not n

2009-10-05 Thread Luke Paireepinart
On Mon, Oct 5, 2009 at 9:28 PM, Sander Sweers sander.swe...@gmail.comwrote: Hi Tutors, I am going through someone's python script and I am seeing a lot of the following boolean checks. if not s == if not n == 0 if b == True if not b == True etc.. All of these can be written