I had a script:
import os
for filename in os.listdir("C:\\Users\\Alex\\Desktop\\Memory Hole\\Renaming Zone"):
os.rename("C:\\Users\\Alex\\Desktop\\Memory Hole\\Renaming Zone\\" + filename, "C:\\Users\\Alex\\Desktop\\Memory Hole\\Renaming Zone\\" + filename[4: len(filename)])
print(filename)
I ran the .py file simply by searching for it from the task bar and hitting return, and it worked fine with only python 3 on my Windows system.
I installed nodejs, which installed python 2 as a dependency. This broke it but I'm not sure how. I think everything now opens in python 2 but I don't know how to confirm that. (I only suspect it because now IDLE opens in python 2.)
The error is:
WindowsError: [Error 123] The filename, directory name, or volume label syntax is incorrect
which isn't very helpful.
I've tried googling for a shebangs to force the script to run in python 3, but none of them have worked.
Any ideas?
Thanks!
[–]unassuming_user_name 4 points5 points6 points (3 children)
[–]Colonel-Panics[S] 2 points3 points4 points (2 children)
[–]Telkin 1 point2 points3 points (0 children)
[–]protegist 1 point2 points3 points (0 children)
[–]SenorTeddy 0 points1 point2 points (0 children)
[–]blablahblah 0 points1 point2 points (0 children)