This is my code:
import os
print(list(os.listdir('test')))
When I run the code in Pycharm it outputs the following:
['test.txt']
However, when I run the same file with windows command prompt I get this output:
(MLspraak) C:\Users\phili>python C:\Users\phili\PycharmProjects\MLspraak\test.py
Traceback (most recent call last):
File "C:\Users\phili\PycharmProjects\MLspraak\test.py", line 2, in <module>
print(list(os.listdir('test')))
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'test'
Why do I get different results and how can I fix it?
I am using a venv and I'm certain that I'm running the same python version.