Python/File System: Difference between revisions
< Python
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 15: | Line 15: | ||
| Path conversion || | | Path conversion || | ||
<source lang="python"> | <source lang="python"> | ||
import os.path | |||
CODE_PATH = os.path.realpath(os.path.dirname(__file__)) + '/' | |||
DATA_PATH = os.path.expanduser('~/osm-data/') | |||
</source> | </source> | ||
|- | |- | ||
Revision as of 03:48, 23 May 2018
| TODO | CODE |
|---|---|
| Read/Write file mtime |
import os.path
os.path.getmtime('filename')
|
| Copy/Move file | |
| Path conversion |
import os.path
CODE_PATH = os.path.realpath(os.path.dirname(__file__)) + '/'
DATA_PATH = os.path.expanduser('~/osm-data/')
|
| List directory |