0

So right now I have written a python program which takes the path name as an argument from console to execute.. now I am trying to learn Django and am trying to execute same program but via the web browser. So I figured out that let me have a form field to upload the file.. and then an execute button.. and when the execute button is pressed.. the program runs.. but how do I handle that uploaded file.. Sorry for this as I have no web-exeprience.. and I want to learn by getting my hands dirty.. :) Thanks

frazman
  • 32,081
  • 75
  • 184
  • 269

1 Answers1

2

There's a bunch of ways:

and maybe others i don't know about. Be aware that exposing these features to the public invites abuse. You may be interested in sandboxing (or this writeup) or using something like pyjs or skulpt which can turn python into javascript and execute in browser.

Community
  • 1
  • 1
jan zegan
  • 1,629
  • 1
  • 12
  • 18