An error when i switched from python v2.6.6 => v3.2.3

Νίκος Γκρ33κ nikos.gr33k at gmail.com
Thu Mar 7 14:22:54 CET 2013


Please tell me at least if i ahve any syntax error in this line:

htmldata = os.system('/usr/bin/python ./metrites.py /data/files/htmltemp')

please man its essential for my website to work otherwise 3 scripts i wrote would not be able to produce proper html output that then i need to append a string after them. her si what i want to do:

	if htmlpage.endswith('.html'):
		f = open( "/home/nikos/www/" + htmlpage )
		htmldata = f.read()
	elif htmlpage.endswith('.py'):
		htmldata = os.system('/usr/bin/python ./metrites.py /data/files/htmltemp')
		
		
	counter = ''' <center><a href="mailto:support at superhost.gr"> <img src="/data/images/mail.png"> </a>
		      <center><table border=2 cellpadding=2 bgcolor=black>
				<td><font color=lime>Αριθμός Επισκεπτών</td>
				<td><a href="http://superhost.gr/?show=stats"><font color=cyan> %d </td>
		  ''' % data[0]
		
		
	template = htmldata + counter
	print( template )

======================

Please just that i like to do it myself ut i cant, i wont ask anyhting else.



More information about the Python-list mailing list