Variable passing to external program - How??
Lee Harr
missive at frontiernet.net
Sat Oct 11 08:05:40 EDT 2003
> #!/usr/bin/python
> import sys
> import os
> # Check that the folder is accessible and writeable
> FileLoc = os.path.exists('/home/rigga')
> if (FileLoc):
> print "File location exists:"
> AccFlag = os.access('% FileLoc',os.R_OK | os.X_OK | os.W_OK)
> if (AccFlag):
> print "You have FULL access to the location"
> else:
> print "**Error - You do not have access to the location**"
> else:
> print "No files found exiting..."
>
> sys.exit()
>
import os
FileLoc = '/home/rigga'
if os.path.exists(FileLoc):
print "File location exists"
AccFlag = os.access(FileLoc, os.R_OK | os.X_OK | os.W_OK)
if AccFlag:
print "You have FULL access to the location"
else:
print "**Error - You do not have access to the location**"
else:
print "No files found exiting..."
More information about the Python-list
mailing list