Python Forum
HTML+CGI (if __name__ == '__main__')
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTML+CGI (if __name__ == '__main__')
#2
You need to move the "if __name__=="__main__"part, it needs to go at the bottom of the code:

if __name__=="__main__":
    htmlHead()
    main()
    htmlTail()
Also, you never appear to call def collect_result(result): and I think you maybe need to split the searching code and the page making code.
Reply


Messages In This Thread
HTML+CGI (if __name__ == '__main__') - by mahesh - Feb-19-2019, 11:49 AM
RE: HTML+CGI (if __name__ == '__main__') - by marienbad - Feb-19-2019, 02:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  HTML multi select HTML listbox with Flask/Python rfeyer 0 4,759 Mar-14-2021, 12:23 PM
Last Post: rfeyer
  Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to loop to next HTML/new CSV Row BrandonKastning 0 2,422 Mar-22-2020, 06:10 AM
Last Post: BrandonKastning

Forum Jump:

User Panel Messages

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