1
The Transport API in bzrlib provides URL based access to network resources.
4
>>> from bzrlib.osutils import getcwd, dirname
5
>>> import bzrlib.transport as transport
6
>>> root = transport.get_transport("file:///")
9
Each Transport instance represents a single logical directory.
11
>>> dir = transport.get_transport(".")
12
>>> dir.base == getcwd() + '/'
15
You can change directories via the clone method:
17
>>> parent = dir.clone('..')
18
>>> parent.base == (dirname(getcwd()).rstrip('/') + '/')