1.1.2.17. gnr.core.gnrsys

Last page update: October 10, 2011

Classes:

There is no class defined

External methods:

Complete reference:

1.1.2.17.1. External methods

These methods don’t belong to any class.

1.1.2.17.2. gnr.core.gnrsys - The complete reference list

gnr.core.gnrsys.expandpath(path)

Expand user home directory (~) and environment variables. Return the expanded path

Parameters:path – the path to expand
gnr.core.gnrsys.listdirs(path, invisible_files=False)

Return a list of all the files contained in a path and its descendant

Parameters:
  • path – the path you want to analyze
  • invisible_files – boolean. If True, add invisible files to the returned list
gnr.core.gnrsys.mkdir(path, privileges=511)

Create a directory named path with numeric mode privileges.

Parameters:
  • path – the name of the directory
  • privileges – the current umask value is first masked out. Default value is 0777 (octal)
gnr.core.gnrsys.resolvegenropypath(path)

added by Jeff.

Relative path may be more appropriate in most cases, but in some cases it may be useful to have this construction.

To make it easier to resolve document paths between different installations of genropy where sometimes it is installed in the user path and sometimes at root (i.e. /genropy/... or ~/genropy/.), so that file path given within Genropy will be resolved to be valid if possible and we do not have to edit for example our import files. Of course I expect it to be rejected and/or refactored