All Samples(6565) | Call(6355) | Derive(0) | Import(210)
stat(path) -> stat result Perform a stat system call on the given path.
src/d/u/dutils-0.0.10/dutils/sample/path.py dutils(Download)
def stat(self):
""" Perform a stat() system call on this path. """
return os.stat(self)
def lstat(self):
""" Like path.stat(), but do not follow symbolic links. """
return os.lstat(self)
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/site-packages/isapi/samples/test.py ironruby(Download)
def run(self):
last_time = os.stat(self.filename)[stat.ST_MTIME]
while 1:
try:
rc = win32event.WaitForSingleObject(self.handle,
win32event.INFINITE)
win32file.FindNextChangeNotification(self.handle)
except win32event.error, details:
# handle closed - thread should terminate.
if details[0] != winerror.ERROR_INVALID_HANDLE:
raise
break
this_time = os.stat(self.filename)[stat.ST_MTIME]
src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/site-packages/isapi/samples/advanced.py ironruby(Download)
def run(self):
last_time = os.stat(self.filename)[stat.ST_MTIME]
while 1:
try:
rc = win32event.WaitForSingleObject(self.handle,
win32event.INFINITE)
win32file.FindNextChangeNotification(self.handle)
except win32event.error, details:
# handle closed - thread should terminate.
if details[0] != winerror.ERROR_INVALID_HANDLE:
raise
break
this_time = os.stat(self.filename)[stat.ST_MTIME]
src/v/a/vapp-HEAD/trunk/samples/voicemail/VoicemailStorage.py vapp(Download)
def __init__(self, user):
self.__home = "%s/%s" % (basePath, user.username())
try:
os.stat(self.__home)
except OSError:
raise Exception("No mailbox found")
self.__current_folder = None
def saveMessage(self, fd, format, cli, logger):
folder_path = "%s/%d" % (self.__home, FOLDER_INBOX)
last_id_filename = "%s/last_id.txt" % self.__home
try:
os.stat(folder_path)
except OSError:
os.makedirs(folder_path)
src/v/a/vapp-HEAD/samples/voicemail/VoicemailStorage.py vapp(Download)
def __init__(self, user):
self.__home = "%s/%s" % (basePath, user.username())
try:
os.stat(self.__home)
except OSError:
raise Exception("No mailbox found")
self.__current_folder = None
def saveMessage(self, fd, format, cli, logger):
folder_path = "%s/%d" % (self.__home, FOLDER_INBOX)
last_id_filename = "%s/last_id.txt" % self.__home
try:
os.stat(folder_path)
except OSError:
os.makedirs(folder_path)
src/t/o/Toolserver-0.4.1/samples/ServerManager.py Toolserver(Download)
file = open('/var/spool/servermanager/joberr-%s' % sig)
err = file.read()
file.close()
ctime = time.ctime(os.stat('/var/spool/servermanager/jobscr-%s' % sig)[9])
output.append(['letzter Lauf: %s' % ctime, 'MAGIC:INFO'])
output.append([out, err])
except:
first[stdo] = '>'
first[stde] = '>'
script.close()
size = os.stat('/var/spool/servermanager/joberr-%s' % sig)[6]
if size:
jobThreads[sig] = 'failed?'
else:
src/s/h/shedskin-HEAD/examples/rdb.py shedskin(Download)
def filesize(filename):
try:
return os.stat(filename)[6]
except OSError:
return 0
def MatchRule(props,rule):
src/p/e/pexpect-HEAD/pexpect/examples/rippy.py pexpect(Download)
def get_filesize (filename):
"""This returns the number of bytes a file takes on storage."""
return os.stat(filename)[stat.ST_SIZE]
def calc_video_bitrate (video_target_size, audio_bitrate, video_length, extra_space=0, dry_run_flag=0):
"""This gives an estimate of the video bitrate necessary to
fit the final target size. This will take into account room to
src/w/e/Webware-for-Python-1.0.2/CGIWrapper/Examples/Directory.py Webware for Python(Download)
if len(filename) > 3 and filename[-3:] == '.py':
script = {}
script['pathname'] = filename
script['size'] = os.stat(script['pathname'])[ST_SIZE]
script['shortname'] = filename[:-3]
scripts.append(script)
scripts.sort(sizeSorter)
src/v/a/vapp-HEAD/trunk/samples/voicemail/User.py vapp(Download)
return None
path = "%s/%s" % (self.__vm_storage.home(), pfile)
try:
os.stat(path + ".sln")
except OSError:
return None
return path
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next