Feb-17-2018, 03:53 PM
(Feb-17-2018, 01:28 PM)Gribouillis Wrote: You can use the__file__
variable. Here is a way to create a directory named 'foo' with the standard pathlib module
from pathlib import Path p = Path(__file__).resolve().parent/'foo' if not p.is_dir(): p.mkdir()
i used this
def make_file(): os.getcwd() os.chdir('export') os.mkdir(str(name.get()))it works as intended once now its like this
Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\HOME-PC\AppData\Local\Programs\Python\Python36-32\lib\tkinter\__init__.py", line 1699, in __call__ return self.func(*args) File "C:\Users\HOME-PC\Desktop\program_thing\tkinter_program.py", line 20, in make_file os.chdir('export') FileNotFoundError: [WinError 2] The system cannot find the file specified: 'export'