On 2006-07-18, tac-tics <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
>> for pete's sake use the comparison operator like god intended.
>>
>> if 0 <= i <= 1:
>
> I'm assuming you used Python's compound comparison as opposed to the
> C-style of and'ing two comparisons together to emphasi
Hello Bruno,
Bruno Desthuilliers wrote:
> Boris Borcic wrote:
>>> Do you have any ideas?
>>
>> you could use a recursive generator, like
>>
>> def genAllChildren(self) :
>> for child in self.children :
>> yield child
>> for childchild in child.genAllChildren() :
>>
Hi everybody,
I'm having trouble using os.path.expanduser('~') on windows. It uses
$HOME or ($HOMEDRIVE+$HOMEPATH), but this doesn't work with windows
machines which are part of a domain. On such machines, the HOME envvar
may not be set at all, and the HOMEPATH envvar may be set to '\\'!!
Here's
Brian Buderman wrote:
> Anyone know if there is a way to make slickedit tag the built in modules
> such as os and sys so that code completion and the like work?
I don't think that this is possible as the docs are in the python
executable. But it should be easy to generate a dummy module:
import
On 2006-07-18, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, tac-tics
> wrote:
>
>> Grant Edwards wrote:
>>> for pete's sake use the comparison operator like god intended.
>>>
>>> if 0 <= i <= 1:
>>
>> I'm assuming you used Python's compound comparison as op
On 2006-07-18, Paul Boddie <[EMAIL PROTECTED]> wrote:
> John Machin wrote:
>>
>> range() and xrange() are functions. You are suggesting that 2
>> *functions* should acquire a __contains__ method each? I trust
>> not.
>
> Well, range is a function in the current implementation,
> although its usage
In csv.reader, is there any way of skip lines that start whith '#' or
empty lines
I would add comments at my CSV file
--
http://mail.python.org/mailman/listinfo/python-list
hi eveyrbody , i have started working on python tkinter,
While I was working on one of the tkinter classes..named listbox
widget. I had a slight problem.
Now let me tell you that i was able to create a simple listbox which
had 6 options which one can select, but Now what I want is that from
the av
The two primary differences between using def and using lambda is that
lambda is limited to a single expression and def cannot be used within
another function.
Basically, use lambda when you need to define a small function within
another function. I've also used it to create 'shortcut' functions a
Hi,
I have been browsing around the net looking for a way (hopefully an easily implemented module) to log into a web site using python. The site I wish to log into is an internal site which requires email address and password for authentication. Does anyone have any suggestions or links that migh
GinTon wrote:
> In csv.reader, is there any way of skip lines that start whith '#' or
> empty lines
> I would add comments at my CSV file
For skip comment I get a dirty trick:
reader = csv.reader(open(csv_file))
for csv_line in reader:
if csv_line[0].startswith('#'):
continue
But no
[EMAIL PROTECTED] wrote:
> The two primary differences between using def and using lambda is that
> lambda is limited to a single expression and def cannot be used within
> another function.
'def' can certainly be used within another function :
def make_adder( delta ) :
def adder( x ) :
Grant Edwards wrote:
> On 2006-07-18, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
>>In <[EMAIL PROTECTED]>, tac-tics
>>wrote:
>>
>>
>>>Grant Edwards wrote:
>>>
for pete's sake use the comparison operator like god intended.
if 0 <= i <= 1:
>>>
>>>I'm assuming you used
> *WRONG*. The object exists in and of itself. There may be one *or more*
> references to it, via pointers, scattered about in memory; they are
> *NOT* components of the object. A reference count is maintained inside
> the object and manipulated by Py_INCREF etc. The Python garbage
> collector know
Thanks very much. That should work nicely.
We just upgraded to v11, so I'm not yet familiar with all the changes.
The first noticable thing is the UI got a slight enhancement, as it
seems to from one version to the next. I've not used it for Python yet
(really only C so far), so I unfortunate
[EMAIL PROTECTED] wrote:
> The two primary differences between using def and using lambda is that
> lambda is limited to a single expression and def cannot be used within
> another function.
>
Where on earth did you get that from? I presume you mean "You can't use
a def statement as an argument t
[EMAIL PROTECTED] wrote:
> Hey there,
> i have been learning python for the past few months, but i can seem to
> get what exactly a lamda is for. What would i use a lamda for that i
> could not or would not use a def for ? Is there a notable difference ?
> I only ask because i see it in code sample
David Hopwood wrote:
> Darren New wrote:
>
>>David Hopwood wrote:
>>
>>
>>>public class LoopInitTest {
>>>public static String getString() { return "foo"; }
>>>
>>>public static void main(String[] args) {
>>>String line = getString();
>>>boolean is_last = false;
>>>
>>>
GinTon wrote:
> GinTon wrote:
>> In csv.reader, is there any way of skip lines that start whith '#' or
>> empty lines
>> I would add comments at my CSV file
>
> For skip comment I get a dirty trick:
>
> reader = csv.reader(open(csv_file))
> for csv_line in reader:
> if csv_line[0].startswith(
Carl Banks wrote:
> Here's another reason not to use "if lst". Say you have a function
> that looks like this:
>
> def process_values(lst):
> if not lst:
> return
> do_expensive_initialization_step()
> for item in lst:
> do_something_with(item)
Dan Bishop wrote:
> [EMAIL PROTECTED] wrote:
> > it seems that range() can be really slow:
> ...
> > if i in range (0, 1):
>
> This creates a 10,000-element list and sequentially searches it. Of
> course that's gonna be slow.
And you're doing it 3 times.
--
http://mail.python.org/m
Nick Craig-Wood wrote:
>
> Sets are pretty fast too, and have the advantage of flexibility in
> that you can put any numbers in you like
>
I know this is self-evident to most of the people reading this, but I
thought it worth pointing out that this is a great way to test
membership in range(lo, hi
Bruno Desthuilliers <[EMAIL PROTECTED]> schrieb:
> Carl Banks wrote:
>> Bruno Desthuilliers wrote:
>>
>> I'm well aware of Python's semantics, and it's irrelvant to my
>> argument.
[...]
>> If the language
>> were designed differently, then the rules would be different.
>
> Totally true - and tota
In article <[EMAIL PROTECTED]>,
"Carl Banks" <[EMAIL PROTECTED]> wrote:
> 1. This is fine in a perfect world where all code clearly conforms to
> expectation. Problem is, a lot doesn't. I think it's quite easy to
> accidentally check something intended as an iterable for emptiness.
> And, as I'
Justin Azoff wrote:
> Additionally, I would re-organize your program a bit. something like:
>
Thanks Justin, that was a helpful one. Helping me in learning python
programming.
Thanks,
Senthil
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers <[EMAIL PROTECTED]> schrieb:
> PTY wrote:
>> I was asking whether it was better style to
>> use len() or not.
>
> FWIW, it's also more generic (you could have an object supporting
> pop() but not __len__()), less error-prone,
While I agree with all other points, I don't think t
Darren New wrote:
> David Hopwood wrote:
>
[...]
>> Apparently, Hermes (at least the version of it described in that paper)
>> essentially forgets that is_last has been initialized at the top of the
>> loop, and so when it does the merge, it is merging 'not necessarily
>> initialized' with 'initia
Simon Forman wrote:
> Nick Craig-Wood wrote:
>>
>> Sets are pretty fast too, and have the advantage of flexibility in
>> that you can put any numbers in you like
>>
>
> I know this is self-evident to most of the people reading this, but I
> thought it worth pointing out that this is a great way t
Patrick Maupin wrote:
> The argument that one should always use len() to test whether sequences
> are empty or not simply because the use of len() gives a free "is it a
> sequence?" type-check is not apt to be well received by an audience
> which rejects explicit type-checking in general.
No expli
As described in the docs I pointed to before:
subprocess.call("foo.sh",shell=True)
Is the way to do it without args. I think it is simplest to learn the
subprocess module because (quoting from the docs) this module intends
to replace several other, older modules and functions, such as:
os.system
o
I stand corrected. Not sure where I got that from, improper
defragmentation due to sleep depravation perhaps...
K.S.Sreeram wrote:
> [EMAIL PROTECTED] wrote:
> > The two primary differences between using def and using lambda is that
> > lambda is limited to a single expression and def cannot be us
Hi,
I went through couple of wrong paths to install MySQLdb on my RedHat
box. I was trying to download MySQL client from MySQL.com and also
mySQLdb from SourceForge. After some challenges with compile errors and
also searching for pre-required RPMs, I found RedHat distribution
already contains all
Actually, after a little looking, the simple stats.py module at
http://www.nmr.mgh.harvard.edu/Neural_Systems_Group/gary/python.html
is exactly what I needed. It may not be as fast or as comprehensive as
scipy or R, but installation simply involves downloading the module and
importing into the cod
Simon Forman wrote:
> Nick Craig-Wood wrote:
>> Sets are pretty fast too, and have the advantage of flexibility in
>> that you can put any numbers in you like
>>
>
> I know this is self-evident to most of the people reading this, but I
> thought it worth pointing out that this is a great way to te
Diez B. Roggisch wrote:
> Simon Forman wrote:
>
> > Nick Craig-Wood wrote:
> >>
> >> Sets are pretty fast too, and have the advantage of flexibility in
> >> that you can put any numbers in you like
> >>
> >
> > I know this is self-evident to most of the people reading this, but I
> > thought it wor
Grant Edwards wrote:
>
> It's unclear what you're referring to as "the range".
The notion of something describing a range of values which can be
expanded to a list or, of relevance here, whose boundaries can be
tested efficiently.
> Perhaps you're thinking of a slice? Somethign like
>
> if (0
[EMAIL PROTECTED] wrote:
> What is the Python translation for this Bash statement:
>
> tar cf - "[EMAIL PROTECTED]" | bzip2 > "$file".tar.bz2
>
> (Ignoring the fact that "tar cjf" also exists...)
>
> In other words, how does one pipe together arbitrary commands?
For piping subcommands check out
Bruno Desthuilliers wrote:
> mystilleef wrote:
> > Bruno Desthuilliers wrote:
> >
> >>mystilleef wrote:
> >>
> >>>Gerhard Fiedler wrote:
> >>>
> >>>
> On 2006-07-15 06:55:14, mystilleef wrote:
>
>
>
> >In very well designed systems, the state of an object should only be
> >>
On 2006-07-18, Steve Holden <[EMAIL PROTECTED]> wrote:
>> That said, "for pete's sake" is probably a just an cleaned up
>> version of "for god's sake", so I probably did call pete god.
>
> No, actually you called god pete ;-)
Well that's certainly wrong, because we all know god's name is
Howard.
Hi list,
I am trying to understand better Python packaging. This might be a
messed up class hierachy but how would I break this cyclic relatioship?
In file A:
from B import B_Class
Class_A_Main():
def
def SomeMethod(self):
res=B_Class(self)
Class_A_SubClass(Class_A_Main):
On 2006-07-18, Paul Boddie <[EMAIL PROTECTED]> wrote:
>> It's unclear what you're referring to as "the range".
>
> The notion of something describing a range of values which can be
> expanded to a list or, of relevance here, whose boundaries can be
> tested efficiently.
>
>> Perhaps you're thinkin
Bruno Desthuilliers wrote:
> mystilleef wrote:
> > Bruno Desthuilliers wrote:
> >
> >>mystilleef wrote:
> >>Please don't top-post
> >>
> >>>On State and Behavior:
> >>>
> >>>To understand objects in terms of state and behavior you need to
> >>>absolve yourself from implementation details of langua
add a xscrollcommand and/or yscrollcommand keyword argument to the
construction of your listbox.
def func(*a):
print "i'm a callback!"
L = Tkinter.Listbox(root, yscrollcommand=func)# note no parens
after func
groves wrote:
> hi eveyrbody , i have started working on python tkinter,
> Whi
I think I got the answer by playing around a bit. It appears you
*don't* need to forward declare things. For example, the following
code works:
class a:
def run(self):
new_a=a_sub()
new_a.print_it()
class a_sub(a):
def print_it(self):
print "Hi"
b=a().run()
Regards,
John He
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2006-07-17, Terry Reedy <[EMAIL PROTECTED]> wrote:
>> Or, whether docs (and reasonable interpretation thereof) and
>> implementation match, which I claim they do it this case.
The claim, in reference to the CPython
Consider the following class hierarchy in Python:
class A (object):
def __init__(self):
print "cons A"
class B (object):
def __init__(self):
print "cons B"
class C (A):
def __init__(self):
super(C, self).__init__()
print "cons C"
class D (B):
def
In article <[EMAIL PROTECTED]>,
Thomas Nelson <[EMAIL PROTECTED]> wrote:
>As described in the docs I pointed to before:
>subprocess.call("foo.sh",shell=True)
>Is the way to do it without args. I think it is simplest to learn the
>subprocess module because (quoting from the docs) this module intend
John,
Cycles are tricky. Python is an interpreted dynamic language, whatever
object you instantiate in your methods is a different thing than class
hierarchy. Your class hierarchy is fine: ClassA->ClassASubclass->ClassC
and it should work. If it doesn't, create a quick mock example and
post it alo
I am fairly new to python and I want to put alot of my functions in
another python file and import or from it into my script so I can call
the functions. How is this done?
--
http://mail.python.org/mailman/listinfo/python-list
"Harold Fellermann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am trying to fit a powerlaw to a small dataset using
> Scientific.Functions.LeastSquares fit.
This is a bit off-topic here, and normally better for the scipy list, but I
have some experience with nonlinear least
>> In csv.reader, is there any way of skip lines that start whith '#' or
>> empty lines
Nope. When we wrote the module we weren't aware of any "spec" that
specified comments or blank lines. You can easily write a file wrapper to
filter them out though:
class BlankCommentCSVFile:
Hi!
Interesting (or fun?).
Have you a Internet page, or only README?
@+
MCI
--
http://mail.python.org/mailman/listinfo/python-list
Michael,
You only need to call the __init__ method of the superclass if you need
to do something special during initialization. In general I just use
the SuperClass.__init__(self,...) way of calling the super class
constructors. This way, I only initialize the immediate parents and
they will in tur
Do I need to close the file in this case? Why or why not?
for line in file('foo', 'r'):
print line
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Dittmar wrote:
>
> Premature generalization: the new 'premature optimization'.
Premature specialization: the new 'static typing'.
-- Pat
--
http://mail.python.org/mailman/listinfo/python-list
T> Do I need to close the file in this case? Why or why not?
T> for line in file('foo', 'r'):
T> print line
No. The magic of reference counting.
S
--
http://mail.python.org/mailman/listinfo/python-list
westymatt schrieb:
> I am fairly new to python and I want to put alot of my functions in
> another python file and import or from it into my script so I can call
> the functions. How is this done?
import myfilefullofusefulfunctionsandclasses
Works if you have the file
myfilefullofusefulfuncti
Assuming a one person per one machine per one chat protocol it might be
possible to recreate the tcp streams (a lot of packet capturing devices
already do that). So the gateway would have to have some kind of a
dispatch that would recognize the initialization of a chat loggon and
start a capture pr
T wrote:
> Do I need to close the file in this case? Why or why not?
> for line in file('foo', 'r'):
> print line
Close the file in Jython, but often it's not necessary in CPython.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Dan Bishop:
> xrange already has __contains__. The problem is, it's implemented by a
> highly-inefficient sequential search. Why not modify it to merely
> check the bounds and (value - start) % step == 0?
I think this is a nice idea.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/
T napisał(a):
> Do I need to close the file in this case? Why or why not?
>
> for line in file('foo', 'r'):
> print line
No, if you only read from the file.
But anyway, closing file object is considered good practice in many
documents I found, no matter what you do with it.
--
Jarek Zgoda
> Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>AP> On 2006-07-17, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
Antoon Pardon <[EMAIL PROTECTED]> (AP) wrote:
>>>
>AP> On 2006-07-14, Piet van Oostrum <[EMAIL PROTECTED]> wrote:
>>>
>> Just read what it says. `It is only evaluated
I think file object should be closed whether they will be garbage
collected or not. The same goes for DB and network connections and so
on. Of course in simple short programs they don't have to, but if
someone keeps 1000 open files it might be better to close them when
done. Besides open files (
gmax2006,
Yes, perhaps the MySQLdb project should mention that packages are
usually available in the popular distributions. I am using Ubuntu and
everything I needed for MySQL and Python was in the repositories ,
'apt-get' one-lines is all that is needed. In general though, I found
that more often
"T" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Do I need to close the file in this case? Why or why not?
>
> for line in file('foo', 'r'):
> print line
Are you asking if you can get away without closing it?
Or are you asking if it is a good idea to not close it?
Good progra
K.S.Sreeram wrote:
> Simon Forman wrote:
> > Nick Craig-Wood wrote:
> >> Sets are pretty fast too, and have the advantage of flexibility in
> >> that you can put any numbers in you like
> >>
> >
> > I know this is self-evident to most of the people reading this, but I
> > thought it worth pointing
> P.S. Have you already upgraded to v11 and is there anything worthwhile
> in it (Python or otherwise)?
Hi,
We have just released 11.0.1 where we improve and add new support for
scripting and dynamic languages. A snippet of the press release can be
found below.
SlickEdit v11.0.1 continues to im
Gary Herron wrote:
> py_genetic wrote:
> > py_genetic wrote:
> >
> >> [EMAIL PROTECTED] wrote:
> >>
> >>> py_genetic wrote:
> >>>
> How can you make python interpret a string (of py code) as code. For
> example if you want a py program to modify itself as it runs. I know
> this is
Hm didn't I leave ctypes in there? I added calldll because it had
a really nice can opener.
The Eternal Squire
[EMAIL PROTECTED] wrote:
> >> Diet Python is a flavor of Python with allegro, multiarray, umath,
> >> calldll, npstruct and curses builtin, all else nonessential to
> >> lan
py_genetic wrote:
> I have an H5 file with one group (off the root) and two large main
> tables and I'm attempting to aggragate my data into 50+ new groups (off
> the root) with two tables per sub group.
>
> sys info:
> PyTables version: 1.3.2
> HDF5 version: 1.6.5
> numarray version: 1.5.0
If i have a list of urls how can I extract or pull their respective xml
feeds?
--
http://mail.python.org/mailman/listinfo/python-list
T wrote:
> Do I need to close the file in this case? Why or why not?
>
> for line in file('foo', 'r'):
> print line
I was running a program in IDLE that opened a file for
reading and forgot to add the close.
The program ran and terminated normally.
But when I tried to open it from Windows Ex
"Carl Banks" <[EMAIL PROTECTED]> writes:
> Patrick Maupin wrote:
>> PTY wrote:
>>
>> > It looks like there are two crowds, terse and verbose. I thought terse
>> > is perl style and verbose is python style. BTW, lst = [] was not what
>> > I was interested in :-) I was asking whether it was bette
On 2006-07-18, Sybren Stuvel <[EMAIL PROTECTED]> wrote:
> T enlightened us with:
>> Do I need to close the file in this case? Why or why not?
>>
>> for line in file('foo', 'r'):
>> print line
>
> Nope, it'll get closed automatically when the file object gets garbage
> collected.
Which might not
[EMAIL PROTECTED] (David M. Cooke) writes:
>
> Bruno's already mentioned that iterators and generators aren't
> sequences. Numpy arrays act like the other sequence types:
>
a = numpy.array([])
a
> array([], dtype=int64)
len(a)
> 0
bool(a)
> False
>
> (0-dimensional numpy arrays
Thomas Bartkus wrote:
> "T" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Do I need to close the file in this case? Why or why not?
> >
> > for line in file('foo', 'r'):
> > print line
>
> Are you asking if you can get away without closing it?
> Or are you asking if it is a g
On 2006-07-18, T <[EMAIL PROTECTED]> wrote:
>>> for line in file('foo', 'r'):
>>> print line
>> Good programming practice says that if you open it - you close it.
>>
>> And stay out of trouble ;-)
> How do I close the file in the above case?
Aye, there's the rub.
You can't close an anonymous
T wrote:
> Thomas Bartkus wrote:
>> "T" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>> Do I need to close the file in this case? Why or why not?
>>>
>>> for line in file('foo', 'r'):
>>> print line
>> Are you asking if you can get away without closing it?
>> Or are you asking
Volker Grabsch wrote:
> IMHO, that flaw of Python should be documented in a PEP as it violates
> Python's priciple of beeing explicit. It also harms duck typing.
I think this may be good food for Python 3.0, the are removing
undefined comparisons too (>), etc.
bye,
bearophile
--
http://mail.pyt
The Eternal Squire napisał(a):
> Diet Python is a flavor of Python with allegro, multiarray, umath,
> calldll, npstruct and curses builtin, all else nonessential to language
> ripped out. Total size < 3MB, 1% of PSF Python. Diet Python helps keep
> clients thin :)
Why do you think curses are esse
[EMAIL PROTECTED] wrote:
> it seems that range() can be really slow:
>
> if i in range (0, 1):
My original use was like this:
if i in range (iStart, iEnd):
listData.append(a)
in which iStart is 1000 and iEnd is 1008
so in that case, the program ran fine...
but later on, i
Simon Forman wrote:
> To me, and perhaps others, "T =
> set(xrange(0, 1, 23))" and "n in T" are somewhat easier to read
> and write than "not n % 23 and 0 <= n < 1", YMMV.
Eh? How is the first easier to read than the second?? You have a nested
function call in the first!
Regardless, test
On 18.07.2006, at 15:59, Harold Fellermann wrote:
def powerlaw((a,b),x) :
> ... return a*x**b
Fitting power laws is a tricky business, you need a pretty good
initial guess to get convergence.
> Note that I could easily fit the above data using gnuplots internal
> fitting procedure. An
Best interface for roguelike gaming.
Jarek Zgoda wrote:
> The Eternal Squire napisa³(a):
>
> > Diet Python is a flavor of Python with allegro, multiarray, umath,
> > calldll, npstruct and curses builtin, all else nonessential to language
> > ripped out. Total size < 3MB, 1% of PSF Python. Diet Pyt
I'll try to figure out a way to let people know who the FAQ I am :)
The Eternal Squire
Méta-MCI wrote:
> Hi!
>
> Interesting (or fun?).
> Have you a Internet page, or only README?
>
> @+
>
> MCI
--
http://mail.python.org/mailman/listinfo/python-list
On 19/07/2006 1:05 AM, Dan Bishop wrote:
> Paul Boddie wrote:
>
>> Yes, he wants range to return an iterator, just like xrange more or
>> less does now. Given that xrange objects support __getitem__, unlike a
>> lot of other iterators (and, of course, generators), adding
>> __contains__ wouldn't b
westymatt wrote:
> I am fairly new to python and I want to put alot of my functions in
> another python file and import or from it into my script so I can call
> the functions. How is this done?
>
What you are describing are modules. The Python Tutorial has some
information on this
http://docs.
Thanks for the note, Nick.
I ended up with cycles as a historical reason. Some code that were
written long time ago did not anticipate that part of it will get
sub-classed.
Thanks again.
Nick Vatamaniuc wrote:
> John,
> Cycles are tricky. Python is an interpreted dynamic language, whatever
> ob
Can Python thread start threads? It appears not. When I do that, the
sub-threads gets to certain point and just sit there. If I run the
code serially and not run the sub-thread code as threads, everything is
fine.
I throught the problem is when you run multiple processes of Pythons...
--
http
On 19/07/2006 5:34 AM, [EMAIL PROTECTED] wrote:
> >> In csv.reader, is there any way of skip lines that start whith '#' or
> >> empty lines
>
> Nope. When we wrote the module we weren't aware of any "spec" that
> specified comments or blank lines. You can easily write a file wrapper to
>
Nick Vatamaniuc wrote:
> Assuming a one person per one machine per one chat protocol it might be
> possible to recreate the tcp streams (a lot of packet capturing devices
> already do that). So the gateway would have to have some kind of a
> dispatch that would recognize the initialization of a cha
John Henry schrieb:
> Can Python thread start threads? It appears not. When I do that, the
> sub-threads gets to certain point and just sit there. If I run the
> code serially and not run the sub-thread code as threads, everything is
> fine.
It can.
import threading, time
class Test(threadin
On Tue, 2006-07-18 at 08:37 -0700, groves wrote:
> hi eveyrbody , i have started working on python tkinter,
> While I was working on one of the tkinter classes..named listbox
> widget. I had a slight problem.
>
> Now let me tell you that i was able to create a simple listbox which
> had 6 options
John Machin wrote:
> On 19/07/2006 1:05 AM, Dan Bishop wrote:
> >
> > xrange already has __contains__.
>
> As pointed out previously, xrange is a function and one would not expect
> it to have a __contains__ method.
Well, you pointed out that range is a function, but xrange seems to be
a type...
hi,
groves wrote:
> Now let me tell you that i was able to create a simple listbox which
> had 6 options which one can select, but Now what I want is that from
> the available menu, if I select an option it should give me another
> menu associated with that option. Its like digging up that option
"Shan" <[EMAIL PROTECTED]> wrote:
> If i have a list of urls how can I extract or pull their respective xml
> feeds?
What have you tried so far?
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Volker Grabsch a écrit :
> Bruno Desthuilliers <[EMAIL PROTECTED]> schrieb:
>
>>PTY wrote:
>>
>>>I was asking whether it was better style to
>>>use len() or not.
>>
>>FWIW, it's also more generic (you could have an object supporting
>>pop() but not __len__()), less error-prone,
>
>
> While I agr
Volker Grabsch a écrit :
> Bruno Desthuilliers <[EMAIL PROTECTED]> schrieb:
>
>>Carl Banks wrote:
>>
>>>Bruno Desthuilliers wrote:
>>>
>>>I'm well aware of Python's semantics, and it's irrelvant to my
>>>argument.
>
> [...]
>
>>>If the language
>>>were designed differently, then the rules would
Thanks for the confirmation.
I will see if I can reduce the code down to something managable and
post the failing code.
Diez B. Roggisch wrote:
> John Henry schrieb:
> > Can Python thread start threads? It appears not. When I do that, the
> > sub-threads gets to certain point and just sit the
"Vlad Dogaru" <[EMAIL PROTECTED]> writes:
> I am trying to use cookies and Python to create a simple login example.
> But I am very disoriented at the existence of two cookie libraries,
> namely Cookie and cookielib. I have seen examples of setting cookies
[...]
>From the cookielib docs:
http://
101 - 200 of 230 matches
Mail list logo