Python Forum
Is it possible to import / run compiled Python (.pyd) file in web browser?
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to import / run compiled Python (.pyd) file in web browser?
#5
In order for your code to show, you need several things:

Firstly, there needs to be a server that handles HTTP requests. At the moment you are just opening a file with Firefox on your local hard drive. A server like Apache or something similar is required.

Secondly, presuming that you now have a server that serves the files, you will also need something that interprets the code as Python code for the server. For Python users, the go-to solution is nowadays mod_wsgi. But for simpler cases, you could stick with CGI (more info here), but if you want to produce web pages easily, you should go with an existing Python web framework like Django.

Setting this up can be quite the hassle, so be prepared.
Reply


Messages In This Thread
RE: Is it possible to import / run compiled Python (.pyd) file in web browser? - by SarbjitGrewal - Jan-08-2018, 09:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating a Browser Extension using Python j49857 3 1,035 Feb-13-2024, 10:49 PM
Last Post: j49857
  webdriver.remote to connect back existing browser without open new browser? gahhon 6 6,791 Feb-26-2019, 03:53 PM
Last Post: gahhon
  Enable error logging to browser for Python's Flask under Apache + mod_wsgi nikos 1 3,075 Sep-18-2018, 09:15 PM
Last Post: nikos

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020