Did I find the right examples for you? yes no

All Samples(248)  |  Call(248)  |  Derive(0)  |  Import(0)
Truncate the file's size.

If the optional size argument is present, the file is truncated to
(at most) that size. The size defaults to the current position.
The current file position is not changed unless the position
is beyond the new file size.

If the specified size exceeds the file's current size, the
file remains unchanged.

src/h/u/hunch-sample-app-HEAD/django/test/_doctest.py   hunch-sample-app(Download)
    def truncate(self,   size=None):
        StringIO.truncate(self, size)
        if hasattr(self, "softspace"):
            del self.softspace
 

src/c/o/Command-Tools-0.1a2/command_tools/system/open_file.py   Command-Tools(Download)
    def truncate(self, size=None):
        self.check_can_write()
        return StringIO.truncate(self, size)
 
    def write(self, s):

src/s/l/slarch-0.1/slarch/archive.py   slarch(Download)
    def truncate(self, size=None):
        StringIO.StringIO.truncate(self, size)
        self._dirty = True
 
    def close(self):

src/g/r/grr-HEAD/gui/renderers.py   grr(Download)
          # Flush the buffer
          yield fd.getvalue()
          fd.truncate(size=0)
 
        writer.writerow(

src/k/i/kitsune-HEAD/vendor/packages/nose/nose/ext/dtcompat.py   kitsune(Download)
    def truncate(self,   size=None):
        StringIO.truncate(self, size)
        if hasattr(self, "softspace"):
            del self.softspace
 

src/s/o/socorro-HEAD/webapp-django/vendor/lib/python/nose/ext/dtcompat.py   socorro(Download)
    def truncate(self,   size=None):
        StringIO.truncate(self, size)
        if hasattr(self, "softspace"):
            del self.softspace
 

src/a/n/antisocial-HEAD/ve/lib/python2.7/site-packages/nose/ext/dtcompat.py   antisocial(Download)
    def truncate(self,   size=None):
        StringIO.truncate(self, size)
        if hasattr(self, "softspace"):
            del self.softspace
 

src/i/n/input-lib-HEAD/packages/nose/nose/ext/dtcompat.py   input-lib(Download)
    def truncate(self,   size=None):
        StringIO.truncate(self, size)
        if hasattr(self, "softspace"):
            del self.softspace
 

src/i/n/input-lib-HEAD/lib/python/nose/ext/dtcompat.py   input-lib(Download)
    def truncate(self,   size=None):
        StringIO.truncate(self, size)
        if hasattr(self, "softspace"):
            del self.softspace
 

src/k/u/kuma-lib-HEAD/packages/nose/nose/ext/dtcompat.py   kuma-lib(Download)
    def truncate(self,   size=None):
        StringIO.truncate(self, size)
        if hasattr(self, "softspace"):
            del self.softspace
 

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