Пример #1
0
def compileSpyceDir(dir):
  import spyceCmd
  print '** Processing Spyce files in: %s' % dir
  for file in listDirFilter(dir, '.spy'):
    print 'Processing: %s' % file
    sys.argv = ['', '-o', os.path.join(dir, file[:-4]+'.html'), os.path.join(dir, file)]
    spyceCmd.spyceMain()
Пример #2
0
def compileSpyceDir(dir):
    import spyceCmd
    print '** Processing Spyce files in: %s' % dir
    for file in listDirFilter(dir, '.spy'):
        print 'Processing: %s' % file
        sys.argv = [
            '', '-o',
            os.path.join(dir, file[:-4] + '.html'),
            os.path.join(dir, file)
        ]
        spyceCmd.spyceMain()
Пример #3
0
def doSpyce( (stdin, stdout, stderr, environ) ):
  path = None
  if len(sys.argv)<=1 or not os.path.isfile(sys.argv[1]):
    try: path = findScriptFile(environ['PATH_TRANSLATED'])
    except: pass
  result = spyceCmd.spyceMain(cgimode=1, cgiscript=path,
    stdout=stdout, stdin=stdin, stderr=stderr, environ=environ)
  return result
Пример #4
0
def doSpyce( (stdin, stdout, stderr, environ) ):
  path = None
  if len(sys.argv)<=1 or not os.path.isfile(sys.argv[1]):
    try: path = findScriptFile(environ['PATH_TRANSLATED'])
    except: pass
  result = spyceCmd.spyceMain(cgimode=1, cgiscript=path,
    stdout=stdout, stdin=stdin, stderr=stderr, environ=environ)
  return result