newbie
Batista, Facundo
FBatista at uniFON.com.ar
Thu Aug 19 10:43:59 EDT 2004
[JASON JESSO]
#- The error I get is:
#- ./mkdir.py jason 0777
#- Traceback (most recent call last):
#- File "./mkdir.py", line 31, in ?
#- _mkdir( sys.argv[1], sys.argv[2] )
#- File "./mkdir.py", line 25, in _mkdir
#- os.mkdir( newdir, mode )
#- TypeError: an integer is required
#-
#- When I convert the mode from a string to an octal with
#- oct(int(sys.argv[2])) the permissions are all screwed
#- up.
#-
#- Any help?
Always reduce the problem to it simplest form:
>>> perm = "0777"
>>> oct(int(perm))
'01411'
Also always say what you receive, why you don't like it, and what you
expect.
And an useful "Subject" won't hurt.
Regards,
. Facundo
More information about the Python-list
mailing list