basename with extensions

2006-08-30 Thread Peter Saffrey
I'd like to resurrect this subject: http://groups.google.com/group/comp.lang.python/browse_frm/thread/11146344b03e72b6/6b2a3b0c0e902114?lnk=gst&q=basename&rnum=2#6b2a3b0c0e902114 If I have a path like this: mypath = /some/long/path/file.xml and I want "file" I currently have to do: os.path.bas

Re: Multiple selections in Tix Hlist

2005-05-23 Thread Peter Saffrey
To answer my own question: HList(selectmode="extended") does all the work for you. Peter -- http://mail.python.org/mailman/listinfo/python-list

Python site-packages and import

2005-04-29 Thread Peter Saffrey
(apologies for starting a new thread - Google can't retrieve the other message for some reason) Yes, /usr/lib/python/site-packages is in sys.path. This series of commands should explain what I mean: I've put the Python ID3 module in a sub-directory of site-packages as an illustration. [EMAIL PROT

Python site-packages and import

2005-04-28 Thread Peter Saffrey
I'm trying to write a python service, with an executable in /usr/local/bin, but modules that are kept in a sub-directory of /usr/lib/python/site-packages. Using apt-proxy as my template, I've put the modules in /usr/lib/python/site-packages/mymodules and tried to import them with import mymodules.