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

Νίκος Γκρ33κ nikos.gr33k at
Thu Mar 7 15:34:08 CET 2013

Docs doesn't explain that i just take looked at

I see that the return value of os.system its an indicator to as if the command inside os.system() returned successfully.

So i guess ill be needing somethign like this:

htmltemp = '/home/nikos/www/data/private/htmltemp'

if htmlpage.endswith('.html'):
	f = open( "/home/nikos/www/" + htmlpage )
	htmldata =
elif htmlpage.endswith('.py'):
	os.system( 'python > %s' ) % htmltemp
	f = open( htmltemp )
	htmldata =

template = htmldata + counter

which i just tried and now iam receiving this:

<type 'exceptions.TypeError'>: unsupported operand type(s) for %: 'int' and 'str' 

I'am very close to the solution now i cna feel it but please help a bit!

More information about the Python-list mailing list