Is there a way to bypass the print command

0 Jesse Cox · December 11, 2014
I'm using python directly through cgi (can't find a web-framework which uses Python in the manner which I prefer). I've written a bunch of backend functions for my site already. However, I'm running into a problem. I hate having to issue the print command for every line of HTML. This is one feature I miss from PHP. Is there something like <?python?> which I can tweak in Apache or python itself? Anyone have any other backdoor ideas? Thanks for your time?

Post a Reply


Oldest  Newest  Rating
+2 Jesse Cox · December 11, 2014
I've solved this problem. I'm writing an interpreter in Python which will print lines until it hits "<?python". Then it will execute code until it hits "?>".The shebang line in the python file will need to be pointed towards my interpreter but it should work.

I will be making it open source and sharing in the "Share Your Project" section. thanks for reading.
0 Bernard Pyc0d333 Parah · December 11, 2014
that's cool solved it in 54minutes!!
  • 1



This section is all about snakes! Just kidding.

Bucky Roberts Administrator