def _GetLocation(self): """ """ hn = SystemConfig.instance().GetHostname() if isWindows(): return "windows://" + hn elif isLinux(): if os.getenv("DISPLAY"): return "X11://" + hn + ":" + os.getenv("DISPLAY").split(":")[-1] else: return "X11://" + hn + ":0.0" else: return "unknown://hn"
venueClientUrlList = GetVenueClientUrls() enteredVenue = 0 for venueClientUrl in venueClientUrlList: try: venueClient = VenueClientIW(venueClientUrl) venueClient.IsValid() # Enter the specified venue print "Sending venue client to venue..." venueClient.EnterVenue(venueUrl) enteredVenue = 1 break except Exception, e: print 'Exception messaging VenueClient; venueUrl=%s exc=%s' % ( venueClientUrl, e) enteredVenue = 0 if not enteredVenue: # Communicating with running venue client failed; # launch the venue client, pointed at the specified venue print "Launching the venue client..." if isWindows(): prog = "\"%s\"" % os.path.join(app.GetToolkitConfig().GetBinDir(), "VenueClient3.py") else: prog = "%s" % os.path.join(app.GetToolkitConfig().GetBinDir(), "VenueClient3.py") os.spawnv(os.P_NOWAIT, sys.executable, (sys.executable, prog, "--url", venueUrl))
origDir = os.getcwd() os.chdir(os.path.join(agtk_location, "tools")) if sys.platform == WIN: os.system( "set PYTHONPATH=%s && " % python_path + os.path.join(".", "GenerateInterfaces.py") + " --quiet" ) else: os.system( "export PYTHONPATH=%s; " % python_path + os.path.join(".", "GenerateInterfaces.py") + " --quiet" ) os.chdir(origDir) # Tell users how to use the new configuration files. from AccessGrid.Platform import isOSX, isLinux, isWindows if not options.quiet: print "\n --------------------------------------------------------------" print "" print " To use this configuration:\n" print " Make sure media-related programs (vic, rat, etc.) are in your path." if isWindows(): print " On Windows: copying the vic and rat related binaries (if needed, " print " from a real install) into their own directory before adding them " print " to your path is recommended. If you don't want to bother modifying " print " your path, copying them into AccessGrid/bin is a quick fix.\n" elif isLinux() or isOSX(): print " On linux: if you've installed the vic and rat rpm packages," print " they should already be in your path.\n" else: print "Error, your platform is not defined. Please add it to CvsSetup.py" print " set AGTK_LOCATION to", agtk_location print " set PYTHONPATH to", python_path print "" if isLinux() or isOSX():
# Copyright: (c) 2003 # Licence: See COPYING.TXT #----------------------------------------------------------------------------- import sys import os from wxPython import wx from AccessGrid.Platform import isWindows, isLinux from AccessGrid.Platform.Config import SystemConfig from AccessGrid.GUID import GUID from AccessGrid.hosting import Server from AccessGrid.hosting.SOAPInterface import SOAPInterface, SOAPIWrapper if isWindows(): from DisplayWin32 import GetWindowList elif isLinux(): from DisplayLinux import * class DisplayService: """ id : string location : string [protocol://<host>:<port>/] - examples: - x://host:0 - windows://host - vnc://host:port/ - rdp://host:port/) displayWidth : integer
# fh = open("env-init.csh", "w") fh.write(""" setenv AGTK_LOCATION %(agtk_location)s if ($?PYTHONPATH) then setenv PYTHONPATH ${PYTHONPATH}:%(python_path)s else setenv PYTHONPATH %(python_path)s endif """ % locals()) fh.close() if not options.quiet: print "Wrote csh config to env-init.csh, bash config to env-init.sh" elif isWindows(): fh = open("env-init.bat", "w") fh.write("set AGTK_LOCATION=%s\n" % (agtk_location)) fh.write("set PYTHONPATH=%s\n" % (python_path)) fh.close() if not options.quiet: print "Wrote win32 batchfile init to env-init.bat" else: print "Error, a script appropriate for your platform has not been defined. Please add it to CvsSetup.py" #-------------------------------------------------------------------------------- # Tell users how to use the new configuration files. #--------------------------------------------------------------------------------