Re: How to depress the output of an external module ?

2006-12-26 Thread Luis Armendariz
On Tuesday, 26.12.06 at 21:28, Steven D'Aprano wrote: > > # WARNING: untested > def run_without_stdout(*args, **kwargs): > function = args[0] > args = args[1:] > savestdout = sys.stdout > sys.stdout = cStringIO.StringIO() > result = None > try: > result = function(*

Re: A problem from a Vim user

2006-08-07 Thread Luis Armendariz
manuhack wrote: > When I use raw_input('Please type something.\n') in the python 2.4 > command line windows, it doesn't have any problem. However, when I run > the same command in vim 7 as :py raw_input('Please type something.\n'), > there is an EOFError: EOF when reading a line. Is there a way t

Re: hide python window

2006-05-26 Thread Luis Armendariz
Bell, Kevin wrote: > When I run a script, how can I make it run in the background? I don't > want to see the command window because it runs all day. I'm on > windows... > > Hi Kevin, Rename your kevin_script.py to kevin_script.pyw (so that it runs with pythonw.exe instead of python.exe). -Lu

Re: how to clear up a List in python?

2006-05-26 Thread Luis Armendariz
vbgunz wrote: > Steve, I have no qualm with Fredrik over this '''if you don't know how > to do things, you don't need to post.''' but this ''' if you know why > this is about the dumbest way to do what you're doing, and you're > posted this on purpose, you really need to grow up.'''. Well, given t

Re: ping

2006-04-14 Thread Luis Armendariz
david brochu jr wrote: > Thanks, > > Unfortunately substituting os.system with os.popen results in the output > being: > > http://www.google.com/> > ', mode 'r' at 0x009C4650> > http://www.boston.com/> > ', mode 'r' at 0x009C4650> > http://www.espn.com/> > ', mode 'r' at 0x009C4650> > http://www

Re: Attached images by plain email.

2006-02-15 Thread luis . armendariz
Hi Gaz, Perhaps this will help? http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52243 -- http://mail.python.org/mailman/listinfo/python-list

Re: multiple inheritance

2006-02-15 Thread luis . armendariz
Hi Thomas, When an object is created, the __init__ function will be called. Since you didn't define it in Foobar, the search path finds the __init__ function in Foo, so that's the one that is called. The second __init__ in Bar is masked since it comes second in the inheritance list.. If you want

Re: how to get function names from the file

2006-02-15 Thread luis . armendariz
Try the following: def printFoo(): print "Foo" def printFOO(): print "FOO" functions = ("printFoo", "printFOO")# list or tuple of strings from file, or wherever for function in functions: call = function + "()" eval(call) -- http://mail.python.org/mailman/listinfo/python-li