manatlan / guy

Graphics User Ynterface : a simple module for making GUI applications (with html/js) for py3 ... to target windows, linux, mac & android
Apache License 2.0
202 stars 23 forks source link

Location call of config.json file change after starting the server #2

Closed bendub closed 4 years ago

bendub commented 4 years ago

Hello manatlan, I package an app using setuptools. The app is installed in the user environment:

$ python3 -m pip install --user mypkg.tar.gz

I can run my main script located in ~/.local/bin and the package itself is located in ~/.local/lib/python3.X/site-packages/MyPkg/. When app is started (initialized), 'config.json' is called in my home directory (i.e. ~/config.json). But after start, 'config.json' is called in the .local directory (i.e. ~/.local/bin/config.json). Change seems to appear in the serve() method of Guy() class: os.chdir( os.path.dirname(os.path.abspath(os.path.realpath(sys.argv[0]))) ) Am I doing something wrong? Thank you

manatlan commented 4 years ago

you're right ... I need to fix that !

manatlan commented 4 years ago

the 0.4.0 is out, on pypi ... should fix this issue I close it