Steve Holden wrote:
> Werner Amann wrote:
>
> > Rakesh schrieb:
> >
> >
> >>What I want is to *group the messages belonging to each thread* .
> >
> >
> > Hello
> >
> > Why not sort with Message-ID and References?
> > Attention - it is a Newbie-Solution.
> >
> > import nntplib
> >
> > hamster = nnt
Imagine you have some list that looks like
('unicode', 'not-acii', 'russian') and contains characters not from
acsii. or list of dicts, or dict of dicts.
how can I print it? not on by one, with "for" - but with just a simple
print? My debugging would be MUCH simpler.
Now when I try print or ppr
Roy Smith wrote:
> But, in a nutshell, the biggest reason for immutable types (tuples and
> strings) is that this lets they be dictionary keys.
if you think that's the biggest reason, you haven't spent enough time working
on high-performance Python code and extensions (there's a reason why some
l
Op 2005-01-14, Steve Holden schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>> Op 2005-01-14, Peter Maas schreef <[EMAIL PROTECTED]>:
>>
>>>I have summarized the discussion about the usability of lists (and
>>>and other mutable types) as dictionary keys and put it into the
>>>Python wiki.URL
Tim Roberts <[EMAIL PROTECTED]> writes:
> Jacek Generowicz <[EMAIL PROTECTED]> wrote:
> >
> >I have some code, which makes copious use of the @decorator syntax
>
> I'm very curious to know what kind of application you are writing in which
> "copious use of the @decorator syntax" actually solved a
Timothy Babytch wrote:
> Imagine you have some list that looks like
> ('unicode', 'not-acii', 'russian') and contains characters not from
> acsii. or list of dicts, or dict of dicts.
>
> how can I print it? not on by one, with "for" - but with just a simple
> print? My debugging would be MUCH simpl
I completely agree. I'm also waiting for an advanced Python/project
management book that helps folks out with large-scale projects.
And, for the 2nd edition, may I suggest:
- coverage of OptionParser module, which is more advanced than the
getopt module that you discuss on page 141.
- better Mac O
Serge Orlov wrote:
print unicode([u'ÁÂ×'])
> [u'\u0430\u0431\u0432']
>
Oops, Outlook Express has screwed the encoding, one more evidence that printing
unicode is hard :)
I hope this time, the message will be with real Russian characters instead of
Latin ones.
Serge.
--
http://mail.pyt
Hallo,
wenn du möchtest, dass die Gruppe news:de.comp.lang.python eingerichtet
wird, bitte ich dich, deine Stimme dafür abzugeben. Du brauchst dazu nur
unten stehenden Wahlschein auszufüllen und an [EMAIL PROTECTED] zu
schicken.
Weitere Einzelheiten zum Verfahren finden sich in
news:de.admin.
Fredrik Lundh wrote:
> Fuzzyman wrote:
>
> > I guess that most people use google to post to newsgroups is that
they
> > don't have nntp access. Telling htem to use a newsreader is
facetious
> > and unhelpful.
>
> if you have internet access, you have NNTP access. gmane.org
provides access
> to mo
Martin v. Löwis wrote:
> I'm not what "build statically" means; if you talking about
> building a statically linked interpreter binary - then no,
> this is not possible. At a minimum, you need to link with -ldl,
> or else you cannot perform dlopen(3).
I'll be more specific: when I build python 2.3.
After reading about extending python with C/Fortran in the excellent Python
Scripting for Computational Science book by Hans Langtangen, I'm wondering
whether there's not a more pythonic way of extending python. And frankly I
think there is: OCAML
Fortunately there is already a project up and runn
Ala Qumsieh wrote:
> > © my $n= @_[0];
>
> Do you ever test your code before making fun of yourself in front of millions?
this perl usability study is getting more and more interesting. who
needs television?
--
http://mail.python.org/mailman/listinfo/python-list
Op 2005-01-14, Steve Holden schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>> Op 2005-01-13, hanz schreef <[EMAIL PROTECTED]>:
>>
>>>Antoon Pardon wrote:
>>>
So if I have a call with an expression that takes more than
one line, I should assign the expression to a variable and
us
Antoon Pardon wrote:
What are good arguments or bad and how much weight they have depends
on the person and on the circumstances. So a simple rule like:
Never use a mutable as a key in a dictionary will sometimes not be
the best solution.
True - but I think a purely identity based dictionary *is* t
Craig Howard wrote:
I am working on a python project where an object will have a script that
can be edited by the end user: object.script
If the script is a simple one with no functions, I can easily execute it
using:
exec object.script
Take a look at the execfile builtin.
But if the object
Hi,
could someone tell me what all does and what all doesn't copy
references in python. I have found my script after reaching some
state and taking say 600MB, pushes it's internal dictionaries
to hard disk. The for loop consumes another 300MB (as gathered
by vmstat) to push the data to dictionarie
Jelle Feringa // EZCT / Paris wrote:
> After reading about extending python with C/Fortran in the excellent
> Python Scripting for Computational Science book by Hans Langtangen,
> I'm wondering whether there's not a more pythonic way of extending
> python. And frankly I think there is: OCAML
>
T
Hello,
I have a list of class instances. I wish to get the appropriate class attribute
in each class instance depending on a SINGLE keyword in the calling class.
How do I get the calling method to correctly recognise the keyword as a keyword
and not a class attribute? See example code below (whi
Guy Robinson wrote:
Hello,
I have a list of class instances. I wish to get the appropriate class
attribute in each class instance depending on a SINGLE keyword in the
calling class.
Py> help(getattr)
Help on built-in function getattr in module __builtin__:
getattr(...)
getattr(object, name[,
Hey all,
this is probably a FAQ, but I didn't found the answer...
I use msvcrt.kbhit() to check for a user keyboard event on windows. But
now, I would prefer to make the module independent from the platform
used. I already know that I can use curses (on linux/unix) or Tkinter.
Also, I found thi
Grig Gheorghiu wrote:
In my experience (as a tester), it is easier to deal with PYTHONPATH
than to add the my.pth file to the site-packages directory. The main
reason is that I have my custom packages and modules in a directory
tree that I deploy on many clients/servers/platforms/OS versions, some
Guy Robinson wrote:
> Hello,
>
> I have a list of class instances. I wish to get the appropriate class
attribute
> in each class instance depending on a SINGLE keyword in the calling
class.
>
> How do I get the calling method to correctly recognise the keyword as
a keyword
> and not a class attrib
Antoon Pardon wrote:
[...]
"A foolish consistency is the hobgoblin of little minds". Rules are made
to be broken.
Like only use immutables as dictionary keys.
Fair enough, but don;t go advising newbies to do this.
Besides which, if you don't understand the language
environment, rules alone will
Erik Max Francis wrote:
Steven Bethard wrote:
Is there any chance you could post these all as part of the same
thread?That would be really nice for those of us who aren't
interested -- then we could just ignore the thread...
You are looking for evidence of cluefulness where it seems unlikely
Martin MOKREJ© wrote:
> Hi,
> could someone tell me what all does and what all doesn't copy
> references in python. I have found my script after reaching some
> state and taking say 600MB, pushes it's internal dictionaries
> to hard disk. The for loop consumes another 300MB (as gathered
> by vms
Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
> [...]
>>>"A foolish consistency is the hobgoblin of little minds". Rules are made
>>>to be broken.
>>
>>
>> Like only use immutables as dictionary keys.
>>
> Fair enough, but don;t go advising newbies to do this.
Steve Holden wrote:
As I may have mentioned before, egotism can be the only possible reason.
I'd merely figured it as a textbook case of trolling - attention seeking
behaviour, most likely indicative of a lack of self-esteem, rather than the reverse.
Still, he does at least keep the [perl-python]
Martin MOKREJŠ wrote:
Hi,
could someone tell me what all does and what all doesn't copy
references in python. I have found my script after reaching some
state and taking say 600MB, pushes it's internal dictionaries
to hard disk. The for loop consumes another 300MB (as gathered
by vmstat) to push t
Antoon Pardon wrote:
Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
Antoon Pardon wrote:
[...]
"A foolish consistency is the hobgoblin of little minds". Rules are made
to be broken.
Like only use immutables as dictionary keys.
Fair enough, but don;t go advising newbies to do this.
How
Duncan Booth wrote:
Martin MOKREJ© wrote:
Hi,
could someone tell me what all does and what all doesn't copy
references in python. I have found my script after reaching some
state and taking say 600MB, pushes it's internal dictionaries
to hard disk. The for loop consumes another 300MB (as gathered
Antoon Pardon schrieb:
Dictionary lookup with mutable types like lists is a source of
unpleasant surprises for the programmer and therefore impossible in
Python.
It is not impossible in Python. It may be discouraged but it is not
impossible since I have already done so.
Wouldn't this raise a
> "Jelle" == Jelle Feringa // EZCT / Paris <[EMAIL PROTECTED]> writes:
Jelle> After reading about extending python with C/Fortran in the
Jelle> excellent Python Scripting for Computational Science book
Jelle> by Hans Langtangen, I'm wondering whether there's not a
Jelle> more p
In article <[EMAIL PROTECTED]>,
Peter Maas <[EMAIL PROTECTED]> wrote:
> Antoon Pardon schrieb:
> > Dictionary lookup with mutable types like lists is a source of
> > unpleasant surprises for the programmer and therefore impossible in
> > Python.
> >
> >
> > It is not impossible in Python.
[Delaney, Timothy C]
> Nick's other suggestion - that genexps propagate __len__ - might
> still be interesting. Of course, it would only be applicable for
> unconditional genexps(i.e. no if clause).
Length transparency for iterators is not as general as one would expect. I once
spent a good deal
Steve Holden wrote:
Martin MOKREJŠ wrote:
Hi,
could someone tell me what all does and what all doesn't copy
references in python. I have found my script after reaching some
state and taking say 600MB, pushes it's internal dictionaries
to hard disk. The for loop consumes another 300MB (as gathered
Hi !
OCAML is very complementary at Python :
unreadable vs readable
functionnel vs procedural/POO/etc.
compiled vs interpreted (or compil JIT)
very fast vs mean velocity
hard to learn vs easy to easy to learn
Yes, OCAML is very complementary, too much, much too, complementar
Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>> Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
>>
>>>Antoon Pardon wrote:
>>>[...]
>>>
>"A foolish consistency is the hobgoblin of little minds". Rules are made
>to be broken.
Like
nell wrote:
First the "10x in advance" means thanks in advance.
The main importance of protecting my code is to save headache of
customers that want to be smart and change it and then complain on bugs
also you can try to use py2exe
--
http://mail.python.org/mailman/listinfo/python-list
Martin MOKREJ wrote:
> Duncan Booth wrote:
>> Almost anything you do copies references.
>
>
> But what does this?:
>
> x = 'x'
Copies a reference to the existing string 'x' and stores the new
reference in the variable x. If its a global variable then this will
involve creating a new
Grant Edwards wrote:
On 2005-01-16, Lucas Raab <[EMAIL PROTECTED]> wrote:
Please see both the Python and C code at
http://home.earthlink.net/~lvraab. The two files are ENIGMA.C
and engima.py
http://www.catb.org/~esr/faqs/smart-questions.html
I didn't expect to get bitched out just because I didn
Steven Bethard wrote :
> Xah Lee wrote:
>> © Note: this post is from the Perl-Python
>> © a-day mailing list at
>> © http://groups.yahoo.com/group/perl-python/
>
> Is there any chance you could post these all as part of the same thread?
>That would be really nice for those of us who aren't int
Hi,
The description of Python always mentions "very high level dynamic data
types". Now, I can't seem to find any examples of these (nothing
described with this term anyway). Is this simply refering to built-in
dynamic data structures such as lists and dictionaries, with a great
deal of operators
Lucas Raab wrote:
> I'm done porting the C code, but now when running the script I
> continually run into problems with lists. I tried appending and
> extending the lists, but with no avail. Any help is much appreciated
> Please see both the Python and C code at
> http://home.earthlink.net/~lvraab.
compile and eval is a good way to go.
Regards,
Fuzzy
http://www.voidspace.org.uk/python/index.shtml
--
http://mail.python.org/mailman/listinfo/python-list
Charlie wrote:
Hi,
The description of Python always mentions "very high level dynamic data
types". Now, I can't seem to find any examples of these (nothing
described with this term anyway). Is this simply refering to built-in
dynamic data structures such as lists and dictionaries, with a great
deal
Which other GUI library for Python other than wxpython has native
widgets for MS Windows ?
I know there is MFC and GDI, but I want something easier to use than wx,
not harder :)
wxpython has to problem that it handles much more like a C++ library
than a Python one sometimes.
Alex
--
http://mail
there's someone writing 'dabo', which is apparently "wxpython but more python".
Stephen.
On Mon, 17 Jan 2005 15:13:07 +0100, A. Klingenstein <[EMAIL PROTECTED]> wrote:
> Which other GUI library for Python other than wxpython has native
> widgets for MS Windows ?
> I know there is MFC and GDI, bu
H. Not familiar with erlang at all...
> Subject: Re: OCAMl a more natural extension language for python?
>
> Hi !
>
> OCAML is very complementary at Python :
>
> unreadable vs readable
That's depending on how you compare; I find OCAML quite readable
compared to C / Fortran
>
In article <[EMAIL PROTECTED]>,
Antoon Pardon <[EMAIL PROTECTED]> wrote:
> Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
> > There you go with the minutiae again. How about:
> >
> > "Don't use mutables as hash keys"?
>
> That sounds too dogmatic to my ears. I also find it
> too selec
Antoon Pardon wrote:
Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
Antoon Pardon wrote:
Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
Antoon Pardon wrote:
[...]
"A foolish consistency is the hobgoblin of little minds". Rules are made
to be broken.
Like only use immutables
Does anyone here know if there is a Python Users Group in Melbourne
Australia?
A google search shows an attempt to start one at meetups.com or
something like that but it now seems defunct.
--
http://mail.python.org/mailman/listinfo/python-list
Jelle Ferringa wrote:
>Since I haven't got actual experience programming CAML I'd like to
speculate
>that OCAML would be a very pythonic way of extending python: its
>open-source, object oriented, as fast as C, and ! garbage collecting!
The open source g95 Fortran 95 compiler is already usable an
Op 2005-01-17, Just schreef <[EMAIL PROTECTED]>:
> In article <[EMAIL PROTECTED]>,
> Antoon Pardon <[EMAIL PROTECTED]> wrote:
>
>> Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
>
>> > There you go with the minutiae again. How about:
>> >
>> > "Don't use mutables as hash keys"?
>>
>> Th
Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>> I don't see a big difference between these principles
>> and the hash key principle, so in the end may be we
>> should just stick with the more general principle:
>>
>> Don't use mutables!
>>
>>
>> and be done
I have written a package that can parse and generate files according to
RFC 2445 (iCalender). That should be any file ending with .ics :-)
It is not quite polished yet, but fully functional, and choke full of
doctest.
It does support the full spec and all datatypes and parameter values.
The Api
Stephen Thorne <[EMAIL PROTECTED]> writes:
>
> there's someone writing 'dabo', which is apparently "wxpython but
> more python".
It looks like dabo uses, not replaces, wxPython
http://dabodev.com/about
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Here I am once again to give a bit trouble.
I am at the verge of completing my graduation in computer sciences. I
will be graduating within 6-8 months. Now I am faced with the problems
of my career. I am in a fix what skill set I must choose to be safe as
far as job openings are concerned. I
On Mon, Jan 17, 2005 at 11:41:20AM +, Antoon Pardon wrote:
> Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
> > Antoon Pardon wrote:
> > [...]
> >>>"A foolish consistency is the hobgoblin of little minds". Rules are made
> >>>to be broken.
> >>
> >>
> >> Like only use immutables as
On 2005-01-17, Lucas Raab <[EMAIL PROTECTED]> wrote:
> Sorry about that. I had a bad day. First there was the
> migraine and then the fight with my significant other, so
> yesterday was not a good day. I apologize for what I said.
No worries. As somebody else said, the best way to get help
solvi
I have less than a week experience on linux, so I am a new newbie.
Python 2.3 came preinstalled. I installed version 2.4. All seemed to
go well except it installed to usr/local?
1. Was it wrong to install when logged in as 'root'? Does it make a
difference?
2. I looked in the package editor an
Tim Heaney wrote:
Stephen Thorne <[EMAIL PROTECTED]> writes:
there's someone writing 'dabo', which is apparently "wxpython but
more python".
It looks like dabo uses, not replaces, wxPython
http://dabodev.com/about
Actually I think it *layers* wxPython, with the intention of being able
to replac
In article <[EMAIL PROTECTED]>,
Antoon Pardon <[EMAIL PROTECTED]> wrote:
> >> I don't see a big difference between these principles
> >> and the hash key principle,
> >
> > Than you haven't looked hard enough.
>
> All of these can get unexpected behaviour because of the
> assignment-doesn't-copy
"Bill" <[EMAIL PROTECTED]> wrote:
> 2. I looked in the package editor and there was no way to uninstall
> 2.3? Should I? If so, how can I? If not,what are the problems, if
> any, of having both.
if your OS comes with Python, there's a certain chance that it includes
utilities that rely on a sp
Lucas Raab wrote:
I'm done porting the C code, but now when running the script I
continually run into problems with lists. I tried appending and
extending the lists, but with no avail. Any help is much appreciated
Please see both the Python and C code at
http://home.earthlink.net/~lvraab. The t
On Jan 17, 2005, at 10:19 AM, Steve Holden wrote:
It looks like dabo uses, not replaces, wxPython
http://dabodev.com/about
Actually I think it *layers* wxPython, with the intention of being
able to replace wxPython with other GUI kits at a later date. So,
there should be a simpler graphical API
Op 2005-01-17, John Lenton schreef <[EMAIL PROTECTED]>:
>
>
> --vni90+aGYgRvsTuO
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> On Mon, Jan 17, 2005 at 11:41:20AM +, Antoon Pardon wrote:
>> Op 2005-01-17, Steve Holden
Bill wrote:
I have less than a week experience on linux, so I am a new newbie.
Python 2.3 came preinstalled. I installed version 2.4. All seemed to
go well except it installed to usr/local?
1. Was it wrong to install when logged in as 'root'? Does it make a
difference?
2. I looked in the package
Central New Jersey PIG Meeting -- Python Interest Group In Princeton
PIG/IP
PIG/IP will hold its first meeting on Jan 19, 2005 at the Lawrenceville
Library (Room #3). Jon Fox will speak about Python's 2.4 release and
then open discussion about Python will be encouraged.
When:
Wednesday, January 1
Antoon Pardon wrote:
Op 2005-01-17, Steve Holden schreef <[EMAIL PROTECTED]>:
Antoon Pardon wrote:
I don't see a big difference between these principles
and the hash key principle, so in the end may be we
should just stick with the more general principle:
Don't use mutables!
and be done with it.
Cameron Laird wrote:
Someone really ought to include a couple of sentences to that effect
on the front page of http://jpype.sf.net/ >.
Now I remember visiting this site, but never understood how it
actually worked. Examples such as:
from jpype import *
startJVM("d:/tools/j2sdk/jre/bin/client/jvm.dl
Hello all,
if I have this code:
import sets
class Foo:
x = sets.Set()
then pychecker says:
test.py:4: Methods (__cmp__, __hash__) in sets.Set need to be overridden in a
subclass
I don't get this message. What is it trying to say, and why?
Istvan.
--
http://mail.python.org/mailman/listinfo/pyth
rbt wrote:
>I've always thought of it like this... in C, we have to do something
>like this when declaring a variable:
>int x = 0;
>We had to specifically tell the language compiler that x is an
integer.
>In Python, all we have to do is:
>x = 0
>The interpretor knows that x is an integer. We c
John> In the fnctl docs for both python 2.3 and 2.4 there is a note at
John> the bottom that says
John> The os.open() function supports locking flags and is available on
John> a wider variety of platforms than the lockf() and flock()
John> functions, providing a more platform-
I have the code below. I have changed the background of the frame to
white, but I cannot get the wxSlider to not be the ugly gray color.
Can someone tell me how to change it to a transparent background (I
tried wxTRANSPARENT_WINDOW without success)?
import os
from wxPython.wx import *
ID_ABOUT=10
mport sets
class Foo:
def __init__(self):
self.x = sets.Set()
x = Foo()
print x, getattr(x, 'x')
gives for me:
<__main__.Foo instance at 0x00C578A0> Set([])
on 2.4. on WinXP. What environment do you run in?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
<__main__.Foo instance at 0x00C578A0> Set([])
on 2.4. on WinXP. What environment do you run in?
I'm running it on cygwin,
but still don't get it, why the warning?
Istvan.
--
http://mail.python.org/mailman/listinfo/python-list
l = []
for i in range(2):
for j in range(2):
l[i],[j] = 0
print l
gives
Traceback (most recent call last):
File "C:\TEMP\test.py", line 75, in -toplevel-
l[i],[j] = 0
TypeError: unpack non-sequence
That's why your current code needs a matrix class.
--
http://mail.python.org/mailman/listinfo/pyt
Istvan Albert wrote:
Now I remember visiting this site, but never understood how it
actually worked. Examples such as:
from jpype import *
startJVM("d:/tools/j2sdk/jre/bin/client/jvm.dll", "-ea")
java.lang.System.out.println("hello world")
shutdownJVM()
in three different versions are the only code
Hi,
I am using my own install script for my software and am looking for a
flawless way to figure out where python, and more specifically
site-packages is installed.
Any clue ?
Regards,
Philippe
--
***
Philippe C. Martin
SnakeCard LLC
www.snakecard.com
***
Istvan Albert wrote:
> if I have this code:
>
> import sets
>
> class Foo:
> x = sets.Set()
>
> then pychecker says:
>
> test.py:4: Methods (__cmp__, __hash__) in sets.Set need to be overridden
> in a subclass
>
> I don't get this message. What is it trying to say, and why?
The minimal
On 2005-01-17, Lucas Raab <[EMAIL PROTECTED]> wrote:
> data[4][j] = ((int)ref_rotor[j]-'A'+26)%26;
> data[4],[j] = (ref_rotor[j] - 'A'+26) % 26
^
The comma shouldn't be there.
C: data[4][j]
Python: data[4][j]
> Now, do I need to start boni
I don't know pychecker, maybe there's something wrong with it as your
code seems valid to me.
--
http://mail.python.org/mailman/listinfo/python-list
Fuzzyman wrote:
>> if you have internet access, you have NNTP access. gmane.org provides access
>> to more than 6,500 mailing lists via NNTP, including all relevant Python
>> forums.
>
> Not if you're behind a censoring proxy that blocks everything except
> http. This is a situation many people
>>> l = []
>>> for i in range(2):
for j in range(2):
l[i][j] = 'x'
Traceback (most recent call last):
File "", line 3, in -toplevel-
l[i][j] = 'x'
IndexError: list index out of range
So you still have to dimension the list before you can use it , eg like
>l = []
>for i in range(2):
>l.appen
Russell E. Owen wrote:
> It seems that the path was to a "fat" file partition and included a
> directory name that was all uppercase. The directory was created, but
> using lowercase. I'm not yet sure the version of python.
>
> The workaround for now is to not use fat file partitions. But I was
I have a script that downloads some webpages.The problem is that,
sometimes, after I download few pages the script hangs( stops).
(But sometimes it finishes in an excellent way ( to the end) and
download all the pages I want to)
I think the script stops if the internet connection to the server (fr
Title: RE: How to prevent the script from stopping before it should
[EMAIL PROTECTED]
#- I have a script that downloads some webpages.The problem is that,
#- sometimes, after I download few pages the script hangs( stops).
What do you mean with "hangs"?
It raises an error and quit? It ju
Hans Georg Krauthaeuser wrote:
I use msvcrt.kbhit() to check for a user keyboard event on windows. But
now, I would prefer to make the module independent from the platform
used.
This is not in general possible; many machines do not have keyboards.
You can, perhaps, build one for yourself from a
#import urllib, sys
#pages = ['http://www.python.org', 'http://xxx']
#for i in pages:
# try:
#u = urllib.urlopen(i)
#print u.geturl()
#except Exception, e:
#print >> sys.stderr, '%s: %s' % (e.__class__.__name__, e)
will print an error if a page fails opening, rest open
But you could use a dict of return values, or even just assigning a
different return value in each if clause. The end result is that you
have a single well-defined exit point from the function, which is
generally considered to be preferable.
--
http://mail.python.org/mailman/listinfo/python-list
I should clarify up front that I may have given an overblown sense of
how long the producer thread typically takes to generate a board; It's
usually a few tenths of a second, up to a few seconds for especially
fecund boards.
My concern was that even a few seconds is long enough for fifty reques
errata:
* the variables in the perl section should be declared inside the
subroutine.
* the @_[0] should've been $_[0]
thanks for Dave Cross for pointing them out.
* the Mathematica Apply should be Select...
Xah
[EMAIL PROTECTED]
http://xahlee.org/PageTwo_dir/more.html
--
http://mail.python.
Philippe C. Martin wrote:
Hi,
I am using my own install script for my software and am looking for a
flawless way to figure out where python, and more specifically
site-packages is installed.
You can take a look at how this is done in Lib/site.py.
Look for the bit of code that starts with
prefixes =
Are visitors welcome? I just happen to be in NJ, and I would like to attend
my first PIG/IP Also, are you related in any way to LUG/IP?
-Jay
On Monday 17 January 2005 10:36, [EMAIL PROTECTED] wrote:
> Central New Jersey PIG Meeting -- Python Interest Group In Princeton
> PIG/IP
>
> PIG/IP will
erratum:
the Mathematica Apply should've been Select.
...
Xah
[EMAIL PROTECTED]
http://xahlee.org/PageTwo_dir/more.html
--
http://mail.python.org/mailman/listinfo/python-list
erratum:
the Mathematica Apply should've been Select.
...
Xah
[EMAIL PROTECTED]
http://xahlee.org/PageTwo_dir/more.html
--
http://mail.python.org/mailman/listinfo/python-list
Jon Perez wrote:
If the consumer and the producer are separate threads,
why does the consumer thread block when the producer
thread is generating a new board? Or why does it
take forever for the producer thread to be pre-empted?
Also, I don't understand why the solution works.
How does sleeping fo
[EMAIL PROTECTED] wrote:
#import urllib, sys
#pages = ['http://www.python.org', 'http://xxx']
#for i in pages:
# try:
#u = urllib.urlopen(i)
#print u.geturl()
#except Exception, e:
#print >> sys.stderr, '%s: %s' % (e.__class__.__name__, e)
will print an error if a page
Skip> I could have sworn that os.open supported the O_SHLOCK and
Skip> O_EXLOCK flags.
I submitted a patch to posixmodule.c for these:
http://python.org/sf/1103951
Skip
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 192 matches
Mail list logo