def main(): from xpra.os_util import set_application_name, set_prgname if sys.platform.startswith("win"): from xpra.platform.win32 import set_redirect_output, set_log_filename set_redirect_output(True) set_log_filename("Keyboard_Test.log") init() set_prgname("Keyboard Test Tool") set_application_name("Keyboard Test Tool") KeyboardStateInfoWindow() gtk.main()
def main(): logging.basicConfig(format="%(asctime)s %(message)s") logging.root.setLevel(logging.DEBUG) from xpra.os_util import set_application_name, set_prgname set_prgname("Primary Clipboard Test Tool") set_application_name("Primary Clipboard Test Tool") if sys.platform.startswith("win"): from xpra.platform.win32 import set_redirect_output, set_log_filename set_redirect_output(True) set_log_filename("Primary_Clipboard_Test.log") init() frc = FakeRemoteClipboard() gobject.timeout_add(1000, frc.fake_token) #gobject.timeout_add(1200, fake_target, 0) #gobject.timeout_add(1400, fake_target, 1) #gobject.timeout_add(1600, fake_target, 2) #gobject.timeout_add(1800, fake_data, 2) #gobject.timeout_add(2500, fake_data, 3) #gobject.timeout_add(3500, fake_data, 5) gtk.main()
#!/usr/bin/env python # simple wrapper script so we can launch a script file with the same python interpreter # and environment which is used by the xpra.exe / xpra_cmd.exe process. # # normally, the py2exe win32 platform code redirects the output to a log file # this script disables that. import os.path import sys from xpra.platform.win32 import set_redirect_output set_redirect_output(False) try: import win32api #@UnresolvedImport win32api.SetConsoleTitle("Python") except: pass if len(sys.argv)<2: print("you must specify a python script file to run!") sys.exit(1) filename = sys.argv[1] if not os.path.exists(filename): print("script file '%s' not found" % filename) sys.exit(1) cwd = os.getcwd() if cwd not in sys.path: sys.path.append(cwd)
#!/usr/bin/env python # normally, the win32 platform code redirects the output to a log file # this script disables that and is compiled as "Xpra_cmd.exe" # instead of "Xpra.exe" import sys from xpra.platform.win32 import set_redirect_output set_redirect_output(False) try: import win32api #@UnresolvedImport win32api.SetConsoleTitle("Xpra") except: pass from xpra.scripts.main import main code = main("Xpra.exe", sys.argv) sys.exit(code)