From 3 days, I am continuously making my efforts to get this thing to do in Python, which I can easily do in PHP.
I just want following lines from PHP file (abc.php) to Python (abc.py).
$mind = explode(',', $_GET['mind']);
$data = '';
$data .= file_get_contents('good.txt');
$data .= file_get_contents('bad.txt');
Here whenever I run http://localhost/abc.php?mind=good,bad I get the content combined of good.txt and bad.txt.
I would be grateful if anyone can get me the converted lines to Python.
So that whenever I run, http://localhost:8080/abc?mind=good,bad it perform the same action as we can do in PHP.
I just wrote these lines, but it is waste I think.
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
mind = cgi.escape(self.request.get('mind'))
splitted = mind.split(',')
application = webapp.WSGIApplication([('/abc?', PrintAccordingly)], debug=False)
if __name__ == "__main__":
This topic is now closed. New replies are no longer allowed.