Browse Source

Switched temp directory for issue #57

pull/61/head
nils måsen 10 years ago
parent
commit
cc3815330e
1 changed files with 4 additions and 1 deletions
  1. 5
      gooey/python_bindings/gooey_decorator.py

5
gooey/python_bindings/gooey_decorator.py

@ -51,6 +51,8 @@ import types
import wx import wx
import tempfile
from gooey.gui.lang import i18n from gooey.gui.lang import i18n
from gooey.gui.windows import layouts from gooey.gui.windows import layouts
from gooey.python_bindings import argparse_to_json from gooey.python_bindings import argparse_to_json
@ -58,7 +60,7 @@ import source_parser
ROOT_DIR = os.path.dirname(__import__(__name__.split('.')[0]).__file__) ROOT_DIR = os.path.dirname(__import__(__name__.split('.')[0]).__file__)
TMP_DIR = os.path.join(ROOT_DIR, '_tmp')
TMP_DIR = tempfile.mkdtemp()
def Gooey(f=None, advanced=True, def Gooey(f=None, advanced=True,
language='english', show_config=True, language='english', show_config=True,
@ -83,6 +85,7 @@ def Gooey(f=None, advanced=True,
cleaned_source = clean_source(main_module_path) cleaned_source = clean_source(main_module_path)
filepath = os.path.join(TMP_DIR, filename) filepath = os.path.join(TMP_DIR, filename)
print(filepath)
with open(filepath, 'w') as f: with open(filepath, 'w') as f:
f.write(cleaned_source) f.write(cleaned_source)

Loading…
Cancel
Save