Re: python3: 'where' keyword

2005-01-11 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > Well I for one disagreed with many of your estimates of the zen's > applicability to macros, but I just couldn't be arsed saying so. Well, I was being somewhat flip with them, as I felt Carl was being snotty in referring me to the Zen list. The point the

Re: Python serial data aquisition

2005-01-11 Thread Flavio codeco coelho
[EMAIL PROTECTED] (Michael Fuhr) wrote in message news:<[EMAIL PROTECTED]>... > If the actual byte and/or bit order is different then you'll have > to modify the expression, but this should at least give you ideas. Hi Michael, It all looks pretty god but there is a couple of things I still don't

Re: Python serial data aquisition

2005-01-11 Thread Bengt Richter
On 9 Jan 2005 14:13:28 -0800, [EMAIL PROTECTED] (Flavio codeco coelho) wrote: >Hi, > >I am using pyserial to acquire data from an A/D converter plugged to >my serial port. > >my hardware represents analog voltages as 12bit numbers. So, according >to the manufacturer, this number will be stored in

Re: PyChecker messages

2005-01-11 Thread Roger Binns
> runner.py:878: Function (main) has too many lines (201) > > What does this mean? Cannot functions be large? Or is it simply an advice that > functions should be small and simple? It is advice. > runner.py:200: Function (detectMimeType) has too many returns (11) > > The function is simply a long

Re: Python serial data aquisition

2005-01-11 Thread Flavio codeco coelho
Paul Rubin wrote in message news:<[EMAIL PROTECTED]>... > or something like that. Hi Paul, thanks for your answer. I Noticed, however that although your solution is almost identical to that of Michael (earlier in the thread) your masking for the second byte is differen

Re: Handing a number of methods to the same child class

2005-01-11 Thread Steven Bethard
Dave Merrill wrote: Somewhat silly example: I know you've hedged this by calling it a "silly" example, but I would like to point out that your set_X methods are unnecessary -- since Python allows you to overload attribute access, getters and setters are generally unnecessary. class Address:

Re: Command line and GUI tools : need a single threading solution

2005-01-11 Thread Adrian Casey
Diez B. Roggisch wrote: >> I'm thinking it may be possible to modify the command line tools to use >> qt >> threads instead of native python threads. Is this the way to go? Are >> there other options? > > Why don't you use python threads in qt - I do so and so far it didn't make > any troubles

Re: tuples vs lists

2005-01-11 Thread Antoon Pardon
Op 2005-01-10, Bruno Desthuilliers schreef <[EMAIL PROTECTED]>: > Antoon Pardon a écrit : >> Op 2005-01-08, Bruno Desthuilliers schreef <[EMAIL PROTECTED]>: >> >>>worzel a écrit : >>> I get what the difference is between a tuple and a list, but why would I ever care about the tuple's immu

Re: embedded scripts debugging

2005-01-11 Thread Miki Tebeka
Hello Andrey, > So the question is: Is there suitable library for simple python gui > debugger, or may be there are some other techniques for debugging > embedded scripts? What I usually do is add from pdb import set_trace in the embedded module somewhere and then add a call to set_trace (br

Re: Python & unicode

2005-01-11 Thread Radovan Garabik
"Michel Claveau - abstraction mÃta-galactique non triviale en fuite perpÃtuelle." <[EMAIL PROTECTED]> wrote: > Hi ! > and plain Latin letters > > But not all letters (no : Ã Ã Ã Ã Ã Ã Ã etc.) > ... and some more letters that are not latin (j,w,u,z) ok, I'd better shut up :-) --

Re: Writing huge Sets() to disk

2005-01-11 Thread Bengt Richter
On Mon, 10 Jan 2005 17:11:09 +0100, =?ISO-8859-2?Q?Martin_MOKREJ=A9?= <[EMAIL PROTECTED]> wrote: >Hi, > I have sets.Set() objects having up to 20E20 items, What notation are you using when you write 20E20? IOW, ISTM 1E9 is a billion. So 20E20 would be 2000 billion billion. Please clarify ;-) >e

Re: Securing a future for anonymous functions in Python

2005-01-11 Thread Jacek Generowicz
Jeff Shannon <[EMAIL PROTECTED]> writes: > Jacek Generowicz wrote: > > "Anna" <[EMAIL PROTECTED]> writes: > > > >>But first, wouldn't something like: > >> > >>[x+1 for x in seq] > >> > >>be even clearer? > > I'm glad you mentioned that. [...] > > > As to whether it is clearer. That depends. I wou

Re: Securing a future for anonymous functions in Python

2005-01-11 Thread Jacek Generowicz
Steve Holden <[EMAIL PROTECTED]> writes: > Well, I suspect that Church originally chose lambda precisely because > of its meaninglessness, IAANM, Church didn't choose lambda at all. He chose to put a "hat" (like a circumflex accent) above the bound name. Then, because of some typesetting difficul

Re: PyChecker messages

2005-01-11 Thread Eric Brunel
Frans Englich wrote: Hello, I take PyChecker partly as an recommender of good coding practice, but I cannot make sense of some of the messages. For example: runner.py:878: Function (main) has too many lines (201) What does this mean? Cannot functions be large? Or is it simply an advice that func

Re: Python Operating System???

2005-01-11 Thread Roose
> Huh? I'm just baffled why you think writing a scheduler in an OS is > harder than writing one in an application. You have some means of > doing a coroutine switch in one situation, and some means of doing a > hardware context switch in the other. Aside from that the methods are > about the sa

Re: Python & unicode

2005-01-11 Thread michele . simionato
Uhm ... >>> class C(object): ... pass ... >>> setattr(C, "è", "The letter è") >>> getattr(C, "è") 'The letter \xe8' ;-) Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Command line and GUI tools : need a single threading solution

2005-01-11 Thread Adrian Casey
Phil Thompson wrote: >> I have a collection of multi-threaded command line tools which I want >> wrap a >> PyQt gui around. I'm using queues to route messages from the command >> line tools to the PyQt gui. The command line tools use python threads to >> do >> their work. The gui uses a QThread

Re: Securing a future for anonymous functions in Python

2005-01-11 Thread michele . simionato
Jacek: > Given a population with previous exposure to computer programming, my > money is on the map-lambda version. But this last point is mostly > irrelevant. The fact is that you cannot program computers without > doing a bit of learning ... and the lambda, map and friends really do > not take a

Re: Python & unicode

2005-01-11 Thread michele . simionato
I forgot to add the following: >>> setattr(C, "è", u"The letter è") >>> getattr(C, "è") u'The letter \xe8' >>> print getattr(C, "è") The letter è Python identifiers can be generic strings, including Latin-1 characters; they cannot be unicode strings, however: >>> setattr(C, u"è", "The letter è")

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-11 Thread Nick Coghlan
Nick Coghlan wrote: Semantics - The code:: with: translates to:: def unique_name(): unique_name() Bleh. Not only was my proposed grammar change wrong, my suggested semantics are wrong, too. Raise your hand if you can see the problem with applying the above semantics to the

Re: PyChecker messages

2005-01-11 Thread Sylvain Thenault
On Tue, 11 Jan 2005 06:54:54 +, Frans Englich wrote: > Hello, Hi > I take PyChecker partly as an recommender of good coding practice You may alos be interested by Pylint [1]. Pylint is less advanced in bug detection than pychecker, but imho its good coding practice detection is more advan

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-11 Thread Andrey Tatarinov
Nick Coghlan wrote: Semantics - The code:: with: translates to:: def unique_name(): unique_name() Bleh. Not only was my proposed grammar change wrong, my suggested semantics are wrong, too. Raise your hand if you can see the problem with applying the above semantics to the

python and macros (again) [Was: python3: 'where' keyword]

2005-01-11 Thread michele . simionato
Paul Rubin wrote: > How about macros? Some pretty horrible things have been done in C > programs with the C preprocessor. But there's a movememnt afloat to > add hygienic macros to Python. Got any thoughts about that? "Movement" seems quite an exaggeration. Maybe 2-3 people made some experiments,

Re: Port blocking

2005-01-11 Thread Mark Carter
Ed Leafe wrote: On Jan 10, 2005, at 8:00 PM, Steve Holden wrote: There isn't, IMHO, anything with the polish of (say) Microsoft Access, or even Microsoft SQL Server's less brilliant interfaces. Some things Microsoft *can* do well, it's a shame they didn't just stick to the knitting. Though

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-11 Thread Nick Coghlan
Nick Coghlan wrote: Nick Coghlan wrote: Semantics - The code:: with: translates to:: def unique_name(): unique_name() Bleh. Not only was my proposed grammar change wrong, my suggested semantics are wrong, too. Raise your hand if you can see the problem with applying the abo

Re: 20050110: string join, substring, length

2005-01-11 Thread Jürgen Exner
Xah Lee wrote: [...] > # perldoc -tf substr Is there a specific reason why you are 'ugly-printing' the doc pages? >From 'perldoc perldoc': -t text output Display docs using plain text converter, instead of nroff. This may be faster, but it won't look as nice. jue -- htt

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-11 Thread Nick Coghlan
Andrey Tatarinov wrote: afair you told yourself that var = where: translates to: def unique_name(): return var = unique_name() in this case class gets unique_name() function? is it that bad? No, I wasn't thinking clearly and saw problems that weren't there. However, you're right tha

Re: Securing a future for anonymous functions in Python

2005-01-11 Thread Bengt Richter
On Mon, 10 Jan 2005 21:15:50 -0500, Tim Peters <[EMAIL PROTECTED]> wrote: >... > >[Anna] >>> BTW - I am *quite* happy with the proposal for "where:" syntax - I >>> think it handles the problems I have with lambda quite handily. > >[Steve Holden] >> Whereas I find it to be an excrescence, proving (

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-11 Thread Nick Coghlan
Andrey Tatarinov wrote: I think using 'with' keyword can cause some ambiguity. for example I would surely try to write >>> x = a+b with self: >>> b = member and using with at the end of block brings more ambiguity: >>> stmt1() >>> stmt2() >>> with self: >>> member = stmt3() compare

here document

2005-01-11 Thread Nader Emami
L.S., Would somebody help me how i can write the 'here document' in Python script please? I have a csh script in which a program is invoked with some argument in the form of here document: /bin/exe.x << End_Here CategorY = GRIB etc. End_Here I translate this script to Python and i don't know how

Re: Statement local namespaces summary (was Re: python3: 'where' keyword)

2005-01-11 Thread Andrey Tatarinov
So of the four keywords suggested so far ('where', 'with', 'in', 'using'), I'd currently vote for 'using' with 'where' a fairly close second. My vote goes to 'using' because it has a fairly clear meaning ('execute the statement using this extra information'), and doesn't have the conflicting ex

Re: here document

2005-01-11 Thread harold fellermann
On 11.01.2005, at 11:34, Nader Emami wrote: Would somebody help me how i can write the 'here document' in Python script please? I have a csh script in which a program is invoked with some argument in the form of here document: /bin/exe.x << End_Here CategorY = GRIB etc. End_Here I translate this

Re: The limitation of the Photon Hypothesis

2005-01-11 Thread Jacek Generowicz
Steve Holden <[EMAIL PROTECTED]> writes: > Steve Horsley wrote: > > > Also, I think you probably accidentally posted to the wrong > > newsgroup. > > No, he deliberately posted to the wrong newsgroup. Heh ... I initially read the subject line as "The limitation of the Python Hypothesis". -- http

"Architecture of Python" was removed ?

2005-01-11 Thread cr999
I found the "Architecture of Python" ( http://wiki.cs.uiuc.edu/cs427/PYTHON By Jim Jackson, Kar-Han Tan )is very useful for my understanding of the Python's architecture. But I found the link is not link to that document today. It seems that the document was removed. Who knows what happened? Do

Re: Securing a future for anonymous functions in Python

2005-01-11 Thread Nick Coghlan
Tim Peters wrote: LIke it or not, it doesn't seem as strained as trying to pile more gimmicks on Python expressions. Some of us are piling gimmicks on statements, not expressions :) And I'm looking for out-of-order code execution as well as local namespaces, so the let/in syntax wouldn't help much

Frameworks for database/forms applications?

2005-01-11 Thread Wolfgang Keller
Hello, apart from GNUe (forms) and Dabo, what other "Delphi-lookalike" Python frameworks are there for typical forms-oriented database applications? It's not that the above mentioned are not enough for me, I just want to get a candidate list that is as exhaustive as possible for my evaluation...

Upgraded to python2.3 but httpd taking old version

2005-01-11 Thread Gurpreet Sachdeva
I upgraded my python to 2.3 from 2.2 but Apache (V 2.0.4) is taking old libraries for processing. I also made a soft link redirecting the old files to new files but of no help... These error logs shows that it is still using 2.2 :o( [Tue Jan 11 16:18:45 2005] [error] [client 127.0.0.1] import

Re: Securing a future for anonymous functions in Python

2005-01-11 Thread Carl Banks
Tim Peters wrote: > ... > > [Anna] > >> BTW - I am *quite* happy with the proposal for "where:" syntax - I > >> think it handles the problems I have with lambda quite handily. > > [Steve Holden] > > Whereas I find it to be an excrescence, proving (I suppose) that one > > man's meat is another perso

Re: here document

2005-01-11 Thread Roland Heiber
harold fellermann wrote: f = open("/bin/exe.x","w") print >>f , """CategoryY = GRIB etc. """ This would overwrite the existing /bin/exe.x ... HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & unicode

2005-01-11 Thread P
Michel Claveau - abstraction mÃta-galactique non triviale en fuite perpÃtuelle. wrote: Hi ! If Python is Ok with Unicode, why the next script not run ? # -*- coding: utf-8 -*- def Ñ(toto): return(toto*3) Because the coding is only supported in string literals. But I'm not sure exactly w

Re: shutil.move has a mind of its own

2005-01-11 Thread Daniel Bickett
Oh, I'm sorry, that was my mistake. The example contained that error, but my code does not. Daniel Bickett -- http://mail.python.org/mailman/listinfo/python-list

Checking for X availability

2005-01-11 Thread Flavio codeco coelho
I have a program that uses pythondialog for its UI. Pythondialog is a wrapper of the shell dialog and xdialog libs. But I would like for it to switch between using Dialog ( when X is not available ) and xdialog (when X is available) So my question is: how can I check for the availability of X?

[csv module] duplication of end of line character in output file generated

2005-01-11 Thread simon.alexandre
Hi all, I use csv module included in python 2.3. I use the writer and encouter the following problem: in my output file (.csv) there is a duplication of the end of line character, so when I open the csv file in Ms-Excel a blank line is inserted between each data line. OS: W2k Someone has an idea

Re: Uploading files

2005-01-11 Thread Peter Mott
Thanks for this. Peter "Robert Brewer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Peter Mott wrote: > If you upload a file using the cgi module is there any > way to discover the file name that the user submitted > as well as the file data? I've googled till I squint > but I can

Re: [csv module] duplication of end of line character in output file generated

2005-01-11 Thread Peter Otten
simon.alexandre wrote: > I use csv module included in python 2.3. I use the writer and encouter the > following problem: in my output file (.csv) there is a duplication of the > end of line character, so when I open the csv file in Ms-Excel a blank > line is inserted between each data line. > > O

Re: Checking for X availability

2005-01-11 Thread Nils Nordman
On Tue, Jan 11, 2005 at 03:32:01AM -0800, Flavio codeco coelho wrote: > So my question is: how can I check for the availability of X? i.e., > How will my program know if its running in a text only console or in > console window over X? Well, one way to do it is to check whether the environment var

Re: here document

2005-01-11 Thread Craig Ringer
On Tue, 2005-01-11 at 18:46, harold fellermann wrote: > On 11.01.2005, at 11:34, Nader Emami wrote: > > Would somebody help me how i can write the 'here document' in > > Python script please? I have a csh script in which a program > > is invoked with some argument in the form of here document: > >

Re: "Architecture of Python" was removed ?

2005-01-11 Thread Nick Coghlan
cr999 wrote: > I found the "Architecture of Python" ( http://wiki.cs.uiuc.edu/cs427/PYTHON > By Jim Jackson, Kar-Han Tan )is very useful for my understanding of the > Python's architecture. But I found the link is not link to that document > today. It seems that the document was removed. Who kno

Re: else condition in list comprehension

2005-01-11 Thread Nick Coghlan
Dan Bishop wrote: Luis M. Gonzalez wrote: Hi there, I'd like to know if there is a way to add and else condition into a list comprehension. I'm sure that I read somewhere an easy way to do it, but I forgot it and now I can't find it... for example: z=[i+2 for i in range(10) if i%2==0] what if I wan

Re: Python & unicode

2005-01-11 Thread Kent Johnson
[EMAIL PROTECTED] wrote: I forgot to add the following: setattr(C, "Ã", u"The letter Ã") getattr(C, "Ã") u'The letter \xe8' print getattr(C, "Ã") The letter à But try this: >>> C.à File "", line 1 C.â ^ SyntaxError: invalid syntax Python identifiers can be generic strings, including

Re: SuSE 9.1: updating to python-2.4

2005-01-11 Thread Peter Otten
Torsten Mohr wrote: > along with my distribution SuSE 9.1 came python 2.3.3. > > I'd like to update to 2.4 now, is this an easy thing to do > or will lots of installed modules refuse to work then? > > Is there an easy way to find out what i need to update? I shied away from a full upgrade and i

Re: [csv module] duplication of end of line character in output file generated

2005-01-11 Thread Kent Johnson
simon.alexandre wrote: Hi all, I use csv module included in python 2.3. I use the writer and encouter the following problem: in my output file (.csv) there is a duplication of the end of line character, so when I open the csv file in Ms-Excel a blank line is inserted between each data line. From th

Re: [csv module] duplication of end of line character in output file generated

2005-01-11 Thread simon.alexandre
ok thanks it works S. "Kent Johnson" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > simon.alexandre wrote: > > Hi all, > > > > I use csv module included in python 2.3. I use the writer and encouter the > > following problem: in my output file (.csv) there is a duplicatio

including folders with McMillan Installer

2005-01-11 Thread Linda Eyambe
Hi everyone, After months of hacking i managed to get my python software to work properly, and have even managed to turn it into an exe with Mcmillan's Installer  (ran into a LookupError with py2exe so i tossed it).   Anyway, now i'm wondering how to include entire folders and their content

Exception not captured

2005-01-11 Thread Miki Tebeka
Hello All, Can someone please explain how is the following code fragment possible? (If you're interested I can place the whole project somewhere). def checkout(dest, log): '''Get latest version from SCM client - SCM client to use dest - Destination directory ''' try:

RE: Writing huve ge Sets() to disk

2005-01-11 Thread Batista, Facundo
Title: RE: Writing huve ge Sets() to disk [Martin MOKREJÅ] #- When importing data from a flatfile into mysql table, there's an #- option to delay indexing to the very last moment, when all keys are #- loaded (it doesn't make sense to re-create index after each new #- row into table is added)

Re: fetching method names from a class, and the parameter list from a methodRe: fetching method names from a class, and the parameter list from a method

2005-01-11 Thread Philippe C. Martin
>>> import inspect >>> help(inspect) Thanks, I have not seen the func params yet, but the default values are so Regards, Philippe -- *** Philippe C. Martin SnakeCard LLC www.snakecard.com *** -- http://mail.python.org/mailman/listinfo/py

Re: Ranting about the state of Python IDEs for Windows

2005-01-11 Thread Nick Vargish
"AkioIto" <[EMAIL PROTECTED]> writes: > Look at http://www.pspad.com/en/index.html. Thanks for the tip, looks perfect for the flash memory toolkit, since it can just run from the directory it was unpacked into. Nick -- # sigmask || 0.2 || 20030107 || public domain || feed this to a p

Re: Exception not captured

2005-01-11 Thread Peter Otten
Miki Tebeka wrote: > Hello All, > > Can someone please explain how is the following code fragment possible? > (If you're interested I can place the whole project somewhere). > > def checkout(dest, log): > '''Get latest version from SCM > > client - SCM client to use > dest -

Re: Upgraded to python2.3 but httpd taking old version

2005-01-11 Thread Jim
Gurpreet Sachdeva wrote: > I upgraded my python to 2.3 from 2.2 but > [Tue Jan 11 16:18:45 2005] [error] [client 127.0.0.1] import cgi > [Tue Jan 11 16:18:45 2005] [error] [client 127.0.0.1] File > "/usr/lib/python2.2/cgi.py", line 38, in ? Does the first line of your file say #!/usr/bin/pyt

Re: Locale confusion

2005-01-11 Thread Serge . Orlov
Jorgen Grahn wrote: [snip] > > frailea> cat foo > import locale > print locale.getlocale() > locale.setlocale(locale.LC_CTYPE) > print locale.getlocale() > > When I paste it into an interactive Python session, the locale is already > set up correctly (which is what I suppose interactive mode /shou

Re: Exception not captured

2005-01-11 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Miki Tebeka <[EMAIL PROTECTED]> wrote: > print SCMError is e.__class__ > raise SystemExit > > I get to the second "except" clause, and the printout is: > /home/mikit/work/nightly/scm/common.py:3 > /home/mikit/work/nightly/scm/common.py:3 > False >

Re: embedded scripts debugging

2005-01-11 Thread Andrey Tatarinov
Miki Tebeka wrote: So the question is: Is there suitable library for simple python gui debugger, or may be there are some other techniques for debugging embedded scripts? What I usually do is add from pdb import set_trace in the embedded module somewhere and then add a call to set_trace (brea

Re: Python & unicode

2005-01-11 Thread Serge . Orlov
Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle. wrote: > Hi ! > > >>> and plain Latin letters > > But not all letters (no : é à ç à ê ö ñ etc.) > > > > Therefore, the Python's support of Unicode is... limited. > So is the support of Unicode in virtually every comp

Re: Old Paranoia Game in Python

2005-01-11 Thread Paul McGuire
"McBooCzech" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Newbie in Python. > I did copy the whole script form the web and save it as para1.py. I did > download pyparsing module and save it to > C:\\Python23\\Lib\\pyparsing122. > I did run following script: > > import sys > sys.pat

Re: [Python-Dev] PEP 246, redux

2005-01-11 Thread Nick Coghlan
Alex Martelli wrote: "I really wish the language had private inheritance because I'm using Abstract as a base just for code reuse" Funny you should say that. . . what about a __nonconformant__ entry that accepts a list of base classes that is used to indicate inheritance without a proper is-a r

Re: Python serial data aquisition

2005-01-11 Thread Diez B. Roggisch
> It all looks pretty god but there is a couple of things I still don't > understand, 1) in Steve's solution (which seems equivalent to your > own), he does the masking, shifts by seven, and then sums the two > numbers while you, instead of summing, use a logical or. How can these > operations be

Re: Exception not captured

2005-01-11 Thread Nick Coghlan
Miki Tebeka wrote: I get to the second "except" clause, and the printout is: /home/mikit/work/nightly/scm/common.py:3 /home/mikit/work/nightly/scm/common.py:3 False How is this possible? Is line 3 inside a function? Then the class will be recreated anew each time the function is run. Has common.p

Re: why not datetime.strptime() ?

2005-01-11 Thread Skip Montanaro
Josh> OK, it was pretty straightforward. Thanks for the direction. Glad to help. Josh> To whom should I send the patch (attached)? Patches should be posted to SourceForge using this form: http://sourceforge.net/tracker/?func=add&group_id=5470&atid=305470 Note that you will have to

Re: Python & unicode

2005-01-11 Thread michele . simionato
Kent: > I don't think so. You have hacked an attribute with latin-1 characters in it, but you > haven't actually created an identifier. No, I really created an identifier. For instance I can create a global name in this way: >>> globals()["è"]=1 >>> globals()["è"] 1 > According to the language r

Re: Importing Problem on Windows

2005-01-11 Thread brolewis
I launched the interpreter shell from the same directory in both Windows and Linux before posting. That's what sent the red flag up for me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 and os.open question?

2005-01-11 Thread Antoon Pardon
Op 2005-01-11, Eino Mäkitalo schreef <[EMAIL PROTECTED]>: > I just test in Windows XP with Python 2.4 > > I'd like to create a file with exclusive flag. Why? What is it about the exclusive flag that makes you like to use it? > If file exist I try to use it, if not I'd like to create it. If you w

Gecko bindings for Python?

2005-01-11 Thread Cordula's Web
Hello, I'd like to use the Gecko engine in GTK+ or Qt programs written in Python. Could you recommend a module for this? A tutorial to get started? I didn't find anything useful, but I may have been looking in all the wrong places... :) Thanks, -cpghost. -- Cordula's Web. http://www.cordula.ws/

Re: Python 2.4 and os.open question?

2005-01-11 Thread Eino Mäkitalo
Antoon Pardon wrote: Why? What is it about the exclusive flag that makes you like to use it? Ok. Thanks, I misunderstood the meaning of flag. What I' like to do is to open file and keep it exclusive locked for me. Apparently this flag is not for me. Eino Mäkitalo -- http://mail.python.org/mailman/l

Re: Importing Problem on Windows

2005-01-11 Thread Peter Otten
brolewis wrote: > I have a directory that has two files in it: > > parse.py > parser.py > > parse.py imports a function from parser.py and uses it to parse out the > needed information. On Linux, the following code works without a > problem: > > parse.py, line 1: > from parser import regexsearc

Re: else condition in list comprehension

2005-01-11 Thread Anthony
On Mon, 10 Jan 2005 09:13:17 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: > Luis M. Gonzalez wrote: > > It's me wrote: > >>> z = [i + (2, -2)[i % 2] for i in range(10)] > >> > >> But then why would you want to use such feature? Wouldn't that make > >> the code much harder to understand ... > >

Re: OT: MoinMoin and Mediawiki?

2005-01-11 Thread Alexander Schremmer
On 10 Jan 2005 18:45:16 -0800, Paul Rubin wrote: > I need to set up a wiki for a small group. I've played with MoinMoin > a little bit and it's reasonably straightforward to set up, but > limited in capabilities and uses BogusMarkupConventions. At which point do you see limitations? And what of

Python 2.4 and os.open question?

2005-01-11 Thread Eino Mäkitalo
I just test in Windows XP with Python 2.4 I'd like to create a file with exclusive flag. If file exist I try to use it, if not I'd like to create it. Python (and underlying library) works differently with/without O_EXCL flag. Is this okay. How I should use this. Has somebody manual :-) ? Eino Mäk

Re: Python serial data aquisition

2005-01-11 Thread Flavio codeco coelho
[EMAIL PROTECTED] (Bengt Richter) wrote in message news:<[EMAIL PROTECTED]>... > On 9 Jan 2005 14:13:28 -0800, [EMAIL PROTECTED] (Flavio codeco coelho) wrote: > > >Hi, > > > >I am using pyserial to acquire data from an A/D converter plugged to > >my serial port. > > > >my hardware represents analo

Windows GUIs from Python

2005-01-11 Thread Bob Swerdlow
Anyone have opinions about whether we will be better off using PythonNet or wxPython for the GUI layer of our application on Windows? Our code is all Python and is now running on Mac OS X with PyObjC and Cocoa, which works very well. Our goal is not necessarily to move to a cross-platform sol

Re: why not datetime.strptime() ?

2005-01-11 Thread josh
David M. Cookie writes: > You don't check for errors: an exception being thrown by > PyObject_CallMethod will return obj == NULL. Oops, missed that one. Thanks. > If there's a module in sys.path called time that overrides the stdlib > time, things will fail, and you should be able to catch that.

os.spawnv & stdin trouble

2005-01-11 Thread Jelle Feringa // EZCT / Paris
##I know I should be using 2.4 and os.Popen, I know, I know… ##However, since most modules I need, I’m using 2.3 for this script     I’m having troubles executing a shell script. The thing is that I’m produing material and geometry files that need to be compiled to a binary description

Re: shutil.move has a mind of its own

2005-01-11 Thread Neil Benn
Daniel Bickett wrote: Oh, I'm sorry, that was my mistake. The example contained that error, but my code does not. Daniel Bickett To be fair though - I would have expected the method to throw an error rather than default to cwd. Neil -- Neil Benn Senior Automation Engineer Cenix BioScience BioI

Re: OT: MoinMoin and Mediawiki?

2005-01-11 Thread Paul Rubin
Alexander Schremmer <[EMAIL PROTECTED]> writes: > > I need to set up a wiki for a small group. I've played with MoinMoin > > a little bit and it's reasonably straightforward to set up, but > > limited in capabilities and uses BogusMarkupConventions. > > At which point do you see limitations? It

Re: tuples vs lists

2005-01-11 Thread Reinhold Birkenfeld
Antoon Pardon wrote: > Op 2005-01-10, Bruno Desthuilliers schreef <[EMAIL PROTECTED]>: >> Antoon Pardon a écrit : >>> Op 2005-01-08, Bruno Desthuilliers schreef <[EMAIL PROTECTED]>: >>> worzel a écrit : >I get what the difference is between a tuple and a list, but why would I >ev

Re: os.spawnv & stdin trouble

2005-01-11 Thread Denis S. Otkidach
On Tue, 11 Jan 2005 17:31:07 +0100 "Jelle Feringa // EZCT / Paris" <[EMAIL PROTECTED]> wrote: > ##I know I should be using 2.4 and os.Popen, I know, I know. > ##However, since most modules I need, I'm using 2.3 for this script There is os.popen in 2.3, as well as popen2 module. Did you mean subp

Re: OT: MoinMoin and Mediawiki?

2005-01-11 Thread Richie Hindle
[Paul] > [MoinMoin] doesn't have [...] automatic update notification for > specific pages of your choice Yes it does. See http://entrian.com/sbwiki for example - register there and you'll see in your preferences "Subscribed wiki pages (one regex per line)" > The BogusMixedCaseLinkNames. I'd ra

os.spawn & stdOUT trouble

2005-01-11 Thread Jelle Feringa // EZCT / Paris
Yikes, how painful, I meant stdOUT > trouble instead of stdin... Awefully sorry Cheers, Jelle ##thanks for pointing that out Denis! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & unicode

2005-01-11 Thread Kent Johnson
[EMAIL PROTECTED] wrote: Kent: I don't think so. You have hacked an attribute with latin-1 characters in it, but you haven't actually created an identifier. No, I really created an identifier. For instance I can create a global name in this way: globals()["è"]=1 globals()["è"] 1 Maybe I'm splitti

Time script help sought!

2005-01-11 Thread kpp9c
I am kind of in a bit of a jam (okay a big jam) and i was hoping that someone here could give me a quick hand. I had a few pages of time calculations to do. So, i just started in on them typing them in my time calculator and writing them in by hand. Now i realize, that i really need a script to d

Re: OT: MoinMoin and Mediawiki?

2005-01-11 Thread Paul Rubin
Richie Hindle <[EMAIL PROTECTED]> writes: > > [MoinMoin] doesn't have [...] automatic update notification for > > specific pages of your choice > > Yes it does. See http://entrian.com/sbwiki for example - register there > and you'll see in your preferences "Subscribed wiki pages (one regex per O

Re: why not datetime.strptime() ?

2005-01-11 Thread josh
On Tue, Jan 11, 2005 at 08:56:33AM -0600, Skip Montanaro wrote: > * The seventh item returned from time.strptime() is the day of the week. > You're passing it into the microsecond arg of the datetime constructor Thanks! > and ignoring the timezone info (ninth item returned from >

Re: Time script help sought!

2005-01-11 Thread Paul Rubin
"kpp9c" <[EMAIL PROTECTED]> writes: > These are analog tapes that were digitized (on to CD or a digital tape) > that have now been exported as individual files that are meant to be > part of an on-line audio archive. ... > I was hoping and > praying that some one here was feeling generous and show

Re: Windows GUIs from Python

2005-01-11 Thread Thomas Bartkus
"Bob Swerdlow" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Anyone have opinions about whether we will be better off using PythonNet or > wxPython for the GUI layer of our application on Windows? Our code is all > Python and is now running on Mac OS X with PyObjC and Cocoa, which

Re: Checking for X availability

2005-01-11 Thread Jeremy Bowers
On Tue, 11 Jan 2005 03:32:01 -0800, Flavio codeco coelho wrote: > So my question is: how can I check for the availability of X? i.e., How > will my program know if its running in a text only console or in console > window over X? The first thing that leaps to mind is... try it. If it fails, switch

Re: complex numbers

2005-01-11 Thread Anno Siegel
It's me <[EMAIL PROTECTED]> wrote in comp.lang.perl.misc: [reply moved to bottom into context] > "Jürgen Exner" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > [EMAIL PROTECTED] wrote: > > > #python supports complex numbers. > > [...] > > > > So? > > > > The world would come to

Re: Time script help sought!

2005-01-11 Thread kpp9c
Yes, Ultimately it will be part of a large digital archive available for researchers on site and eventually probably on-line for the New York Public Library. It is a huge undertaking and most of the soundfiles have been made. I (we) are struggling with the sheer size of the documentation Sorr

Re: else condition in list comprehension

2005-01-11 Thread Serhiy Storchaka1659322541
Nick Coghlan wrote: Dan Bishop wrote: Luis M. Gonzalez wrote: Hi there, I'd like to know if there is a way to add and else condition into a list comprehension. I'm sure that I read somewhere an easy way to do it, but I forgot it and now I can't find it... for example: z=[i+2 for i in range(10) if i

exporting from Tkinter Canvas object in PNG

2005-01-11 Thread Nicolas Pourcelot
Hello, I'm new to this mailing list and quite to Pyhon too. I would like to know how to export the contain of the Canvas object (Tkinter) in a PNG file ? Thanks :) Nicolas Pourcelot -- http://mail.python.org/mailman/listinfo/python-list

Re: Python & unicode

2005-01-11 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: Because the coding is only supported in string literals. But I'm not sure exactly why. The why is the same as why we write in English on this newsgroup. Not because English is better, but because that leaves a single language for everyone to use to communicate in. If you

  1   2   3   >