Re: what is the keyword "is" for?

2006-08-16 Thread Hendrik van Rooyen
"Dan Bishop" <[EMAIL PROTECTED]> wrote: | Sybren Stuvel wrote [on the difference between is and ==]: | > Obviously "a is b" implies "a == b", | | Not necessarily. | | >>> a = b = 1e1000 / 1e1000 | >>> a is b | True | >>> a == b | False Huh? - wtf is this - I find this deeply disturbing - Sybre

Small Troll on notation of variables over time

2006-08-19 Thread Hendrik van Rooyen
Hi there, I can write: s = 'some string' then print s[1] will be the string 'o' and a while later I can write: s = 'other some string' then print s[1] will be the string 't' and then: s = [1,2,3,4] then print s[1] will be the number 2 and still later: s = {1:'boo',2:'foo',3:'shoo'} when pri

Re: Small Troll on notation of variables over time

2006-08-19 Thread Hendrik van Rooyen
"John Machin" <[EMAIL PROTECTED]> wrote: | | Hendrik van Rooyen wrote: | [snip] | > What do you guys think? | | The subject said it all. You should find some other way of entertaining | yourself on the weekends :-) This is the right answer... *grin* - well - at leas

Re: tkinter btn visual state with tkMessageBox

2006-08-19 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: To: | why is the button sunken when called through a bind method, and not | with the command attribute? | Thank you! | | | ## Cut'nPaste example | from Tkinter import * | import tkMessageBox | | class Vue(object): | def __init__(self): | self.root=Tk() |

Re: tkinter btn visual state with tkMessageBox

2006-08-20 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> Wrote: | | Hendrik van Rooyen wrote: | > <[EMAIL PROTECTED]> wrote: | > | > To: | > | > | > | why is the button sunken when called through a bind method, and not | > | with the command attribute? | > | Thank you! | > | | > | | &g

Re: Input from the same file as the script

2006-08-21 Thread Hendrik van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]> Wrote: | On 20 Aug 2006 11:02:25 -0700, [EMAIL PROTECTED] declaimed the | following in comp.lang.python: | | > Can the input to the python script be given from the same file as the | > script itself. e.g., when we execute a python script with the command

Re: Small Troll on notation of variables over time

2006-08-21 Thread Hendrik van Rooyen
"Piet van Oostrum" <[EMAIL PROTECTED]> Wrote: | You are about 7 months early. | -- Am I? - Early for what - a seven months premature baby is small indeed... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Small Troll on notation of variables over time

2006-08-21 Thread Hendrik van Rooyen
"Jeremy Sanders" <[EMAIL PROTECTED]> wrote: | Hendrik van Rooyen wrote: | | > What do you guys think? | | You could get something similar using an object, such as | | class Hist(object): | | def __init__(self): | self.vals = [None] | | def __ca

Re: What do you want in a new web framework?

2006-08-23 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: | Alex Martelli wrote: | | > Indeed, it has been truthfully observed that Python's the only language | > with more web frameworks than keywords. | | recent research indicates that it has more web frameworks than comments | in the source code. | | Aa

Re: What do you want in a new web framework?

2006-08-23 Thread Hendrik van Rooyen
"Alex Martelli" <[EMAIL PROTECTED]> | Tim Roberts <[EMAIL PROTECTED]> wrote: |... | > themselves. However, in the case of web frameworks, I believe Marc is | > fundamentally correct: the web framework proliferation in Python is | > actually doing the language a huge disservice. | | Indeed,

Re: how do you get the name of a dictionary?

2006-08-23 Thread Hendrik van Rooyen
"jojoba" <[EMAIL PROTECTED]> Wrote: | > At the risk of stating the obvious, why don't you simply add a parameter | > for the title in the invocation of the tree editor? I.e. instead of | > invoke_tree_editor(somedict) | > do | > invoke_tree_editor(somedict, "somedict") | > HTH, | > Carsten. | | |

Re: Python/Tkinter crash.

2006-10-04 Thread Hendrik van Rooyen
"Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Wed, 04 Oct 2006 10:33:55 +0200, Hendrik van Rooyen > <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I get the following: > > > > [EMAIL PROTECTED]:~/Controller/lib> python dis

Re: Python/Tkinter crash.

2006-10-05 Thread Hendrik van Rooyen
"Russell E. Owen" <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > > >Hi, > > > >I get the following: > > > >[EMAIL PROTECTED]:~/Controller/lib> pyth

Re: Python/Tkinter crash.

2006-10-05 Thread Hendrik van Rooyen
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Eric Brunel" <[EMAIL PROTECTED]> wrote: > > > > On Wed, 04 Oct 2006 10:33:55 +0200, Hendrik van Rooyen > > <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > >

Re: Python/Tkinter crash.

2006-10-05 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Eric Brunel wrote: > > > AFAIK, Tkinter is not thread safe. Using some kind of lock to serialize > > the calls from different threads may seem to work (I never tested it > > actually), but the safest way I found to use threads with Tkinter was to > > cal

Re: Python/Tkinter crash.

2006-10-05 Thread Hendrik van Rooyen
"Paul Rubin" <http://[EMAIL PROTECTED]> wrote: > "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: > > I am not sure how to do this - once I have called the Tkinter > > mainloop - that main thread is essentially event driven - and > > figuring

Re: tkinter newsgroup or mailing list

2006-10-06 Thread Hendrik van Rooyen
"Franz Steinhaeusler" <[EMAIL PROTECTED]> wrote: > Hello NG, > > I'm asking this, (although I know a mailing list on gmane > gmane.comp.python.tkinter and there is so little traffic > compared to the mailing list of wxPython also mirrored > on gmane gmane.comp.python.wxpython. > > I cannot imagin

Re: Python/Tkinter crash.

2006-10-06 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > > > >>Eric Brunel wrote: > >> > >> > >>>AFAIK, Tkinter is not thread safe. Using some kin

Re: Why do this?

2006-10-06 Thread Hendrik van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote: > On Thu, 5 Oct 2006 11:28:08 +0100, "Matthew Warren" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > Now, I started programming when I was 8 with BBC Basic. > > > Remember what the acronym BASIC stands for? 8<-

Re: Dumping the state of a deadlocked process

2006-10-07 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > Hi all > > I'm currently having some issues with a process getting deadlocked. The > problem is that the only way I can seem to find information about where > it deadlocks is by making a wild guess, insert a pdb.set_trace() before > this point, and then step until it l

Re: HOST - Assembla Inc. Breakout - Copyright Violation by Mr. AndySingleton

2006-10-07 Thread Hendrik van Rooyen
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: 8<--- > ... - I don't wanna get > into the details of my underwear :P > > Diez Why not? - what are you hiding? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: dictionary containing a list

2006-10-08 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Steve Holden wrote: > > > One of the fascinating things about c.l.py is that sometimes a questin > > will be posted that makes almost no sense to me, and somebody else will > > casually read the OP's mind, home in on the issue and provide a useful > >

Re: People's names (was Re: sqlite3 error)

2006-10-08 Thread Hendrik van Rooyen
t use this). NO! - I think of my surname as "van Rooyen" - its only a string with a space in it - and its peculiar in that the first letter is not capitalised And I am sure that the people called "von Kardorff" would not agree either... - Hendrik van Rooyen -- http://mail.python.org/mailman/listinfo/python-list

Re: Names changed to protect the guilty

2006-10-08 Thread Hendrik van Rooyen
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > On Fri, 06 Oct 2006 18:29:34 -0700, John Machin wrote: > > MonkeeSage wrote: > >> On Oct 6, 8:02 pm, "MonkeeSage" <[EMAIL PROTECTED]> wrote: > >> > it is clearer to you to make the condition explicit ("blah not False"), > >> > >> "blah not False" -> "

Re: People's names (was Re: sqlite3 error)

2006-10-09 Thread Hendrik van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]>wrote: 8<-- > In the days of paper filing (I actually took Shorthand, and a > Business Machines & Filing course in High School to avoid Phys.Ed.) the > training for things like oriental names was to choose one for "surname

Re: People's names (was Re: sqlite3 error)

2006-10-10 Thread Hendrik van Rooyen
"Lawrence D'Oliveiro" <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>, Hendrik van > Rooyen wrote: > > > "Lawrence D'Oliveiro" <[EMAIL PROTECTED]> wrote: > > > > 8<--

Re: Everything is a distributed object

2006-10-10 Thread Hendrik van Rooyen
"Martin Drautzburg" <[EMAIL PROTECTED]> wrote: > Hello all, > > I've seen various attempts to add distributed computing capabilities on top > of an existing language. For a true distributed system I would expect it to > be possible to instantiate objects of a remote class or to subclass a > remot

Re: Python component model

2006-10-10 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Nick Vatamaniuc wrote: > > > At the same time one could claim that Python already has certain > > policies that makes it seem as if it has a component model. 8< > implementing

Re: OT: Sarcasm and irony

2006-10-11 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: 8< > ... It's well-known among Brits that Americans don't > understand irony. They can be pretty oblique when it come to sarcasms > too, for that matter. *ducks to avoid the nuclear fal

Re: Wing IDE 2.1.3 released

2006-10-13 Thread Hendrik van Rooyen
"Wingware Announce" <[EMAIL PROTECTED]> wrote: 8<--- > * Professional quality code editor > * Visual Studio, VI/Vim, Emacs, and Brief key bindings Can I copy paste columns as in Brief? Do the Brief Macros work? 100% ? - Hendrik --

Re: Thread termination

2006-10-13 Thread Hendrik van Rooyen
"Teja" <[EMAIL PROTECTED]>wrote: > Hi all, > > Does any one know how to terminate or kill a thread that is started > with "start_new_thread()" in the middle of its execution? > > Any pointers? > > Thanks in advance > > Teja. can't be done from outside without co operation of thread in questi

Re: What value should be passed to make a function use the defaultargument value?

2006-10-13 Thread Hendrik van Rooyen
"Antoon Pardon" <[EMAIL PROTECTED]> wrote: 8<- > If we somehow want to seperate parameters in those that > can be used with a keyword and those that don't it has > to be something different than providing a default value

Re: Starting out.

2006-10-13 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: 8< > Well, I'm on vacation this week, so 5 pm means nothing to me: > > teetertotter > > from the Consolidated Word List from puzzlers.org. > > Yes, it's also spelled with a hyphen or a space, but as long as this > is a valid spelling, it counts.

Re: Thread termination

2006-10-14 Thread Hendrik van Rooyen
"Nick Craig-Wood" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen <[EMAIL PROTECTED]> wrote: > > can't be done from outside without co operation of thread in question. > > google this newsgroup > > Hopefully google will discover also the th

Can I set up a timed callback without Tkinter or twisted or something?

2006-10-14 Thread Hendrik van Rooyen
Hi, I want to do the equivalent of the after thingy in tkinter - setting up in effect a timed call back. My use case is as a "supervisory" timer - I want to set up an alarm, which I want to cancel if the expected occurrence occurs - but its not a GUI app. My googling gets a lot of stuff pointing

Re: Can I set up a timed callback without Tkinter or twisted orsomething?

2006-10-15 Thread Hendrik van Rooyen
"Scott David Daniels" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > I want to do the equivalent of the after thingy in tkinter - setting up in > > effect a timed call back. > > > > My use case is as a "supervisory" timer - I want

Re: Can I set up a timed callback without Tkinter or twisted orsomething?

2006-10-15 Thread Hendrik van Rooyen
"hg" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > Hi, > > > > I want to do the equivalent of the after thingy in tkinter - setting up in > > effect a timed call back. > > > > My use case is as a "supervisory" tim

Re: Can I set up a timed callback without Tkinter or twisted orsomething?

2006-10-16 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > > Hendrik> is there not something based on signals? - I seem to recall > Hendrik> some such thing here in another thread.. ( I am running Linux) > > Have you tried: > > import signal > help(signal) > > at the interpreter prompt? > > Skip *blush*

Re: A friendlier, sugarier lambda -- a proposal for Ruby-like blocksin python

2006-10-16 Thread Hendrik van Rooyen
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote: > Kay Schluehr wrote: > > Bruno Desthuilliers wrote: > > > >> Just for the record : Ruby's code-blocks (closures, really) come from > >> Smalltalk, which is still the OneTrueObjectLanguage(tm). > > > > IsTheOneTrueObjectLanguage(tm)ReallyCamelCased?

Re: People's names (was Re: sqlite3 error)

2006-10-17 Thread Hendrik van Rooyen
"Florian Diesch" <[EMAIL PROTECTED]>wrote: 8<-- >In Germany "von" is just a part of the name since 1919 when the nobility >was abolished by law. Thanks - was not aware of this - 1919 - just after the Great War, 1914-1918... - Hendrik

Re: invert or reverse a string... warning this is a rant

2006-10-19 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]>wrote: 8<--- > 'a man a plan a canal panama' is not a palindrome > > ? not if spaces count - able was I ere I saw elba - is one - but its a tougher test... - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting existing module/objects to threads

2006-10-19 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > I have inheirted some existing code, that i will explain in a moment, > have needed to extend and ultimately should be able to run in threads. > I've done a bunch of work with python but very little with threads and > am looking for some pointers on how to implement, an

Re: invert or reverse a string... warning this is a rant

2006-10-20 Thread Hendrik van Rooyen
"Brad" <[EMAIL PROTECTED]> wrote: > Steven D'Aprano wrote: > > > Gah!!! That's *awful* in so many ways. > > Thanks... I'm used to hearing encouragement like that. After a while you > begin to believe that everything you do will be awful, so why even > bother trying? > > > > It has been my exper

Re: Arrays? (Or lists if you prefer)

2006-10-23 Thread Hendrik van Rooyen
From: <[EMAIL PROTECTED]> wrote: 8<--- > So: > Way to do SIMPLE array, either internally or externally, with Python, > please. to help you see it - here is a simple 3 row by 3 column list: myarray = [[1,2,3],[4,5,6],[7,8,9]] the first "row" is myarray[0] - ie

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-23 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: Méta-MCI wrote: > For the professional developments, it is a major risk. some days, I ask myself why I shouldn't just use GPL for everything I do, and ship it as source code only. because then you would deny your work to thousands of ungrateful, un

Re: Rabbit Modules - Dynamic C - Python

2006-10-23 Thread Hendrik van Rooyen
"Picio" <[EMAIL PROTECTED]> wrote: > Hello, > I would wonder if anyone knows something about programming with > Python, Rabbit Core Modules, that normally were programmed with Dynamic > C. > > I mean either: > - something like using python to create code in dynamic suitable for > the rabbit core

Re: Tkinter question

2006-10-23 Thread Hendrik van Rooyen
Sorin Schwimmer wrote: Hi All, Is it possible to have a widget id while it is created? Something like this: Button(root, text='...', command= lambda v=: fn(v)).grid() and then the function: def fn(v): v['bg']='BLUE' # or maybe nametowidget(v)['bg']='BLUE' Thanks, Sorin - just give the t

Re: Tkinter question

2006-10-25 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Eric Brunel wrote: > > > But Hendrik's solution is better, since it avoids the use of lambda, which > > is often difficult to understand. > > storing the button reference in a variable doesn't help if you want to use the > same callback for multiple b

Re: question about True values

2006-10-25 Thread Hendrik van Rooyen
"Robert Kern" <[EMAIL PROTECTED]> wrote: 8<-- > It's a bit of an abuse on the English language, but what isn't in software? jumps used not to be - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: basic questions on cmp, < and sort

2006-10-25 Thread Hendrik van Rooyen
"Ben Finney" <[EMAIL PROTECTED]> wrote: To: Sent: Thursday, October 26, 2006 4:44 AM Subject: Re: basic questions on cmp, < and sort Schüle Daniel <[EMAIL PROTECTED]> writes: 8<--- > third question > > sort([[1,2,3],["ABC"],['Z','A'], X(), 4) >>> sor

Re: cleaner way to write this?

2006-10-26 Thread Hendrik van Rooyen
"John Salerno" <[EMAIL PROTECTED]> wrote: 8<- > > LOL. Guess I'm doing things right, then? ;) > you can NEVER be sure - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: displaying \n-less prompts in a pythonic way

2006-10-27 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: 8<--- > >>> mystr = raw_input("Who is this? ") > Who is this? Steve how did you know how to answer that? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: wxPython 2.7.1.3

2006-10-28 Thread Hendrik van Rooyen
"Johann C. Rocholl" <[EMAIL PROTECTED]>wrote: 8<-- > Oh, it's fun to be a speling fanatic! :-) six munce ago I could not even spell 'fatanic' - and now I are one... I wander what a speling fanatic is? - Hendrik -- http://mail.python.org/mailman/listinfo/p

Tkinter Listbox string formatting question - how to kill a dancing snake ?

2006-10-30 Thread Hendrik van Rooyen
I am populating a listbox from a directory that looks like this: variable_dict = {"funny_long_or_short_variable_name_as_key": (2,45),.. the tuple represents a "card, line" pair. medf is a font object and a forward reference here. I write: for x in variable_dict: txt = x while medf.m

Re: Python windows interactive.

2006-10-30 Thread Hendrik van Rooyen
"notejam" <[EMAIL PROTECTED]> Top posted: > Thanks everyone for the help. I got a simple two line program to work > from a text file. > Can not figure out how to write more than one line in interpreter mode. > Is that all interpreter is good for, testing one liners? I have it > run the progra

Re: Tkinter Listbox string formatting question - how to kill a dancingsnake ?

2006-10-31 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > instead of trying to force the listbox to behave like a multicolumn > widget, maybe you could switch to another widget? some alternatives include > > a Text widget (you have to roll your own selection logic) I _really_ don't feel strong enough

Re: Tkinter Listbox string formatting question - how to kill adancingsnake ?

2006-10-31 Thread Hendrik van Rooyen
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > > > instead of trying to force the listbox to behave like a multicolumn > > widget, maybe you could switch to another widget? some alternatives include

Re: report progress from C function

2006-11-02 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Michael S wrote: > > > I downloaded Pyrex and ran it through their own > > example. The code looks quite messy, and I even saw a > > few "goto"s. > > looked at the assembler output from your C compiler lately? > > LOL! - is it even possible to c

Re: Tkinter Listbox string formatting question - how to kill a dancingsnake ?

2006-11-02 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: In the meantime, I have produced this evil hack, that takes advantage of the difference in pixel widths between the space, and either the fullstop or the single quote... It will only work if you have quite a lot of space to waste between columns, an

Is there a way to define a true global across modules?

2006-11-03 Thread Hendrik van Rooyen
I am struggling with this - I want to define a "system-wide" flag for use as a semaphore. It looks to me as if the only way to do it is to import all the modules that need to access it into the main namespace using the " from whatever import * " form. Is there a way to have one global object know

Re: Is there a way to define a true global across modules?

2006-11-03 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > > I am struggling with this - I want to define a "system-wide" flag for use as a > > semaphore. > > http://www.effbot.org/pyfaq/how-do-i-share-global-variables-across

Re: Is there a way to define a true global across modules?

2006-11-03 Thread Hendrik van Rooyen
"robert" <[EMAIL PROTECTED]> wrote: > Fredrik Lundh wrote: > > Hendrik van Rooyen wrote: > > > >> I am struggling with this - I want to define a "system-wide" flag for > >> use as a > >> semaphore. > > > > http://ww

Re: Having trouble with file modes

2006-11-03 Thread Hendrik van Rooyen
"erikcw" <[EMAIL PROTECTED]> wrote: 8< > #loop through patterns list and find/replace data > for o, r in patterns: > data = data.replace(o, r) > print "Replaced %s with %s" % (o, r) > f.write(data) > f.close() > > This results in an empty file. All of the

Re: Programming Language that is Spreadsheet/Table Based

2006-11-05 Thread Hendrik van Rooyen
"James Stroud" <[EMAIL PROTECTED]> wrote: > Gerard Flanagan wrote: 8<-- > Thank you, this is very good stuff to think about. > > James I can't really add to the above train of thought... And I don't know if this will help - but if you want to think,

Re: tips requested for a log-processing script

2006-11-05 Thread Hendrik van Rooyen
"Jaap" <[EMAIL PROTECTED]> wrote: > Python ers, > As a relatively new user of Python I would like to ask your advice on > the following script I want to create. > > I have a logfile which contains records. All records have the same > layout, and are stored in a CSV-format. Each record is (non-uni

Re: Is there a way to define a true global across modules?

2006-11-05 Thread Hendrik van Rooyen
"alex23" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "robert" <[EMAIL PROTECTED]> wrote: > > > Fredrik Lundh wrote: > > > > http://www.effbot.org/pyfaq/how-do-i-share-global-variables-across-modules.htm > &g

Re: Unicode/ascii encoding nightmare

2006-11-06 Thread Hendrik van Rooyen
"John Machin" <[EMAIL PROTECTED]> wrote: 8<--- > I strongly suggest that you read the docs *FIRST*, and don't "tinker" > at all. > > HTH, > John This is *good* advice - its unlikely to be followed though, as the OP is prolly just like most of us - you unpack

Re: [DLC] ChiPy Monthly Meeting, Thursday 7:00 pm.

2006-11-07 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > I don't suppose there's any chance that someone might be passing > Schaumberg on their way to this meeting? I'm teaching there, and a ride > would avoid me having to rent a car (and hence increase the probability > I'd make it). Where in the whole wid

Re: [DLC] ChiPy Monthly Meeting, Thursday 7:00 pm.

2006-11-08 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> > Hendrik van Rooyen wrote: > > "Steve Holden" <[EMAIL PROTECTED]> wrote: > > > > > >>I don't suppose there's any chance that someone might be passing > >>Schaumberg on their

Re: substring search without using built in utils

2006-11-09 Thread Hendrik van Rooyen
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote: 8<-- > Given a source list, find the offset of a target sub-list within the > source list, in other words, find for lists. > > i.e. search(source, target) returns n if source[n:n+len(target)] == target > for any sequence type. >

Re: Multithreaded C API Python questions

2006-11-09 Thread Hendrik van Rooyen
"Svein Seldal" <"svein at seldal dot com">wrote: 8<--- > I am dependent upon the ability to have to threads executing in python > land at the same time. How can this be done? call time.sleep(0.001) in each, as well as the main thread, to politely giv

Re: Py3K idea: why not drop the colon?

2006-11-10 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: 8<--- > >>> color = "blue" > >>> if color == "red" or "green" or "yellow": > ... print color, "is red or green or yellow" > ... > blue is red or green or yellow *grin* - this can be construed as a wea

Re: Py3K idea: why not drop the colon?

2006-11-12 Thread Hendrik van Rooyen
"Dan Lenski" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > > > > 8<--- > > > >>> color = "blue" > &

Re: explicit self revisited

2006-11-13 Thread Hendrik van Rooyen
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote: > Especially since there is a comefrom *breaks into song* : "Oh Susannah, now don't you cry for me..." -- http://mail.python.org/mailman/listinfo/python-list

Re: Random image text generation?

2006-11-13 Thread Hendrik van Rooyen
From: "Leif K-Brooks" <[EMAIL PROTECTED]> wrote: > Steven D'Aprano wrote: > > For a text only solution, consider putting up a natural language question > > such as: > > > > What is the third letter of 'national'? > > What is four plus two? > > How many eggs in a dozen? > > Fill in the blank: Mary

Re: Data structure for ordered sequence

2006-11-14 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > unless this is homework because the pil people will not let > > you distribute pils. > > I'm not sure I can parse this sentence fragment. What do you mean? oh come on! - you of all people should know that "pils" mean

Re: Python development time is faster.

2006-11-14 Thread Hendrik van Rooyen
"Chris Brat" <[EMAIL PROTECTED]> wrote: > I've seen a few posts, columns and articles which state that one of the > advantages of Python is that code can be developed x times faster than > languages such as <>. > > Does anyone have any comments on that statement from personal > experience? > How

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Hendrik van Rooyen
"Simon Brunning" <[EMAIL PROTECTED]> Wrote: > On 11/11/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Hendrik van Rooyen wrote: > > > > >> blue is red or green or yellow > > > > > > *grin* - this can be construed as a weakness

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Hendrik van Rooyen
"Robert Kern" <[EMAIL PROTECTED]> wrote: > Michael Hobbs wrote: > > True enough. Although, I have to ask how many times you define a new > > function only to have Python spit a syntax error out at you saying that > > you forgot a colon. It happens to me all the time. (Usually after an > > "else"

Re: Py3K idea: why not drop the colon?

2006-11-14 Thread Hendrik van Rooyen
"Dan Lenski" <[EMAIL PROTECTED]> wrote: > I think part of learning to think like a computer is learning to stop > associating computer logic too strongly with the natural language > meanings of "and", "or", and "not". This is true - and you have left out "but" - Hendrik -- http://mail.p

Re: Python v PHP: fair comparison?

2006-11-14 Thread Hendrik van Rooyen
Olexandr Melnyk wrote: > PHP has a lower barrier to entry I don't think so. Python has more intuitive syntax for beginners and is one of the best choices for the first programming language to pick up. I second this - before discovering Python (in a GSM module's guts) - I was being steered in t

Re: Secure Python

2006-11-15 Thread Hendrik van Rooyen
"Fredrik Tolf" <[EMAIL PROTECTED]> wrote: > I was thinking that maybe it could be possible to load and run untrusted > Python code, simply by loading it in a module with a modified version of > __builtins__. Without any reachable function that do unsafe operations, > code running from there shoul

Re: Decimal() instead of float?

2006-11-15 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > .. and seriously, under- > standing the various aspects of floats and decimals is utterly trivial > compared to all the nearly-magical things you need to understand to be > able to do geographical calculations at a sub-millimeter scale. heck, >

Re: Decimal() instead of float?

2006-11-15 Thread Hendrik van Rooyen
"John Salerno" <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > > Here in Austraila, (I expect this is common to most countries), there > > are people who are utterly clueless about elementary data model rules, > > like identification "numbers" should be kept as strings. > > Do you mean that I

Re: Py3K idea: why not drop the colon?

2006-11-17 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > have anyone counted the number of colons used in this way by the OP, > in his first few posts ? (if there isn't a name for the law that > states that the number for a "let's remove the colons" proposal is > always greater than zero, someone should com

Re: Secure Python

2006-11-17 Thread Hendrik van Rooyen
"Stephan Kuhagen" <[EMAIL PROTECTED]> wrote: > The problem with linux kernel limits are, that they won't work really good > on MacOSX and Windows... OTOH the idea is the right one, but the effect can > be achieved inside of Python. Since Python does byte compile the code and > the interpreter eva

Re: Secure Python

2006-11-17 Thread Hendrik van Rooyen
"Stephan Kuhagen" <[EMAIL PROTECTED]> wrote: > The problem with linux kernel limits are, that they won't work really good > on MacOSX and Windows... OTOH the idea is the right one, but the effect can > be achieved inside of Python. Since Python does byte compile the code and > the interpreter eva

Re: Secure Python

2006-11-17 Thread Hendrik van Rooyen
"Stephan Kuhagen" <[EMAIL PROTECTED]> wrote: > The problem with linux kernel limits are, that they won't work really good > on MacOSX and Windows... OTOH the idea is the right one, but the effect can > be achieved inside of Python. Since Python does byte compile the code and > the interpreter eva

Re: Secure Python

2006-11-17 Thread Hendrik van Rooyen
"Stephan Kuhagen" <[EMAIL PROTECTED]> wrote: > The problem with linux kernel limits are, that they won't work really good > on MacOSX and Windows... OTOH the idea is the right one, but the effect can > be achieved inside of Python. Since Python does byte compile the code and > the interpreter eva

Re: sum and strings

2006-08-25 Thread Hendrik van Rooyen
"Fredrik Lundh" <[EMAIL PROTECTED]> Wrote: 8< | (I still think a "join" built-in would be nice, though. but anyone who | argues that "join" should support numbers too will be whacked with a | great big halibut.) | | Strange this - you don't *LOOK* lik

Re: Is this a good idea or a waste of time?

2006-08-25 Thread Hendrik van Rooyen
"Simon Forman" <[EMAIL PROTECTED]> wrote: 8<- | BTW, speaking of "strictness", "more stricter" is invalid English, | just "stricter" is the "correct" form. ;-) or alternatively the construct "more strict" is also acceptable - Hendri

Consistency in Python

2006-08-25 Thread Hendrik van Rooyen
Hi, for S where S is a Standard Python type: The slice notation S[n] returns either: The n'th element of S, or The value of the dictionary entry whose key is n. This is beautiful because as a programmer you don't have to worry what S is... (and as an aside - This consistency h

Fw: Is this a good idea or a waste of time?

2006-08-25 Thread Hendrik van Rooyen
"Simon Forman" <[EMAIL PROTECTED]> wrote: 8<- | BTW, speaking of "strictness", "more stricter" is invalid English, | just "stricter" is the "correct" form. ;-) or alternatively the construct "more strict" is also acceptabl

Re: Fw: Is this a good idea or a waste of time?

2006-08-26 Thread Hendrik van Rooyen
"Simon Forman" <[EMAIL PROTECTED]> Wrote: | Hendrik van Rooyen wrote: | > "Simon Forman" <[EMAIL PROTECTED]> wrote: | > | > 8<- | > | > | BTW, speaking of "strictness",

Re: Consistency in Python

2006-08-26 Thread Hendrik van Rooyen
"Paul Boddie" <[EMAIL PROTECTED]> Wrote: | Hendrik van Rooyen wrote: | > | > There seems to be no common methods such as- | > "prepend" - for adding something to the beginning | > "append" - for adding something to the end | >

Re: Consistency in Python

2006-08-26 Thread Hendrik van Rooyen
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote, oder schrieb, of het geskryf: | Hendrik van Rooyen schrieb: | > Hi, | > | > for S where S is a Standard Python type: | > The slice notation S[n] returns either: | > The n'th element of S, or | >

Re: How to let a loop run for a while before checking for break condition?

2006-08-28 Thread Hendrik van Rooyen
"Claudio Grondi" <[EMAIL PROTECTED]> Wrote: | Fredrik Lundh wrote: | > Diez B. Roggisch wrote: | > | >> A while loop has a condition. period. The only thing to change that is | >> to introduce a uncoditioned loop, and use self-modifying code to make | >> it a while-loop after that timer interrupt

Re: How to let a loop run for a while before checking for breakcondition?

2006-08-28 Thread Hendrik van Rooyen
"Claudio Grondi" <[EMAIL PROTECTED]> wrote: | Diez B. Roggisch wrote: | > Claudio Grondi schrieb: | > | >> | >> Sometimes it is known in advance, that the time spent in a loop will | >> be in order of minutes or even hours, so it makes sense to optimize | >> each element in the loop to make it

Re: time.clock() going backwards??

2006-08-29 Thread Hendrik van Rooyen
"Grant Edwards" <[EMAIL PROTECTED]> Wrote: | On 2006-08-28, Grant Edwards <[EMAIL PROTECTED]> wrote: | | >>> For processors that run at (say) 2GHz, several million (say 10 | >>> million) represents a difference of 10e6/2e9 = 0.005 seconds | >>> between when the processors were sufficiently power

Re: How to let a loop run for a while before checking for break condition?

2006-08-29 Thread Hendrik van Rooyen
"Claudio Grondi" <[EMAIL PROTECTED]> wrote: 8<- | The test of the counter is what actually slows the loop down. Probably | the test of time slows the loop even more down. Any test slows a loop | down, so the idea here is to get rid of the test what can be done by | interrupti

  1   2   3   4   5   6   7   8   9   >