File: fit_sesans.py

package info (click to toggle)
sasmodels 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 15,888 kB
  • sloc: python: 25,392; ansic: 7,377; makefile: 149; sh: 61
file content (20 lines) | stat: -rwxr-xr-x 576 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python
import os
import sys

# Need to fix the paths to sasmodels and sasview if no eggs present
ONEUP=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECTS=os.path.dirname(ONEUP)
SASMODELS=os.path.join(PROJECTS, 'sasmodels')
SASVIEW=os.path.join(PROJECTS, 'sasview', 'src')
BUMPS=os.path.join(PROJECTS, 'bumps')

sys.path.insert(0, BUMPS)
sys.path.insert(0, SASVIEW)
sys.path.insert(0, SASMODELS)

if sys.argv[-1].startswith('-'):
    from bumps.cli import main as run_bumps
else:
    from bumps.gui.gui_app import main as run_bumps
run_bumps()