1

I am trying to have someone without Python installed use a simple program.

Have compiled it using py2exe, it worked, but it requires too much additional files. Have tried PyInstaller, but getting some errors when generating the executable file.

Anyway, I was thinking that it would be better upload that program to somewhere in the web, so, anyone with the link could use it in a much easier and practical way.

Does anyone know how I could accomplish that ?

4
  • 1
    Well, you could start by hooking it up to WSGI, I suppose. Commented Mar 16, 2015 at 15:00
  • What does the program do ? Does it recquire any file or extra data ? Commented Mar 16, 2015 at 15:01
  • Thank you Kevin, will have a look on the WSGI. Commented Mar 16, 2015 at 15:23
  • Math, thank you ! That is a program to create a simple file based in a file provided. I can either modify the program to ask the user to input the full file and then the simple file will be generated or use grab this from a specific folder Commented Mar 16, 2015 at 15:27

2 Answers 2

2
  1. If you want someone to download your file, use command:

    python -m SimpleHTTPServer
    

    on your file dir. And the someone use url {YourIp}:8000 with browser to access download.

  2. If you want to execute something in python script, create a small web service use flask:

    from flask import Flask
    app = Flask(__name__)
    
    @app.route('/')
    def hello_world():
        # Do your python script here
        return 'Hello World!'
    
    if __name__ == '__main__':
        app.run()
    

    And also, the someone can execute your script use {YourIp}:8000 with browser.

Except for the code, all you need is a server and a browser to access.

Sign up to request clarification or add additional context in comments.

Comments

0

Depending on how simple it is you could send them the file and run using an online interpreter such as http://repl.it/languages/Python3

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.