Re: Perl Hacker, Python Initiate

2011-02-01 Thread Carl Banks
On Feb 1, 8:36 pm, Gary Chambers wrote: > open DIG, "$DIGCMD|" or die "$DIG: $!\n"; > while () { > Will someone please provide some insight on how to accomplish that task in > Python?  I am unable to continually (i.e. it stops after displaying a single > line) loop through the output while test

Help with python-twain module

2011-02-01 Thread Sandy Oz
Hello everyone, Really need help with the python-twain module. I installed the module for python 2.6 on a win-xp 32bit machine. I ran the demo app and got a python core crash when calling SourceManager.OpenSource(). I've managed to run the scanner I'm using on a Linux machine with python-

Classic asp registered with python in IIS 7

2011-02-01 Thread Ansuman Bebarta
I had a website which used IIS 6 to call classic asp pages. The asp pages called python script and the python pages was doing all the operations. Now I am using IIS7 in windows7 and while running my websites I am getting HTTP/1.1 500 Server Error. I have done following steps but no luck. I have in

wxPython's "Print" Help

2011-02-01 Thread Akand Islam
I can print whatever I want (definitely texts) by using following "Printer" class. However, it prints only in Black and White mode regardless original color of texts. Is there any way I can print color texts? = #License: MIT impor

Re: Perl Hacker, Python Initiate

2011-02-01 Thread Ben Finney
Gary Chambers writes: > Given the following Perl script: […] > > Will someone please provide some insight on how to accomplish that > task in Python? I am unable to continually (i.e. it stops after > displaying a single line) loop through the output while testing for > the matches on the two regu

Re: Perl Hacker, Python Initiate

2011-02-01 Thread Chris Rebert
On Tue, Feb 1, 2011 at 8:36 PM, Gary Chambers wrote: > All, > > Given the following Perl script: > Will someone please provide some insight on how to accomplish that task in > Python?  I am unable to continually (i.e. it stops after displaying a single > line) loop through the output while testin

Perl Hacker, Python Initiate

2011-02-01 Thread Gary Chambers
All, Given the following Perl script: #!/usr/bin/perl %dig = ( solaris => "/usr/sbin/dig", linux => "/usr/bin/dig", darwin => "/usr/bin/dig" ); $DIG = $dig{"$^O"}; $DOMAIN = "example.com"; $DNS = "ns.example.com"; $DIGCMD = qq/$DIG \@$DNS $DOMAIN axfr/; open DIG, "$DIGCMD|" or

Adding Asian text error with IIS

2011-02-01 Thread Panupat Chongstitwattana
I created a very simple script, testing it out with web browser. # -*- coding: utf-8 -*- import sys sys.getdefaultencoding() f = '?' print "Content-Type: text/plain;charset=utf-8" print f The moment I have an Asian text in my file (without doing anything to it at all) I always get a 502 error -

Re: Print docstrings to shell

2011-02-01 Thread Gnarlodious
Thank you for the help, I learned a few things. The André solution renders the colors but needs q-q to quit. The Carl solution 1 prints colors and requires q to quit. The Carl solution 2 prints colorlessly, it looks good for exporting to a file. Everything I need. -- Gnarlie http://Gnarlodious.com

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Westley Martínez
http://www.youtube.com/watch?v=z5jKMEB4hHE On Tue, 2011-02-01 at 10:23 -0800, rantingrick wrote: > On Feb 1, 11:52 am, Red John wrote: > > > Go away. You are easily one of the worst (and definitely most > > annoying) person I've encountered in person or online, which is saying > > something be

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Raymond Hettinger
On Jan 31, 9:39 am, rantingrick wrote: > IDLE: cornucopia ... > These are just the top of the list. The peak of a huge iceberg that > threatens to sink the community in the arms of chaos never to return. That being said, I've taught a lot of people Python using IDLE. It's a surprisingly producti

Re: Print docstrings to shell

2011-02-01 Thread Carl Banks
On Feb 1, 4:11 pm, Gnarlodious wrote: > Can I run a script in bash and print out its docstrings to the bash > shell? I tried this at the end: > > print(help(__file__)) > > Runnig the script: > python ~/Sites/Sectrum/Harmonics.py > > but all it spit out was: > > no Python documentation found for '~

Re: Reassign or discard Popen().stdout from a server process

2011-02-01 Thread John O'Hagan
On Tue, 1 Feb 2011, John O'Hagan wrote: > > So far my best bet seems to be closing stdin, which doesn't seem very > clean, but it does what I want and seems to be just as fast as using > stdin=open(os.devnull) in the Popen call in the first place. ...and both references to stdin above should hav

Re: Print docstrings to shell

2011-02-01 Thread André Roberge
On Tuesday, February 1, 2011 9:21:48 PM UTC-4, André Roberge wrote: SNIP > > === > import pydoc > import os > import sys > > '''this is a test''' > > class A(object): > '''docstring''' > pass > > _path, _file_name = os.path.split(__file__) > _module_name = _file_name[:-3] > sys.

Re: PyQT: QWebView with custom QNetworkAccessManager

2011-02-01 Thread Gelonida
On 02/02/2011 12:31 AM, Gelonida wrote: > Hi, > > I would like to subclass QNetworkAccessManager and > create a subclass of QWebView, that will use the subclassed > QNetworkAccessManager for all accesses. > > Is this possible? > I have really no idea when and how I could achieve this. > > Thanks

Re: Print docstrings to shell

2011-02-01 Thread André Roberge
On Tuesday, February 1, 2011 9:05:28 PM UTC-4, Gnarlodious wrote: > On Feb 1, 5:30 pm, André Roberge wrote: > > > test.py== > > import pydoc > > > > '''this is a test''' > > > > class A(object): > >         '''docstring''' > >         pass > > > > print(pydoc.help(__file__[:-3]))

Re: Print docstrings to shell

2011-02-01 Thread Gnarlodious
On Feb 1, 5:30 pm, André Roberge wrote: > test.py== > import pydoc > > '''this is a test''' > > class A(object): >         '''docstring''' >         pass > > print(pydoc.help(__file__[:-3])) > = > > python test.py OK that works, but only if I cd into the folder of th

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Corey Richardson
On 02/01/2011 07:42 PM, Robert wrote: > On 2011-02-01 10:54:26 -0500, Terry Reedy said: > >> On 2/1/2011 12:13 AM, rantingrick wrote: >>> On Jan 31, 4:17 pm, Kevin Walzer wrote: Rick, >> >>> Yes. IDLE is first and foremost a tool to get work done. However we >>> should not ignore the fact th

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Robert
On 2011-02-01 10:54:26 -0500, Terry Reedy said: On 2/1/2011 12:13 AM, rantingrick wrote: On Jan 31, 4:17 pm, Kevin Walzer wrote: Rick, Yes. IDLE is first and foremost a tool to get work done. However we should not ignore the fact that IDLE could also be a great learning resource for Tkinte

Re: Print docstrings to shell

2011-02-01 Thread André Roberge
On Tuesday, February 1, 2011 8:11:51 PM UTC-4, Gnarlodious wrote: > Can I run a script in bash and print out its docstrings to the bash > shell? I tried this at the end: > > print(help(__file__)) > > Runnig the script: > python ~/Sites/Sectrum/Harmonics.py > > but all it spit out was: > > no Py

Re: How to create an entry in the "Program menu" of Windows?

2011-02-01 Thread Westley Martínez
distutils can do this with a post-install script. See the distutils documentation. This is a script I wrote that did this (and other stuff): import sys import os if sys.argv[1] == '-install': # Append .py to scripts os.rename(os.path.join(sys.prefix, 'Scripts', 'anikom15'), o

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Michael Torrie
On 02/01/2011 08:26 AM, Noah Hall wrote: > On Tue, Feb 1, 2011 at 3:14 PM, rantingrick wrote: >> #-- Embedded Trolls and Minions --# > These people, including myself, aren't trolls nor minions. They just > don't agree with you. I strongly disagree with rr and find him to be an egotistical troll w

Print docstrings to shell

2011-02-01 Thread Gnarlodious
Can I run a script in bash and print out its docstrings to the bash shell? I tried this at the end: print(help(__file__)) Runnig the script: python ~/Sites/Sectrum/Harmonics.py but all it spit out was: no Python documentation found for '~/Sites/Sectrum/Harmonics.py' However in the interactive

Re: How to create an entry in the "Program menu" of Windows?

2011-02-01 Thread Alexander Kapps
On 01.02.2011 22:43, Diesel wrote: Hi, I'd like to add menu entry in the Program Menu as part of the installation of an application. Is it possible to do that from Python? Any examples or link? I have not been able to find anything with google... thanks in advance s/ AFAIK, the startmenu e

Re: How to create an entry in the "Program menu" of Windows?

2011-02-01 Thread Michael Torrie
On 02/01/2011 02:43 PM, Diesel wrote: > I'd like to add menu entry in the Program Menu as part of the > installation of an application. Is it possible to do that from Python? > > Any examples or link? I have not been able to find anything with > google... Use an installer program like nsis to cr

PyQT: QWebView with custom QNetworkAccessManager

2011-02-01 Thread Gelonida
Hi, I would like to subclass QNetworkAccessManager and create a subclass of QWebView, that will use the subclassed QNetworkAccessManager for all accesses. Is this possible? I have really no idea when and how I could achieve this. Thanks in advance for any suggestions / pointers -- http://mail.

Re: simplest way to create simple standalone wsgi server without import wsgi_lib.server

2011-02-01 Thread Gelonida
On 02/01/2011 11:36 PM, Jean-Paul Calderone wrote: >> >>> twistd -n web --port --wsgi >> >> >> The problem is rather simple. The host in question is not 100% under my >> control. I can request to have packages installed if they're in the list >> of available packages. >> >> python 2.4 is part

Re: DRY and static attribute for multiple classes.

2011-02-01 Thread Peter Otten
Marc Aymerich wrote: > Hi all, > I want to provide an encapsulated static attribute called _registry > for several classes. > > I try to use inheritance in order to make it DRY: all classes inherit > from a BaseClass that implements the _registry encapsulation. But with > inheritance it doesn't w

Re: simplest way to create simple standalone wsgi server without import wsgi_lib.server

2011-02-01 Thread Jean-Paul Calderone
On Feb 1, 2:01 pm, Gelonida wrote: > On 02/01/2011 03:07 AM, Jean-Paul Calderone wrote: > > > > > On Jan 31, 5:28 pm, Gelonida wrote: > >> Hi, > > >> Normally I use following code snippet to quickly test a wsgi module > >> without a web server. > > >> import wsgi_lib.server > >> wsgi_lib.server.r

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread AD.
On Feb 2, 4:14 am, rantingrick wrote: > On Feb 1, 8:27 am, Jean-Michel Pichavant > wrote: > > > In a more serious way, just count the people who second your > > prosposition. It's around 0. It is usually a good sign that you're > > wrong. This rule kinda applies to anyone, don't take it personnal

Re: test: please ignore

2011-02-01 Thread Gelonida
On 02/01/2011 10:44 PM, Gelonida wrote: > Somehow I can't post anymore to gmane. > > Would like to know why. > Now this message arrived. So it seems to work again, though with quite some heavy delay. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create an entry in the "Program menu" of Windows?

2011-02-01 Thread rantingrick
On Feb 1, 3:43 pm, Diesel wrote: > I'd like to add menu entry in the Program Menu as part of the > installation of an application. Is it possible to do that from Python? Diesel your description is ambiguous at best, might we inquire that you elaborate a wee bit more? Is this "application" someth

Re: simplest way to create simple standalone wsgi server without import wsgi_lib.server

2011-02-01 Thread Gelonida
On 02/01/2011 03:07 AM, Jean-Paul Calderone wrote: > On Jan 31, 5:28 pm, Gelonida wrote: >> Hi, >> >> Normally I use following code snippet to quickly test a wsgi module >> without a web server. >> >> import wsgi_lib.server >> wsgi_lib.server.run(application, port=port) >> >> However Now I'd like

DRY and static attribute for multiple classes.

2011-02-01 Thread Marc Aymerich
Hi all, I want to provide an encapsulated static attribute called _registry for several classes. I try to use inheritance in order to make it DRY: all classes inherit from a BaseClass that implements the _registry encapsulation. But with inheritance it doesn't work how I want, because a single ins

How to create an entry in the "Program menu" of Windows?

2011-02-01 Thread Diesel
Hi, I'd like to add menu entry in the Program Menu as part of the installation of an application. Is it possible to do that from Python? Any examples or link? I have not been able to find anything with google... thanks in advance s/ -- http://mail.python.org/mailman/listinfo/python-list

test: please ignore

2011-02-01 Thread Gelonida
Somehow I can't post anymore to gmane. Would like to know why. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get and search a html file from a website

2011-02-01 Thread Corey Richardson
On 02/01/2011 04:20 PM, Tracubik wrote: > Hi all! > i'm writing a notification program and i'm quite new to python. > The program have to check every 5 minutes a particular website and alert > me when a particular sentence ("user online") is in the html. > i've thinked to use a text browser (lynx)

Re: how to get and search a html file from a website

2011-02-01 Thread James Mills
On Wed, Feb 2, 2011 at 7:20 AM, Tracubik wrote: > Hi all! > i'm writing a notification program and i'm quite new to python. > The program have to check every 5 minutes a particular website and alert > me when a particular sentence ("user online") is in the html. > i've thinked to use a text browse

XEmacs output from Python

2011-02-01 Thread Beliavsky
The script name = raw_input("What is your name? ") print "Hello, ",name runs fine from the Windows prompt (cmd.exe), but when I run it in a shell buffer under XEmacs, I only see the text "What is your name? " AFTER I enter some text, so a run looks like this: H:\python>python xinput.py x What is

Re: how to get and search a html file from a website

2011-02-01 Thread Paul Anton Letnes
Den 01.02.11 22.20, skrev Tracubik: Hi all! i'm writing a notification program and i'm quite new to python. The program have to check every 5 minutes a particular website and alert me when a particular sentence ("user online") is in the html. i've thinked to use a text browser (lynx) to retrieve

how to get and search a html file from a website

2011-02-01 Thread Tracubik
Hi all! i'm writing a notification program and i'm quite new to python. The program have to check every 5 minutes a particular website and alert me when a particular sentence ("user online") is in the html. i've thinked to use a text browser (lynx) to retrieve the html and parse the output in pyt

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Corey Richardson
On 02/01/2011 03:05 PM, rantingrick wrote: > On Feb 1, 1:35 pm, John Nagle wrote: >> On 1/31/2011 2:17 PM, Kevin Walzer wrote: >> >>> It certainly would be interesting to see a fresh approach to IDLE... >> >> The future of "playing with Python" is probably Python in a browser >> window, of which t

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread rantingrick
On Feb 1, 1:35 pm, John Nagle wrote: > On 1/31/2011 2:17 PM, Kevin Walzer wrote: > > > It certainly would be interesting to see a fresh approach to IDLE... > > The future of "playing with Python" is probably Python in a browser > window, of which there are several implementations. Hello John, I

Re: How can I tell if I am inside a context manager?

2011-02-01 Thread Ethan Furman
Gerald Britton wrote: I'd like to know how (perhaps with the inspect module) I can tell if I am running in a context manager. What's your use-case? ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple values for keyword argument

2011-02-01 Thread Patty
Here is a list of the compiled personalities... #-- Moderates --# Patty ? 26 moderates 31 trolls, minions, sockpuppets, and or flamers 2 missing in action = This community needs serious help! -- http://mail.python.org/mailman/listinfo/python-list How Embarrass

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread John Nagle
On 1/31/2011 2:17 PM, Kevin Walzer wrote: It certainly would be interesting to see a fresh approach to IDLE... The future of "playing with Python" is probably Python in a browser window, of which there are several implementations. If you're doing anything serious, you're using a programme

Re: How can I tell if I am inside a context manager?

2011-02-01 Thread Jerry Hill
On Tue, Feb 1, 2011 at 1:38 PM, Gerald Britton wrote: > As you can see, the object has a '__enter__' method regardless of how > it was created. Whatever the test, it needs to return False in the > first case and True in the second case, without modifying the class > definition. > > I'm sorry, I c

Re: Use the Source Luke

2011-02-01 Thread OKB (not okblacke)
Tim Wintle wrote: > However I think the biggest changes that have probably happened > with python itself are: > > (1) More users for whom this is their first language. > (2) CS courses / training not teaching C (or pointer-based > languages). > > (2) is especially important IMO - under half

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Terry Reedy
On 2/1/2011 11:18 AM, rantingrick wrote: Well the best attribute of IDLE is backward compatibility -- there is none to worry about. IDLE is not a module with an interface, it's just a tool. So we could change anything we want without worry of causing code breakage. There is not good reason NOT t

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread David Hutto
In the grand scope of things...you're all boring. -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple values for keyword argument

2011-02-01 Thread Patty
- Original Message - From: "Jean-Michel Pichavant" To: "Patty" Cc: Sent: Tuesday, February 01, 2011 2:27 AM Subject: Re: multiple values for keyword argument Patty wrote: pa...@cruzio.com wrote: I have been avoiding understanding this 'self', [snip] Regards, Patty What is

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Cousin Stanley
rantingrick wrote: > Terry (or anyone) can you give some link to info on "hg" > so i can study up on this topic ? http://mercurial.selenic.com/ -- Stanley C. Kitching Human Being Phoenix, Arizona -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I tell if I am inside a context manager?

2011-02-01 Thread Gerald Britton
"Perhaps something like this:" >>x = open('somefile') >>if hasattr(x, '__enter__'): >>return false >>with open('somefile') as x: >>do_something() >>> class f(): def __init__(s): pass def __enter__(s): return s def __exit__(s,a,b,c): return None >>> x = f() >>> hasattr(x, '__e

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread rantingrick
On Feb 1, 11:52 am, Red John wrote: > Go away. You are easily one of the worst (and definitely most > annoying) person I've encountered in person or online, which is saying > something because I used to frequent 4chan. Hmm, that coming from someone who has two posts in this group. And the last h

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Robert
On 2011-02-01 00:13:06 -0500, rantingrick said: On Jan 31, 4:17 pm, Kevin Walzer wrote: Yes. IDLE is first and foremost a tool to get work done. However we should not ignore the fact that IDLE could also be a great learning resource for Tkinter GUI's and other subjects. Why not clean up the co

Re: How can I tell if I am inside a context manager?

2011-02-01 Thread Jerry Hill
On Tue, Feb 1, 2011 at 11:34 AM, Gerald Britton wrote: > x = open('somefile') > # return false since not in a context > with open('somefile') as x > # return true since in a context. > Perhaps something like this: x = open('somefile') if hasattr(x, '__enter__'): return false with open('somef

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Red John
On Feb 1, 10:26 am, rantingrick wrote: > On Feb 1, 10:29 am, "Littlefield, Tyler" wrote: > > > I hope everyone will > > excuse me now, I must dash off to slit  my wrists in a tub of warm water > > and listen to Free Bird, > > Free Bird! hmm, I would have chosen Chopin's nocturne 48-1 or 72-1 if >

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread rantingrick
On Feb 1, 10:29 am, "Littlefield, Tyler" wrote: > I hope everyone will > excuse me now, I must dash off to slit  my wrists in a tub of warm water > and listen to Free Bird, Free Bird! hmm, I would have chosen Chopin's nocturne 48-1 or 72-1 if i was feeling rather melancholy at the moment. Then t

How can I tell if I am inside a context manager?

2011-02-01 Thread Gerald Britton
On Dienstag 01 Februar 2011, Gerald Britton wrote: > I'd like to know how (perhaps with the inspect module) I can > tell if I am running in a context manager. >>class f(object): >> def __init__(self): >> self.inContext = False >>def __enter__(self): >>self.inContext = True >>

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Littlefield, Tyler
>See now you are offering truth in your argument! Keep this up and i'll >move you over to the occasional flamers group. Then over time, if you >can demonstrate an ability to engage in lively discussion based on >facts and not emotion, i *may* even move you into the moderates group. O no, whatever

Re: argparse: combine current option value with positional argument

2011-02-01 Thread rantingrick
On Feb 1, 6:59 am, Peter Otten <__pete...@web.de> wrote: > I'd like to capture the current value of an option --prefix= along > with a positional value as it is seen by argparse. Have you seen the handy optphart module yet? I believe its in alpha2 currently but very stable. http://tinyurl.com/op

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread rantingrick
On Feb 1, 9:54 am, Terry Reedy wrote: > On 2/1/2011 12:13 AM, rantingrick wrote: > > > On Jan 31, 4:17 pm, Kevin Walzer  wrote: > >> Rick, > > Yes. IDLE is first and foremost a tool to get work done. However we > > should not ignore the fact that IDLE could also be a great learning > > resource fo

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Kevin Walzer
On 2/1/11 10:54 AM, Terry Reedy wrote: Maybe Kevin would help a bit. Probably not--IDLE is good enough for my needs. I've submitted some (rather extensive) patches for things that annoyed me and got in my way, and they eventually made it in. (The classic open source pathway--scratching my ow

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread rantingrick
On Feb 1, 9:26 am, Noah Hall wrote: > On Tue, Feb 1, 2011 at 3:14 PM, rantingrick wrote: > > #-- Embedded Trolls and Minions --# > > Steven D'Aprano(smart and witty (annoying) troll) > > Stephan Hansen (controversy troll) > > Ben Finny (haughty troll) > > alex23(angry/dangerous troll) > > Tyler L

Re: How can I tell if I am inside a context manager?

2011-02-01 Thread Wolfgang Rohdewald
On Dienstag 01 Februar 2011, Gerald Britton wrote: > I'd like to know how (perhaps with the inspect module) I can > tell if I am running in a context manager. class f(object): def __init__(self): self.inContext = False def __enter__(self): self.inContext = True re

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Terry Reedy
On 2/1/2011 12:13 AM, rantingrick wrote: On Jan 31, 4:17 pm, Kevin Walzer wrote: Rick, Yes. IDLE is first and foremost a tool to get work done. However we should not ignore the fact that IDLE could also be a great learning resource for Tkinter GUI's and other subjects. Why not clean up the c

Re: Looking for Remote Python Project

2011-02-01 Thread Subhabrata
On Feb 1, 8:45 am, Alan Meyer wrote: > On 01/29/2011 04:19 PM,joy99wrote: > > > Dear Room, > > > I am a Python Programmer from India(New Delhi Region), and I worked > > for quite a long time in Bangalore. I have been working in Python for > > the last 4 years or so. I have successfully built aroun

How can I tell if I am inside a context manager?

2011-02-01 Thread Gerald Britton
I'd like to know how (perhaps with the inspect module) I can tell if I am running in a context manager. e.g. class f(): def __init__(s): pass def __enter__(s): return s def __exit__(s,a,b,c): return None def g(): x = f() # insert code here to return False, since I am not in a

Re: Reassign or discard Popen().stdout from a server process

2011-02-01 Thread John O'Hagan
On Tue, 1 Feb 2011, Chris Rebert wrote: > On Tue, Feb 1, 2011 at 12:30 AM, John O'Hagan wrote: > > I'm starting a server process as a subprocess. Startup is slow and > > unpredictable (around 3-10 sec), so I'm reading from its stdout until I > > get a line that tells me it's ready before proceedin

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Noah Hall
On Tue, Feb 1, 2011 at 3:14 PM, rantingrick wrote: > #-- Embedded Trolls and Minions --# > Steven D'Aprano(smart and witty (annoying) troll) > Stephan Hansen (controversy troll) > Ben Finny (haughty troll) > alex23(angry/dangerous troll) > Tyler Littlefeild(confused troll) > Bryan ? (annoying trol

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread rantingrick
On Feb 1, 8:27 am, Jean-Michel Pichavant wrote: > In a more serious way, just count the people who second your > prosposition. It's around 0. It is usually a good sign that you're > wrong. This rule kinda applies to anyone, don't take it personnaly. Well your statment completely ignores the sile

Re: Installing Suds for Python 2.6.1 on Mac OS X

2011-02-01 Thread Darkside Android
On Feb 1, 4:30 am, Chris Rebert wrote: > On Tue, Feb 1, 2011 at 2:43 AM, Darkside Android > > wrote: > > I'd like to test my SOAP-based web service from Textmate (PyMate) > > however I'm running into some trouble trying to get suds configured on > > my Mac. I was able to install it from Terminal

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Westley Martínez
Man you're a real comedian. This is a hilarious thread. Keep up the good work! On Tue, 2011-02-01 at 05:38 -0800, rantingrick wrote: > On Feb 1, 6:53 am, Adam Tauno Williams wrote: > > > If you despise IDLE so much - use one of the many other IDE's that > > support Python; move on. > > Not ex

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Jean-Michel Pichavant
rantingrick wrote: On Feb 1, 6:53 am, Adam Tauno Williams wrote: If you despise IDLE so much - use one of the many other IDE's that support Python; move on. Not exactly. Can we continue to ignore such lackluster and shabby code in OUR stdlib. Remember the code reflects on all of us!

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread André
On Tuesday, February 1, 2011 9:38:26 AM UTC-4, Richard "rantingrick" Johnson wrote: > On Feb 1, 6:53 am, Adam Tauno Williams wrote: > > > If you despise IDLE so much - use one of the many other IDE's that > > support Python;  move on. > > Not exactly. Can we continue to ignore such lackluster a

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread rantingrick
On Feb 1, 6:53 am, Adam Tauno Williams wrote: > If you despise IDLE so much - use one of the many other IDE's that > support Python;  move on. Not exactly. Can we continue to ignore such lackluster and shabby code in OUR stdlib. Remember the code reflects on all of us! -- http://mail.python.org

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread Adam Tauno Williams
On Tue, 2011-02-01 at 04:38 -0800, rantingrick wrote: > On Feb 1, 4:20 am, flebber wrote: > > Sorry Rick too boringtrying to get bored people to bite at your > > ultra lame post yawn... > Well reality and truth both has a tendency to be boring. Even more true of pointless and drawn-o

argparse: combine current option value with positional argument

2011-02-01 Thread Peter Otten
I'd like to capture the current value of an option --prefix= along with a positional value as it is seen by argparse. Example: python script.py -p1 alpha beta -p2 gamma -p3 should result in a list [(1, "alpha"), (1, "beta"), (2, "gamma")] Here's a working script that uses --name= instead of of

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread rantingrick
On Feb 1, 4:20 am, flebber wrote: > Sorry Rick too boringtrying to get bored people to bite at your > ultra lame post yawn... Well reality and truth both has a tendency to be boring. Why? Well because we bathe in them daily. We have come accustomed, acclimated, and sadly complacent o

Re: Installing Suds for Python 2.6.1 on Mac OS X

2011-02-01 Thread Chris Rebert
On Tue, Feb 1, 2011 at 2:43 AM, Darkside Android wrote: > I'd like to test my SOAP-based web service from Textmate (PyMate) > however I'm running into some trouble trying to get suds configured on > my Mac. I was able to install it from Terminal however I'm getting the > message each time I run th

Installing Suds for Python 2.6.1 on Mac OS X

2011-02-01 Thread Darkside Android
I'd like to test my SOAP-based web service from Textmate (PyMate) however I'm running into some trouble trying to get suds configured on my Mac. I was able to install it from Terminal however I'm getting the message each time I run the script: ImportError: No module named suds What do you recomme

Re: multiple values for keyword argument

2011-02-01 Thread Jean-Michel Pichavant
Patty wrote: pa...@cruzio.com wrote: I have been avoiding understanding this 'self', [snip] Regards, Patty What is to be understood ?? self references the instance. Did I miss something ? JM Yes, there was more. And it's been fully explained at this point. Patty Hmm... I re-

Re: IDLE: A cornicopia of mediocrity and obfuscation.

2011-02-01 Thread flebber
On Feb 1, 4:39 am, rantingrick wrote: > IDLE: A cornicopia of mediocrity and obfuscation. > -- by Rick Johnson > > IDLE --which is the Python Integrated Development and Learning > Environment-- was once the apple of Guido's eye but has since > degenerated into madness many years ago and remains no

Re: Reassign or discard Popen().stdout from a server process

2011-02-01 Thread Chris Rebert
On Tue, Feb 1, 2011 at 12:30 AM, John O'Hagan wrote: > I'm starting a server process as a subprocess. Startup is slow and > unpredictable (around 3-10 sec), so I'm reading from its stdout until I get a > line that tells me it's ready before proceeding, in simplified form: > > import subprocess > p

Reassign or discard Popen().stdout from a server process

2011-02-01 Thread John O'Hagan
I'm starting a server process as a subprocess. Startup is slow and unpredictable (around 3-10 sec), so I'm reading from its stdout until I get a line that tells me it's ready before proceeding, in simplified form: import subprocess proc = subprocess.Popen(['server', 'args'], stdout=subprocess.PI