Exemple #1
0
"script to save NTdb to convention"
from cing import cingPythonCingDir
from cing.Libs.NTutils import * #@UnusedWildImport
from cing.core.database import NTdb
from cing.core.database import saveToSML

cing.verbosity = cing.verbosityDebug

if __name__ == '__main__':
    if 1: # DEFAULT: 1 disable only when needed.
        nTwarning("Don't execute this script %s by accident. It damages CING." % getCallerFileName())
        sys.exit(1)
    # end if
    
    convention = INTERNAL_1
    
    rootPath = os.path.realpath(os.path.join(cingPythonCingDir, 'Database' , convention) )
    if not os.path.exists( rootPath ):
        os.makedirs(  rootPath )
    saveToSML( NTdb, rootPath, convention )

Exemple #2
0
def save_database(db):
    """Resolve the path of the database db and save it to SML."""
    path = os.path.realpath(os.path.join(cingPythonCingDir, 'Database', db))
    saveToSML(NTdb, path, db)
Exemple #3
0
"script to save NTdb to convention"
from cing import cingPythonCingDir
from cing.Libs.NTutils import *  #@UnusedWildImport
from cing.core.database import NTdb
from cing.core.database import saveToSML

cing.verbosity = cing.verbosityDebug

if __name__ == '__main__':
    if 1:  # DEFAULT: 1 disable only when needed.
        nTwarning(
            "Don't execute this script %s by accident. It damages CING." %
            getCallerFileName())
        sys.exit(1)
    # end if

    convention = INTERNAL_1

    rootPath = os.path.realpath(
        os.path.join(cingPythonCingDir, 'Database', convention))
    if not os.path.exists(rootPath):
        os.makedirs(rootPath)
    saveToSML(NTdb, rootPath, convention)
Exemple #4
0
def save_database(db):
    """Resolve the path of the database db and save it to SML."""
    path = os.path.realpath(os.path.join(cingPythonCingDir, 'Database', db))
    saveToSML(NTdb, path, db)