-2

I'm trying to create an online application for a Python function I have created. In my script, I input the path of my file for the computer (input_path = '/users/user/desktop/input.txt') but I'm not sure how to go about this using Google App Engine.

I have the choice between 3 templates: Flask, Django, and Bottle. I really do believe this question is relevant for people transitioning from scripts to web-based applications. Do I need to incorporate GUI stuff from Tkinter or something?

There has to be a way to simply select a file to use for the input path in an interactive way using Python scripts.

halfer
  • 19,824
  • 17
  • 99
  • 186
O.rka
  • 29,847
  • 68
  • 194
  • 309
  • you can't use Tkinter on GAE because there is no display available that can be drawn on. You'll have to create the GUI as a web page instead and serve that to the client for use in their browser. – Paul Collingwood May 30 '14 at 10:58

1 Answers1

4

This really has nothing whatsoever to do with "python scripts" or even frameworks.

You are writing a web application: you need to think about how the web works. The only way to give your web application access to a file on the user's computer is to upload it. To upload it, you need to create an HTML form with an <input type="file"> element - which when clicked will allow the user to browse for the file. Then you need to receive it on the server, and do something with it (either store it, or process it then and there).

Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895
  • thanks for the direction . i was hoping it wouldnt get downvoted but i didnt know how else to word it or where to get advice . – O.rka May 30 '14 at 18:26