Cleaning strings with Regular Expressions

Fredrik Lundh fredrik at pythonware.com
Tue Sep 6 22:58:10 CEST 2005


"sheffdog" <masonsheffield at gmail.com> wrote:

> setAttr ".ftn" -type "string" /assets/chars/
>    /boya/geo/textures/lod1/ppbhat.tga";

> Can I do this in one line?

>>> os.path.basename("/assets/chars/.../lod1/ppbhat.tga")
'ppbhat.tga'

</F>






More information about the Python-list mailing list