Re: calling python scripts as a sub-process

2008-11-19 Thread Mike Driscoll
On Nov 19, 1:03 pm, Catherine Moroney <[EMAIL PROTECTED]> wrote: > I have one script (Match1) that calls a Fortran executable as a > sub-process, and I want to write another script (Match4) that > spawns off several instances of Match1 in parallel and then waits > until they all finish running.  Th

Re: Exception difference 2.4 ==> 2.5

2008-11-19 Thread Chris Rebert
On Wed, Nov 19, 2008 at 8:24 AM, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: > On Tue, 18 Nov 2008 22:33:35 -0800 > "Chris Rebert" <[EMAIL PROTECTED]> wrote: >> What happens under Python 2.6? > > Interesting. I installed 2.6 and tried it. My unit test still failed > but for a different reason tha

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-19 Thread George Sakkis
On Nov 19, 1:05 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Wed, 19 Nov 2008 05:41:57 -0800 (PST), Rick Giuly > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > (By "better" I mean that over many years of time programmers will be > > more productive because the

Re: spam update

2008-11-19 Thread Shawn Milochik
On Tue, Nov 18, 2008 at 11:23 AM, <[EMAIL PROTECTED]> wrote: > With some help from the python.org postmasters over the weekend I figured > out why some seemingly obvious spam messages seem to be making it to the > python-list@python.org mailing list. Messages gatewayed from Usenet don't > pass th

Re: calling python scripts as a sub-process

2008-11-19 Thread Catherine Moroney
I just tried that, and I get the same error. Interestingly enough, a shorter (and incorrect) version of the command works well enough so that it gets into the Match1 code and does the argument check there. The following code gets into Match1: >>> command = ['python', '../src_python/Match1.py','

Re: calling python scripts as a sub-process

2008-11-19 Thread Catherine Moroney
Dan Upton wrote: On Wed, Nov 19, 2008 at 2:13 PM, Philip Semanchuk <[EMAIL PROTECTED]> wrote: On Nov 19, 2008, at 2:03 PM, Catherine Moroney wrote: The command (stored as an array of strings) that I'm executing is: ['python ../src_python/Match1.py ', '--file_ref=MISR_AM1_GRP_ELLIPSOID_GM_P228

Re: spam update

2008-11-19 Thread Grant Edwards
On 2008-11-19, Shawn Milochik <[EMAIL PROTECTED]> wrote: > At the time there was a lot of chatter on the list about > people "plonking" posts from Google Groups. That's "a" > solution, if that's where the spam comes from, but it > penalizes the legitimate users who don't subscribe to the > mailing

Re: calling python scripts as a sub-process

2008-11-19 Thread Dan Upton
On Wed, Nov 19, 2008 at 2:38 PM, Catherine Moroney <[EMAIL PROTECTED]> wrote: > Dan Upton wrote: >> >> On Wed, Nov 19, 2008 at 2:13 PM, Philip Semanchuk <[EMAIL PROTECTED]> >> wrote: >>> >>> On Nov 19, 2008, at 2:03 PM, Catherine Moroney wrote: >>> The command (stored as an array of strings) t

Re: Will MySQLdb, the Python shim, be supported for Python 2.6 or 3.x?

2008-11-19 Thread John Nagle
Alia Khouri wrote: John Nagle wrote: Whoever did the port somehow created a dependency on the Intel math library, "libguide40.dll" and "libmmd.dll". That shouldn't be needed in the MySQL Python shim. It's not freely distributable, either; you have to buy the Intel C++ compiler to get it.

Re: 404 not found on for Python 2.6 Itanium

2008-11-19 Thread nadiasvertex
Then why is there a link on the download site? You are saying that for python 2.6 forward, there is no plan to support a stock python for IA64? Is there any particular reason why this is so? -={C}=- Christian Heimes wrote: > [EMAIL PROTECTED] wrote: > > Anyone know where else I can download 2.6

Re: Exception difference 2.4 ==> 2.5

2008-11-19 Thread D'Arcy J.M. Cain
On Wed, 19 Nov 2008 11:20:48 -0800 "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Wed, Nov 19, 2008 at 8:24 AM, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: > > Interesting. I installed 2.6 and tried it. My unit test still failed > > but for a different reason that I will have to investigate but t

Eric IDE Autocomplete

2008-11-19 Thread Samuel Morhaim
If anyone is familiar with this editor, can you tell me how to enable autocomplete and tooltips, IDLE-style?I add the API thing, and everything but it display a lot of methods that dont make sense in the context.. for example if i do import sys sys. <-- Ctrl Space.. I get a list of about 10

Re: Finding the instance reference of an object

2008-11-19 Thread Craig Allen
I've just come to the conclusion it's not possible to call functions in python, to do so is undefined and indeterminate, like dividing by zero. Henceforth no calling functions for me as clearly it's the devil's playground. -- http://mail.python.org/mailman/listinfo/python-list

Re: 404 not found on for Python 2.6 Itanium

2008-11-19 Thread Martin v. Löwis
> Then why is there a link on the download site? Where specifically did you spot that link? I can't see any. > You are saying that > for python 2.6 forward, there is no plan to support a stock python for > IA64? Is there any particular reason why this is so? Yes. It's too much effort to build,

Re: wxPython Crashes with basic example

2008-11-19 Thread Benjamin Kaplan
I looked up the error code- c005 is Microsoft's cryptic way of telling you that you had a seg fault. You might want to ask this on the wxPython mailing list (http://www.wxpython.org/maillist.php) since I'm pretty sure it's an issue with wx. On Wed, Nov 19, 2008 at 3:04 PM, Samuel Morhaim <[EMAI

Re: 404 not found on for Python 2.6 Itanium

2008-11-19 Thread Benjamin Kaplan
On Wed, Nov 19, 2008 at 4:12 PM, "Martin v. Löwis" <[EMAIL PROTECTED]>wrote: > > Then why is there a link on the download site? > > Where specifically did you spot that link? I can't see any. > Copied from the download page: - Python 2.6 compressed source tarball

Re: 404 not found on for Python 2.6 Itanium

2008-11-19 Thread Jerry Hill
On Wed, Nov 19, 2008 at 4:12 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> Then why is there a link on the download site? > > Where specifically did you spot that link? I can't see any. I believe the link in question is on the page http://www.python.org/download/ titled "Python 2.6 Windows I

Re: 404 not found on for Python 2.6 Itanium

2008-11-19 Thread Martin v. Löwis
> Copied from the download page: It would have helped if you had provided the URL instead. I didn't recognize that you were talking about http://www.python.org/download/ as I rarely ever view this page. On http://www.python.org/download/releases/2.6/ no such link is included. I have now dele

Re: Getting fractional part from a float without using string operations

2008-11-19 Thread John Machin
On Nov 20, 3:38 am, "Blind Anagram" <[EMAIL PROTECTED]> wrote: > "MRAB" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > On Nov 19, 1:44 pm, John Machin <[EMAIL PROTECTED]> wrote: > > > On Nov 20, 12:35 am, srinivasan srinivas <[EMAIL PROTECTED]> > > wrote: > > > > > | >>> import

Re: calling python scripts as a sub-process

2008-11-19 Thread Jeremy Sanders
Catherine Moroney wrote: > I have one script (Match1) that calls a Fortran executable as a > sub-process, and I want to write another script (Match4) that > spawns off several instances of Match1 in parallel and then waits > until they all finish running. The only way I can think of doing this >

Re: calling python scripts as a sub-process

2008-11-19 Thread Jeremy Sanders
Dan Upton wrote: > I think when I came across this error, I added shell=True, e.g. > > sub1 = subprocess.Popen(command, shell=True) That's really papering over the bug. You need to have the parameters separately, including the name of the program, separately in the list. You need to remove any s

Designing superclasses so inherited methods return objects with same type as the instance.

2008-11-19 Thread Felix T.
I have a class called Interval(type.ObjectType) that is supposed to mimic closed mathematical intervals. Right now, it has a lot of methods like this: def __add__(self,other): if type(other) in Numerical: return Interval(self.lower_bound+other, self.upper_bound +other)

Re: calling python scripts as a sub-process

2008-11-19 Thread Catherine Moroney
Dan Upton wrote: On Wed, Nov 19, 2008 at 2:38 PM, Catherine Moroney <[EMAIL PROTECTED]> wrote: Dan Upton wrote: On Wed, Nov 19, 2008 at 2:13 PM, Philip Semanchuk <[EMAIL PROTECTED]> wrote: On Nov 19, 2008, at 2:03 PM, Catherine Moroney wrote: The command (stored as an array of strings) that

F2PY: Access Fortran module data from multiple python module

2008-11-19 Thread Yann Vonder
Hi all, Here is a description of what I am trying to implement using F2PY: I have created two python extension modules using F2PY. The first extension module (say fsubr1.so) contains a Fortran module (say "tmod") and a subroutine (say "subr1") that modifies the data contained in "tmod". The second

Re: Exception difference 2.4 ==> 2.5

2008-11-19 Thread Terry Reedy
D'Arcy J.M. Cain wrote: If true I hope that a new version is forthcoming on the 2.5 branch. Yes, couple of weeks. I am running Python 2.5.2. I was able to reduce the program to a reasonably small version that exhibits the problem. It is in two files in ftp://ftp.druid.net/pub/distrib/Test_

Re: Designing superclasses so inherited methods return objects with same type as the instance.

2008-11-19 Thread Arnaud Delobelle
"Felix T." <[EMAIL PROTECTED]> writes: > I have a class called Interval(type.ObjectType) that is supposed to > mimic closed mathematical intervals. Right now, it has a lot of > methods like this: > > def __add__(self,other): > if type(other) in Numerical: > return Interval(

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-19 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Nov 18, 10:22 am, Steve Holden <[EMAIL PROTECTED]> wrote > in thread "Python-URL! weekly Python news and links (Nov 17)": >> [EMAIL PROTECTED] wrote: >> [...] >>> One of the reasons I would like to formulate a good >>> model of an object's value and type is so that I c

Re: 404 not found on for Python 2.6 Itanium

2008-11-19 Thread Terry Reedy
Jerry Hill wrote: On Wed, Nov 19, 2008 at 4:12 PM, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: Then why is there a link on the download site? Where specifically did you spot that link? I can't see any. I believe the link in question is on the page http://www.python.org/download/ titled "Pyth

Problem with writing a long line in a text file

2008-11-19 Thread Mohsen Akbari
Dear guys, I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. I thought maybe that's because the maximum possible length of the te

Re: Problem with writing a long line in a text file

2008-11-19 Thread Joe Strout
On Nov 19, 2008, at 3:27 PM, Mohsen Akbari wrote: I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. Appears that way whe

Re: Building musical chords starting from (a lot of) rules

2008-11-19 Thread Mr . SpOOn
I think I've found a nice way to represent and build chords. At least, at the moment it satisfy me, maybe later I'll understand how it sucks. I'm using two separate classes: one represent a chord and is implemented as a set of Notes; the other represents the structure (type) of the chord and is a

Re: Python image library issue: domain users cannot save files?

2008-11-19 Thread Gabriel Genellina
En Wed, 19 Nov 2008 13:43:07 -0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: Has anyone try to use PIL in a windows domain environment? I am having a permission issue. If I am a domain user, even I have the permission to write a folder, when I tried to do simple things like Image.open (

Re: Problem with writing a long line in a text file

2008-11-19 Thread John Machin
On Nov 20, 9:31 am, Joe Strout <[EMAIL PROTECTED]> wrote: > On Nov 19, 2008, at 3:27 PM, Mohsen Akbari wrote: > > > I'm a newbie in python and I have this problem with the code that   > > I'm writing. There is a very long line which I wish to output it to   > > a text file.But when I do this, in th

Re: how to acces the block inside of a context manager as sourcecode

2008-11-19 Thread Aaron Brady
See below. On Nov 19, 8:02 am, Daniel <[EMAIL PROTECTED]> wrote: > Hi Aaron, > > let me give you the reason for the context manager: > I am driving handware with a python script, basically a data acquisition > program which looks like this: > > with dataStore('measurement1.dat') as d: >         ma

Re: Why is try...except in my code not working (gzip/text files) ?

2008-11-19 Thread Gabriel Genellina
En Wed, 19 Nov 2008 13:25:03 -0200, Barak, Ron <[EMAIL PROTECTED]> escribió: I need to read a file that is either a gzip or a text file (on both *nix and Windows). Since I didn't find a way to determine a file type, I thought of using the following: import gzip FILE = "../dpm/save_state-

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-19 Thread Aaron Brady
On Nov 19, 12:05 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > >         I wouldn't expect a language like Ada to somehow re-evaluate a > default argument on each call; why would I expect Python to do such? Lots of people do. If you had a menu in a browser interface that had the items, say,

Re: Finding the instance reference of an object

2008-11-19 Thread Aaron Brady
On Nov 19, 12:28 pm, Joe Strout <[EMAIL PROTECTED]> wrote: > On Nov 19, 2008, at 11:05 AM, Douglas Alan wrote: > > (2) It is also unarguably true that saying that Python or Java use > >    "call-by-value", and saying nothing more is going to be profoundly > >    confusing to anyone who is learning

Using eval, or something like it...

2008-11-19 Thread r0g
Hi There, I know you can use eval to dynamically generate the name of a function you may want to call. Can it (or some equivalent method) also be used to do the same thing for the variables of a class e.g. class Foo(): bar = 1 gum = 2 mylist = ['bar','gum'] a = Foo() for each in mylist: a

Re: Using eval, or something like it...

2008-11-19 Thread James Mills
DON'T USE eval! On Thu, Nov 20, 2008 at 10:44 AM, r0g <[EMAIL PROTECTED]> wrote: > Hi There, > > I know you can use eval to dynamically generate the name of a function > you may want to call. Can it (or some equivalent method) also be used to > do the same thing for the variables of a class e.g. >

Python / Debian package dependencies

2008-11-19 Thread Steven Samuel Cole
Hi all, I am trying to build a debian package for my python modules using stdeb and dpkg-buildpackage. The package building itself works, I also managed to have an entry point created and I can use my python modules on the Ubuntu virtual machine I use to test the package. The problem is that my m

Re: Using eval, or something like it...

2008-11-19 Thread George Sakkis
On Nov 19, 7:44 pm, r0g <[EMAIL PROTECTED]> wrote: > Hi There, > > I know you can use eval to dynamically generate the name of a function > you may want to call. Can it (or some equivalent method) also be used to > do the same thing for the variables of a class e.g. > > class Foo(): >   bar = 1 >  

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-19 Thread greg
Antoon Pardon wrote: You are changing your argument. In a follow up you made the point that call by value should be as it was intended by the writers of the algol 60 report. No, I was countering the argument that "call by value" is short for "call by copying the value". I was pointing out that

Re: Using eval, or something like it...

2008-11-19 Thread John Machin
On Nov 20, 11:44 am, r0g <[EMAIL PROTECTED]> wrote: > Hi There, > > I know you can use eval to dynamically generate the name of a function > you may want to call. Can it (or some equivalent method) also be used to > do the same thing for the variables of a class e.g. > > class Foo(): >   bar = 1 >

Re: Programming exercises/challenges

2008-11-19 Thread Edwin
On Nov 18, 6:39 pm, [EMAIL PROTECTED] wrote: > Hi guys, > > I'm learning Python by teaching myself, and after going through several > tutorials I feel like I've learned the basics. Since I'm not taking a > class or anything, I've been doing challenges/programs to reinforce the > material and improv

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-19 Thread alex23
On Nov 20, 10:14 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > If you had a menu in a browser interface that had the items, say, > 'Stop' and 'Reload', what would you expect to happen if you clicked on > them? If you had a keyword called 'def', which defined functions, would you expect it to define

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-19 Thread Jeremiah Dodds
On Wed, Nov 19, 2008 at 8:58 PM, alex23 <[EMAIL PROTECTED]> wrote: > On Nov 20, 10:14 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > > If you had a menu in a browser interface that had the items, say, > > 'Stop' and 'Reload', what would you expect to happen if you clicked on > > them? > > If you had

Re: Using eval, or something like it...

2008-11-19 Thread r0g
George Sakkis wrote: > On Nov 19, 7:44 pm, r0g <[EMAIL PROTECTED]> wrote: >> Hi There, >> >> I know you can use eval to dynamically generate the name of a function >> you may want to call. Can it (or some equivalent method) also be used to >> do the same thing for the variables of a class e.g. >> >

Re: sorting list of complex numbers

2008-11-19 Thread Paul Rubin
Terry Reedy <[EMAIL PROTECTED]> writes: > >> Do your tuple destructuring in the first statement in your body and > >> nothing will break. Why get rid of a useful feature that unclutters code? > > Unless you were using a lambda, which is quite useful as argument to > > "sort". > > So write a sepa

Re: Exception difference 2.4 ==> 2.5

2008-11-19 Thread D'Arcy J.M. Cain
On Wed, 19 Nov 2008 17:08:13 -0500 Terry Reedy <[EMAIL PROTECTED]> wrote: > > am running Python 2.5.2. I was able to reduce the program to a > > reasonably small version that exhibits the problem. It is in two files > > in ftp://ftp.druid.net/pub/distrib/Test_2.5.tgz including Fredrik > > Lundh's

Re: Quick nested loop syntax?

2008-11-19 Thread alex23
On Nov 20, 3:48 am, Johannes Bauer <[EMAIL PROTECTED]> wrote: > a = { "a", "b", "c" } > b = { 4, 9, 13} > for (x, y) in someoperator(a, b): >         print(x, y) > > which would print all tuples of > "a", 4 > "a", 9 > "a", 13 > "b", 4 > "b", 9 > "b", 13 > "c", 4 > "c", 9 > "c", 13 If you're using

help with comparison

2008-11-19 Thread tekion
Hi, Could some one take a look at the below code snipet which keep failing: import optparse p = optparse.OptionParser(description="script to do stuff", prog="myscript.py", ) p.add_option("-c" "--compress", help="0 is noncompress") function1(options.compress) here's what the what function defi

[ANN]: circuits-1.0a2 released!

2008-11-19 Thread James Mills
Hi all, I'm pleased to announce the release of circuits-1.0a2 Overview == circuits is an event-driven framework with a focus on Component Software Architectures where System Functionality is defined in Components. Components communicate with one another by propagating events throughout the s

Module Structure/Import Design Problem

2008-11-19 Thread Rafe
Hi, I am in a situation where I feel I am being forced to abandon a clean module structure in favor of a large single module. If anyone can save my sanity here I would be forever grateful. My problem is that classes in several modules share a common base class which needs to implement a factory m

Re: help with comparison

2008-11-19 Thread John Machin
On Nov 20, 2:21 pm, tekion <[EMAIL PROTECTED]> wrote: > Hi, > Could some one take a look at the below code snipet which keep > failing: > > import optparse > p = optparse.OptionParser(description="script to do stuff", > prog="myscript.py", ) > p.add_option("-c" "--compress", help="0 is noncompr

Re: help with comparison

2008-11-19 Thread George Sakkis
On Nov 19, 10:21 pm, tekion <[EMAIL PROTECTED]> wrote: > Hi, > Could some one take a look at the below code snipet which keep > failing: > > import optparse > p = optparse.OptionParser(description="script to do stuff", > prog="myscript.py", ) > p.add_option("-c" "--compress", help="0 is noncomp

Re: Exception difference 2.4 ==> 2.5

2008-11-19 Thread Ross Ridge
D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: >I managed to move everything into one test file and switched to the >SimpleXMLRPCServer module but to no avail. The new code is at >ftp://ftp.druid.net/pub/distrib/test_2.5 It seems be this issue: http://bugs.python.org/issue1739842 Your hand

Re: Finding the instance reference of an object

2008-11-19 Thread Douglas Alan
Joe Strout <[EMAIL PROTECTED]> writes: >> Q. What type of calling semantics do Python and Java use? >> >> A. Call-by-sharing. > > Fair enough, but if the questioner then says "WTF is call-by-sharing," > we should answer "call-by-sharing is the term we prefer for call-by- > value in the case wh

Moving file on remote server: How?

2008-11-19 Thread MarkusJ_NZ
Hi, I am using python to FTP into a remote server and copy a file to a local machine. After I have downloaded the file I would like to move the file on the remote server to an archive directory. Can someone please tell me if / how I can move a file between folders on a remote server via FTP using

Re: Moving file on remote server: How?

2008-11-19 Thread alex23
On Nov 20, 3:40 pm, MarkusJ_NZ <[EMAIL PROTECTED]> wrote: > Can someone please tell me if / how I can move a file between folders > on a remote server via FTP using Python. I'm assuming you're using ftplib? Try ftp.rename() (although I'm not in a position to test this...) -- http://mail.python.or

Re: Getting fractional part from a float without using string operations

2008-11-19 Thread srinivasan srinivas
Yes it works for most of the cases.  But it doesn't for the following case: >>> str(abs(int(1234567.89)-1234567.89)) '0.88999898' Thanks, Srini - Original Message From: Tino Wildenhain <[EMAIL PROTECTED]> To: srinivasan srinivas <[EMAIL PROTECTED]> Cc: Jeremiah Dodds <[EMAIL PROTEC

Re: Moving file on remote server: How?

2008-11-19 Thread MarkusJ_NZ
On Nov 20, 3:54 pm, alex23 <[EMAIL PROTECTED]> wrote: > On Nov 20, 3:40 pm, MarkusJ_NZ <[EMAIL PROTECTED]> wrote: > > > Can someone please tell me if / how I can move a file between folders > > on a remote server via FTP using Python. > > I'm assuming you're using ftplib? > > Try ftp.rename() (alth

Re: Multiple equates

2008-11-19 Thread Tim Roberts
jzakiya <[EMAIL PROTECTED]> wrote: > >I looked online and in books, but couldn't find a definitive answer to >this. > >I have an array and set multiple elements to either True or False at >one time. > >Question: Which way is faster (or does it matter)? Answer: it does not matter. This is prematur

Re: Getting fractional part from a float without using string operations

2008-11-19 Thread Chris Rebert
On Wed, Nov 19, 2008 at 10:01 PM, srinivasan srinivas <[EMAIL PROTECTED]> wrote: > Yes it works for most of the cases. But it doesn't for the following case: > str(abs(int(1234567.89)-1234567.89)) > '0.88999898' Since you really care about significant figures here, have you considered us

Re: help with comparison

2008-11-19 Thread Tim Roberts
tekion <[EMAIL PROTECTED]> wrote: > >Could some one take a look at the below code snipet which keep >failing: > >import optparse >p = optparse.OptionParser(description="script to do stuff", >prog="myscript.py", ) >p.add_option("-c" "--compress", help="0 is noncompress") >function1(options.compr

Re: Programming exercises/challenges

2008-11-19 Thread Arnaud Delobelle
Edwin <[EMAIL PROTECTED]> writes: [...] > a diary manager compatible with my Emacs diary file (sometimes I don't > want to open Emacs for a quick note) You mean that you sometimes don't have emacs open? -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Using eval, or something like it...

2008-11-19 Thread r0g
John Machin wrote: > On Nov 20, 11:44 am, r0g <[EMAIL PROTECTED]> wrote: >> Hi There, >> >> I know you can use eval to dynamically generate the name of a function >> you may want to call. Can it (or some equivalent method) also be used to >> do the same thing for the variables of a class e.g. >> >>

[ANN] logilab-astng 0.17.4

2008-11-19 Thread Sylvain Thénault
Hi there! Back from holidays, I finally took a few hours to fix a few bugs in astng an publish a 0.17.4 release. It fixes some crashes, the "using possibly undefined loop variable" false positive reported by Maarteen and Skip and add some support for python 2.5 relative imports. See the ChangeLog

Re: Module Structure/Import Design Problem

2008-11-19 Thread Arnaud Delobelle
Rafe <[EMAIL PROTECTED]> writes: > Hi, > > I am in a situation where I feel I am being forced to abandon a clean > module structure in favor of a large single module. If anyone can save > my sanity here I would be forever grateful. > > My problem is that classes in several modules share a common b

Two functionaly identical functions -> different results ??!

2008-11-19 Thread Barak, Ron
Hi Guys, I cannot see any difference between read1() and read2() below, and yet, one is okay, the other give an exception. In the first run, read2() is executed, and as expected, the text file is printed $ cat ./gzip_try.py import gzip FILE = "text_file.txt" def read2(): try: fl =

Re: sorting list of complex numbers

2008-11-19 Thread Terry Reedy
Paul Rubin wrote: Terry Reedy <[EMAIL PROTECTED]> writes: Do your tuple destructuring in the first statement in your body and nothing will break. Why get rid of a useful feature that unclutters code? Because, as has been posted before, it is rarely used, it is replaceable, its presence inte

DISNEY VISA CARD

2008-11-19 Thread MEGAL
DISNEY VISA CARD http://www.disneyvisacards.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

RE: Why is try...except in my code not working (gzip/text files) ?

2008-11-19 Thread Barak, Ron
Thanks Gabriel, Okay, I get it: I was under the impression that the format check would be done on the open. Bye, Ron. -Original Message- From: Gabriel Genellina [mailto:[EMAIL PROTECTED] Sent: Thursday, November 20, 2008 02:06 To: python-list@python.org Subject: Re: Why is try...except in

Re: Two functionaly identical functions -> different results ??!

2008-11-19 Thread Chris Rebert
On Wed, Nov 19, 2008 at 11:24 PM, Barak, Ron <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I cannot see any difference between read1() and read2() below, and yet, one > is okay, the other give an exception. > > In the first run, read2() is executed, and as expected, the text file is > printed > > $ cat

<    1   2