Re: execute commands independantly

2005-09-06 Thread Eric McGraw

If you want it to return when the program is finished then use
os.system('app') but if you just want to start it and return right
away, use os.startfile('app')

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python function with **kwargs Question

2006-01-06 Thread Eric McGraw
You could call it like this:
>>> foo(**{"a-special-keyword":5})
but that might defeat the purpose of keyword arguments.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: invert the order of a string

2006-02-13 Thread Eric McGraw
> Well, it turns out to be the best way to invert a string, IMO. The
> reversed() feature returns a reversed object... not a reversed string.
> In short, I have to fool with it again _after_ it has been inverted. The
> slicing takes care of the job right away and gives me what I want... no
> Computer Sciencey > to deal with :)

A  can be turned back into a string:
 >>> st = '0123456789'
 >>> reversed(st)
 
 >>> ''.join( reversed(st) )
 '9876543210'

>
> I'm sure the reversed feature is much more generic though for dealing
> with other types.

-- 
http://mail.python.org/mailman/listinfo/python-list