When I run the code in terminal outside PyCharm's IDE:
directory = "./exports./images"
if not os.path.isdir(directory):
os.mkdir(directory)
with open(os.path.join(directory, "test"), "wb") as f:
f.write(b"\xff")
It works perfectly fine; however, when running it in PyCharm, it gives FileNotFoundError. When running this in PyCharm:
directory = "./exports"
if not os.path.isdir(directory):
os.mkdir(directory)
with open(os.path.join(directory, "test"), "wb") as f:
f.write(b"\xff")
It works perfectly fine. Why does the first one not work in PyCharm, and the second one does? And why does the first one work outside of PyCharm?