Home | Trees | Indices | Help |
|
---|
|
object --+ | MagmaFile
A file inside the magma list.
Provides some abstractions for files inside Magma objects.
>>> magma_file = MagmaFile({FILENAME_PARAMETER: "input_file.txt", "urn": {"sha1": "3UJCLAOIZVCNAIT7TQYFLAP7ZNFW6G2G"}}) >>> print magma_file.data {'urn': {'sha1': '3UJCLAOIZVCNAIT7TQYFLAP7ZNFW6G2G'}, 'Filename': 'input_file.txt'} >>> print magma_file.sha1_hash 3UJCLAOIZVCNAIT7TQYFLAP7ZNFW6G2G >>> print magma_file.name input_file.txt >>> print magma_file.magnet magnet:?xt=urn:sha1:3UJCLAOIZVCNAIT7TQYFLAP7ZNFW6G2G&dn=input_file.txt
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
data All data of the file |
|||
name The name of the file, so we can easily print it. |
|||
sha1_hash The sha1 hash of the file. |
|||
urls The list of alternate urls. |
|||
Gnutella_alt_locs The Other Gnutella clients who have the file. |
|
|||
magnet The magnet link of the file |
|||
Inherited from |
|
A file inside the magma list.
|
Show nicely readable information about the file.
|
Readout alternate urls from the data
|
Readout the Alt-Locs from the data
|
Parse the magnet link from the data inside the file.
|
|
nameThe name of the file, so we can easily print it. Every MagmaFile needs a filename. |
sha1_hashThe sha1 hash of the file. Every MagmaFile needs a sha1 hash. |
|
magnetThe magnet link of the file
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Jan 7 11:36:57 2009 | http://epydoc.sourceforge.net |