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)
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
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
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
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
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 ...).
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
[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
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
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
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
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
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
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/
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
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 <
"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" :)
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
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
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
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.
--
--
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
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
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
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
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
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
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
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:
>
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
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'
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
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
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
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
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.
--
_
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
| 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
[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
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
> 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
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
[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
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
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
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
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
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
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
> > 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
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.
[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
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
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
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
> >>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.
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
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
"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
"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
> 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
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
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
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
"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
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(
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
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
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".
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
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
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
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
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
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
[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 - 100 of 257 matches
Mail list logo