Use os.path.basename :
>>> os.path.basename('/foo/bar/baz.py')
'baz.py'
It will have the expected behavior on each system. You could also use
os.sep instead of '/' in your split method call, but os.path.basename
is more elegant.
On Thu, Jan 15, 2009 at 7:34 AM, asit wrote:
> I recently faced a
IIRC, Windows automatically add a newline after the program output.
On Fri, Jan 16, 2009 at 4:24 PM, Jean-Paul VALENTIN
wrote:
> Feature? the output of below Hello program he0.py started from command
> line looks as follows:
> F:\prompt>he0.py
> Hello
> F:\prompt>
>
> 'Hello' was sent with sys.st
On Sat, Jan 24, 2009 at 12:16 AM, Xah Lee wrote:
> The haskell tutorials you can find online are the most mothefucking
> stupid unreadable fuck. The Haskll community is almost stupid. What
> they talk all day is about monads, currying, linder myer fuck type.
> That's what they talk about all day.
The commands module is Unix only. See its documentation :
http://docs.python.org/library/commands.html
On Sun, Dec 28, 2008 at 10:03 PM, Lee Harr wrote:
>
> My application is trying to start twistd in a cross-platform way.
>
> Unfortunately, it works fine on my linux system, but I do not
> have w
On Wed, Jun 17, 2009 at 04:14, Steven D'Aprano wrote:
> What's np.arange?
import numpy as np
--
Pierre "delroth" Bourdon
Étudiant à l'EPITA / Student at EPITA
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jun 18, 2009 at 05:28, per wrote:
> hi all,
Hi,
> i'm looking for a native python package to run a very simple data
> base. i was originally using cpickle with dictionaries for my problem,
> but i was making dictionaries out of very large text files (around
> 1000MB in size) and pickling w