Really frustrated with this as one thing works at one time. Sometimes import filename.py works. But in the tutorials all I see is python filename.py. But when I try to give that, I am facing an error like invalid syntax.
I have edited all the environment variables and I have C:\Python27 folder in the same location. To be able to run the files using python filename.py what are the conditions that must be met? What should be the current working directory? Should the .py files be there in the same working directory?
python /path/to/your/program.pyto run it. But imports might be in specific places that need certain paths so you'll need to set that up. Your question is too broad though. Narrow down a specific issue you're having with a specific script and post that.filename.py. Can you include its contents? It sounds like your environments is okay. To be sure, what is your output when you run 1)python? 2)python filename.py?python filename.pyinside a.pyfile are you? Just checking...