Python Forum
How to Load Idle/Cmd Programs to Server?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Load Idle/Cmd Programs to Server?
#1
Hello,

So I have a program I'm running on my computer from the CMD prompt as well as Python Idle.

How can I load these onto a server to run independent of my computer?

Is it even possible that I can load the program in cmd or idle format and have it run independently? If not how can I just get my program on a server?
Reply
#2
you can use pyinstaller (will need to learn how to use), that will create an .exe file which can be run on a system without installing python.
details here: https://pypi.org/project/PyInstaller/
Reply
#3
(Jun-23-2018, 04:16 AM)Larz60+ Wrote: you can use pyinstaller (will need to learn how to use), that will create an .exe file which can be run on a system without installing python.
details here: https://pypi.org/project/PyInstaller/

will this allow me to run the program on a server though?
Reply
#4
Yes, it would have to be moved to, or visible from (with exe privileges) the server to do so.
Reply
#5
Talking about server then it usually run Linux,the a .exe wont work.
What is your server running?

Usually when i transfer Python code to a server it's for running a web-app.
The i also has a Repo eg GitHub,BitBucket.
Example DigitalOcean VPS have a Linux distro running eg Ubuntu(Droplet) that has Python and Git pre-installed.
Transfer code to server git clone my_repo.
On local Pc i have also build code with virtual environment.
Then pip install -r requirements.txt to install dependencies to server.
At this point i could run a script python my_scipt.py on server.
With a web-app there as more step like eg setting up Gunicorn,Nginx,so other can see web-app in browser.
Reply
#6
(Jun-23-2018, 11:11 AM)snippsat Wrote: Talking about server then it usually run Linux,the a .exe wont work.
What is your server running?

Usually when i transfer Python code to a server it's for running a web-app.
The i also has a Repo eg GitHub,BitBucket.
Example DigitalOcean VPS have a Linux distro running eg Ubuntu(Droplet) that has Python and Git pre-installed.
Transfer code to server git clone my_repo.
On local Pc i have also build code with virtual environment.
Then pip install -r requirements.txt to install dependencies to server.
At this point i could run a script python my_scipt.py on server.
With a web-app there as more step like eg setting up Gunicorn,Nginx,so other can see web-app in browser.

Im trying to run instabot.py on a server but I need some server recommendations because pythonanywhere seems to be blocking instagram bot py
Reply
#7
Are you using the free account?
Quote:A limited account with one web app at your-username.pythonanywhere.com, restricted outbound Internet access from your apps
PythonAnywhere is running Linux server environment with uWSGI and Nginx for web-app.
All this is already setup to make it easier for end users.
You can ask if they allow bots.

I like Digital Ocean.
Quote:Am I allowed to run bots on droplets?
Yes, you are definitely allowed to run a bots on DigitalOcean Droplets.
The only caveat is that the bot needs to follow the terms of service for the platform that it is using.
Digital Ocean VPS you have a lot freedom,start on eg clean Ubuntu distro.
The freedom also mean that you have to manage all yourself.

Can also look into AWS Lambda for no server setup Wall
Quote:AWS Lambda lets you run code without provisioning or managing servers.
You pay only for the compute time you consume - there is no charge when your code is not running.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to take the tar backup files form remote server to local server sivareddy 0 1,871 Jul-14-2021, 01:32 PM
Last Post: sivareddy
  IDLE not importing pygame (ok outside of IDLE) miner_tom 1 3,279 Sep-14-2018, 07:54 PM
Last Post: Larz60+
  Python IDLE 3.6.2 on WIn7 vs Pyhton 3 IDLE raspberry djdan_23 5 5,650 Sep-07-2017, 12:51 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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