I have a large library of python scripts that I wrote in Notepad++ and Pycharm, and I would like to start running them with Emacs. However, something about these files is causing a syntax error in Emacs.
As a minimum working example, I saved the following in Notepad++:
print('hello world')
Then, I open it in Emacs 22.3.1, and go to Python --> Start Interpreter. I type C-c C-c, and I get the following error in the interpreter screen:
File "/tmp/py110681cL", line 1
print('hello world')
^
SyntaxError: invalid syntax
This makes it look like there is an indentation it is reading at the beginning of the line, but I do not see it in the Emacs text editor window. I tried cleaning up whitespace to no avail.
If I create a new file in Emacs and manually type the same code, it runs just fine following this procedure.
I'd rather not manually retype all of my pre-existing scripts, so how can I remove this phantom space? Google was not helpful...
UPDATE: Notepad++ was representing my new lines with [CR][LF]. Removing the carriage return in Notepad++ allowed it to run in Emacs.