-
Notifications
You must be signed in to change notification settings - Fork 0
Home
z80x1 edited this page Sep 20, 2020
·
1 revision
Welcome to the watertower wiki!
>>> import py
>>> temppath = py.path.local('py.path_documentation')
>>> foopath = temppath.join('foo') # get child 'foo' (lazily)
>>> foopath.check() # check if child 'foo' exists
False
>>> foopath.write('bar') # write some data to it
>>> foopath.check()
True
>>> foopath.read()
'bar'
>>> foofile = foopath.open() # return a 'real' file object
>>> foofile.read(1)
'b'