Your ROOT_URL in app.ini is https://git.hpc.odu.edu/ but you are visiting https://git.wahab.hpc.odu.edu/wirawan0/wpylib/commit/606214eb664b62587d5fe6b2503ee4a48cc192b7?style=split&whitespace=ignore-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
7 changed files with
9 additions and
9 deletions
db/file_db.py
db/result_base.py
db/tables.py
file/file_utils.py
iofmt/fortbin.py
iofmt/text_input.py
shell_tools.py
@ -48,7 +48,7 @@ class file_table(object):
def __init__ ( self , src_name , table_name = ' filedb ' , extra_fields = [ ] ) :
def __init__ ( self , src_name , table_name = ' filedb ' , extra_fields = [ ] ) :
self . src_name = src_name
self . src_name = src_name
self . table_name = table_name
self . table_name = table_name
if isinstance ( src_name , str ) : # os.path.isfile(src_name):
if isinstance ( src_name , base string ) : # os.path.isfile(src_name):
self . db = sqlite3 . connect ( src_name )
self . db = sqlite3 . connect ( src_name )
self . dbc = self . db . cursor ( )
self . dbc = self . db . cursor ( )
elif isinstance ( src_name , sqlite3 . Connection ) :
elif isinstance ( src_name , sqlite3 . Connection ) :
@ -62,7 +62,7 @@ class result_base(dict):
if isinstance ( src , dict ) :
if isinstance ( src , dict ) :
self . clear ( )
self . clear ( )
self . update ( src )
self . update ( src )
elif isinstance ( src , str ) :
elif isinstance ( src , base string ) :
# WARNING: Awaiting future definition of parse_text_file_().
# WARNING: Awaiting future definition of parse_text_file_().
# This must be specified in the derived class.
# This must be specified in the derived class.
self . parse_file_ ( src )
self . parse_file_ ( src )
@ -37,7 +37,7 @@ class simple_table(object):
def __init__ ( self , src_name , table_name , dtypes = None ) :
def __init__ ( self , src_name , table_name , dtypes = None ) :
self . src_name = src_name
self . src_name = src_name
self . table_name = table_name
self . table_name = table_name
if isinstance ( src_name , str ) : # os.path.isfile(src_name):
if isinstance ( src_name , base string ) : # os.path.isfile(src_name):
self . db = sqlite3 . connect ( src_name )
self . db = sqlite3 . connect ( src_name )
self . dbc = self . db . cursor ( )
self . dbc = self . db . cursor ( )
elif isinstance ( src_name , sqlite3 . Connection ) :
elif isinstance ( src_name , sqlite3 . Connection ) :
@ -86,7 +86,7 @@ def glob_files(filespec):
When globbing is done , the result is sorted for predictability . '''
When globbing is done , the result is sorted for predictability . '''
if getattr ( filespec , " __iter__ " , False ) :
if getattr ( filespec , " __iter__ " , False ) :
return filespec # no re-sorting
return filespec # no re-sorting
elif isinstance ( filespec , str ) :
elif isinstance ( filespec , base string ) :
return sorted ( glob . glob ( filespec ) )
return sorted ( glob . glob ( filespec ) )
else :
else :
raise ValueError , " Don ' t know how to glob for an object of " + type ( filespec )
raise ValueError , " Don ' t know how to glob for an object of " + type ( filespec )
@ -159,7 +159,7 @@ class fortran_bin_file(object):
v2 = self . default_float ( v )
v2 = self . default_float ( v )
# FIXME: check for overflow error like in integer conversion above
# FIXME: check for overflow error like in integer conversion above
vals . append ( v2 )
vals . append ( v2 )
elif isinstance ( v , str ) :
elif isinstance ( v , base string ) :
v2 = self . default_str ( v )
v2 = self . default_str ( v )
vals . append ( v2 )
vals . append ( v2 )
elif " itemsize " in dir ( v ) :
elif " itemsize " in dir ( v ) :
@ -199,7 +199,7 @@ class fortran_bin_file(object):
vals = [ ]
vals = [ ]
for f in fields :
for f in fields :
if isinstance ( f , str ) :
if isinstance ( f , base string ) :
vals . append ( getval ( src , f ) )
vals . append ( getval ( src , f ) )
elif isinstance ( f , ( list , tuple ) ) :
elif isinstance ( f , ( list , tuple ) ) :
v = getval ( src , f [ 0 ] )
v = getval ( src , f [ 0 ] )
@ -119,7 +119,7 @@ class text_input(object):
regular expression object . '''
regular expression object . '''
if regex :
if regex :
if isinstance ( regex , str ) :
if isinstance ( regex , base string ) :
Regexp = re . compile ( regex )
Regexp = re . compile ( regex )
else :
else :
Regexp = regex
Regexp = regex
@ -186,7 +186,7 @@ else:
This is my customary shortcut for backtick operator .
This is my customary shortcut for backtick operator .
The result is either a single string ( if split == False ) or a list of strings
The result is either a single string ( if split == False ) or a list of strings
with EOLs removed ( if split == True ) . """
with EOLs removed ( if split == True ) . """
if shell or isinstance ( args , str ) :
if shell or isinstance ( args , base string ) :
# BEWARE: args should be a string in this case
# BEWARE: args should be a string in this case
p = os . popen ( args , " r " )
p = os . popen ( args , " r " )
else :
else :
@ -203,7 +203,7 @@ else:
""" Executes a shell command, piping in the stdin from python for driving.
""" Executes a shell command, piping in the stdin from python for driving.
This is the reverse of pipe_out .
This is the reverse of pipe_out .
Commands are given through file - like write ( ) or writelines ( ) methods . """
Commands are given through file - like write ( ) or writelines ( ) methods . """
if shell or isinstance ( args , str ) :
if shell or isinstance ( args , base string ) :
# BEWARE: args should be a string in this case
# BEWARE: args should be a string in this case
p = os . popen ( args , " w " )
p = os . popen ( args , " w " )
else :
else :