Naming conventions for path?

Mike Müller mmueller at dgfz.de
Fri Feb 2 08:56:08 CET 2001


Setting up my first bigger Python program I find myself al little bit
confused with the use of path. That is, using path as a variable I don’t
exactly know what I am referring to when joining and spliting path names. I
would like to use self explaining variable names for those path parts. Lets
look an example:

.../dir1/dir2/filename.ext
-----------++++++.***

The whole thing is usually referred to as path. But also the part underlined
with ---- can be addressed with path. Alternatively the whole thing can be
named filename (or any thing else if want to but I talk about conventions).

+++.*** can also be filename

furthermore

+++ filenameRoot ?

and

*** fileExtension ?

also

---- directory or dir ?

Are there any conventions in Python (or any other language) that are more or
less widely used? Or should I come up with my own naming scheme and just
stay consistent throughout may project(s)?

Thanks for advise.

Mike








More information about the Python-list mailing list