trial 719 B

123456789101112131415161718192021222324
  1. #!/usr/bin/python
  2. # Twisted, the Framework of Your Internet
  3. # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
  4. # See LICENSE for details.
  5. ### Twisted Preamble
  6. # This makes sure that users don't have to set up their environment
  7. # specially in order to run these programs from bin/.
  8. import sys, os, string
  9. if string.find(os.path.abspath(sys.argv[0]), os.sep+'Twisted') != -1:
  10. sys.path.insert(0, os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir)))
  11. if hasattr(os, "getuid") and os.getuid() != 0:
  12. sys.path.insert(0, os.curdir)
  13. ### end of preamble
  14. # begin chdir armor
  15. sys.path[:] = map(os.path.abspath, sys.path)
  16. # end chdir armor
  17. from twisted.scripts.trial import run
  18. run()