(Jan-06-2018, 11:12 AM)squenson Wrote: We need to check which version of python you are running. Just typePython version 3.6.4 (v3.6.4:d48eceb). I thought your advice on deleting possible white spaces would work, but alas :(python
and let us know what you get as a version (to exit the shell, typeexit()
).
(I know that you mentioned the python version in your first post, it is just to double-check it...)
Also, verify that there are no "invisible" characters in your hello_word.py file after the last parenthesis. Position your cursor after it and press the Delete key many times to be sure.
(Jan-06-2018, 12:15 PM)Gribouillis Wrote: Such things may happen if you copy and paste code from certain files such as pdf files to your editor. These files contain invisible characters that produce invalid python code (this is not a python specific issue).i typed it myself, didn't copy/paste. i even tried to copy/paste before, but it didn't do anything :D
You can delete the whole file and type it by hand. In fact there is a well known online tutorial named "Learn python the hard way". Its main paradigm is to type every single character of every program in the tutorial! No copy and paste is allowed.
(Jan-06-2018, 01:30 PM)sparkz_alot Wrote: In addition to the already mentioned advice, make sure, when you are writing your code that you do NOT use a 'formatting' text editor such as MS Write or MS Word. These editors also insert 'hidden' formatting characters. Instead, use a plain text editor like Notepad or a better option is the free Notepad++ (with the Python plugin). In addition, do not mix tabs and spaces, in Python always use 4 spaces for indentation.nope. i used Geany. supposedly this is a helpful tool to write your code in.
i'll add the message i'm getting in python tags
>>> C:\> cd Desktop\python_work File "<stdin>", line 1 C:\> cd Desktop\python_work ^ SyntaxError: unexpected character after line continuation characterdoes the little '^' under the last k mean anything..?