Re: search a string

2006-04-20 Thread Carl J. Van Arsdall
p.match(line): print 'I found requested' or you can use one of the string modules, I suggest hitting up the documentation on python.org if you wish to know string functions. -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: search a string

2006-04-20 Thread Carl J. Van Arsdall
Bruno Desthuilliers wrote: > Carl J. Van Arsdall a écrit : > >> david brochu jr wrote: >> >> >>> Hello, >>> >>> >>> I have a text file with the following string: >>> ['\r\n', 'Pinging www.ebayyy.com <

Re: search a string

2006-04-20 Thread Carl J. Van Arsdall
Bruno Desthuilliers wrote: > Carl J. Van Arsdall a écrit : > (snip) > > >> With a file object, to iterate through the lines in a file don't you >> have to use readlines()? >> > > Nope - no more, should I say. The file object is now an iterable.

Re: threading, how to?

2006-04-21 Thread Carl J. Van Arsdall
nization at some point #END Code Anyhow, there are more ways to do it and it really depends on your needs as to how far you need to take this. Hope that helps. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: proposed Python logo

2006-04-21 Thread Carl J. Van Arsdall
gt; I think something Monty Python related would be better. How >> about a nice can of spam? >> > > Six words: copyright violation ... trademark violation. > Six? Looks more like 4 to me. -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Wake on LAN and Shutdown for Windows and Linux

2006-05-02 Thread Carl J. Van Arsdall
unction if i was writing some type of manager for a computing farm or something like that. -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: easy way to dump a class instance?

2006-05-05 Thread Carl J. Van Arsdall
bjects into files as they are and read them again as they were. Its fairly easy to use and might work well for you. HTH -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: how to construct a binary-tree using python?

2006-05-05 Thread Carl J. Van Arsdall
d + " and " + root.bTag if nodeToFind == root.bTag: return root elif nodeToFind < root.bTag: return( self.findNode(nodeToFind, root.left) ) else: return( self.findNode(nodeToFind, root.right) ) -- Carl J. Van Arsdall [EMAIL PROTECTED] Buil

Re: Shadow Detection?

2006-05-09 Thread Carl J. Van Arsdall
t; globals() {'__builtins__': , '__name__': '__main__', '__doc__': None, 'blah': None} #Taking this a step further, this is a dictionary so you can use the has_key method or try to access the dict and catch an exception should the key not exist >>> if globals().has_key('blah'): ... print "I have blah" ... I have blah -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: design a Condition class

2006-05-10 Thread Carl J. Van Arsdall
tion, conditions are based on > fields by using regexp > > I just wanted to make the comment that there already exists a Condition() class in the threading module. If you plan on using your class with the threading module you might wish to use another name. -carl -- Carl J. Van

Re: Threads

2006-05-11 Thread Carl J. Van Arsdall
constructs for making threads wait: Check out Events and Conditions -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Discussion: Python and OpenMP

2006-05-12 Thread Carl J. Van Arsdall
ading standards (should they ever become available). I see other use cases as well, but I just wanted to throw a couple ideas to see if this was worth thinking about further. Thanks for reading this one, I know it was long but I'd really appreciate your comments! -Carl -- Carl J. Va

Re: [silly] Does the python mascot have a name ?

2006-05-16 Thread Carl J. Van Arsdall
is for this belief. > > To be honest, Monty really makes the most sense to me for a mascot name... now if we can only get past all that damn copyright infringement ;) -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: [silly] Does the python mascot have a name ?

2006-05-16 Thread Carl J. Van Arsdall
wtf is it ?), so it had to be called > something ! > > Well, we could call the perl camel Joe but I don't know if the perlcores (read: hardcore PERL users) would be down for that ;) .c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://ma

Re: Tabs are EVIL *and* STUPID, end of discussion. (Re: Tabs versus Spaces in Source Code)

2006-05-17 Thread Carl J. Van Arsdall
r way, and in the end the indentation levels all work out fine. People want to fight tooth and nail over this debate. But its really not worth it. Get an editor that doesn't completely suck and you won't have problems. .c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

2006-05-17 Thread Carl J. Van Arsdall
gt; > Why couldn't you tab your third line over as close as possible to the start of the quote then use a couple spaces? Then the tabs would work just fine and you could still have your pretty line. .c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

2006-05-17 Thread Carl J. Van Arsdall
Andy Sy wrote: > Carl J. Van Arsdall wrote: > > >>> Next major objection then, how can one practically use 'tabs as >>> semantic indentation' without screwing up formatting of code like >>> the below?? >>> >>> >>>

Re: Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

2006-05-17 Thread Carl J. Van Arsdall
Dave Hansen wrote: > On Wed, 17 May 2006 12:02:46 -0700 in comp.lang.python, "Carl J. Van > Arsdall" <[EMAIL PROTECTED]> wrote: > > >> Andy Sy wrote: >> >>> Carl J. Van Arsdall wrote: >>> >>> >>> >>

Re: Tabs versus Spaces in Source Code ('semantic' vs. arbitrary indentation)

2006-05-17 Thread Carl J. Van Arsdall
abs". I think we've just about beat this discussion to death... nice work everyone! -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: [silly] Does the python mascot have a name ?

2006-05-18 Thread Carl J. Van Arsdall
amn. > > Odi(e) was a punk. I'm gonna be a rebel without a cause and stay with Monty ;) -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Request for comments on python distributed technologies

2006-05-19 Thread Carl J. Van Arsdall
nto the framework making it easy for developers to distribute tasks. Anyhow, any comments would be greatly appreciated! I also hope to release this framework as an open-source project when its finished, so again I community input is important. Thanks! .c -- Carl J. Van Arsdall [EMAI

Re: Request for comments on python distributed technologies

2006-05-19 Thread Carl J. Van Arsdall
other technologies enough to comment on them? .c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: [silly] Does the python mascot have a name ?

2006-05-19 Thread Carl J. Van Arsdall
sub{$_+9}] > > That was easy. > Wakka wakka. -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Software Needs Philosophers

2006-05-22 Thread Carl J. Van Arsdall
t; > > Debate? There's no valid dabate. Tabs bad. Spaces good. > > Hrmms, I think we should debate about the debate now, I mean we've already beaten the actual topic to DEATH. .c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Best way to handle exceptions with try/finally

2006-05-23 Thread Carl J. Van Arsdall
ionary try: self.__userData[variableName] = value finally: self.__mutex.release() return -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to handle exceptions with try/finally

2006-05-24 Thread Carl J. Van Arsdall
rson reading my code would more easily see any exit points in my code. Turns out that it came to bite me later. Again, thanks to all your help and comments on my coding style. .c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: simple print is not working..

2006-05-24 Thread Carl J. Van Arsdall
ee a couple typos First, on the line for line in fsfiles.readlines(): There's an extra s in fsfile Secondly, the line: print line should have an indentation to denote that its the block of code that the for loop will execute on. .c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release

Create a process with a "time to live"

2008-08-15 Thread Carl J. Van Arsdall
but that seems like overkill to do such a simple thing. -Carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Why TypeError: 'str' object is not callable?

2006-03-22 Thread Carl J. Van Arsdall
> messed up what str is? This code used to work. I am trying to figure > out what caused it to cease to work. > > Any ideas? > > -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: [fcntl]how to lock a file

2006-04-10 Thread Carl J. Van Arsdall
but i not even > can write from the python shell with that. > > python 2.2 > linux > kernel 2.4 > glibc-2.3.2-95.6 > > Thanks in advance for any help. > sorry for my bad english > Grazie > Marcello > -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Looking for thoughts on PyMPI

2006-04-13 Thread Carl J. Van Arsdall
oject, thanks! -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

<    1   2