Package magma :: Package magma :: Module create_simple_magma_list
[hide private]
[frames] | no frames]

Module create_simple_magma_list

source code

Returns a magma-list containing the file name. Takes the names as input.

# Test strip_dirname

>>> a = "blah/blubb/bangala/goi.gis"
>>> print strip_dirname(a)
goi.gis
>>> a = "/blah/blubb/bangala/goi.gis"
>>> print strip_dirname(a)
goi.gis
Classes [hide private]
  Magma
A Simple Magma object created from a list of input file paths.
Functions [hide private]
 
strip_dirname(path)
Strip everything but the name of the file.
source code
 
_test()
Do all doctests
source code
Variables [hide private]
  __depends__ = 'yaml, os'
  FILE_LIST_NAME = 'files'
The name of the file list parameter inside the Magma file.
  URN_PARAMETER_NAME = 'urn'
The name of the dict holding the hashes and other unique identifiers.
  MAGMA_0_4_HEADER = '#MAGMAv0.4'
The header (magic line) of Magma v0.4 files.
  FILENAME_PARAMETER = 'filename'
The name of the filename parameter.
Function Details [hide private]

strip_dirname(path)

source code 

Strip everything but the name of the file.

Parameters:
  • path (String) - A path to a file.
Returns:
The name of the file, stripped of anything before it.

Example: /home/blah/blubb.magma becomes

blubb.magma

_test()

source code 

Do all doctests

Returns:
None