Re: variable declaration

2005-02-08 Thread Alex Martelli
Terry Reedy <[EMAIL PROTECTED]> wrote: > "Brian van den Broek" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Is the right way to understand it in this vicinity: > > In the vicinity, but not quite exact > > >At compile time (by which I mean when the Python bytecode is built)

Re: Confused with methods

2005-02-08 Thread Antoon Pardon
Op 2005-02-07, Alex Martelli schreef <[EMAIL PROTECTED]>: > Antoon Pardon <[EMAIL PROTECTED]> wrote: > >> Yes it is inconsistent with the rest of python. That you found >> a subset in which it is consistent doesn't change that. >> >> And what if you do: >> >> c = C() >> c.f = g >> >> >> The

python connect to server using SSH protocol

2005-02-08 Thread [EMAIL PROTECTED]
How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). Any suggestion? Sincerely Yours, Pujo Aji -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Francis Girard wrote: [I wrote:] In any case, he may be right, and the FSF, Trolltech, and you could all be wrong. Your intention when you use the GPL may be moot if a judge determines that the text itself and copyright law does not support your interpretation. I'm sorry to jump into this thread w

Re: Confused with methods

2005-02-08 Thread Alex Martelli
jfj <[EMAIL PROTECTED]> wrote: > I just realized that I'm trolling. I'm glad you're retracting your earlier assertion that "There is no trolling involved here". Everybody can err, but to admit and apologize takes character: may I offer my warmest handshake. Back when I was a Python newbie (and

Re: Curses on Windows

2005-02-08 Thread Josef Meile
Hi Peter, Last November I posted a message asking for advice on using simple screen handling techniques under Windows. Since then I have been occupied with family / job /Christmas /living and trying to understand curses under linux (it works, seems very complex, sure I'm missing something ...).

Re: Subclassing cElementTree.Element

2005-02-08 Thread Fredrik Lundh
Kent Johnson wrote: > Is it possible to subclass cElementTree.Element? I tried > >>> import cElementTree as et > >>> class Elt(et.Element): > ... pass > ... > Traceback (most recent call last): > File "", line 1, in ? > TypeError: Error when calling the metaclass bases > cannot create

Re: An Ode To My Two Loves

2005-02-08 Thread Peter Maas
Jorgen Grahn schrieb: It's something that worries me frequently -- I feel guilty when I introduce Python into ("force Python upon") an organization. Because I hate having /other/ people's favorite toy languages forced down /my/ throat ... The solution is a multi language glue layer. Software interf

Re: Big development in the GUI realm

2005-02-08 Thread Fredrik Lundh
Robert Kern wrote: > Believe me, I share your frustration every time this issue comes up. However, > I think it's best to > follow Robert Heinlein's maxim: > > "Never attribute to malice what can adequately be explained by stupidity." that's Hanlon, not Heinlein. to be on the safe side, I won

Re: variable declaration

2005-02-08 Thread Fredrik Lundh
Terry Reedy wrote: >>At compile time (by which I mean when the Python bytecode is built) > > Compile time is when the def statement is executed no, that's run time. "def" is an executable statement, just like "print", "for", assignments, "import", etc. the entire module is compiled (to bytecod

Re: Re: Big development in the GUI realm

2005-02-08 Thread Fredrik Lundh
Tim Churches wrote: >> and how exactly are you going to load a DLL from an EXE file with- >> out "mixing, including, or combining" the two? > > You can't, but as long as that "mixing, including, or combining" only occurs > at runtime, > the GPL itself specifically says that is out of scope and th

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Fredrik Lundh wrote: Robert Kern wrote: Believe me, I share your frustration every time this issue comes up. However, I think it's best to follow Robert Heinlein's maxim: "Never attribute to malice what can adequately be explained by stupidity." that's Hanlon, not Heinlein. to be on the safe s

Re: variable declaration

2005-02-08 Thread Nick Coghlan
Antoon Pardon wrote:ons already existing. The compilor might generate a RESTORE instruction. Whether it is done as a LOAD/STORE or a RESTORE, it has to perform the same work - check the name exists in the local namespace, and throw an exception if it doesn't. If it the name does exist, perform a

Re: variable declaration

2005-02-08 Thread Just
In article <[EMAIL PROTECTED]>, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote:ons already existing. > > The compilor might generate a RESTORE instruction. > > Whether it is done as a LOAD/STORE or a RESTORE, it has to perform the same > work > - check the name exists in the loc

Re: variable declaration

2005-02-08 Thread Peter Otten
Fredrik Lundh wrote: > executed. the compiler handles "global" and "from __future__", everything > else is done at runtime. and __debug__, too, it seems: >>> __debug__ False >>> def f(): ... if __debug__: ... global x ... x = 42 ... >>> f() >>> x Traceback (most recent call l

Re: empty classes as c structs?

2005-02-08 Thread Nick Coghlan
Steven Bethard wrote: I wonder if it would be worth adding a descriptor that gives a warning for usage from instances, e.g.: Thinking about it some more, I realised that a class method approach means that 'type(self).method(self,...)' still works as a way to spell the call in a polymorphism frie

Re: variable declaration

2005-02-08 Thread Duncan Booth
Brian van den Broek wrote: > Can it then be further (truly :-) ) said that > > if False: > # thousands of lines of code here > > would effect the structure of the function object's bytecode, but not > its behaviour when run? Or, at most, would cause a performance effect > due to the bytec

Learning Python - resources and ideas

2005-02-08 Thread [EMAIL PROTECTED] (Cody Houston)
Hi. What is the best way to learn Python? None of the local schools near me teach any courses on the topic. Thanks. -- Cody Houston [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: AsciiDoc 6.0.0

2005-02-08 Thread Fuzzyman
Donnal Walter wrote: > Stuart Rackham wrote: > > AsciiDoc > > > > AsciiDoc is an uncomplicated text document format for writing short > > documents, articles, books and UNIX man pages. > > > > AsciiDoc files can be translated to HTML (with or without > > stylesheets), DocBook (articles, b

Re: Big development in the GUI realm

2005-02-08 Thread Fred Pacquier
Robert Kern <[EMAIL PROTECTED]> said : >> that's Hanlon, not Heinlein. to be on the safe side, I won't attempt >> to attribute your mistake to anything. > > Fair enough. The only time I've seen it in dead-tree print was in > Heinlein's _Time Enough For Love_, unattributed to anyone else. > Goo

Learning Python - resources and ideas

2005-02-08 Thread [EMAIL PROTECTED] (Cody Houston)
Hi. What is the best way to learn Python? None of the local schools near me teach any courses on the topic. Thanks. -- Cody Houston [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-08 Thread Antoon Pardon
Op 2005-02-08, Nick Coghlan schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote:ons already existing. >> The compilor might generate a RESTORE instruction. > > Whether it is done as a LOAD/STORE or a RESTORE, it has to perform the same > work > - check the name exists in the local namespace, and t

Re: Big development in the GUI realm

2005-02-08 Thread Fredrik Lundh
Robert Kern wrote: > Fair enough. The only time I've seen it in dead-tree print was in Heinlein's > _Time Enough For > Love_, unattributed to anyone else. if that's true, it would seem that it predates the Hanlon reference by a couple of years: http://www.statusq.org/archives/2001/12/04 o

how to convert 4 bytes into a float ?

2005-02-08 Thread Jean-Baptiste PERIN
I read 4 bytes from a binary file. These bytes represent a floating point number (mantisse exponent form) How can I get a float from these bytes ? -- http://mail.python.org/mailman/listinfo/python-list

Re: variable declaration

2005-02-08 Thread Nick Coghlan
Just wrote: In article <[EMAIL PROTECTED]>, Nick Coghlan <[EMAIL PROTECTED]> wrote: Antoon Pardon wrote:ons already existing. The compilor might generate a RESTORE instruction. Whether it is done as a LOAD/STORE or a RESTORE, it has to perform the same work - check the name exists in the local

Re: Big development in the GUI realm

2005-02-08 Thread Alex Martelli
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > hassle to code, but if your application could dynamically select from > whatever toolkit is available on the machine, you (and I should emphasis > that this is an impersonal/generic "you" I reference) might be able to > argue an exemption from the QT

Re: variable declaration

2005-02-08 Thread Nick Coghlan
Antoon Pardon wrote: I have the impression you are looking at this too much from the view of the current implementation where putting a an entry in a directory is seen as an atomic operation. Yes and no. I *am* looking at it from an implementation point of view, but dictionaries have nothing to do

Re: variable declaration

2005-02-08 Thread Fredrik Lundh
Peter Otten wrote: >> executed. the compiler handles "global" and "from __future__", everything >> else is done at runtime. > > and __debug__, too, it seems: you left out the "python -O" line. __debug__ > False def f(): > ... if __debug__: > ... global x > ... x = 4

Re: how to convert 4 bytes into a float ?

2005-02-08 Thread Alex Martelli
Jean-Baptiste PERIN <[EMAIL PROTECTED]> wrote: > I read 4 bytes from a binary file. > > These bytes represent a floating point number (mantisse exponent form) > > How can I get a float from these bytes ? See the docs for module struct, specifically the struct.unpack function, if the float is in

Re: empty classes as c structs?

2005-02-08 Thread Nick Coghlan
Michael Spencer wrote: Nick Coghlan wrote: The other issue is that a namespace *is* a mutable object, so the default behaviour should be to make a copy I don't follow this argument. Why does mutability demand copy? Given that somedict here is either a throwaway (in the classic bunch applicati

re-entrancy question

2005-02-08 Thread apocalypznow
I have a program that instantiates some objects and runs a main loop. Before the main loop starts, I create a thread that listens to TCP connections on a port. If any connections are made, and depending on the data, I call methods on some of those objects. I am worried that calling methods on

RE: re-entrancy question

2005-02-08 Thread Tim Golden
[apocalypznow] | I have a program that instantiates some objects and runs a main loop. | Before the main loop starts, I create a thread that listens to TCP | connections on a port. If any connections are made, and depending on | the data, I call methods on some of those objects. | | I am worr

variable declaration

2005-02-08 Thread Alexander Zatvornitskiy
Hi, Peter! 05 feb 2005 at 15:28, Peter Otten wrote: >> variable names. You have to move the code into a function, though: $ >> cat epsilon.py ...skipped... $ pychecker epsilon.py epsilon.py:6: >> Local variable (epselon) not used Well, I can change it a little to >> pass this check. Just add

Re: An Ode To My Two Loves

2005-02-08 Thread Alex Martelli
Jorgen Grahn <[EMAIL PROTECTED]> wrote: > I also notice I forget one language after doing another for a few weeks. And > it's not just brackets and semicolons -- I also try to use one language's > idioms in the other. People who /claim/ they have no trouble switching > languages seem to have the s

Re: empty classes as c structs?

2005-02-08 Thread Alex Martelli
Nick Coghlan <[EMAIL PROTECTED]> wrote: > > We could use __add__, instead for combining namespaces > > Update already let's us combine namespaces. To create a new object that merges > two namespaces do: >namespace.update(namespace(ns_1), ns_2) One thing I'd like to see in namespaces is _chai

Re: how to convert 4 bytes into a float ?

2005-02-08 Thread Jean-Baptiste PERIN
Alex Martelli a écrit : Jean-Baptiste PERIN <[EMAIL PROTECTED]> wrote: I read 4 bytes from a binary file. These bytes represent a floating point number (mantisse exponent form) How can I get a float from these bytes ? See the docs for module struct, specifically the struct.unpack function, if the

Choosing the right parser for parsing C headers

2005-02-08 Thread Jean de Largentaye
Hi, I need to parse a subset of C (a header file), and generate some unit tests for the functions listed in it. I thus need to parse the code, then rewrite function calls with wrong parameters. What I call "shaking the broken tree" :) I chose to make my UT-generator in Python 2.4. However, I am no

Re: Big development in the GUI realm

2005-02-08 Thread Robert Kern
Fredrik Lundh wrote: Robert Kern wrote: Fair enough. The only time I've seen it in dead-tree print was in Heinlein's _Time Enough For Love_, unattributed to anyone else. if that's true, it would seem that it predates the Hanlon reference by a couple of years: http://www.statusq.org/archives/

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Fredrik Lundh
Jean de Largentaye wrote: > I need to parse a subset of C (a header file), and generate some unit > tests for the functions listed in it. I thus need to parse the code, > then rewrite function calls with wrong parameters. What I call "shaking > the broken tree" :) > > I chose to make my UT-generat

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Miki Tebeka
Hello Jean, > - ply: > Lex / Yacc for python! Tackle the Beast! Syntax processing looks mini_c is a C compiler written using ply. You can just use it as is. http://people.cs.uchicago.edu/~varmaa/mini_c/ HTH. -- Miki Tebeka <

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Thomas Heller
"Jean de Largentaye" <[EMAIL PROTECTED]> writes: > Hi, > > I need to parse a subset of C (a header file), and generate some unit > tests for the functions listed in it. I thus need to parse the code, > then rewrite function calls with wrong parameters. What I call "shaking > the broken tree" :)

Re: Big development in the GUI realm

2005-02-08 Thread Joe
On Tue, 8 Feb 2005 10:01:51 +0100, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >except that if *you* set things up so the code is combined when run, *you* are >copying, distributing, and/or modifying the program in order to mix, include >and/or >combine your work with the GPL:ed work. > >if you lea

Re: Curses on Windows

2005-02-08 Thread Martin Miller
I just tried the flangy.com link and it appears to be OK now. Martin Peter wrote: > ... > One reply (in fact the only reply - thanks Tim Golden) suggested I > look at http://flangy.com/dev/python/curses/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Fredrik Lundh
Thomas Heller wrote: > IMO, for parsing 'real-world' C header files, nothing can beat gccxml. no free tool, at least. if a budget is involved, I'd recommend checking out the Edison Design Group stuff. -- http://mail.python.org/mailman/listinfo/python-list

Re: email extraction program

2005-02-08 Thread Miki Tebeka
Hello Paul, >Can you help me create an ebay email extraction program ? > >I have some ebay scripts which worked and extracted emails from >ebay.com but these days don't work. http://www.catb.org/~esr/faqs/smart-questions.html HTH. -- --

Re: how to convert 4 bytes into a float ?

2005-02-08 Thread Alex Martelli
Jean-Baptiste PERIN <[EMAIL PROTECTED]> wrote: > I'll have to handle Intel-PC, DEC-VAX and MIPS-SUN/SGI numbers > So I can't escape the painful bit-twiddling I don't recall for sure (even though I did my thesis on a Vax, 25 years ago!) but I think you _might_ be lucky -- VAX used the binary forma

Re: variable declaration

2005-02-08 Thread Antoon Pardon
Op 2005-02-08, Nick Coghlan schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> I have the impression you are looking at this too much from the view >> of the current implementation where putting a an entry in >> a directory is seen as an atomic operation. > > Yes and no. I *am* looking at it fr

Re: Problems with python and threads under Freebsd

2005-02-08 Thread Andrew MacIntyre
snacktime wrote: After debugging this some more I narrowed it down to an encryption function in pycrypto that is triggering the segfault. I posted a bug report. Don't really know enough about threading to know whether it's a python bug or a pycrypto bug, but I'll let someone else sort that out no

Re: def __init__ question in a class definition

2005-02-08 Thread Steve Holden
M.E.Farmer wrote: Steve Holden wrote: M.E.Farmer wrote: Jeffrey Borkent Systems Specialist Information Technology Services With that kind of credentials, and the fact that you claim you are a system specialists I don't know you have me worried already. I guess for you I just say RTFM. If you

Re: how to convert 4 bytes into a float ?

2005-02-08 Thread Fredrik Lundh
Alex Martelli wrote: > I don't recall for sure (even though I did my thesis on a Vax, 25 years > ago!) but I think you _might_ be lucky -- VAX used the binary format > that became the IEEE standard, if I recall correctly. iirc, you have to swap bytes around. the code on this page might be helpfu

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Jean de Largentaye
GCC-XML looks like a very interesting alternative, as Python includes tools to parse XML. The mini-C compiler looks like a step in the right direction for me. I'm going to look into that. I'm not comfortable with C++ yet, and am not sure how I'd use Pyste. Thanks for the information guys, you've b

User Identification

2005-02-08 Thread Bob Parnes
I have a python program on a server of an all-linux network. It needs to record the user name running it. Is there a way for the program to extract the name from the system without a separate log-in dialog? Bob Parnes -- Bob Parnes [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/p

Re: empty classes as c structs?

2005-02-08 Thread Carlos Ribeiro
On Tue, 8 Feb 2005 12:01:23 +0100, Alex Martelli <[EMAIL PROTECTED]> wrote: > Nick Coghlan <[EMAIL PROTECTED]> wrote: > > > > We could use __add__, instead for combining namespaces > > > > Update already let's us combine namespaces. To create a new object that > > merges > > two namespaces do: >

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Fredrik Lundh
Jean de Largentaye wrote: > GCC-XML looks like a very interesting alternative, as Python includes > tools to parse XML. > The mini-C compiler looks like a step in the right direction for me. > I'm going to look into that. > I'm not comfortable with C++ yet, and am not sure how I'd use Pyste. to c

Re: User Identification

2005-02-08 Thread Fredrik Lundh
Bob Parnes wrote: >I have a python program on a server of an all-linux network. It needs to > record the user name running it. Is there a way for the program to extract > the name from the system without a separate log-in dialog? how about: >>> import getpass >>> getpass.getuser() 'gromit'

Re: User Identification

2005-02-08 Thread Laszlo Zsolt Nagy
Bob Parnes wrote: I have a python program on a server of an all-linux network. It needs to record the user name running it. Is there a way for the program to extract the name from the system without a separate log-in dialog? Bob Parnes What about: import os username = os.getlogin() Please see

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Roman Yakovenko
try http://sourceforge.net/projects/pygccxml There are a few examples and nice ( for me ) documentation. Roman On Tue, 8 Feb 2005 13:35:57 +0100, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Jean de Largentaye wrote: > > > GCC-XML looks like a very interesting alternative, as Python includes > > t

How to keep a module with the same name as a module it is importing from importing itself?

2005-02-08 Thread plb
All: I am struggling with an import problem... In my package, myapp, I have a module, logging.py. That module, naturally, imports the library module logging with an 'import logging' statement. However, when I use 'import myapp.logging' in my script, the myapp.logging module tries to import its

Re: re-entrancy question

2005-02-08 Thread Valentino Volonghi aka Dialtone
Tim Golden <[EMAIL PROTECTED]> wrote: > No doubt there are more pertinent answers, but unless this is > a learning exercise, you'd be better off investigating Pyro: > http://pyro.sf.net AFAIK pyro is just a RPC implementation for python whereas Twisted is a completely different beast that happens

Re: User Identification

2005-02-08 Thread Laszlo Zsolt Nagy
how about: import getpass getpass.getuser() 'gromit' Hmm, yours is better. It also works on Windows. :-) I wonder why os.getuser() does not work in Windows - apparently there is a good implementation for Windows. -- _

Re: Big development in the GUI realm

2005-02-08 Thread Kent Johnson
Fredrik Lundh wrote: Robert Kern wrote: Fair enough. The only time I've seen it in dead-tree print was in Heinlein's _Time Enough For Love_, unattributed to anyone else. Amazon.com "search inside the book" finds no hits for "malice" in this book. http://www.amazon.com/gp/reader/0441810764/102-763

RE: re-entrancy question

2005-02-08 Thread Tim Golden
| Tim Golden <[EMAIL PROTECTED]> wrote: | | > No doubt there are more pertinent answers, but unless this is | > a learning exercise, you'd be better off investigating Pyro: | > http://pyro.sf.net | | AFAIK pyro is just a RPC implementation for python whereas | Twisted is a | completely different

Re: python connect to server using SSH protocol

2005-02-08 Thread Laszlo Zsolt Nagy
[EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). In advance, I'm not sure if I understood your problem. SSH is clearly a remote shell. You will be

Handling import conflicts when module has the same name as a library module that it needs to import?

2005-02-08 Thread plb
All: I am struggling with an import problem... In my package, myapp, there is a module called logging. This module, naturally, imports the standard library module logging. However, when I try 'import myapp.logging', the 'import logging' statement appears to be finding the myapp.logging module in

Re: Synchronizing methods of a class

2005-02-08 Thread Diez B. Roggisch
> My Question: > > If I decorate these function references in __class__.__dict__, am I > doing it only for my specific instance of that class or the base class > as well? A class is a class - so yes, all instances are affected. You might want to think about metaclasses for decorating. -- Regards

Handling import conflicts when module has the same name as a library module that it needs to import?

2005-02-08 Thread plb
All: I am struggling with an import problem... In my package, myapp, there is a module called logging. This module, naturally, imports the standard library module logging. However, when I try 'import myapp.logging', the 'import logging' statement appears to be finding the myapp.logging module in

Re: python connect to server using SSH protocol

2005-02-08 Thread P
[EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). Any suggestion? you can use popen around the ssh binary. You man need the pty module if you want to de

Re: User Identification

2005-02-08 Thread Gerhard Haering
On Tue, Feb 08, 2005 at 12:29:48PM -, Bob Parnes wrote: > I have a python program on a server of an all-linux network. It needs to > record the user name running it. Is there a way for the program to extract > the name from the system without a separate log-in dialog? os.environ["USER"] for a

Re: How to keep a module with the same name as a module it is importing from importing itself?

2005-02-08 Thread Laszlo Zsolt Nagy
In my package, myapp, I have a module, logging.py. That module, naturally, imports the library module logging with an 'import logging' statement. However, when I use 'import myapp.logging' in my script, the myapp.logging module tries to import itself rather than the library logging module. How c

Re: python connect to server using SSH protocol

2005-02-08 Thread Simon Anders
Hi Laszlo Zsolt Nagy wrote: [EMAIL PROTECTED] wrote: How can python connect to server which use SSH protocol? Is it easy since my python has to run third party vendor, write data, read data inside the server (supercomputer). In advance, I'm not sure if I understood your problem. SSH is clearly

Re: Is Python as capable as Perl for sysadmin work?

2005-02-08 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "John M. Gabriele" <[EMAIL PROTECTED]> wrote: > I recently posted this sort of question to the c.l.p.m but > didn't get much of a response. I know a little Perl and a > little Python, but master neither at the moment. > > I see that Python is a general purpose OO

iterators instead of callbacks.

2005-02-08 Thread Antoon Pardon
My current understanding is that callbacks are used in a number of places because they predate iterator. But now that we have iterators these would be better suited. I'm thinking about the FTP-lib now where iterator equivallents of retrbinary and retrlines methods may be more easily usable then the

Re: Big development in the GUI realm

2005-02-08 Thread Tim Churches
Fredrik Lundh wrote: Tim Churches wrote: and how exactly are you going to load a DLL from an EXE file with- out "mixing, including, or combining" the two? You can't, but as long as that "mixing, including, or combining" only occurs at runtime, the GPL itself specifically says that is out

Re: Big development in the GUI realm

2005-02-08 Thread Gabriel B.
> > users. For example, from their FAQ, it seems that no precompiled > > binaries will be provided. Support for comercial compilers will not be > > built in, only for gcc (through Cygwin?). > > Isn't this just the same thing with a different spin. There was always > an available distribution for

Re: re-entrancy question

2005-02-08 Thread Valentino Volonghi aka Dialtone
Tim Golden <[EMAIL PROTECTED]> wrote: > Now *where* is there any mention of Twisted, either in the original > post or in my reply? As I read it, the OP is doing something which Ya sorry. I thought this was crossposted but the OP posted 2 different emails to both python-list and twisted-python ML.

RE: re-entrancy question

2005-02-08 Thread Tim Golden
[EMAIL PROTECTED] | | Tim Golden <[EMAIL PROTECTED]> wrote: | | > Now *where* is there any mention of Twisted, either in the original | > post or in my reply? As I read it, the OP is doing something which | | Ya sorry. I thought this was crossposted but the OP posted 2 different | emails to both

trolltech comitment (was:Big development in the GUI realm)

2005-02-08 Thread Gabriel B.
On Mon, 07 Feb 2005 20:56:44 -0800, Courageous <[EMAIL PROTECTED]> wrote: > Follow the copyright holder's wishes. > > That's fair. After all, it's free, so they're doing you a damn > big favor. I'm terrible sorry to extend this topic even furter, but it's silly, not to say dull to think like that

Re: python connect to server using SSH protocol

2005-02-08 Thread Laszlo Zsolt Nagy
import os fi, foe = os.popen4 ('ssh dopey') print >>fi, 'ls' fi.close () # <-- this is annoying for line in foe: print line, foe.close () The above connects to a server, passes the command 'ls', which is executed there, and prints the returned result. However, reading from foe succeeds only

Re: Big development in the GUI realm

2005-02-08 Thread Fredrik Lundh
Tim Churches wrote: >>except that if *you* set things up so the code is combined when run, *you* are >>copying, distributing, and/or modifying the program in order to mix, include >>and/or >>combine your work with the GPL:ed work. >> >>if you leave all that to the user, you're clear. >> > Yes, th

Re: Big development in the GUI realm

2005-02-08 Thread Gabriel B.
> >>Considering the fact that the Qt DLL exist by themselves, that the > >>version used is the one provided by Qt, and that the EXE uses a > >>standard, open way to communicate with it, the above does seem to say > >>this use would be valid. > >> > >> > > > >http://www.gnu.org/licenses/gpl-faq.

Re: PHP Embedded In Python

2005-02-08 Thread Keith
jdonnell wrote: > I'm not sure exactly what your trying to do, but I use php and python > together a lot. I usually call the python script from php with the > passthru function like this: > > $outputFromPy = passthru('/path/to/myScript.py'); > ?> I need to go the other direction. I need to call

Re: Choosing the right parser for parsing C headers

2005-02-08 Thread Jean de Largentaye
That looks cool Roman, however, I'm behind a Corporate Firewall, is there any chance you could send me a cvs snapshot? John -- http://mail.python.org/mailman/listinfo/python-list

Re: Curses on Windows

2005-02-08 Thread rzed
"Martin Miller" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > I just tried the flangy.com link and it appears to be OK now. > > Martin > > > Peter wrote: >> ... >> One reply (in fact the only reply - thanks Tim Golden) suggested I >> look at http://flangy.com/dev/python/cu

Re: [perl-python] text pattern matching, and expressiveness

2005-02-08 Thread Daniel Fackrell
"John Bokma" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Xah Lee wrote: > > > Perl is a language of syntactical variegations. Python on the other > > hand, does not even allow changes in code's indentation, but its > > efficiency and power in expression, with respect to semantics

Re: [perl-python] text pattern matching, and expressiveness

2005-02-08 Thread Diez B. Roggisch
> He (XL) is a troll and admits it. If only he would include that > information up-front in his (IMO worthless) [perl-python] posts, it would > save a lot of effort. He does - all of his posts start with [perl-python]. Now the big question is which community comes up with a better/nicer/shorter/w

Re: ANN: Zeus Programmers Editor V3.94

2005-02-08 Thread Gabriel Cooper
Jussi Jumppanen wrote: The latest release of the Zeus for Windows programmer's editor is now available. So is this mentioned here on the Python mailing list because Zeus was written in Python, or is this just targeted spam for a commerical product? -- http://mail.python.org/mailman/listinfo/python

Loop in list.

2005-02-08 Thread Jim
Where did this type of structure come from: mat = ['a' for i in range(3)]? This will produce a list of three elements but I don't see reference for it in any of the books. -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-08 Thread Jeremy Jones
Jim wrote: Where did this type of structure come from: mat = ['a' for i in range(3)]? This will produce a list of three elements but I don't see reference for it in any of the books. It's called a list comprehension and it appeared in Python 2.0. http://www.amk.ca/python/2.0/index.html#SECTI

Re: Loop in list.

2005-02-08 Thread Fredrik Lundh
"Jim" <[EMAIL PROTECTED]> wrote: > Where did this type of structure come from: > > mat = ['a' for i in range(3)]? > > This will produce a list of three elements but > I don't see reference for it in any of the books. it's called "list comprehension", and was added in Python 2.0. http://w

Re: Basic file operation questions

2005-02-08 Thread Marc Huffnagle
When you read a file with that method, is there an implied close() call on the file? I assume there is, but how is that handled? Caleb Hattingh wrote: Peter, that was very clear, thanks. So not only is for line in file(...): # do stuff the most elegant, it is also the fastest. file.readlines(

Re: Loop in list.

2005-02-08 Thread Diez B. Roggisch
Jim wrote: > Where did this type of structure come from: > > mat = ['a' for i in range(3)]? > > This will produce a list of three elements but > I don't see reference for it in any of the books. Its called a list-comprehension. And as I don't know what books you mean, I can't say if its cov

Re: Loop in list.

2005-02-08 Thread Bill Mill
Jim, That is called a "list comprehension", and it is a feature which appeared in python 2.3 (iirc). Thus if your books are about earlier versions of python, list comprehensions will not be covered. Check out the section of the tutorial about them at http://docs.python.org/tut/node7.html#SECTION0

Re: Loop in list.

2005-02-08 Thread Simon Brunning
On Tue, 08 Feb 2005 06:50:31 -0800 (PST), Jim <[EMAIL PROTECTED]> wrote: > Where did this type of structure come from: > > mat = ['a' for i in range(3)]? > > This will produce a list of three elements but > I don't see reference for it in any of the books. It's called a "List Comprehension".

Re: Synchronizing methods of a class

2005-02-08 Thread Christopher De Vries
On Mon, Feb 07, 2005 at 11:57:02AM -0800, Keith Veleba wrote: > Background: > I'm working on a project where I have to do some serious > multithreading. I've worked up a decorator in Python 2.3.4 to implement > the lock semantics required for specific functions I want to > synchronize: I found Chr

Re: How to keep a module with the same name as a module it is importing from importing itself?

2005-02-08 Thread plb
Good call! The following snippet solved my problems portably. path = sys.path[1:] file, filename, description = imp.find_module('logging', path) logging = imp.load_module('logging', file, filename, description) Thanks! --Peter -- http://mail.python.org/mailman/listinfo/python-list

in wxPython, how to minimize the window in absence of minimize button?

2005-02-08 Thread Erik Bethke
Hello All, I now have a wx.NO_BORDER frame that I have written dragging code for... I like my window this way as it looks sleeker and I am now installing some image buttons. Now I would like to create a new minimize button from an image, and then capture that mouse down and cause it to minimize t

Efficient checksum calculating on lagre files

2005-02-08 Thread Ola Natvig
Hi all Does anyone know of a fast way to calculate checksums for a large file. I need a way to generate ETag keys for a webserver, the ETag of large files are not realy nececary, but it would be nice if I could do it. I'm using the python hash function on the dynamic generated strings (like in

Re: in wxPython, how to minimize the window in absence of minimize button?

2005-02-08 Thread Erik Bethke
Damn, I am dumb... self.Iconize( True ) Sorry. But a helpful tip is that the demo code *surrounding* the wxPython demo is VERY useful, I never looked at that before! -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-08 Thread Roy Smith
Jim <[EMAIL PROTECTED]> wrote: >Where did this type of structure come from: > >mat = ['a' for i in range(3)]? > >This will produce a list of three elements but >I don't see reference for it in any of the books. It's a list comprehension. Unfortunately, this is a bad example of one, since a mu

Re: ANN: Zeus Programmers Editor V3.94

2005-02-08 Thread Richie Hindle
[Jussi] > The latest release of the Zeus for Windows programmer's > editor is now available. [Gabriel] > So is this mentioned here on the Python mailing list because Zeus was > written in Python, or is this just targeted spam for a commerical product? >From the features page: > o Syntax highli

  1   2   3   >