mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Read the data files from the same path where the script resides.
This commit is contained in:
parent
ac9f0c30a5
commit
a9179f2779
2 changed files with 9 additions and 2 deletions
6
main.py
6
main.py
|
@ -23,6 +23,8 @@ from lslopt.lslparse import parser,EParse
|
|||
from lslopt.lsloutput import outscript
|
||||
from lslopt.lsloptimizer import optimizer
|
||||
import sys
|
||||
import os
|
||||
import lslopt.lslcommon
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
|
@ -129,6 +131,10 @@ Options (+ means active by default, - means inactive by default):
|
|||
'optsigns','optfloats','constfold','dcr'
|
||||
))
|
||||
|
||||
# If it's good to append the basename to it, it's good to append the
|
||||
# auxiliary files' names to it.
|
||||
lslopt.lslcommon.DataPath = __file__[:-len(os.path.basename(__file__))]
|
||||
|
||||
if sys.argv[1] == '-O':
|
||||
if len(sys.argv) < 4:
|
||||
sys.stderr.write('Command line: Not enough parameters\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue