From 52d0fc1e2ca304360784560540b83744dde117f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Mon, 27 Sep 2010 15:54:24 +0200 Subject: [PATCH 1/1] optionally print env --- sface-run | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sface-run b/sface-run index 74fdb73..84afd0c 100755 --- a/sface-run +++ b/sface-run @@ -11,6 +11,16 @@ exe = os.path.abspath(sys.argv[0]) def using_env(e): print "Using %s = %s" % (e, os.environ[e]) +def print_env(options): + if not options.verbose: + return + + if sys.platform == "darwin": + using_env("DYLD_FRAMEWORK_PATH") + using_env("DYLD_LIBRARY_PATH") + + using_env("PATH") + print "Using sys.path =", sys.path if sys.platform == "darwin": # for testing on mac os x 10.5 - baris @@ -33,22 +43,13 @@ if sys.platform == "darwin": os.environ["DYLD_LIBRARY_PATH"] = DYLD_LIBRARY_PATH os.environ["DYLD_FRAMEWORK_PATH"] = DYLD_FRAMEWORK_PATH - using_env("PATH") - using_env("DYLD_FRAMEWORK_PATH") - using_env("DYLD_LIBRARY_PATH") - print "Using sys.path =", sys.path - elif sys.platform == "linux2": sys.path.extend(["/usr/share", "/usr/share/sface"]) - using_env("PATH") - print "Using sys.path =", sys.path - from sface.mainwindow import MainWindow from sface.config import config - def main(args): app = QApplication(args) app.setStyleSheet(''' @@ -100,4 +101,5 @@ if __name__ == "__main__": (options,args)=parser.parse_args() config.update_from_OptionParser(options) config.display("After command-line") + print_env(options) main(sys.argv) -- 2.43.0