How to turn $6 to $16000 in few days of web crawling

2005-10-27 Thread Master
It Will Work. If you do as I have done! Just Do It! follow the 4 steps. $6.00 to $15,000.00 in 30 days! Steps: Follow the Logic, Just Do it and It will work. $$$ in 4 easy steps. 1. Set Up a Free Paypal Account. 2. Send $1.00 to six Email Accounts from your Paypal Account 3. Delete email addres

Virus found in a message you sent

2005-10-27 Thread Email_Gateway
A virus was found in a message sent by this account. --- Scan information follows --- Result: Virus Detected Virus Name: [EMAIL PROTECTED] File Attachment: document.ex_ Attachment Status: deleted --- Original message information follows --- From: python-list@python.org To: [EMAIL PROTECTED] Dat

Re: Double replace or single re.sub?

2005-10-27 Thread Alex Martelli
Iain King <[EMAIL PROTECTED]> wrote: > I have some code that converts html into xhtml. For example, convert > all tags into . Right now I need to do to string.replace calls > for every tag: > > html = html.replace('','') > html = html.replace('','') > > I can change this to a single call to r

Re: How to replace all None values with the string "Null" in a dictionary

2005-10-27 Thread Alex Martelli
Bengt Richter <[EMAIL PROTECTED]> wrote: ... > Which is probably more efficient than one-liner updating the dict with > > mydict.update((k,'Null') for k,v in mydict.items() if v is None) ...which in turn is probably better than _auxd = {None: "Null"} newd = dict((k, _auxd.get(k, c) for k,

Re: Quick way to test if value lies within a list of lists of ranges?

2005-10-27 Thread Paul McGuire
"Ben O'Steen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Scenario: = Using PyGame in particular, I am trying to write an application that will run a scripted timeline of events, eg at 5.5 seconds, play xxx.mp3 and put the image of a ball on screen, at 7.8 seconds move the

Re: NEWBIE

2005-10-27 Thread [EMAIL PROTECTED]
Check out http://www.freenetpages.co.uk/hp/alan.gauld. His tutorial is great, covering basic programming using pythion examples. -- http://mail.python.org/mailman/listinfo/python-list

Re: handling ExpatError exception raised from ElementTree.XML() method

2005-10-27 Thread mirandacascade
Mr. Boddie's suggestions work as indicated...many thanks. It's not clear how a grep of the site-packages directory revealed the most likely location of the ExpatError class is xml.parsers.expat. Using XP's search utility, I searched for any files within the c:\python24\ folder structure that had

Re: Distutils patch for MS toolkit use

2005-10-27 Thread Steve Holden
Steve Holden wrote: > I've just realised that my 2.4.1 upgrade removed the patch I made to > distutils to use the Microsoft free toolchain. > > unfortunately www.vrplumber.com appears to be down. Does anyone reading > this have the details? > Never mind - turns out the site's inaccessibility wa

Re: XML Tree Discovery (script, tool, __?)

2005-10-27 Thread uche . ogbuji
> - don't use SAX unless your document is huge > - don't use DOM unless someone is putting a gun to your head What I say is: use what works for you. I think SAX would be fine for this task, but, hey, I personally would use Amara ( http://uche.ogbuji.net/tech/4suite/amara/ ), of course. The follo

Re: Microsoft Hatred FAQ

2005-10-27 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>> "Ironically, while no one else has so much as compared MS to criminals >>> with >>> guns". I defy you to find *one* place where I complain that MS behavior >>> is >>>

Distutils patch for MS toolkit use

2005-10-27 Thread Steve Holden
I've just realised that my 2.4.1 upgrade removed the patch I made to distutils to use the Microsoft free toolchain. unfortunately www.vrplumber.com appears to be down. Does anyone reading this have the details? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web

Re: How to replace all None values with the string "Null" in a dictionary

2005-10-27 Thread Bengt Richter
On Thu, 27 Oct 2005 16:46:32 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: >"dcrespo" <[EMAIL PROTECTED]> writes: > >> Hi all, >> >> How can I replace all None values with the string 'Null' in a >> dictionary? > >Iterate over everything in the dictionary: > >for key, item in mydict.items(): >if

Re: Double replace or single re.sub?

2005-10-27 Thread Bengt Richter
On 27 Oct 2005 12:39:18 -0700, "EP" <[EMAIL PROTECTED]> wrote: >How does Python execute something like the following > >oldPhrase="My dog has fleas on his knees" >newPhrase=oldPhrase.replace("fleas", >"wrinkles").replace("knees","face") > >Does it do two iterations of the replace method on the ini

Re: how do i run another script from my python script

2005-10-27 Thread nephish
well i know i dont want to do another thread, my program has six running all the time. whew. that can get nuts. i mean, this will come to me easier later i am sure. But right now. simple is best. thanks for all the suggestions, gents. right now i am just doing a varient of Steves suggestion, an

Re: Microsoft Hatred FAQ

2005-10-27 Thread David Schwartz
"Mike Schilling" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >>> There's a huge difference to the non-techy consumer. One of the >>> buggest reasons Linux has had a reputation of being harder to use >>> than Windows was the fact that Linux had to be installed, while >>> Windows

Re: how to associate files with application

2005-10-27 Thread jmdeschamps
Ashok wrote: > hi, > i want to know how to make a specific type of file open in an > application i developed in python when the user clicks on the file.(in > windows) for eg. a .txt file when clicked opens in notepad, a .doc file > when clicked opens in MS-word. In the same way i want to make a .x

Re: Microsoft Hatred FAQ

2005-10-27 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >> "Ironically, while no one else has so much as compared MS to criminals >> with >> guns". I defy you to find *one* place where I complain that MS behavior >> is >> equated to the actual use of force where that is not in

Re: specify arbitrary library directory directly in code?

2005-10-27 Thread Mike Meyer
[EMAIL PROTECTED] writes: > ### Initial Findings > After searching around a bit, it appears that python does not have a > built-in mechanism for specifying arbitrary directories as the first > place to look for module code. There are options that allow one to > specify alternate directories, but a

specify arbitrary library directory directly in code?

2005-10-27 Thread scooterm
### Background In [other programming language] it is possible to specify any special and arbitrary directory (or set of directories) to use as a source for custom, user-designed modules. For example, one can do: ### begin script ### (located in ../faa/faa_script.xyz) ### init script u

Suggestion for (re)try statement - correction

2005-10-27 Thread Sori Schwimmer
"i += 1" is wrong there. I had in my mind at first a "while" statement. Sorry... Sorin __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting Threads

2005-10-27 Thread David Poundall
First time I have used thread locking. This seems to work but is it correct? from threading import Thread, Event, Lock . . . def launch(self, ThreadTitle, SubToLaunch, SubsArgs=(), SubsKwargs={}, AsDaemon=True): my_lock = Lock() my_lock.acquire() try: # ---

Re: Microsoft Hatred FAQ

2005-10-27 Thread Mike Meyer
"David Schwartz" <[EMAIL PROTECTED]> writes: > "Mike Meyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> I've noticed something strange that makes me wonder the same >> thing. Everytime someone compares MS's behavior with that of any other >> criminals, he responds about MS's a

Re: Microsoft Hatred FAQ

2005-10-27 Thread Mike Schilling
"David Schwartz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Mike Schilling wrote: > >> "David Schwartz" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] > >>>There is no different to Microsoft beween a bare computer and one >>> preloaded with Linux or FreeBSD.

Re: Help: Quick way to test if value lies within a list of lists of ranges?

2005-10-27 Thread Paddy
Would this help? ''' >>> pp(name2ranges) {'a': [[5, 12], [27, 89], [120, 137]], 'b': [[6, 23], [26, 84], [200, 222]], 'c': [[2, 22], [47, 60], [67, 122]]} >>> names4val(28) ['a', 'b'] >>> names4val(11) ['a', 'c', 'b'] >>> names4val(145) [] >>> ''' from pprint import pprint as pp name2ranges =

Re: time conversion

2005-10-27 Thread Steven D'Aprano
On Thu, 27 Oct 2005 14:36:30 +, flupke wrote: > Is there an easy to convert following hour notation hh:mm > to decimals? > For instance 2 hours and 30 minutes as 2:30 to 2,50 > I don't really know where to search for this kind of conversion. def str_HMS(s): """Convert a string "H:M:S" to

Re: Microsoft Hatred FAQ

2005-10-27 Thread David Schwartz
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've noticed something strange that makes me wonder the same > thing. Everytime someone compares MS's behavior with that of any other > criminals, he responds about MS's activity being "equated to that of > criminals with

Re: Microsoft Hatred FAQ

2005-10-27 Thread David Schwartz
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "David Schwartz" <[EMAIL PROTECTED]> writes: >> Sorry to be pedantic, but I think it's an important point that no >> court >> ever found that Microsoft illegally acquired a monopoly. So to >> characterize >>

Re: a Haskell a Day

2005-10-27 Thread steve
On Wed, 26 Oct 2005 18:35:49 +0800, Roedy Green wrote (in article <[EMAIL PROTECTED]>): > On 26 Oct 2005 00:38:23 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote, > quoted or indirectly quoted someone who said : > >> A Haskell A Day: Manifesto > This is the wrong newsgroup. Had you done the same for J

Re: Microsoft Hatred FAQ

2005-10-27 Thread Mike Meyer
Paul Rubin writes: >> Sorry to be pedantic, but I think it's an important point that no court >> ever found that Microsoft illegally acquired a monopoly. So to characterize >> the monopoly itself as "illegal" is simply erroneous. > > Who is paying you to tell these

Re: Microsoft Hatred FAQ

2005-10-27 Thread EP
Was this a test of Godwin's Law? Hitler wasn't mentioned explicitly, but he was certainly implied in the initial post. So we learn: Hitler must be _explicitly_ mentioned to invoke Godwin's Law (or) Xah Lee is immune from the central laws of the universe Personally I suspect Xah Lee is a bot

Re: Microsoft Hatred FAQ

2005-10-27 Thread Paul Rubin
"David Schwartz" <[EMAIL PROTECTED]> writes: > Sorry to be pedantic, but I think it's an important point that no court > ever found that Microsoft illegally acquired a monopoly. So to characterize > the monopoly itself as "illegal" is simply erroneous. Who is paying you to tell these ridicul

Re: How to replace all None values with the string "Null" in a dictionary

2005-10-27 Thread Mike Meyer
"dcrespo" <[EMAIL PROTECTED]> writes: > Hi all, > > How can I replace all None values with the string 'Null' in a > dictionary? Iterate over everything in the dictionary: for key, item in mydict.items(): if item is None: mydict[key] = 'Null' http://www.mired.

Signals and keyboard interupts

2005-10-27 Thread Martin Miller
[Using Windows XP and Python 2.4.1] I have question about the following code, which basically accomplished what what I want, which is to gracefully exit the main loop when the user presses either the control-c or control-break key: import signal import sys import time import traceback QUIT = Fal

Re: help with sending data out the parallel port

2005-10-27 Thread [EMAIL PROTECTED]
You don't want to use Python for that task. You're much better off using the Microsoft DDK (driver development kit). -- http://mail.python.org/mailman/listinfo/python-list

Re: How to replace all None values with the string "Null" in a dictionary

2005-10-27 Thread Steve Holden
dcrespo wrote: > Hi all, > > How can I replace all None values with the string 'Null' in a > dictionary? > > For example: > convert this: > a = {'item1': 45, 'item2': None} > > into this: > a = {'item1': 45, 'item2': 'Null'} > for k in a: if a[k] is None: a[k] = 'Null' You aren't doing

Re: How to replace all None values with the string "Null" in a dictionary

2005-10-27 Thread skip
Daniel> How can I replace all None values with the string 'Null' in a Daniel> dictionary? a = {'item1': 45, 'item2': None} for key in a: if a[key] is None: a[key] = "Null" Skip -- http://mail.python.org/mailman/listinfo/python-list

How to replace all None values with the string "Null" in a dictionary

2005-10-27 Thread dcrespo
Hi all, How can I replace all None values with the string 'Null' in a dictionary? For example: convert this: a = {'item1': 45, 'item2': None} into this: a = {'item1': 45, 'item2': 'Null'} Thanks Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread James Stroud
On Thursday 27 October 2005 11:16, Carsten Haese wrote: > On Thu, 2005-10-27 at 14:00, Gregory Piñero wrote: > > Not quite because if something(3) fails, I still want something(4) to > > run. > > def something_ignore_exceptions(x): > try: something(x) > except: pass > > something_ignore_excepti

Suggestion for (re)try statement

2005-10-27 Thread Sori Schwimmer
Hi, I think that would be useful to have an improved version of the "try" statement, as follows: try(retrys=0,timeout=0): # things to try except: # what to do if failed and having the following semantic: for i in range(retrys): try: # things to try except: if i < retrys: i

Re: MSH (shell)

2005-10-27 Thread Michael
[EMAIL PROTECTED] wrote: > This can be of little interest of some people here, but I think it can > be interesting enough to justify a post. > > An article on the Microsoft Command Shell: > http://arstechnica.com/guides/other/msh.ars > (Its syntax is rather Python-like, but Py syntax seems better

Re: Counting Threads

2005-10-27 Thread David Poundall
>> But the count isn't doint what I expected. I was after a increment >> after every time the class was used ireespective of instance. >I have no idea what that last sentence above means... On re-reading it - neither do I. Sorry about that. What I meant to say was that I was after an incremen

Re: NEWBIE

2005-10-27 Thread edw!n
If you're a complete newbie.. Try the tutorials at www.hetland.org. And maybe change them for a book when your eyes get sour with reading ;) I just started programming in python myself and i must say that it pleases me so far. Don't know what your programming experience is, but mine is limited to

Re: Double replace or single re.sub?

2005-10-27 Thread EP
How does Python execute something like the following oldPhrase="My dog has fleas on his knees" newPhrase=oldPhrase.replace("fleas", "wrinkles").replace("knees","face") Does it do two iterations of the replace method on the initial and then an intermediate string (my guess) -- or does it compile t

Re: how do i run another script from my python script

2005-10-27 Thread Mike Meyer
Daniel Schüle <[EMAIL PROTECTED]> writes: > Steve already answeared to your question, regaring PHP script > if this would be python script, you could run it by import'ing it That's not very pythonic. Better is to provide a function in the script to run it (say run), then run that in the script iff

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Steve Holden
Carsten Haese wrote: > On Thu, 2005-10-27 at 14:00, Gregory Piñero wrote: > >>Not quite because if something(3) fails, I still want something(4) to >>run. > > > def something_ignore_exceptions(x): > try: something(x) > except: pass > > something_ignore_exceptions(1) > something_ignore_exc

Re: Counting Threads

2005-10-27 Thread Peter Hansen
David Poundall wrote: > Just sorted (its always the way when you post isn't it) > > But the count isn't doint what I expected. I was after a increment > after every time the class was used ireespective of instance. I have no idea what that last sentence above means... > Instead > I get a coun

Re: help with sending data out the parallel port

2005-10-27 Thread Peter Hansen
David wrote: > I'm wondering if python is capable of fairly precise timing and also sending > data out the parallel port. > > For example ; making a 7.5 KHz square wave come out of one of the data pins > on the printer port. > > I've tried to help myself with this one but searching in the "Python

how to associate files with application

2005-10-27 Thread Ashok
hi, i want to know how to make a specific type of file open in an application i developed in python when the user clicks on the file.(in windows) for eg. a .txt file when clicked opens in notepad, a .doc file when clicked opens in MS-word. In the same way i want to make a .xyz file open in the appl

Re: Microsoft Hatred FAQ

2005-10-27 Thread John Gordon
In <[EMAIL PROTECTED]> "David Schwartz" <[EMAIL PROTECTED]> writes: > When you say "it only become illegal", you are just being vague. Nothing > becomes illegal. The abuse is illegal, but it never was legal. You're splitting hairs. But hey, what's usenet for? -- John Gordon"It

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Carsten Haese
On Thu, 2005-10-27 at 14:00, Gregory Piñero wrote: > Not quite because if something(3) fails, I still want something(4) to > run. def something_ignore_exceptions(x): try: something(x) except: pass something_ignore_exceptions(1) something_ignore_exceptions(2) # etc... HTH, Carsten Haese

MSH (shell)

2005-10-27 Thread bearophileHUGS
This can be of little interest of some people here, but I think it can be interesting enough to justify a post. An article on the Microsoft Command Shell: http://arstechnica.com/guides/other/msh.ars (Its syntax is rather Python-like, but Py syntax seems better to me, even taking into account that

Re: Microsoft Hatred FAQ

2005-10-27 Thread David Schwartz
"John Gordon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In <[EMAIL PROTECTED]> "David Schwartz" > <[EMAIL PROTECTED]> writes: >> What is an "illegal monopoly"? > A monopoly that acts in certain ways, abusing its monopoly power. There's > nothing inherently illegal abo

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Gregory Piñero
Not quite because if something(3) fails, I still want something(4) to run.  On 10/27/05, Micah Elliott <[EMAIL PROTECTED]> wrote: If you just want to ignore the exceptions while saving space/typing,you could equivalently do::try:something(1)something(2)# ...except: 

Re: Counting Threads

2005-10-27 Thread David Poundall
Just sorted (its always the way when you post isn't it) But the count isn't doint what I expected. I was after a increment after every time the class was used ireespective of instance. Instead I get a count based on the instance usage. Idea's anyone? # -

Re: Counting Threads

2005-10-27 Thread David Poundall
Just sorted (its always the way when you post isn't it) But the count isn't doint what I expected. I was after a increment after every time the class was used ireespective of instance. Instead I get a count based on the instance usage. Idea's anyone? # -

Counting Threads

2005-10-27 Thread David Poundall
I have a thread class and I want to be able to track its usage within an application. FYI the class launches aplications in their own thread when the 'launch' method is called. That works OK However I want to take things a bit further and my thinking was that I could use a class parameter to do

Re: Microsoft Hatred FAQ

2005-10-27 Thread John Gordon
In <[EMAIL PROTECTED]> "David Schwartz" <[EMAIL PROTECTED]> writes: > What is an "illegal monopoly"? A monopoly that acts in certain ways, abusing its monopoly power. There's nothing inherently illegal about having a monopoly; it only becomes illegal when you abuse the power. -- John Gordo

Re: Would there be support for a more general cmp/__cmp__

2005-10-27 Thread Bengt Richter
On 27 Oct 2005 08:12:15 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: [...] > >The evidence suggests that cmp is not used in sorting. If you have a >list of sets, sort will happily try to sort it, while calling cmp >with a set as an argument throws an exception. > A data point re evidence: >>> cl

Re: Microsoft Hatred FAQ

2005-10-27 Thread David Schwartz
Espen Myrland wrote: > "David Schwartz" <[EMAIL PROTECTED]> writes: >> What is an "illegal monopoly"? > The opposite of a "legal monopoly". For example, in Norway we have > "Vinmonopolet", a monopoly which are the only one allowed to sell > wine and spirits to the public. Seriously, I h

Re: Microsoft Hatred FAQ

2005-10-27 Thread David Schwartz
Paul Rubin wrote: > "David Schwartz" <[EMAIL PROTECTED]> writes: >>> Of course it's legal for non-monopoly companies. You seem to think >>> Microsoft's illegal monopoly is an irrelevant detail. It is not. >> What is an "illegal monopoly"? > It's what Microsoft still stands convicted of ha

Re: help with concurrency control (threads/processes & signals)

2005-10-27 Thread Alan Kennedy
[Sori Schwimmer] > I am working on an application which involves > interprocess communication. More to the point, > processes should be able to notify other processes > about certain situations, so the "notifyees" would be > able to act in certain ways. > > As processes are distributed on several

Re: Microsoft Hatred FAQ

2005-10-27 Thread Espen Myrland
"David Schwartz" <[EMAIL PROTECTED]> writes: > What is an "illegal monopoly"? The opposite of a "legal monopoly". For example, in Norway we have "Vinmonopolet", a monopoly which are the only one allowed to sell wine and spirits to the public. -- espen -- http://mail.python.org/mailma

Re: how do i run another script from my python script

2005-10-27 Thread Daniel Schüle
Steve already answeared to your question, regaring PHP script if this would be python script, you could run it by import'ing it #a.py print "in a" #b.py import a# prints "in a" print "in b" and of course other solutions import os if os.fork()==0: os.execv("

Re: Microsoft Hatred FAQ

2005-10-27 Thread Paul Rubin
"David Schwartz" <[EMAIL PROTECTED]> writes: > > Of course it's legal for non-monopoly companies. You seem to think > > Microsoft's illegal monopoly is an irrelevant detail. It is not. > > What is an "illegal monopoly"? It's what Microsoft still stands convicted of having. http://cyber.law

Weekly Python Patch/Bug Summary

2005-10-27 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 360 open (+16) / 2956 closed ( +1) / 3316 total (+17) Bugs: 893 open (+10) / 5353 closed (+12) / 6246 total (+22) RFE : 199 open ( -2) / 189 closed ( +2) / 388 total ( +0) New / Reopened Patches __ Patch for

Re: Microsoft Hatred FAQ

2005-10-27 Thread David Schwartz
Paul Rubin wrote: > "David Schwartz" <[EMAIL PROTECTED]> writes: >> I defy you to find any court that has ruled this practice >> illegal for a company that does not have a monopoly. Because if they >> did, I'm going after Doctor's Associates and Kenmore. > Of course it's legal for non-monopo

Re: how do i run another script from my python script

2005-10-27 Thread nephish
man, thats just too easy. thanks much ! -- http://mail.python.org/mailman/listinfo/python-list

Your message to Gimp-developer awaits moderator approval

2005-10-27 Thread gimp-developer-bounces
Your mail to 'Gimp-developer' with the subject report Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification of the modera

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Micah Elliott
On Oct 27, Gregory Piñero wrote: > >my goal really was to do: >try:something(1);except:pass >try:something(2);except:pass >try:something(3);except:pass >... >for about 20 lines. If you just want to ignore the exceptions while saving space/typing, you could equivalently do:

Re: how do i run another script from my python script

2005-10-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: > hey there all, > i have been looking for a way to run a php command line script from my > python script. > > here is what i want to do: > > if x = 4: > execute php4 testin.php > else: > execute php4 testout.php > > and i also need the script to wait untill the

Re: more than 100 capturing groups in a regex

2005-10-27 Thread Tim Peters
[DH] >> It's a conflict between python's syntax for regex back references >> and octal number literals. Probably wasn't noticed until way too >> ate, and now it will never change. [EMAIL PROTECTED] > I suspect it comes from Perl, since Python's regular expression engine tries > pretty hard to be

help with concurrency control (threads/processes & signals)

2005-10-27 Thread Sori Schwimmer
Hi, I am working on an application which involves interprocess communication. More to the point, processes should be able to notify other processes about certain situations, so the "notifyees" would be able to act in certain ways. As processes are distributed on several machines, in different phy

Re: Microsoft Hatred FAQ

2005-10-27 Thread Paul Rubin
"David Schwartz" <[EMAIL PROTECTED]> writes: > I defy you to find any court that has ruled this practice illegal for a > company that does not have a monopoly. Because if they did, I'm going after > Doctor's Associates and Kenmore. Of course it's legal for non-monopoly companies. You seem t

how do i run another script from my python script

2005-10-27 Thread nephish
hey there all, i have been looking for a way to run a php command line script from my python script. here is what i want to do: if x = 4: execute php4 testin.php else: execute php4 testout.php and i also need the script to wait untill the php4 script is done (which i think is the default

Re: Set an environment variable

2005-10-27 Thread Jorgen Grahn
On Wed, 26 Oct 2005 16:04:58 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: > Jorgen Grahn <[EMAIL PROTECTED]> writes: >> On Wed, 26 Oct 2005 07:42:19 -0700, Alex Martelli <[EMAIL PROTECTED]> wrote: >>> Grant Edwards <[EMAIL PROTECTED]> wrote: On 2005-10-24, Eric Brunel <[EMAIL PROTECTED]> wrote

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Gregory Piñero
That's interesting, Simon.  However, my goal really was to do: try:something(1);except:pass try:something(2);except:pass try:something(3);except:pass ... for about 20 lines.  I figured this would be more readable because if I reader sees 20 lines of nearly identical text he'll understand that it

Re: db.DB_CREATE|db.DB_INIT_MPOOL|db.DB_THREAD|db.DB_INIT_CDB

2005-10-27 Thread Jean-Paul Calderone
On Fri, 28 Oct 2005 00:17:54 +0800, "Neville C. Dempsey" <[EMAIL PROTECTED]> wrote: >Why does this python program fail to read record "600"? > >#!/usr/bin/env python >import bsddb # twiceopen.py > >key="600" >btf=bsddb.db.DB_INIT_THREAD > >list1=bsddb.btopen("twiceopen.tbl",btflags=btf) >l

Re: ANN: SPE 0.7.5.d released!

2005-10-27 Thread SPE - Stani's Python Editor
I forgot to include a sample of an exported Uml diagram, so here it is as a pdf: http://www.stani.be/python/spe/images/smdi.pdf Previous announcement: I'm currently packaging the new SPE. The release is a matter of minutes. Next releases (0.8.*) will focus on the Mac in honour of the fund raising

Re: more than 100 capturing groups in a regex

2005-10-27 Thread skip
DH> It's a conflict between python's syntax for regex back references DH> and octal number literals. Probably wasn't noticed until way too DH> late, and now it will never change. I suspect it comes from Perl, since Python's regular expression engine tries pretty hard to be compatible

Re: sys.exit call from pythonw.exe gives error

2005-10-27 Thread jepler
I wrote the following small program: #--- import sys, Tkinter t = Tkinter.Tk() b = Tkinter.Button(command=lambda: sys.exit(0), text="Click to exit") b.pack() t.mainloop() #---

db.DB_CREATE|db.DB_INIT_MPOOL|db.DB_THREAD|db.DB_INIT_CDB

2005-10-27 Thread Neville C. Dempsey
Why does this python program fail to read record "600"? #!/usr/bin/env python import bsddb # twiceopen.py key="600" btf=bsddb.db.DB_INIT_THREAD list1=bsddb.btopen("twiceopen.tbl",btflags=btf) list1[key]="we have the technology" list2=bsddb.btopen("twiceopen.tbl",btflags=btf) #print "key

Re: strange problems with urllib2

2005-10-27 Thread jdonnell
I haven't checked them, but will do it now. However, I don't have problems with anything but python. I can download that image in less than a second with wget or in my browser. I know that I had ipv6 problems before. I had to turn it off because of my nat router so I'll look into that sort of thing

Re: socket.error: (32, 'Broken pipe'): need help

2005-10-27 Thread Jeremy Jones
Junhua Deng (AL/EAB) wrote: >Hi, >I have a simple server-client application with threading. It works fine when >both server and client on the same machine, but I get the following error >message if the server is on another machine: > >... ... >self.socket.send(outgoingMsg) >socket.error: (32

Re: socket.error: (32, 'Broken pipe'): need help

2005-10-27 Thread dcrespo
When enabling the server, note that you put '' as the IP, and not 'localhost'. if you put an ip: '172.16.1.2', your server will listen on that IP (if it's valid) if you put '', your server will listen on all IPs defined on that computer. of you put 'localhost', it will listen for local connections

socket.error: (32, 'Broken pipe'): need help

2005-10-27 Thread Junhua Deng (AL/EAB)
Hi, I have a simple server-client application with threading. It works fine when both server and client on the same machine, but I get the following error message if the server is on another machine: ... ... self.socket.send(outgoingMsg) socket.error: (32, 'Broken pipe') I do not know where

Re: time conversion

2005-10-27 Thread flupke
Fredrik Lundh wrote: > "flupke" wrote: > > >>Is there an easy to convert following hour notation hh:mm >>to decimals? >>For instance 2 hours and 30 minutes as 2:30 to 2,50 >>I don't really know where to search for this kind of conversion. > > > you mean like > > >>> timestamp = "2:30" >

OpenSSL in Python

2005-10-27 Thread dcrespo
Hi to all, What do I have to install to get the following code work (Win XP, Python 2.4.2) from OpenSSL import SSL import config KEY_FILE = config.SSL_KEY_FILE CERT_FILE = config.SSL_CERT_FILE -- I've been looking for OpenSSL for python. I found pyOpenSSL, but

Re: time conversion

2005-10-27 Thread Fredrik Lundh
"flupke" wrote: > Is there an easy to convert following hour notation hh:mm > to decimals? > For instance 2 hours and 30 minutes as 2:30 to 2,50 > I don't really know where to search for this kind of conversion. you mean like >>> timestamp = "2:30" >>> hour, minute = timestamp.split(":")

Re: Help: Quick way to test if value lies within a list of lists of ranges?

2005-10-27 Thread Jean-Paul Calderone
On Thu, 27 Oct 2005 15:48:53 +0100 (BST), Ben O'Steen <[EMAIL PROTECTED]> wrote: >Scenario: >= > >Using PyGame in particular, I am trying to write an application that will >run a scripted timeline of events, eg at 5.5 seconds, play xxx.mp3 and put >the image of a ball on screen, at 7.8 seco

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Simon Brunning
On 27/10/05, Gregory Piñero <[EMAIL PROTECTED]> wrote: > So much for writing my whole program on one line :-( http://www.unixuser.org/~euske/pyone/ But you didn't hear it from me, OK? ;-) -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/

Re: time conversion

2005-10-27 Thread flupke
flupke wrote: > Is there an easy to convert following hour notation hh:mm > to decimals? > For instance 2 hours and 30 minutes as 2:30 to 2,50 > I don't really know where to search for this kind of conversion. > > Thanks, > Benedict I found a way. Not sure if it's the best: time = "2:3" factor =

Re: handling ExpatError exception raised from ElementTree.XML() method

2005-10-27 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > > NameError: name 'ExpatError' is not defined > > I'm guessing that I need to define/describe the ExpatError exception > class and then refer to that defined exception class after the keyword > 'except' and before the ':', but I cannot figure out how to do that. You just

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread W.H.Offenbach
Gregory Piñero wrote: > So much for writing my whole program on one line :-( Why bother with one liners? "The number of meaningful lines and pages a writer produces is a measure for his writer-ship" -- my old Literature professor -- http://mail.python.org/mailman/listinfo/python-list

sys.exit call from pythonw.exe gives error

2005-10-27 Thread Jo Schambach
I wrote a python GUI with tkInter and installed it on a windows machine with the .pyw extension, so it will be executed from pythonw.exe instead of python.exe, since I didn't want the console window to appear. My application exits with a call to sys.exit. However, when this call is executed under p

Re: syntax question - if 1:print 'a';else:print 'b'

2005-10-27 Thread Gregory Piñero
So much for writing my whole program on one line :-( j/k -GregOn 10/26/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: Gregory Piñero wrote:> Any idea why I can't say:>> if 1:print 'a';else:print 'b'>> all in one line like that?because ";" can only be used to separate simple statements, not the diff

Re: xml.dom.minidom - parseString - How to avoid ExpatError?

2005-10-27 Thread Gregory Piñero
Thanks, John.  That was all very helpful.  It looks like one option for me would be to put cdata[ around my text with all the weird characters.  Otherwise running it through on of the SAX utilities before parsing might work. I wonder if the sax utilities would give me a performance hit.  I have 60

Help: Quick way to test if value lies within a list of lists of ranges?

2005-10-27 Thread Ben O'Steen
Scenario: = Using PyGame in particular, I am trying to write an application that will run a scripted timeline of events, eg at 5.5 seconds, play xxx.mp3 and put the image of a ball on screen, at 7.8 seconds move the ball up and down. At this point, I hear you say 'Oh, like Flash'. Yes, we

time conversion

2005-10-27 Thread flupke
Is there an easy to convert following hour notation hh:mm to decimals? For instance 2 hours and 30 minutes as 2:30 to 2,50 I don't really know where to search for this kind of conversion. Thanks, Benedict -- http://mail.python.org/mailman/listinfo/python-list

Re: strange problems with urllib2

2005-10-27 Thread Cousin Stanley
> When I run this code on windows it runs quickly > (about a second per image) but when I run it on linux > it runs very very slowly (10+ seconds per image). > jdonnell I'm running a 1999 vintage 250 MHz Compaq with Debian Gnu/Linux & Python 2.3.5 The following version

Re: SOAPpy module

2005-10-27 Thread Lawrence Oluyede
Il 2005-10-27, Alvin A. Delagon <[EMAIL PROTECTED]> ha scritto: > Has anyone experienced this? I'm googling like crazy these past few > weeks just to find a solution to this predicament. Thank you in advance! >:-) Don't know very much about it, but... did you ask on the mailing list? -- Lawre

  1   2   >