Re: Detecting computers on network

2005-07-21 Thread linuxfreak
How about sending an ICMP echo packet to your broadcast address and checking which hosts send a reply -- http://mail.python.org/mailman/listinfo/python-list

Detecting computers on network

2005-07-21 Thread Sandeep Arya
Hello dear I had sent my earlier queries regarding same topic. However just to be more specific this time.. I just wann try to detect that if there are some ip address in a list of some ip address alive or not. How can i do this? Shall i try to connect them and check that my connection is wor

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread Benjamin Niemann
Jan Danielsson wrote: > Hello all, > >How do I make a python script actually a _python_ in unix:ish > environments? > > I know about adding: > #!/bin/sh > >..as the first row in a shell script, but when I installed python on > a NetBSD system, I didn't get a "python" executable; only a

Re: Setting environment variables for tcsh session

2005-07-21 Thread Dan Sommers
On Thu, 21 Jul 2005 21:39:01 -0500, David Durkee <[EMAIL PROTECTED]> wrote: > I'm trying to write a script I can run from tcsh in Terminal (on Mac > OS X) that will set environment variables that can be accessed by > subsequent commands I execute in that session. Not having any luck so > far. Her

Re: Difference between " and '

2005-07-21 Thread Benji York
Steven D'Aprano wrote: > Michael Hoffman wrote: >>John Machin wrote: >>>[EMAIL PROTECTED] wrote: Can someone tell me the difference between single quote and double quote? >>> >>> ord("'") - ord('"') >>>5 >>Very zen. > But unfortunately incorrect, since the original poster > didn't ask f

Re: Generating images with text in them

2005-07-21 Thread Terry Hancock
On Thursday 21 July 2005 11:29 am, phil hunt wrote: > On Thu, 21 Jul 2005 02:44:03 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: > >On Wednesday 20 July 2005 11:59 pm, phil hunt wrote: > >> I am trying to generate some images (gifs or pngs) with text in > >> them. I can use the Python Imaging Li

Setting environment variables for tcsh session

2005-07-21 Thread David Durkee
Hi, I'm trying to write a script I can run from tcsh in Terminal (on Mac OS X) that will set environment variables that can be accessed by subsequent commands I execute in that session. Not having any luck so far. Here's what I've tried: #!/usr/bin/python import sys import commands

Re: Difference between " and '

2005-07-21 Thread Robert Kern
Steven D'Aprano wrote: > Michael Hoffman wrote: > >>John Machin wrote: >> >>>[EMAIL PROTECTED] wrote: >>> Can someone tell me the difference between single quote and double quote? >>> >>> >>> ord("'") - ord('"') >>>5 >> >>Very zen. > > But unfortunately incorrect, since the original poste

Re: Copying attributes

2005-07-21 Thread Terry Hancock
On Thursday 21 July 2005 08:17 pm, Terry Hancock wrote: > But is "faces" a list, > dictionary, or tuple (or something more obscure)? Lest it be unclear why this matters: >>> da = {'a':1, 'b':2, 'c':3} >>> for d in da: ... print d ... a c b >>> la = [1,2,3] >>> for d in la: ... print d ..

Re: Returning histogram-like data for items in a list

2005-07-21 Thread George Sakkis
"jeethu_rao" <[EMAIL PROTECTED]> wrote: > Adding to George's reply, if you want slightly more performance, you > can avoid the exception with something like > > def hist(seq): > h = {} > for i in seq: > h[i] = h.get(i,0)+1 > return h.items() > > Jeethu Rao The performance penalty of t

Re: Difference between " and '

2005-07-21 Thread Benjamin Niemann
[EMAIL PROTECTED] wrote: > Hi, > > Can someone tell me the difference between single quote and double > quote? There is none. Except that in a double quoted string, single quotes don't have to be escaped and vice versa, sometimes one of the two forms saves you some backslashes: "That's my house"

Re: Difference between " and '

2005-07-21 Thread Steven D'Aprano
Michael Hoffman wrote: > John Machin wrote: > >> [EMAIL PROTECTED] wrote: >> >>> Can someone tell me the difference between single quote and double >>> quote? >> >> >>> ord("'") - ord('"') >> 5 > > Very zen. But unfortunately incorrect, since the original poster didn't ask for the difference

Re: Returning histogram-like data for items in a list

2005-07-21 Thread Bruno Desthuilliers
Ric Deez a écrit : > Hi there, > > I have a list: > L1 = [1,1,1,2,2,3] > > How can I easily turn this into a list of tuples where the first element > is the list element and the second is the number of times it occurs in > the list (I think that this is referred to as a histogram): > > i.e.: >

Apology [was: is this pythonic]

2005-07-21 Thread Steven D'Aprano
It has been suggested to me off-list that my response(s) to Bill Mill in the "is this pythonic" thread were rude and hostile. If that is what people saw in my posts, then I apologise, because that wasn't my intention. In fact, my comments weren't especially even aimed at Bill -- they were int

Re: Copying attributes

2005-07-21 Thread Terry Hancock
On Thursday 21 July 2005 03:47 am, red wrote: > Terry Hancock wrote: > > I'm not sure either, yet, but can you indicate which line in your > > listing is 102 in the source file? That might be helpful. > > 101: ## f1.normal = copy.deepcopy(f.normal) > 102: f1.normal = NMesh.Vert(f.normal[0]

Re: Difference between " and '

2005-07-21 Thread Robert Kern
[EMAIL PROTECTED] wrote: > The only difference is when you want to include " or ' inside the string. If > you want to include the "like" quote, then escape it ("\"", '\''). If you > include the "unlike" quote, no escape is needed ("'" or '"'). > > I think that people new to programming will use

Re: Generating images with text in them

2005-07-21 Thread Terry Hancock
On Thursday 21 July 2005 05:23 am, Daren Russell wrote: > I've just been playing around with this. You can use truetype fonts with: > > font = ImageFont.truetype("/path/to/font.ttf", 12) > > from version 1.1.4 > > http://www.pythonware.com/library/pil/handbook/imagefont.htm for more Wow, I did

Re: Difference between " and '

2005-07-21 Thread jepler
The only difference is when you want to include " or ' inside the string. If you want to include the "like" quote, then escape it ("\"", '\''). If you include the "unlike" quote, no escape is needed ("'" or '"'). I think that people new to programming will use '' if it is unshifted on their keyb

Re: Opinions on KYLIX 3 (Delphi 4 Linux)

2005-07-21 Thread Thomas Bartkus
On Wed, 20 Jul 2005 18:37:48 +1000, David Trudgett wrote: > My advice would be to steer clear of Kylix and choose one of the other > environments suggested to you. If you really like Pascal, fpc may be a > possibility as someone mentioned. ... Well - I really like Python! But - climbing back o

looking for a book on python

2005-07-21 Thread David Fickbohm
People, could someone please recommend a book on python. Ideally a windows oriented one ? Thanks DaveDave FickbohmUse Technology to the Fullest1250 45th st suite 200Emeryville, CA, 94608510 594 4151 voice__Do You Yahoo!?Tired of spam? Yahoo! Mail has

Re: python certification

2005-07-21 Thread [EMAIL PROTECTED]
yeah i figured that since i can't get a certificate i'll make a program and put it on source forge. thanks for all your input. btw. your right i have absolutly no idea what i was getting into but then again thats whats these groups are for...to ask right??? -- http://mail.python.org/mailman/lis

Re: Web-Forms

2005-07-21 Thread Mike Meyer
Mathias Waack <[EMAIL PROTECTED]> writes: > Hi, > > I need to access some information from a web site which are only accessible > through a form. Thus for each bucket of data you have to fill out the form, > submit it and wait for an answer. Very easy - if you don't have to check > some hundred t

Re: Need to interrupt to check for mouse movement

2005-07-21 Thread Peter Hansen
Jp Calderone wrote: > On Thu, 21 Jul 2005 02:33:05 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: >> (And since there is even a wxPython main loop >> integrated with and provided in Twisted, surely you aren't arguing that >> what wx does is somehow unusual or bad.) > > Blocking inside the mainloop

Difference between " and '

2005-07-21 Thread [EMAIL PROTECTED]
Hi, Can someone tell me the difference between single quote and double quote? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-07-21 Thread Michael Hoffman
Reinhold Birkenfeld wrote: > John Roth wrote: > >>Why did Guido want a PEP? > > He said, > > """ > Whoa! Do we really need a completely different mechanism for doing the > same stuff we can already do? The path module seems mostly useful for > folks coming from Java who are used to the Java Path

Re: PEP on path module for standard library

2005-07-21 Thread Michael Hoffman
Reinhold Birkenfeld wrote: > Michael Hoffman wrote: > >>Having path descend from str/unicode is extremely useful since I can >>then pass a path object to any function someone else wrote without >>having to worry about whether they were checking for basestring. I think >>there is a widely used p

Re: Difference between " and '

2005-07-21 Thread Michael Hoffman
John Machin wrote: > [EMAIL PROTECTED] wrote: > >> Can someone tell me the difference between single quote and double >> quote? > > >>> ord("'") - ord('"') > 5 Very zen. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: What does "::" mean?

2005-07-21 Thread Jim Sizelove
Robert Kern wrote: > Michael Hoffman wrote: > >> Robert Kern wrote: > > >>> Well, that part's easy at least: >>> >>> live[::-1] >>> >>> :-) And so the circle is complete ... >> >> >> What about reversed(live)? Or if you want a list instead of an >> iterator, list(reversed(live))? > > > That

Re: PEP on path module for standard library

2005-07-21 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > I really love Jason's 'path' module. Sadly, I've encountered a serious > problem with using it. When you try to 'freeze' an application module, > and Jason's 'path' module is present in any of the directories that are > looked at by freeze's module finder (your app does

Re: Difference between " and '

2005-07-21 Thread muldoon
[EMAIL PROTECTED] wrote: > Hi, > > Can someone tell me the difference between single quote and double > quote? > > Thanks And please settle the dispute between "xxx". And "xxx". There was a fellow at Oxford who decided these things but I hear he went mad. -- http://mail.python.org/mailma

Re: Hash functions

2005-07-21 Thread Cyril Bazin
Maybe in certain case you could use hash to compare objects (hashable of course) quicker by comparing there hash values, if the hash values are the same you test the equality between the objects. But the sets and dicts cover the greatest part of the use of hash. (Personally, I never used that exp

Re: is this pythonic?

2005-07-21 Thread Terry Reedy
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 21 Jul 2005 10:27:24 -0400, Bill Mill wrote: > > [snip] > >> I said the *builtins* section. I think you learn pretty quick that >> figuring out what functions are builtins is pretty important in every >> langu

Python Programming Patterns

2005-07-21 Thread Tin
Hi, I have listed Python Programming Patterns ISBN:0130409561 on ebay.co.uk A brand new with really cheap price-4.99 If you are interested, go and have a look at www.ebay.co.uk and locate that one. Come one, fish and chips would cost more than that. Surely. Cheers Tin -- http://mail.python.o

Re: PEP on path module for standard library

2005-07-21 Thread Terry Reedy
"Reinhold Birkenfeld" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Most prominent change is that it doesn't inherit from str/unicode > anymore. > I found this distinction important, because as a str subclass the Path > object > has many methods that don't make sense for it. Wh

Re: print pdf file to network printer using python

2005-07-21 Thread scrimp
I just tried it and all that printed out was garbage. I found another way to do it. It all depends on what you wanna do. If u want to print to the default printer (easiest way) then just use this line: win32api.ShellExecute(0, "print", file_path, None, ".", 0) file_path of course being the full p

Re: Buffering problem using subprocess module

2005-07-21 Thread Dr. Who
Unfortunatley that doesn't help. Even when callee is started using the -u, I get the same behavior. -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-07-21 Thread Reinhold Birkenfeld
FYI: I modified the path module a bit so that it fits many of the suggestions from python-dev, and put the result in the Python CVS tree under nondist/sandbox/path. Most prominent change is that it doesn't inherit from str/unicode anymore. I found this distinction important, because as a str subcl

Re: socket programming

2005-07-21 Thread Helge Aksdal
* gry@ll.mit.edu [2005/07/20 15:26]: > What I have done in similar circumstances is put in a random sleep > between connections to fool the server's load manager. Something like: > > .import time > .min_pause,max_pause = (5.0, 10.0) #seconds > .while True: > . time.sleep(random.uniform(min_p

Re: PEP on path module for standard library

2005-07-21 Thread Fernando Perez
Peter Hansen wrote: > Michael Hoffman wrote: >> For the PEP, do any of you have arguments for or against including path? >> Code samples that are much easier or more difficult with this class >> would also be most helpful. > > I believe the strongest argument for "path" can be made for how it > i

Re: Generating images with text in them

2005-07-21 Thread phil hunt
On Thu, 21 Jul 2005 02:44:03 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >On Wednesday 20 July 2005 11:59 pm, phil hunt wrote: >> I am trying to generate some images (gifs or pngs) with text in >> them. I can use the Python Imaging Library, but it only has access >> to the default, rather cra

Re: Generating images with text in them

2005-07-21 Thread phil hunt
On Thu, 21 Jul 2005 11:23:46 +0100, Daren Russell <[EMAIL PROTECTED]> wrote: >phil hunt wrote: >> I am trying to generate some images (gifs or pngs) with text in >> them. I can use the Python Imaging Library, but it only has access >> to the default, rather crappy, font. >> >> Ideally I'd like

Re: PEP on path module for standard library

2005-07-21 Thread Peter Hansen
Michael Hoffman wrote: > For the PEP, do any of you have arguments for or against including path? > Code samples that are much easier or more difficult with this class > would also be most helpful. I believe the strongest argument for "path" can be made for how it integrates functionality which

Re: difficulty connecting to networked oracle database

2005-07-21 Thread Grig Gheorghiu
As the other posters already mentioned, cx_Oracle is the way to go. I'm using it to connect to Oracle not only on Windows, but also on Solaris, Linux and AIX. Grig -- http://mail.python.org/mailman/listinfo/python-list

Re: What does "::" mean?

2005-07-21 Thread Robert Kern
Michael Hoffman wrote: > Robert Kern wrote: >>Well, that part's easy at least: >> >> live[::-1] >> >>:-) And so the circle is complete ... > > What about reversed(live)? Or if you want a list instead of an iterator, > list(reversed(live))? That's fine if you want to iterate over it. Often, es

Re: Hash functions

2005-07-21 Thread Michael Hudson
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Do people often use hash() on built-in types? Only implicitly. > What do you find it useful for? Dictionaries :) > How about on custom classes? Same here. > Can anyone give me some good tips or hints for writing and using > hash functions in Pyt

Re: is this pythonic?

2005-07-21 Thread Steven D'Aprano
On Thu, 21 Jul 2005 10:27:24 -0400, Bill Mill wrote: [snip] > I said the *builtins* section. I think you learn pretty quick that > figuring out what functions are builtins is pretty important in every > language. There's a fair number of people out there giving the advice > to read chapter 2 of t

Re: Overriding a built-in exception handler

2005-07-21 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > I've Read-TFM, but I only see good info on how to create my own class > of exception; I don't see anything on how to override an existing > exception handler. You need to read the tutorial on handling exceptions: http://docs.python.org/tut/node10.html -- Michael Hoff

Re: Filling up commands.getstatusoutput's buffer

2005-07-21 Thread travislspencer
Jeff Epler wrote: > On Wed, Jul 20, 2005 at 03:10:49PM -0700, [EMAIL PROTECTED] wrote: > How much output are you talking about? Honestly, I don't know. I came on to a project were they said they were hitting up against some limit, and had a hack to work around it. I just wondered if others had hi

Re: is this pythonic?

2005-07-21 Thread Steven D'Aprano
On Thu, 21 Jul 2005 16:43:00 +0100, Michael Hoffman wrote: > Personally, I feel my time is better served by answering questions that > would not be easy to find without assistance. I can't expect everyone to > know about or expect enumerate() from the beginning, so I don't have any > objections

Re: print pdf file to network printer using python

2005-07-21 Thread Grant Edwards
On 2005-07-21, scrimp <[EMAIL PROTECTED]> wrote: > Well, Ive been searching through google groups and Ive seen a lot about > printing a pdf file, but I havent seen a definite answer. I tried this > code: > > f = open(printer_path, 'w') > f.write(pdffile_path) > f.close() > > Basically it doesnt wor

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread callmebill
You could also set your "python" environment variable on the system... set it to be "/path/to/python2.4". Then use the "#!/usr/bin/env python" trick. Just make sure that env is working for you, first. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need to interrupt to check for mouse movement

2005-07-21 Thread Christopher Subich
Paul Rubin wrote: > Huh? It's pretty normal, the gui blocks while waiting for events > from the window system. I expect that Qt and Tk work the same way. Which is why I recommended Twisted for the networking; it integrates with the toolkit event loops so it automagically works: http://twistedm

Re: is this pythonic?

2005-07-21 Thread Michael Hoffman
Steven D'Aprano wrote: > The great thing about Usenet and the Internet is that we can pick each > other's brains for answers, instead of flailing around blindly in manuals > that don't understand the simplest natural language query. And isn't that > why we're here? Personally, I feel my time is b

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread callmebill
oops... I missed the "too specific comment." Sorry =) -- http://mail.python.org/mailman/listinfo/python-list

Re: goto

2005-07-21 Thread Michael Hudson
[EMAIL PROTECTED] writes: > >>> what is the equivalent of C languages' goto statement in python? > > >> You really shouldn't use goto. > >> Fortunately you can't. > > Steven> Of course you can :-) > > Steven> You can write your own Python interpreter, in Python, and add a >

Hash functions

2005-07-21 Thread Steven D'Aprano
Do people often use hash() on built-in types? What do you find it useful for? How about on custom classes? Can anyone give me some good tips or hints for writing and using hash functions in Python? Thank you, -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

PEP on path module for standard library

2005-07-21 Thread Michael Hoffman
Many of you are familiar with Jason Orendorff's path module , which is frequently recommended here on c.l.p. I submitted an RFE to add it to the Python standard library, and Reinhold Birkenfeld started a discussion on it in python-dev

Re: What does "::" mean?

2005-07-21 Thread Michael Hoffman
Robert Kern wrote: > Rob Williscroft wrote: > >> import sys >> >> live = 'live' >> >> print live[ sys.maxint : : -1 ] >> print live[ len(live)-1 : : -1 ] >> >> print live[ len(live)-1 : -len(live)-1 : -1 ] >> print live[ len(live)-1 : -sys.maxint : -1 ] >> print live[ s

Re: difficulty connecting to networked oracle database

2005-07-21 Thread Martin Franklin
yahibble wrote: > Now, I am no Python expert but I have dabbled and I have spent a > couple of days with another engineer unsuccessfully installing oracle > drivers for MS ODBC on the win XP machine. > > It looked to me like ODBC was the best way to get a (free) python > module to upload data to a

Re: difficulty connecting to networked oracle database

2005-07-21 Thread Paul McNett
yahibble wrote: > Now, I am no Python expert but I have dabbled and I have spent a > couple of days with another engineer unsuccessfully installing oracle > drivers for MS ODBC on the win XP machine. > > It looked to me like ODBC was the best way to get a (free) python > module to upload data to a

difficulty connecting to networked oracle database

2005-07-21 Thread yahibble
Now, I am no Python expert but I have dabbled and I have spent a couple of days with another engineer unsuccessfully installing oracle drivers for MS ODBC on the win XP machine. It looked to me like ODBC was the best way to get a (free) python module to upload data to an oracle database table. Asi

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread Bill Mill
On 7/21/05, Bill Mill <[EMAIL PROTECTED]> wrote: > On 7/21/05, Jan Danielsson <[EMAIL PROTECTED]> wrote: > > Hello all, > > > >How do I make a python script actually a _python_ in unix:ish > > environments? > > > > I know about adding: > > #!/bin/sh > > > >..as the first row in a shell scri

Re: Overriding a built-in exception handler

2005-07-21 Thread Jaime Wyant
You can't override an exception. You can only catch whatever exception is thrown. For your case, you would want to wrap that while loop up in a try/catch block like this: try: while 1: print "Yay for me!" except KeyboardInterrupt: print "CTRL-C caught" Someone had mentioned poss

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread Bill Mill
On 7/21/05, Jan Danielsson <[EMAIL PROTECTED]> wrote: > Hello all, > >How do I make a python script actually a _python_ in unix:ish > environments? > > I know about adding: > #!/bin/sh > >..as the first row in a shell script, but when I installed python on > a NetBSD system, I didn't get

Re: Overriding a built-in exception handler

2005-07-21 Thread Jp Calderone
On 21 Jul 2005 07:39:10 -0700, [EMAIL PROTECTED] wrote: >I'm having a tough time figuring this one out: > > >class MyKBInterrupt( . ): > print "Are you sure you want to do that?" > >if __name__ == "__main__": > while 1: > print "Still here..." > > >So this thing keeps printing

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread callmebill
On your system, do: which python2.4 That will give you the full path to the python2.4 binary (let's call it "path/to/py24"). Then add: #!/path/to/py24 ...to the top of your script. And make sure the file is chmod'd +x -- http://mail.python.org/mailman/listinfo/python-list

Overriding a built-in exception handler

2005-07-21 Thread callmebill
I'm having a tough time figuring this one out: class MyKBInterrupt( . ): print "Are you sure you want to do that?" if __name__ == "__main__": while 1: print "Still here..." So this thing keeps printing "Still here..." until the user hits ctl-c, at which time the except

Re: Stupid question: Making scripts python-scripts

2005-07-21 Thread Jp Calderone
On Thu, 21 Jul 2005 16:34:30 +0200, Jan Danielsson <[EMAIL PROTECTED]> wrote: >Hello all, > > How do I make a python script actually a _python_ in unix:ish >environments? > > [snip] Put "#!/usr/bin/python". Install the program using distutils: if necessary, distutils will rewrite the #! line t

Stupid question: Making scripts python-scripts

2005-07-21 Thread Jan Danielsson
Hello all, How do I make a python script actually a _python_ in unix:ish environments? I know about adding: #!/bin/sh ..as the first row in a shell script, but when I installed python on a NetBSD system, I didn't get a "python" executable; only a "python2.4" executable. Adding "#!/usr/

Python session handling

2005-07-21 Thread mohammad babaei
Hi, What is th best way for "session  tracking" in python ? regards, mo -- http://mail.python.org/mailman/listinfo/python-list

Re: is this pythonic?

2005-07-21 Thread Bill Mill
On 7/21/05, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Wed, 20 Jul 2005 16:30:10 -0400, Bill Mill wrote: > > > On 7/20/05, Simon Brunning <[EMAIL PROTECTED]> wrote: > >> On 7/20/05, Mage <[EMAIL PROTECTED]> wrote: > >> > Or is there better way? > >> > > >> > for (i, url) in [(i,links[i]) for

Dr. Dobb's Python-URL! - weekly Python news and links (Jul 20)

2005-07-21 Thread Simon Brunning
QOTW: "Discussing goto statements and Microsoft together is like mixing dynamite and gasoline." - DH '"Spaghetti" doesn't quite describe it. I've settled on "Lovecraftian": reading the code, you can't help but get the impression of writhing tentacles and impossible angles.' - Robert Kern Hig

Re: goto

2005-07-21 Thread Rocco Moretti
> My "favorite" infinte loop with while is: > >i = 0 >while i < 20: > do_process(i) > > Note the prominent *lack* of any change to i here? > > Oh, for: > > from i = 0 > invariant 0 <= i <= 20 > variant 21 - i > until i > 19 > loop > do_process(i) >

Re: is this pythonic?

2005-07-21 Thread Steven D'Aprano
On Wed, 20 Jul 2005 16:30:10 -0400, Bill Mill wrote: > On 7/20/05, Simon Brunning <[EMAIL PROTECTED]> wrote: >> On 7/20/05, Mage <[EMAIL PROTECTED]> wrote: >> > Or is there better way? >> > >> > for (i, url) in [(i,links[i]) for i in range(len(links))]: >> >> for i, url in enumerate(links): >> >

Re: Filling up commands.getstatusoutput's buffer

2005-07-21 Thread Jeff Epler
On Wed, Jul 20, 2005 at 03:10:49PM -0700, [EMAIL PROTECTED] wrote: > Hey, > > Has anyone ever had commands.getstatusoutput's buffer fill up when > executing a verbose command? [...] How much output are you talking about? I tried outputs as large as about 260 megabytes without any problem. (RedHa

Re: wxPythin installation woes

2005-07-21 Thread linuxfreak
Does anyone know if the same can be done in fedora distributions??? Sybren Stuvel wrote: > linuxfreak enlightened us with: > > Turns out that libstdc++.so.5 is needed but I checked and i see > > that libstdc++.so.6 is installed on my system. > > On my system (Ubuntu, based on Debian), I can hav

RE: Listing Processes Running on Remote Machines

2005-07-21 Thread George Flaherty
Look into STAF http://staf.sourceforge.net/index.php -g -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of yoda Sent: Thursday, July 21, 2005 9:23 AM To: python-list@python.org Subject: Listing Processes Running on Remote Machines Hello Hackers, I'm develop

Re: Buffering problem using subprocess module

2005-07-21 Thread Jp Calderone
On 21 Jul 2005 06:14:25 -0700, "Dr. Who" <[EMAIL PROTECTED]> wrote: >I am using the subprocess module in 2.4. Here's the fragment: > >bufcaller.py: > import sys, subprocess > proc = subprocess.Popen('python bufcallee.py', bufsize=0, shell=True, >stdout=subprocess.PIPE) > for line

Listing Processes Running on Remote Machines

2005-07-21 Thread yoda
Hello Hackers, I'm developing a large scale distributed service and part of the requirement is that I be able to monitor clients in a very granular way. To this end, I'd like to know if there is any way to get a list of all the processes running on a remote client\machine. I need to be able to do

Re: Need to interrupt to check for mouse movement

2005-07-21 Thread Jp Calderone
On Thu, 21 Jul 2005 02:33:05 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote: >Jp Calderone wrote: >> In the particular case of wxWidgets, it turns out that the *GUI* blocks >> for long periods of time, preventing the *network* from getting >> attention. But I agree with your position for other tool

Buffering problem using subprocess module

2005-07-21 Thread Dr. Who
I am using the subprocess module in 2.4. Here's the fragment: bufcaller.py: import sys, subprocess proc = subprocess.Popen('python bufcallee.py', bufsize=0, shell=True, stdout=subprocess.PIPE) for line in proc.stdout: sys.stdout.write(line) bufcallee.py:

Re: popen2 usage

2005-07-21 Thread jb
Actually, "-test1" is a text argument that testme.exe should receive from standard input. For example, Executing testme.exe generates the following output, Please select one of the following options: 1) test1 2) test2 3) exit Please enter your option here:-test1 <-This -test1 is what user would typ

Re: Need to interrupt to check for mouse movement

2005-07-21 Thread Jp Calderone
On Thu, 21 Jul 2005 05:42:32 -, Donn Cave <[EMAIL PROTECTED]> wrote: >Quoth Paul Rubin : >| Christopher Subich <[EMAIL PROTECTED]> writes: >| > > In the particular case of wxWidgets, it turns out that the *GUI* >| > > blocks for long periods of time, preventing the *ne

Re: Need to interrupt to check for mouse movement

2005-07-21 Thread Jp Calderone
On 20 Jul 2005 22:06:31 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: >Christopher Subich <[EMAIL PROTECTED]> writes: >> > In the particular case of wxWidgets, it turns out that the *GUI* >> > blocks for long periods of time, preventing the *network* from >> > getting attention. But I

Re: Need to interrupt to check for mouse movement

2005-07-21 Thread Jp Calderone
On Thu, 21 Jul 2005 00:51:45 -0400, Christopher Subich <[EMAIL PROTECTED]> wrote: >Jp Calderone wrote: > >> In the particular case of wxWidgets, it turns out that the *GUI* blocks >> for long periods of time, preventing the *network* from getting >> attention. But I agree with your position for o

Re: returning list of strings from Python COM to Visual basic 6

2005-07-21 Thread Philippe C. Martin
I guess that also means (which makes sense) that the returned object has to be registered as a COM object. However, in my case, I just needed that object to pass it to yet another object, I did not need to use it from VB Regards, Philippe Philippe C. Martin wrote: > Thanks a bunch, > > I'll

print pdf file to network printer using python

2005-07-21 Thread scrimp
Well, Ive been searching through google groups and Ive seen a lot about printing a pdf file, but I havent seen a definite answer. I tried this code: f = open(printer_path, 'w') f.write(pdffile_path) f.close() Basically it doesnt work and what it prints out is the value of pdffile_path variable. I

Re: Lots of pdf files

2005-07-21 Thread nick
Paul Rubin wrote: > Greg Lindstrom <[EMAIL PROTECTED]> writes: > > There does not appear to be a simple way to merge many pdf's into one. > There's probably some way to do it with pstops or some related program > or set of programs. Google for "multivalent tools" - a co

Re: Python Path Setting

2005-07-21 Thread Chris Curvey
http://www.python.org/doc/2.4.1/inst/search-path.html#SECTION00041 -- http://mail.python.org/mailman/listinfo/python-list

Re: gdb python C API

2005-07-21 Thread fraca7
[EMAIL PROTECTED] a écrit : > Actually, take a look in the distribution at Misc/gdbinit. In particular, > check out the pystack command. Wow, nice! This will be put to good use, thanks :) -- http://mail.python.org/mailman/listinfo/python-list

Re: UPDATE: SPE 0.7.4.d Python Editor released

2005-07-21 Thread travlr
I just dloaded 0.7.4.b an hour ago... your quik. Ha...lol. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: gdb python C API

2005-07-21 Thread skip
fraca7> derrick a écrit : >> are there any tools / methods that others have used to get what line >> of the python script is being executed while running in gdb? or if it >> would actually show me the source python script (instead of the the >> python c source) that would help.

Re: spurious syntax error when updating to 2.4 ?

2005-07-21 Thread Simon Dahlbacka
Replying to self, it seems to be related to https://sourceforge.net/tracker/index.php?func=detail&aid=1163244&group_id=5470&atid=105470 (Syntax error on large file with MBCS encoding) even though my files had # -*- coding: ascii -*- However, if I removed this explicit ascii encoding then I did not

Re: is a file open ?

2005-07-21 Thread John Machin
luis wrote: > John Machin wrote: > >> Daniel Dittmar wrote: >> >>> luis wrote: >>> for root, dirs, files in os.walk(path): for file in files: # ¿ is opened ? >>> >>> >>> >>> >>> On Linux and some other Unixes, you can probably read the /proc >>> filesystem. >>> >>> On Wind

Re: wxPythin installation woes

2005-07-21 Thread Sybren Stuvel
linuxfreak enlightened us with: > Turns out that libstdc++.so.5 is needed but I checked and i see > that libstdc++.so.6 is installed on my system. On my system (Ubuntu, based on Debian), I can have multiple versions of libstdc++ installed at the same time. Sybren -- The problem with the world i

A sad story about a real "Python"

2005-07-21 Thread Marco Aschwanden
http://www.snopes.com/photos/animals/fencesnake.asp Cheers, Marco -- http://mail.python.org/mailman/listinfo/python-list

Re: gdb python C API

2005-07-21 Thread fraca7
derrick a écrit : > are there any tools / methods that others have used to get what line of > the python script is being executed while running in gdb? or if it would > actually show me the source python script (instead of the the python c > source) that would help. I don't think so, but when hav

UPDATE: SPE 0.7.4.d Python Editor released

2005-07-21 Thread Stani
Something which prevented SPE 0.7.4.a to start is fixed Stani PS http://www.stani.be/python/spe/blog -- http://mail.python.org/mailman/listinfo/python-list

Re: returning list of strings from Python COM to Visual basic 6

2005-07-21 Thread Philippe C. Martin
Thanks a bunch, I'll try this, This raises two questions: 1) How do I declare the receiving VB variable ? 2) Then, can I use the returned object as a COM object: call its public methods (that would be hot)? Dim newobj as ? newobj = acom.Get_Obj() newobj.A_Public() Regards, Philippe

Re: Generating images with text in them

2005-07-21 Thread John Abel
Have you downloaded the pilfonts.zip from effbot.org? J phil hunt wrote: >I am trying to generate some images (gifs or pngs) with text in >them. I can use the Python Imaging Library, but it only has access >to the default, rather crappy, font. > >Ideally I'd like to use one of the nicer fonts

  1   2   >