Did I find the right examples for you? yes no

All Samples(44)  |  Call(0)  |  Derive(0)  |  Import(44)
int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)

src/w/s/WsgiDAV-1.1.0/wsgidav/samples/virtual_dav_provider.py   WsgiDAV(Download)
    def getContentLength(self):
        statresults = os.stat(self.filePath)
        return statresults[stat.ST_SIZE]      
    def getContentType(self):
        if not os.path.isfile(self.filePath):

src/w/s/WsgiDAV-1.1.0/wsgidav/samples/dav_provider_tools.py   WsgiDAV(Download)
    def getContentLength(self):
        statresults = os.stat(self.filePath)
        return statresults[stat.ST_SIZE]      
    def getContentType(self):
        if not os.path.isfile(self.filePath):

src/w/s/wsgidav-HEAD/wsgidav/samples/virtual_dav_provider.py   wsgidav(Download)
    def getContentLength(self):
        statresults = os.stat(self.filePath)
        return statresults[stat.ST_SIZE]      
    def getContentType(self):
        if not os.path.isfile(self.filePath):

src/w/s/wsgidav-HEAD/wsgidav/samples/dav_provider_tools.py   wsgidav(Download)
    def getContentLength(self):
        statresults = os.stat(self.filePath)
        return statresults[stat.ST_SIZE]      
    def getContentType(self):
        if not os.path.isfile(self.filePath):

src/h/u/hunch-sample-app-HEAD/django/contrib/staticfiles/views.py   hunch-sample-app(Download)
    mimetype = mimetype or 'application/octet-stream'
    if not was_modified_since(request.META.get('HTTP_IF_MODIFIED_SINCE'),
                              statobj[stat.ST_MTIME], statobj[stat.ST_SIZE]):
        return HttpResponseNotModified(mimetype=mimetype)
    contents = open(fullpath, 'rb').read()

src/m/2/M2Crypto-HEAD/examples/medusa054/ftp_server.py   M2Crypto(Download)
        else:
            self.respond (
                    '213 %d' % (self.filesystem.stat(filename)[stat.ST_SIZE])
                    )
 

src/m/2/M2Crypto-HEAD/examples/medusa054/default_handler.py   M2Crypto(Download)
            return
 
        file_length = self.filesystem.stat (path)[stat.ST_SIZE]
 
        ims = get_header_match (IF_MODIFIED_SINCE, request.header)

src/m/2/M2Crypto-HEAD/examples/medusa/ftp_server.py   M2Crypto(Download)
		else:
			self.respond (
				'213 %d' % (self.filesystem.stat(filename)[stat.ST_SIZE])
				)
 

src/m/2/M2Crypto-HEAD/examples/medusa/default_handler.py   M2Crypto(Download)
			return
 
		file_length = self.filesystem.stat (path)[stat.ST_SIZE]
 
		ims = get_header_match (IF_MODIFIED_SINCE, request.header)

src/w/e/Webware-for-Python-1.1.1/CGIWrapper/Examples/Directory.py   Webware-for-Python(Download)
import os
from operator import itemgetter
from stat import ST_SIZE
 
print '''%s
# a particular script.
scripts = sorted((dict(pathname=filename,
    shortname=filename[:-3], size=os.stat(filename)[ST_SIZE])
    for filename in os.listdir(os.curdir)
    if len(filename) > 3 and filename.endswith('.py')),

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next