Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42773

problem in running a basic code in python 3.3.0 that includes HTML file

X-Received by 10.224.18.132 with SMTP id w4mr3839393qaa.1.1365102516871; Thu, 04 Apr 2013 12:08:36 -0700 (PDT)
X-Received by 10.49.29.99 with SMTP id j3mr756713qeh.38.1365102516856; Thu, 04 Apr 2013 12:08:36 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!ca1no29434225qab.0!news-out.google.com!ef9ni1849qab.0!nntp.google.com!ca1no29434217qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Thu, 4 Apr 2013 12:08:36 -0700 (PDT)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=108.176.159.139; posting-account=3Ufq0AoAAABpM0WTqR6KqgXoYdvnfuKz
NNTP-Posting-Host 108.176.159.139
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <4b7526eb-b501-4ff8-a257-8cfefbeda413@googlegroups.com> (permalink)
Subject problem in running a basic code in python 3.3.0 that includes HTML file
From Satabdi Mukherjee <satamukh@gmail.com>
Injection-Date Thu, 04 Apr 2013 19:08:36 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:42773

Show key headers only | View raw


i have written this code and i need to run this file

def CreateEvent(str):
"This prints a passed string into this function";
   print str;
   return;

CreateEvent (print'''
content-type: text/html 
 
 <html> 
 <head> 
 <title> the list of all possible events that can be notified by our system </title> 
 </head> 
 <body> 
<form>
<input type="checkbox" name="tsunami" value="tsunami">tsunami<br>
<input type="checkbox" name="earthquake" value="earthquake">earthquake<br>
<input type="checkbox" name="volcano" value="volcano">volcano<br>
<input type="checkbox" name="hurricane" value="hurricane">hurricane<br>
<input type="checkbox" name="sinkholes" value="sinkholes">sinkholes<br>
<input type="checkbox" name="tornado" value="tornado">tornado<br>
<input type="checkbox" name="landslide" value="landslide">landslide<br>
<input type="checkbox" name="downburst" value="downburst">downburst<br>
</form>

<input type="submit" value="Submit">
</body>
</html>
''')



but it gives this error

expected an intended block.

can anyone please tell me how to overcome this problem? i am working in python 3.3.0
thank you

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee <satamukh@gmail.com> - 2013-04-04 12:08 -0700
  Re: problem in running a basic code in python 3.3.0 that includes HTML file Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-04 15:48 -0400

csiph-web