![]() |
|
[Python] Hosting Python files without framework - how far can you go? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Hosting Python files without framework - how far can you go? (/showthread.php?tid=5923668) |
Hosting Python files without framework - how far can you go? - Red-Leonard - Dec 28, 2018 I'm trying to get some python files working on my server/host but can't seem to get much done without using a framework so, how complex can you get without using Flask or Django? at the moment, anything other than basic text or sums doesn't seem to work on the web RE: Hosting Python files without framework - how far can you go? - enmafia2 - Dec 29, 2018 (Dec 28, 2018 06:15 PM)Red-Leonard Wrote: I'm trying to get some python files working on my server/host but can't seem to get much done without using a framework Python comes with a very simple http server, does this work for you? https://docs.python.org/2/library/simplehttpserver.html It is not meant for production but I am not sure what you really want to do anyways RE: Hosting Python files without framework - how far can you go? - .kr. - Dec 30, 2018 you can handle http requests with a socket check this: https://tools.ietf.org/html/rfc2616 Hypertext Transfer Protocol -- HTTP/1.1 RE: Hosting Python files without framework - how far can you go? - are_you_here - Dec 30, 2018 You can use the Http request , the Get Data can get args , from this args you can run it on you server side. /VPS/.. RE: Hosting Python files without framework - how far can you go? - Red-Leonard - Dec 31, 2018 ok, thanks, but how to run it server side? I mean, I have a windows server and it was a major hassle just getting 'hello world' up and running - is it worth changing server, persevering with windows, or possibly using node.js (which has easy install with server) instead? RE: Hosting Python files without framework - how far can you go? - Viridescent - Jan 2, 2019 (Dec 31, 2018 03:45 AM)Red-Leonard Wrote: ok, thanks, but how to run it server side? Node.js is really easy to setup and you should probably use it if you aren't going to use flask RE: Hosting Python files without framework - how far can you go? - Nachfolger - Jan 2, 2019 (Dec 31, 2018 03:45 AM)Red-Leonard Wrote: ok, thanks, but how to run it server side?ignore this Any reason you're opting to not use PHP? Sure, Node works, but if you're using it just because some hipster developer said it's the future, I would make the case you haven't weighed your options. RE: Hosting Python files without framework - how far can you go? - Red-Leonard - Jan 3, 2019 thanks for the replies, think I'll stick with Flask for now will prob make a thread in the 'database' section soon, as I'm a little stuck on making changes to that right now.... |