Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- """ The method chdir() changes the current working directory
- to the given path. It returns NONE in all the cases.
- Syntax is os.chdir(path)
- Parameters: path is the complete path of the directory to be
- changed to a new location.
- This method does not return any value. """
- import os
- path = "/usr/tmp"
- # Check the current working directory.
- retval = os.getcwd()
- print "Current working directory %s" % retval
- # Now change the directory
- os.chdir(path)
- # Check the current working directory.
- retval = os.getcwd()
- print "Directory changed successfully %s" % retval
- """ from www.tutorialspoint.com/python/os_chdir.htm """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement