johnf wrote:
> Please add a full description of why that works.  Folks coming from other 
> languages know little about the os module.  For example it needs to be 
> pointed out that the os module is platform aware.  Also what ".join" is doing 
> and how it got there.  From the private emails I'm getting it is obvious that 
> the newbies know little about python.  I'll add your side bar to the wiki 
> when I post the thread and all the other sidebars.
> 

Yes, sure.
But every newbie has to start reading about the new language he tries to
learn. So he starts with a tutorial and looks up things he doesn't
understand.
A starting point is:
http://docs.python.org/

Module documentation can be found in the Library Reference:
http://docs.python.org/lib/lib.html

In there is:
From: http://docs.python.org/lib/module-os.html
This module provides a more portable way of using operating system
dependent functionality than importing a operating system dependent
built-in module like posix or nt.

path
    The corresponding operating system dependent standard module for
pathname operations, such as posixpath or macpath. Thus, given the
proper imports, os.path.split(file) is equivalent to but more portable
than posixpath.split(file). Note that this is also an importable module:
it may be imported directly as os.path.

From: http://docs.python.org/lib/module-os.path.html
This module implements some useful functions on pathnames.

join(   path1[, path2[, ...]])
    Join one or more path components intelligently. If any component is
an absolute path, all previous components (on Windows, including the
previous drive letter, if there was one) are thrown away, and joining
continues. The return value is the concatenation of path1, and
optionally path2, etc., with exactly one directory separator (os.sep)
inserted between components, unless path2 is empty. Note that on
Windows, since there is a current directory for each drive,
os.path.join("c:", "foo") represents a path relative to the current
directory on drive C: (c:foo), not c:\\foo.

HTH,
Uwe



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]

Reply via email to