views:

29

answers:

1

Hello everyone, im new to learning python and i've been trying to implement a text to image converter that runs on a web page.

1.I have succeeded in making the functional code that converts the text into image ,in python using the PIL module. (i.e user enters input text at run time and that gets converted into an image and is stored in the hard drive)

2.Now i want this code segment to work on a web page (something similar to feedback or comments form in websites)

  a.that asks the user to enter a string in a text field and on pressing a button, it 
     goes ahead and converts it into an image and reloads the page

  b. once reloaded it displays the string-converted-image, and also provides the text 
     box again for any new user to do the same.
  1. I started with the google web apps framework, and unfortunately i learnt that google web apps cant support PIL module although it provides an image api , it cant support dynamic image generations based on user input.

  2. So , can anyone guide me , as to how i can go ahead and integrate a web page and the python code that i have ready ? so that it works ?

  3. Please guide me where i need to look and anything you consider is necessary to know in order to proceed ahead

A: 

Check out webpy, just about the simplest Python web framework. In the web.py module, import your PIL image converter, grab the text from the submitted form (via web.input()), convert the text and render a page with the new image on it. You should be able to get a simple page up in a dozen or so lines.

Hollister