⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Appion
All Projects
Appion
Overview
Activity
Roadmap
Issues
Spent time
News
Documents
Wiki
Files
Download (448 Bytes)
Feature #1918
» test.py
Anchi Cheng
, 07/23/2012 10:34 PM
#!/usr/env/bin python
import
os
import
sys
outputDir
=
sys
.
argv
[
1
]
#Expand any shell variables in the output directory string
outputDir
=
os
.
path
.
expandvars
(
outputDir
)
print
'output dir:'
,
outputDir
#Make sure output directory exist before trying to write a file there.
if
not
os
.
path
.
exists
(
outputDir
):
try
:
os
.
makedirs
(
outputDir
,
0775
)
except
OSError
,
e
:
sys
.
stderr
.
write
(
"Couldn't create output directory "
+
outputDir
+
": "
+
str
(
e
))
« Previous
1
2
Next »
(2-2/2)
Loading...