Remote Python Program As Local Program - python-3.x

I am new to python. So please pardon my mistakes/ignorance.
I have an GUI app script that I use to copy some folders from another machine to my machine and also do some other processing with the files in the folders.
Now, I would like to place this script on my machine and let other people(with no python installed on theirs machines) to execute this script. I want it to behave as if it was running on their machine. I mean, I don't want to see any errors while this script from my machine makes any changes to their files like access denied etc. It should tread D:\ drive as theirs not mine.
Is it possible somehow in python?
Thanks in advance.

I don't know the way do such a thing. But maybe you can use tools such as py2exe to convert Python scripts into Windows .exe applications.
And as the introduction
It is an utility based in Distutils that allows you to run applications written in Python on a Windows computer without requiring the user to install Python. It is an excellent option when you need to distribute a program to the end user as a standalone application. py2exe currently only works in Python 2.x.
if you use python3.0 or 3.1, this question is helpful.

Related

I wonder if this is Python IDLE

At first, I'm not good at English but I'm doing my best, thank you.
I connected Amazon Lightsail and installed python36.
It is the list I installed.
python36.x86_64
python36-devel.x86_64
python36-libs.x86_64
python36-pip.noarch
Then I entered shell as shown in picture below after typing 'python3'.
At https://realpython.com/python-idle/#what-is-python-idle, How to Use the Python IDLE Shell's first image, it looks very similar to the image I uploaded.
So I think it is Python IDLE but I'm not sure yet.
Because at https://www.centos.org/forums/viewtopic.php?t=53908, 'python34-tools' contains idle3.
What? I'm not installed 'python36-tools'!
I installed 'python36-tools' and typed 'idle3' but there's an error, 'command not found'.
Even according to https://centos.pkgs.org/7/puias-unsupported-x86_64/python36-idle-3.6.6-1.sdl7.x86_64.rpm.html, it is definitely Python IDLE!
What's the right thing? I'm so confused.
I wanted to know more, so visit https://docs.python.org/ko/3.6/whatsnew/3.6.html and find this, 'The IDLE features formerly implemented as extensions have been reimplemented as normal features.'
It can be translated like this?
'Starting with version 3.6.3, you don't have to install idle3 separately. Just type python3 for use Python IDLE.'
I searched the information related to the above and couldn't find anything.
Please help me!
IDLE is a GUI application, with menus and windows. So you need to use a Linux/macos/windows desktop environment, it does not run in a terminal window.
It actually looks like this: https://www.youtube.com/watch?v=bOvqYw1SZJg
It starts in a standard python interactive shell, such as your screen shot.
But being a desktop app, it allows you to have multiple editor windows open with source files, and it has GUI debugging tools. IDLE is rudimentary, but also very simple (which can be a good thing).
I think there is a lot to be said for learning python in a real desktop environment, with multiple windows and friendly, easy to use debuggers.
There are cloud IDEs for python, but I don't think they are a good step for newcomers. The debugging is not very good, for instance.
However, jupyter is a good option for learning python, I think.
E.g.: https://realpython.com/jupyter-notebook-introduction/
Jupyter runs a webserver and you edit python in interactive workbooks which you open in a browser. I suppose it is a cloud IDE.
This is a short video of running it on Windows ... https://www.youtube.com/watch?v=jZ952vChhuI
jump to about the 2m mark to see it running.
To be honest, it is arguably a better place to start than IDLE.You could run the server part of this from lightsail, but you will probably need to configure your lightsail instance to open the ports needed to server jupyter's web pages.
But if you want to start with IDLE, you need python running on a desktop. A linux desktop is a very good choice. You can set up a desktop linux, such as ubuntu, in virtualbox if all you have is Windows.
However, if after all of that, you are going to do python from the command line, you should learn about
* virtual environments
* once you set one up, do pip install ipythonto get a better version of the python shell.
As others said, python3 on a non-Windows command line starts python in interactive mode. To start IDLE on a command line, use python3 -m idlelib.

How to create my Python3 automation program useable by another users?

Right now I can create a simple Ms.Excel automation program using Python3 but I want to others can also use my program.
What kind of features or packages that I could learn to make others able to use my program? Such as turn my program into portable software or web application?
You need to look into packaging your python application with all its dependedncies. Pyinstaller is a good way to go you can find a very good tutorial here.

How to make a python application distributable

My question pertains to distributing a python application the proper way. i have done research, but the answers appear to be vague and usually instruct the user to upload projects to the python package index. I simply want to make sure i research the proper methods instead of steering in the wrong direction.
I have been writing a stock analysis application with stored text files, and a dozen or so python scripts that interact with each other. Outside computers are to communicate with my servers through a random port (not the internet ports). all the imports work properly and the communication works properly, but i have no clue how to approach the distribution/setup or the GUI.
As an application with dozens of python scripts, should i write each script as an executable via pyInstaller, or should i add a python environment to the application to install python on all the user systems?
I need to add 'README', and 'LICENSE' to the application. What is the point of set up? is that a resource so python knows what is going on or does it actually setup the application? Does it need a URL, and what is the point of using the URL? Do i need anything else for the setup tools?
How do i package the entire application to download on user systems? I want the software to be uploaded via a URL link or from a USB. Do i have to make a tar file? i can do it automatically by writing my own python setup script, but i believe python has an easier way. Do i put a function in the setup to send an executable file to the desktop as a controller so the users don't open all the folders? How do i install from a link on a website?
For a graphical interface for the users on python applications, do most programmers use tkinter, or python integration into HTML, CSS? I do not want this application to be live in a website, but rather as a desktop application. Do i need to use a framework, such as django, to implement python into my html code?
I apologize if this is all unorganized. Ive always coded my own programs and never distributed or put a GUI on any of the scripts, so i just want to make sure i approach the task the right way.

Using Insall4j for a simple server (with no java)

Is there any way I can ignore all the java components that Install4J uses? For example not requiring the user to have java installed? I have a very simple executable that I would like the user to install onto their machine and I would like the user to be able to enter some input for things like port.
The issue is that Install4J requires you to have java downloaded, and it also installs a ton of unnessary items that I don't need for this project.
Reason I'm using Install4J is my company has a license for it, and its very clean and easy to use unlike something like Inno where its windows only and I would need to learn how to script it.
The project is a javascript nodejs file thats already been packaged. I just need a neat installer so that all the client needs to do is enter some information such as port and have the program read the xml file for the needed input.
Thanks.
EDIT: Seems to not be possible. See: Can you use nodejs with install4j

run Python script program-like

again a beginners question...I got a Python 3.5 script i want to run on a windows server. I found that thread and some links like this one but stil are not clear.
I got my sript on my laptop and I am importing some packages like boto3 from AWS. Now I want to execute on a windows server and also have an option to stop it.
My script has a thread that is running in an infinity loop until some break conditions occur.
How to package my "program" so I can run it on the server right away without using pip to install all the packages I imported?
Should I turn my thread into a deamon?
How to add a start/stop automatic? I think once Python is added to the path a doubleclick can start it or u are using a bat file to call it...but how to stop it?
Can someone outline the steps I need to perform?
Referring to your first question, I would recommend you to look into Docker. Docker is a containerization technology that makes it easier to run your software on any OS. It also "orchestrates" the installation of your dependencies by building an image so that you don't have to it manually every time. See https://runnable.com/docker/python/dockerize-your-python-application

Resources