Skip to main content
added 12 characters in body; edited title
Source Link
user1114
  • 1
  • 88
  • 359
  • 383

working Working with relative paths

When I run the following script:

c:\Program Files\foo\bar\scripy.py

c:\Program Files\foo\bar\scripy.py 

How can I refer to directory 'foo''foo'? Is

Is there a convenient way of using relative paths?

I've done it before with the string module, but there must be a better way (I couldn't find it in os.pathos.path).

working with relative paths

When I run the following script:

c:\Program Files\foo\bar\scripy.py

How can I refer to directory 'foo'? Is there a convenient way of using relative paths?

I've done it before with the string module, but there must be a better way (I couldn't find it in os.path).

Working with relative paths

When I run the following script:

c:\Program Files\foo\bar\scripy.py 

How can I refer to directory 'foo'?

Is there a convenient way of using relative paths?

I've done it before with the string module, but there must be a better way (I couldn't find it in os.path).

Source Link
Dominik
  • 377
  • 4
  • 11

working with relative paths

When I run the following script:

c:\Program Files\foo\bar\scripy.py

How can I refer to directory 'foo'? Is there a convenient way of using relative paths?

I've done it before with the string module, but there must be a better way (I couldn't find it in os.path).