Re: repeating regular expressions in one string

2005-11-16 Thread Carl J. Van Arsdall
Shane wrote: > Hi folks, > > I'm new to regular expressions (and a novice at Python) but it seems to be > the tool I need for a particular problem. I have a bunch of strings that > looks like this: > > 'blahblah_sf1234-sf1238_blahblah' > > and I would like to use the re module to parse all the 's

Re: about try and exception

2005-11-17 Thread Carl J. Van Arsdall
I would think that when the exception occurs the interpreter exits the block of code it is currently in and enters the exception block. Thus the line n = 1/2 would never get executed. -Carl Ben Bush wrote: > I wrote the following code to test the use of "try...exception", > and I want n to be

Re: about try and exception

2005-11-17 Thread Carl J. Van Arsdall
Shi Mu wrote: > On 11/17/05, Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: > >> I would think that when the exception occurs the interpreter exits the >> block of code it is currently in and enters the exception block. >> >> Thus the line n = 1/2 woul

Re: Mutability of function arguments?

2005-12-07 Thread Carl J. Van Arsdall
clude with the foo > within the FooWrapper now modified? > Yes, passing FooWrapper will pass by reference to a python function thereby allowing you to edit the fooToLoad HTH, carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Threading in python

2005-12-13 Thread Carl J. Van Arsdall
. Thanks in advance, -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading in python

2005-12-14 Thread Carl J. Van Arsdall
y one time. Is there a way to get around this? This isn't something I need to do, I'm just curious at this point. -c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Question about tuple lengths

2005-12-14 Thread Carl J. Van Arsdall
From my interpreter prompt: >>> tuple = ("blah") >>> len(tuple) 4 >>> tuple2 = ("blah",) >>> len (tuple2) 1 So why is a tuple containing the string "blah" without the comma of length four? Is there a good reason for this or

Re: Why and how "there is only one way to do something"?

2005-12-15 Thread Carl J. Van Arsdall
ot;for" loop would be the most obvious. I think it really is obvious in most cases with python. Although, obvious to whom is a good question. If you don't know the language very little will be obvious to you, however one who is familiar with python (rtfm) would know which cases should obviously use "while" and which cases should obviously use "for" 2cents -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a refrence issue?

2005-12-28 Thread Carl J. Van Arsdall
s would give you what you want, and there's more than one way to do this. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Abuse of the object-nature of functions?

2006-07-11 Thread Carl J. Van Arsdall
Bruno Desthuilliers wrote: > Carl J. Van Arsdall wrote: > >> Sybren Stuvel wrote: >> >> >>> Ant enlightened us with: >>> >>> >>> >>>> try: >>>> assertion = callable.is_assertion >&

Is there a limit to os.popen()?

2006-07-11 Thread Carl J. Van Arsdall
t is growing). Does os.popen() have some kind of read buffer limit that i'm hitting which is causing things to break? -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a limit to os.popen()?

2006-07-11 Thread Carl J. Van Arsdall
t; > Well, running the make on the command line seems to work just fine, no errors at all. I, in fact, get the results I expect with no error messages printed out. I thought maybe something might have used cat as a utility, thanks, i'll keep on it. -c -- Carl J. Van Arsdall [E

Re: Is there a limit to os.popen()?

2006-07-11 Thread Carl J. Van Arsdall
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > > >> Well, running the make on the command line seems to work just fine, no >> errors at all. >> > > What ab

Re: Python for Embedded Systems?

2006-07-14 Thread Carl J. Van Arsdall
> > This raises a good question. Is there a need for python to change somewhat to work better in an embedded profile? Are there many people in the community interested in using python for embedded projects? -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: How to lock files (the easiest/best way)?

2006-07-17 Thread Carl J. Van Arsdall
Closing the file should release the lock (unless you have a truly > horrible operating system). > > I also find that fcntl has problems with NFS (or at least, *I* had problems using the python fcntl module and nfs - could be that horrible operating system, but doing things like that o

Re: How to force a thread to stop

2006-07-24 Thread Carl J. Van Arsdall
geQueue() op() So with this whole "hey mr. nice thread, please die for me" concept gets ugly quickly in complex situations and doesn't scale well at all. Furthermore, say you have a complex systems where users can write pluggable modules. IF a module gets stuck inside of som

Re: How to force a thread to stop

2006-07-24 Thread Carl J. Van Arsdall
Steve Holden wrote: > Carl J. Van Arsdall wrote: > [... rant ...] > >> So with this whole "hey mr. nice thread, please die for me" concept gets >> ugly quickly in complex situations and doesn't scale well at all. >> Furthermore, say you ha

Re: How to force a thread to stop

2006-07-24 Thread Carl J. Van Arsdall
Jean-Paul Calderone wrote: > On Mon, 24 Jul 2006 11:22:49 -0700, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> > wrote: > >> Steve Holden wrote: >> >>> Carl J. Van Arsdall wrote: >>> [... rant ...] >>> >>> >

Re: How to force a thread to stop

2006-07-24 Thread Carl J. Van Arsdall
Steve Holden wrote: > Carl J. Van Arsdall wrote: > > >> >> > I take this to mean you don't want to do the necessary research? ;-) > Well, i've been looking at this on and off for quite some time now, I almost feel like I've seen it all in reg

Re: How to force a thread to stop

2006-07-25 Thread Carl J. Van Arsdall
[EMAIL PROTECTED] wrote: > Carl J. Van Arsdall wrote: > [...] > >> My problem with the fact that python doesn't have some type of "thread >> killer" is that again, the only solution involves some type of polling >> loop. >> > >

Re: How to force a thread to stop

2006-07-25 Thread Carl J. Van Arsdall
Gerhard Fiedler wrote: > On 2006-07-25 13:30:22, Carl J. Van Arsdall wrote: > > >>> Running os.system() in multiple threads strikes me as kind of whacked. >>> Won't they all compete to read and write stdin/stdout simultaneously? >>> >>>

Re: How to force a thread to stop

2006-07-26 Thread Carl J. Van Arsdall
[EMAIL PROTECTED] wrote: > Carl J. Van Arsdall wrote: > > I don't get what threading and Twisted would to do for > you. The problem you actually have is that you sometimes > need terminate these other process running other programs. > Use spawn, fork/exec* or maybe one of

Re: How to force a thread to stop

2006-07-26 Thread Carl J. Van Arsdall
Paul Rubin wrote: > "Carl J. Van Arsdall" <[EMAIL PROTECTED]> writes: > >> The problem I have is a large distributed system, that's the reality >> of it. The short summary, I need to use and control 100+ machines in >> a computing farm.

Threads vs Processes

2006-07-26 Thread Carl J. Van Arsdall
reads are over used. I don't understand why, so can anyone shed any light on this? Thanks, -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: How to force a thread to stop

2006-07-26 Thread Carl J. Van Arsdall
[EMAIL PROTECTED] wrote: > Carl J. Van Arsdall wrote: > >> [EMAIL PROTECTED] wrote: >> >>> Carl J. Van Arsdall wrote: >>> >>> I don't get what threading and Twisted would to do for >>> you. The problem you actually have is that y

Re: How to force a thread to stop

2006-07-26 Thread Carl J. Van Arsdall
Paul Rubin wrote: > "Carl J. Van Arsdall" <[EMAIL PROTECTED]> writes: > >> Alright, so manually running builds is going to be crazy and >> unmanageable. So what the people who came before me did to manage >> this scenario was to fork on thread per b

Re: Threads vs Processes

2006-07-26 Thread Carl J. Van Arsdall
Paul Rubin wrote: > "Carl J. Van Arsdall" <[EMAIL PROTECTED]> writes: > >> Processes seem fairly expensive from my research so far. Each fork >> copies the entire contents of memory into the new process. >> > > No, you get two processes whose

Re: How to force a thread to stop

2006-07-26 Thread Carl J. Van Arsdall
Gerhard Fiedler wrote: > On 2006-07-26 19:08:44, Carl J. Van Arsdall wrote: > > >> Also, threading's condition and event constructs are used a lot >> (i talk about it somewhere in that thing I wrote). They are easy to use >> and nice and ready for me, with

Re: Threads vs Processes

2006-07-27 Thread Carl J. Van Arsdall
[EMAIL PROTECTED] wrote: > Carl J. Van Arsdall wrote: > >> Alright, based a on discussion on this mailing list, I've started to >> wonder, why use threads vs processes. >> > > In many cases, you don't have a choice. If your Python program > is

Re: Threads vs Processes

2006-07-27 Thread Carl J. Van Arsdall
[EMAIL PROTECTED] wrote: > Carl J. Van Arsdall wrote: > >> Ah, alright, I think I understand, so threading works well for sharing >> python objects. Would a scenario for this be something like a a job >> queue (say Queue.Queue) for example. This is a situation in whic

Re: How to force a thread to stop

2006-07-27 Thread Carl J. Van Arsdall
e had to and abstract the ssh calls away so that we could do something better later. -c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads vs Processes

2006-07-27 Thread Carl J. Van Arsdall
[EMAIL PROTECTED] wrote: > Carl J. Van Arsdall wrote: > [...] > >> I actually do use pickle (not for this, but for other things), could you >> elaborate on the safety issue? >> > > >From http://docs.python.org/lib/node63.html : > > Warnin

Re: Multiple Telnet sessions through one script

2006-07-31 Thread Carl J. Van Arsdall
ession1.interact() > > output : > ospf> > > But in this case, i want in one console router one can open and on > other console ospf should open. But this i want to do is through one > script only. > > Regds > Vik > > -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Get age of a file/dir

2006-08-01 Thread Carl J. Van Arsdall
time(path) However this only gets creation time on Windows, on Unix it gets the the time of the last change. Any ideas? Thanks! -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: How to force a thread to stop

2006-08-03 Thread Carl J. Van Arsdall
s > <http://www.pcwatchdog.com/> or the like... > > > Yea, there are other free solutions you might want to check out, I've been looking at ganglia and nagios. These require constant communication with a server, however they are customizable in that you can have the server take action on various events. Cheers! -c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyro stability

2006-11-06 Thread Carl J. Van Arsdall
. but thanks. Pyro is fucking amazing and has been a great help to a couple of our projects. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyro stability

2006-11-07 Thread Carl J. Van Arsdall
Paul Boddie wrote: > Beliavsky wrote: > >> Carl J. Van Arsdall wrote: >> > > [Enthusiasm for Pyro, not for those with sensitivity to rude words] > > >> You should watch your language in a forum with thousands of readers. >> I think you s

Re: Pyro stability

2006-11-07 Thread Carl J. Van Arsdall
Steve Holden wrote: > Carl J. Van Arsdall wrote: > >> Paul Boddie wrote: >> >> >>> Beliavsky wrote: >>> >>> >>> >>>> Carl J. Van Arsdall wrote: >>>> >>>> >>> [En

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Carl J. Van Arsdall
uld really be offended by my profanity-free statement above). -c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Carl J. Van Arsdall
Cliff Wells wrote: > On Wed, 2006-11-08 at 10:12 -0800, Carl J. Van Arsdall wrote: > >> BartlebyScrivener wrote: >> > > >>> I agree. And Python is an extremely serious matter calling for decorum >>> and propriety. >>> >>&

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Carl J. Van Arsdall
y people have gotten way to used to the political correctness shoved down our throats by society. Again, that's just my take on it, but those of you who would be offended by my statements and use of colorful language to describe my love of technology should probably just adjust your spam f

Re: profanity on comp.lang.python (was Re: Pyro stability)

2006-11-08 Thread Carl J. Van Arsdall
able to explain code or concepts to someone, but adjective choice (at least in the way I had used it) hardly hinders one's ability to communicate python ideas and code. Can you explain how the use of profanity affects one's ability to code in python or explain their code? The only thin

Re: what are you using python language for?

2006-06-06 Thread Carl J. Van Arsdall
lities (utilities to help manage distribution of work across 70 machines) and we are currently developing a distributed execution framework. Some cool stuff if you ask me (I mean, i had better like it, its my job!) -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista So

Re: Killing a thread

2006-06-09 Thread Carl J. Van Arsdall
iced that each python thread spawns a new interpreter. If python is doing this, I would think that each thread could be associated with PIDs or something. I haven't thought about it too much, its a little to crazy/brute force for me, but I thought i'd throw it out there so you g

Re: Advanced lockfiles

2006-06-12 Thread Carl J. Van Arsdall
tl to get a lock on lockfile"}, {"releaseLock", lock_releaseLock, METH_VARARGS, "releases lock on lockfile"}, {NULL, NULL} }; /*Close the file to be neat about things*/ void cleanupModule(void) { close(fp); } /*Init function that python needs to load this as

Question about the Exception class

2006-06-14 Thread Carl J. Van Arsdall
ething else equally vanilla? Are there any difference to library provided exceptions other than their names? -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

need helping tracking down weird bug in cPickle

2006-06-20 Thread Carl J. Van Arsdall
ceQueue.initQueue() File "/home/build/bin/resourceManager/resourceQueue.py", line 58, in initQueue raise ResourceError, "Unknown Error loading Queue" resourceError.ResourceError: Unknown Error loading Queue -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Quick Question

2006-06-22 Thread Carl J. Van Arsdall
is array you store strings, so if you want to print stuff out in hex you need to give python integers, so let's say you have a list of integers: thisArray = [256,512,1024] for item in thisArray: print "%x"%item That will print those integers in hex. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: to py or not to py ?

2006-06-27 Thread Carl J. Van Arsdall
application in python requires > self-discipline and attention to details, looking at the way you spell > I think it will be a challenge ;) > One more comment would be that running parallel applications on python can be problematic because of the way python does threading (an

Re: to py or not to py ?

2006-06-28 Thread Carl J. Van Arsdall
s that arise, its more like inefficiency. Anyhow, it all depends on what you are trying to do and the needs of your application. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: to py or not to py ?

2006-06-29 Thread Carl J. Van Arsdall
Tom Plunket wrote: > Carl J. Van Arsdall wrote: > > >> Because of the GIL only one thread can actually run at a time. >> > > I've recently been wondering about this, since in the work I do, a lot > of time is spent doing disk I/O. So if I want the UI to

Re: Abuse of the object-nature of functions?

2006-07-11 Thread Carl J. Van Arsdall
re doomed" traceback.print_exc() #something to print the traceback exit_gracefully() Is this frowned upon? You still handle the error and you know where it happened and what happened. Anything wrong with this? I don't like the idea of my system crashing for any reason. -carl --

Re: smtplib needs me to put from/to headers in the message?

2006-08-24 Thread Carl J. Van Arsdall
ty, this would include to, from, etc. Then whatever smtp library is available simply takes that message and a server and handles the rest. I don't think that the current functionality should be stripped out or anything, but that this other "interface" exist for a much more i

trackin down hard to find bugs

2006-09-06 Thread Carl J. Van Arsdall
xception so that I could piece things together and try to solve this thing? TIA! -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Help me use my Dual Core CPU!

2006-09-12 Thread Carl J. Van Arsdall
. > Me, too. I'd love to talk over Linda with other aficionados, > and/or hunt together for an excuse to use her/it. > Funny you should mention that. I've had PyLinda opened in firefox for a couple days waiting to be read about. I have a large distributed system I&#x

How to convert a timedelta object to a string?

2006-09-14 Thread Carl J. Van Arsdall
dTime.group(2)), hours=int(parsedTime.group(1))) parsedTime = timeRegex.match(resultsDict[key].stop) stopDelta = datetime.timedelta(seconds=int(parsedTime.group(3)), minutes=int(parsedTime.group(2)), hours=int(parsedTime.group(1))) duration = stopDelta - startDelta Thanks, -car

Re: How to convert a timedelta object to a string?

2006-09-14 Thread Carl J. Van Arsdall
tobiah wrote: > Carl J. Van Arsdall wrote: > >> Basically I used the datetime module and timedelta objects to calculate >> a difference between two times. Now I'm trying to figure out how I make >> that time delta a string HH:MM:SS >> >> >>

Re: Upgrading question

2006-09-20 Thread Carl J. Van Arsdall
ython to point to 2.5 instead of 2.4 -c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: a different question: can you earn a living with *just* python?

2006-09-26 Thread Carl J. Van Arsdall
on a single language, depending on > the job at hand.) > Be familiar with lots of tools, get good at the ones you feel will help you get the job done. No doubt you'll be most proficient in the one you need to use the most, but you'll always need to move around, its d

Re: a different question: can you earn a living with *just* python?

2006-09-27 Thread Carl J. Van Arsdall
f the complex things simple. But I also like a language where, if I need it, I can tap into some raw power and do that really wild stuff. So its simple to use if that's all you need yet offers the complexity to get things done that a purely "simple" language can't do. I&#

Is anyone using Python for embedded applications?

2006-12-12 Thread Carl J. Van Arsdall
re of. Thanks to everyone for their input! -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release -- http://mail.python.org/mailman/listinfo/python-list

Re: One module per class, bad idea?

2006-12-12 Thread Carl J. Van Arsdall
se in some cases, or rather, make your module your class (look at the singleton pattern). I actually like to structure all of my code like this, it helps me keep things organized and separated. I guess i'm not sure why it would ever be a really bad idea, maybe if you had really small classes

Re: One module per class, bad idea?

2006-12-12 Thread Carl J. Van Arsdall
Carl Banks wrote: > Carl J. Van Arsdall wrote: > >> Isaac Rodriguez wrote: >> >>>> Yes, it would be a bad idea. =) >>>> >>>> >>> Saying it is a bad idea and not explaining why will not help anyone. I >>> woul

Re: Is anyone using Python for embedded applications?

2006-12-13 Thread Carl J. Van Arsdall
he idea is intriguing, > as I in fact discovered Python because it is embedded in a GPS module > we were evaluating for building into a device - so I will follow your > progress with interest... > > -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: automatically grading small programming assignments

2006-12-14 Thread Carl J. Van Arsdall
class-- does > some version of os.system('rm -Rf /') ? > > The system administrator should make sure that student user accounts (or the auto testing account) doesn't have access to that. Probably should make sure that user applications only get a limited amount of memory too.

Re: Problems with import of modules

2006-01-23 Thread Carl J. Van Arsdall
path from within the script, thus it > contains the doc directory? > > . > > -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

C Extended module init/cleanup

2006-01-23 Thread Carl J. Van Arsdall
ever the module is unloaded some cleanup is run? Thanks, carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: List of files to be opened

2006-01-25 Thread Carl J. Van Arsdall
of the sort. But that still does not solve the problem of > opening them one by one. > > Thanks for all the advice and help. > -- > gurusnetwork.org > Gurus'Network - Are you a guru? > -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: List of files to be opened

2006-01-26 Thread Carl J. Van Arsdall
t;> Gurus'Network - Are you a guru? >> > > os.walk is your friend. Its has wonderful functionality. > > Don't you mean os.path.walk ? > The documentation is in the subsection 'Files and Directories' of the os > module, and there are a couple of exa

Re: 2-dimensional data structures

2006-01-26 Thread Carl J. Van Arsdall
les, or a combination thereof. For example: val = matrix[indexA][indexB] -carl > 'scuse me for being thick - but give me a little pointer and I will do > the rest. > -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread imbalance

2006-02-02 Thread Carl J. Van Arsdall
onditionVar.aquire() conditionVar.wait() functionToDoSomething() This is pseudo python of course, if you need to know about these objects I would suggest consulting the python manual. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Object Oriented vs Pythonic Code, and Pythonic standards

2006-02-07 Thread Carl J. Van Arsdall
quot;Pythonic" code? Thanks, carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Threads and Interpreter death

2006-02-09 Thread Carl J. Van Arsdall
I've been toying with threads a lot lately and I've noticed that if a scripting error occurs in a thread the thread dies, but not the process that spawned the thread. Is python supposed to behave this way or is this type of behavior accidental? Thanks, Carl -- Carl J. Van Arsd

Re: is socket thread safe?

2006-02-15 Thread Carl J. Van Arsdall
take this a step further, you have a status flag that is set to something like QUIT or CONSUME and when the condition is triggered wake up, then examine the status flag to determine if the consumer should then quit, consume, or whatever else you'd want your consumer thread to do.

Re: is socket thread safe?

2006-02-16 Thread Carl J. Van Arsdall
Bryan Olson wrote: > Carl J. Van Arsdall wrote: > >> Steve Horsley wrote: >> >> >>> [EMAIL PROTECTED] wrote: >>> >>> >>> >>>> thread1: >>>> while 1: >>>> buf = s.

Re: is socket thread safe?

2006-02-16 Thread Carl J. Van Arsdall
Jean-Paul Calderone wrote: > On Wed, 15 Feb 2006 12:59:03 -0800, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> > wrote: > >> Steve Horsley wrote: >> >>> [EMAIL PROTECTED] wrote: >>> >>> >>>> thr

Does python have an internal list/dictionary of functions?

2006-02-17 Thread Carl J. Van Arsdall
would be greatly appreciated. Basically, I know that I can create something like this if I have to but I was very much hoping that something already existed somewhere that I could get to via python or by writing a C extension. Thanks in advance! -carl -- Carl J. Van Arsdall [EMAIL PROTEC

Does python have an internal data structure with functions imported from a module?

2006-02-17 Thread Carl J. Van Arsdall
isted somewhere that I could get to via python or by writing a C extension. Thanks in advance! -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Parallel Python

2007-01-10 Thread Carl J. Van Arsdall
ort to making python threading better is a good thing and I'm happy to see the community attempt to make improvements. It would also be cool if this would be open sourced and I'm not quite sure why its not. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Softwa

Tools Designing large/complicated applications

2007-01-11 Thread Carl J. Van Arsdall
r software in another language? Is there anyone here who is forced to use a tool to design python software that completely hates it? Why do you hate it? Thanks! -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

The reliability of python threads

2007-01-24 Thread Carl J. Van Arsdall
or my critical sections, but I wonder if that is really good enough. Does anyone have any conclusive evidence that python threads/locks are safe or unsafe? Thanks, Carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: The reliability of python threads

2007-01-24 Thread Carl J. Van Arsdall
whole GIL thing made me nervous about the locking operations happening truly atomically and not getting weird. Thanks for ensuring me that i'm just nuts :) -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: The reliability of python threads

2007-01-24 Thread Carl J. Van Arsdall
er auditing their code more > carefully, or avoiding threads entirely (the second being what I > suspect your goal is). > > As a last case, I should point out that while the POSIX memory model > can't be proven safe, concrete implementations do not necessarily > suffer from th

Re: The reliability of python threads

2007-01-25 Thread Carl J. Van Arsdall
red. Again, I still don't know how it would get messed up nor can I reproduce the error on my own. Do any of you think that would be a good practice for trying to track this down? (Check the data after reading it, check the data before saving it) -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Mounting shares with python

2007-01-26 Thread Carl J. Van Arsdall
ystem ("the password") > > but it doesn't works. > > I do a lot of that type of stuff. Just setup sudo access for that user and have it state no password. I also do that stuff on remote machines, similarly, setup ssh such that you don't need to use a password.

Re: The reliability of python threads

2007-01-26 Thread Carl J. Van Arsdall
Hendrik van Rooyen wrote: > "Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > > >> [snip] >> > > Are you 100% rock bottom gold plated guaranteed sure that there is > not something else that is also critical that you just haven't realised

Re: Off-Topic Posts

2007-01-26 Thread Carl J. Van Arsdall
; Siberian >>> jail. >>> >>> On Jan 26, 1:13 pm, Richard J Kinch <[EMAIL PROTECTED]> wrote: >>> >>> >>>> alex writes: >>>> >>>>> I have only just joined this group, but have noticed a >>>

Re: The reliability of python threads

2007-01-29 Thread Carl J. Van Arsdall
n I throw a kitchen sink at it in a way I never have before" And away my mind goes, so thank you. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: The reliability of python threads

2007-01-30 Thread Carl J. Van Arsdall
g I can do with my software to offer more stability? -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: The reliability of python threads

2007-01-30 Thread Carl J. Van Arsdall
John Nagle wrote: > Aahz wrote: > >> In article <[EMAIL PROTECTED]>, >> Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: >> My point is that an app that dies only once every few months under load >> is actually pretty damn stable! That is not the

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Carl J. Van Arsdall
% self.urls[i]) > > if __name__ == '__main__': > root = Tkinter.Tk() > frame = Tkinter.Frame(root) > downloader = Downloader([URL] * 10, frame) > def next(cycle): > try: > cycle.next().next() > except StopIteration: &g

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Carl J. Van Arsdall
>> Overkill? Just to download a few web pages? You've got to be >> kidding. >> > > Better "overkill" (whatever that is) than wasting time re-implementing > the same boring thing over and over for no reason. > How is that a waste of time? I wrot

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Carl J. Van Arsdall
ower to him. I, however, do not believe that would be the best approach for a simple problem. Knowing the appropriate tool for the job is a trait of an good engineer. -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Any python scripts to do parallel downloading?

2007-01-31 Thread Carl J. Van Arsdall
Jean-Paul Calderone wrote: > On Wed, 31 Jan 2007 15:13:59 -0800, "Carl J. Van Arsdall" <[EMAIL PROTECTED]> > wrote: > >> Jean-Paul Calderone wrote: >> >>> [snip] >>> >>>> >>> You're right.

Re: Finding cpu time spent on my program

2007-02-05 Thread Carl J. Van Arsdall
take you to the page). You can get some serious numbers using that thing and they have python support as well as some tools for automatically profiling an entire application. Check it out. -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: multithreading concept

2007-02-07 Thread Carl J. Van Arsdall
on, has anyone tried any of the other technologies? I've only used Pyro and i love it, but I'd like opinions and experiences with other technologies if anyone has anything to say. -c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: multithreading concept

2007-02-07 Thread Carl J. Van Arsdall
you need to go. HTH -carl -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: multithreading concept

2007-02-08 Thread Carl J. Van Arsdall
sarily, if he's on a full duplex ethernet connection, then there is some parallelity he can take advantage of. He has upstream and downstream. -c -- Carl J. Van Arsdall [EMAIL PROTECTED] Build and Release MontaVista Software -- http://mail.python.org/mailman/listinfo/python-list

Re: Java Developer Exploring Python

2006-04-18 Thread Carl J. Van Arsdall
e "yes" here, in Poland, > East Europe). > > >> Can anyone recommend an open source IDE for Python that runs on Linux? >> My favorite IDE: vi > > Komodo. But in most cases you don't need any IDE, just good text editor > would make it go. Like Kate, jEdit

Conditions vs Events

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

  1   2   >