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(*
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
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
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
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
Hi Gaz,
Perhaps this will help?
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52243
--
http://mail.python.org/mailman/listinfo/python-list
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
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