Python Forum
Script I can't figure out how to use
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script I can't figure out how to use
#1
I was trying to run this script:
https://languagefixation.files.wordpress...tml-py.pdf
which I need to convert the output of a text-alignment software from txt to html in order to make it more readable. Having no previous experience with python, or coding in general, I simply downloaded Python 3.6, opened IDLE and pasted the code from the pdf file, after which I tried to manually reproduce all the indents. However, when I tried to run it, I got "invalid syntax", with the comma in the following line:

raise ValueError, "Unexpected line format\n%s" % hunline

highlighted in red.

I would be very grateful if somebody could help me out with this as I really haven't got the faintest idea what I am doing, or am supposed to do.

thanks
Reply
#2
That code is written for an older version of Python. You need Python 2.7, and you need to run it in that version.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
Thanks!
Reply


Forum Jump:

User Panel Messages

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