def FixArgFileName(fileName):
 import os
 (path, fname) = os.path.split(fileName)
 if (len(path) == 0):
  path = os.curdir
 path = os.path.abspath(path)
 for syspath in sys.path:
  if (os.path.abspath(syspath) == path):
   break
 else:
  sys.path.append(path)
 return os.path.splitext(fname)[0]

def FixArgFileName ( fileName ) : import os ( path , fname ) = os . path . split ( fileName ) if ( len ( path ) == 0 ) : path = os . curdir path = os . path . abspath ( path ) for syspath in sys . path : if ( os . path . abspath ( syspath ) == path ) : break else : sys . path . append ( path ) return os . path . splitext ( fname ) [ 0 ]
convert a filename on the commandline to something useful .