Created
July 23, 2014 16:00
-
-
Save sankars/e692a4d74b044dd7f4b6 to your computer and use it in GitHub Desktop.
File manipulation in pyhton
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def main(): | |
print os.getcwd() | |
print os.path.abspath('..') | |
print os.path.basename(os.getcwd()) | |
print os.path.dirname(os.path.realpath(__file__)) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment