File: launch_pymol.py

package info (click to toggle)
pymol 2.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 43,400 kB
  • sloc: cpp: 482,465; python: 81,253; ansic: 27,428; sh: 94; makefile: 32; csh: 8
file content (41 lines) | stat: -rw-r--r-- 897 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# NOTE: This file is now obsolete.  However it has been left functional
# and intact in order to promote backwards compatibility with existing
# PyMOL installs.
#
# Future installations should launch pymol by running:
#   "python $PYMOL_PATH/modules/pymol/__init__.py" instead.
# or
#   by importing "pymol" from within a standalone Python script
#   followed immediately by a call to pymol.finish_launching()

import thread 
import threading 
import os
import sys
import time
import __main__

# let pymol/__init__.py known that we're launching using the old way

__main__.pymol_launch = 0 

if hasattr(__main__,"pymol_argv"):
    pymol_argv = __main__.pymol_argv
else:
    pymol_argv = sys.argv

modules_path = os.environ['PYMOL_PATH']+'/modules'

if modules_path not in sys.path:
    sys.path.append(modules_path)

import pymol

pymol.invocation.parse_args(pymol_argv)

pymol.start_pymol()