Python Forum
Just starting out, allready stuck..
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just starting out, allready stuck..
#7
(Jan-06-2018, 11:12 AM)squenson Wrote: We need to check which version of python you are running. Just type python and let us know what you get as a version (to exit the shell, type exit()).
(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.
Python version 3.6.4 (v3.6.4:d48eceb). I thought your advice on deleting possible white spaces would work, but alas :(

(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).

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.
i typed it myself, didn't copy/paste. i even tried to copy/paste before, but it didn't do anything :D

(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 character
does the little '^' under the last k mean anything..?
Reply


Messages In This Thread
Just starting out, allready stuck.. - by Sandman - Jan-05-2018, 11:17 PM
RE: Just starting out, allready stuck.. - by mpd - Jan-06-2018, 12:14 AM
RE: Just starting out, allready stuck.. - by Sandman - Jan-06-2018, 07:06 PM
RE: Just starting out, allready stuck.. - by wavic - Jan-06-2018, 11:43 PM
RE: Just starting out, allready stuck.. - by wavic - Jan-07-2018, 12:53 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020