I'm pretty new to Python and i'm havin troubles

Ok I'm new to python since january. i've read a intro book cover-to-cover and have written some code of my own, but i have a nerve-racking problem thats giving my a headache. I can save a module just fine, but when i try to import it into another program it gives me a syntax error and highlights the middle "5" in the "Python 2.[b]5[/b].5" at the top of the page.

Please assist, what's going on and how can i fix it?

Comments

  • : Ok I'm new to python since january. i've read a intro book
    : cover-to-cover and have written some code of my own, but i have a
    : nerve-racking problem thats giving my a headache. I can save a
    : module just fine, but when i try to import it into another program
    : it gives me a syntax error and highlights the middle "5" in the
    : "Python 2.[b]5[/b].5" at the top of the page.
    :
    : Please assist, what's going on and how can i fix it?
    :

    If it's highlighting a syntax error, it must be interpreting that line as code. If it isn't code, but a comment at the top of the page, you should check whether it's properly commented out. Does the line begin with "# "?

    (or, if you want to put a docstring there at the top of the file, enclose it in triple quotes)




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion