Closed yuanyangwangTJ closed 3 years ago
You could use os.path? If you know where you are writing to that could be viable.
You could use os.path? If you know where you are writing to that could be viable.
Thanks for your notice, I found that the os.path
is root directory C:\Users\user
when I open a file in anywhere, this may be link to the way of working in sublime text. But how can I make the os.path
get the right and actual path?
You could use os.path? If you know where you are writing to that could be viable.
With the help of your notice, I found the problem in my "working_dir"
setting, I modify and run ok. The problem is solved. Thanks for your help again!
You could use os.path? If you know where you are writing to that could be viable.
With the help of your notice, I found the problem in my
"working_dir"
setting, I modify and run ok. The problem is solved. Thanks for your help again!
I do not know if I did much there but that is great man. Have fun. :)
Glad to find this excellent plugin for sublime text. I use it to build my python system following the guidance of plugin. Compared with default setting in sublime, this plugin make it possible to run python in a interactive environment in panel. At the beginning , it works well, but I found a problem about python file operation.
Detail
I open a python file, but not open the folder where it is. The python code is as following:
It run successfully and print hello world, but I can't find
test.txt
, I guess it may be caused by the target in setting. May be the targetterminus_cancel_build
? A supplement, if I open the folder where the python file is and run python, I can findtest.txt
.So how can I to run python file while not opening folder and in a relative path, I would appreciate it if you could provide some help.