How to make a python to run in linux - python

Please I am trying to use linux and I have used it on LiveCD and I really want to use it but the main problem that am having about Linux is that on windows I use an application as a server (ip: 127.0.0.1 port: 8080) to connect to the internet on it and I want to use the same proxy on Linux but I don't know how to do that.
I have tried to extract the Windows Executable file and its a python program (.pyc).
I want to ask if there's a way to pack the files together to be used in Linux so that i will still be connecting through the same proxy again.

Related

Send command to MacBook Terminal from Pycharm installed on virtual Windows

Background:
Through VMWare Fusion installed on my MacBook, I have Windows installed virtually in the VMWare Fusion environment. On the Windows, I have Pycharm IDE through which I run automated python program to control bench instruments from Keysight and Techroniks. No issues.
PS- The instrument drivers are available only for Windows, thats the reason I am using Windows virtually on MacBook
Question:
From Pycharm (installed on virtual Windows), I would like to send any command (say, print Hello World) to the Terminal of the MacBook.
How to do this and what would be the command syntax (or package needed)?
There is no single package to do this.
At a minimum, your Mac host would need to run a server process. Then the VM would need to be on a host network bridge such that it is remotely addressable. Then, you can write a client that sends RPC requests to the host's server process.
At a low-level, you can use socket library, but you may want something higher level like httpserver.
Related - VMWare fusion: connecting to host's web server from guest
The other option without external dependencies would be to communicate over a file-system share.
If you want to install external software, then you can introduce a remote message queue or database.

Access Jupyter notebook/lab running on a remote windows VM?

I want to access Jupyter lab interface on my local machine browser (also running on windows) from a Jupyter server running on a remote Windows VM.
Is there any analogous technique to SSH tunneling in linux but for windows?
Thanks in advance!
EDIT:
I am not looking for remote desktop since the code autocomplete doesn't work and it's really unresponsive (and I think people can relate to other problems of coding on a remote desktop platform)
Remote Desktop would be the easiest option.
If you need a browser, windows has ssh built in, but I think it has to be activated in the Windows options

How can I connect to a windows aws virtual machine using python?

Is there a library that I can use to connect to a remote windows aws machine?
I need just to simulate login and logout.
We most likely need more information about what you are trying to do.
You will probably need to use something like rdpy (to login with the Windows Remote Desktop Protocol) assuming you don't have an ssh server already installed on it. Docs here
Alternatively, you can invoke your rdp client of choice with something like subprocess

Is there a way run a python script on another server?

I have a Djnago web application on IIS 6 on one server. Is there a way that from this website I call another python script that is on another server in such a way that that script just run itself there?
Calling or Runnig that script in the usual way as internet says, is not working.
I always get the error of os.getcwd() and it also doesn't allow to change that directory.
I just want to run that python script there on that server from this server.
Can anyone help?
Normally, I would recommend using a framework like fabric or winrm if you want to run a python script on another server. Those frameworks use ssh or windows remoting functionality, respectively, to allow a python program to execute other commands (including python scripts) on other systems. If the target machine is a windows machine, be forewarned that you can run into all sorts of UAC issues doing normal operations.

Open URL command from Linux to Windows in Python

I have a Linux PC (running Ubuntu) and a Windows 7 PC, and they are connected to the same network.
I want to write a script in Python from the Linux PC that "tells" the Windows PC to open a specific URL.
I know the command in windows is e.g. "start www.google.com", so I think I have to somehow send this command from the Linux to the Windows PC using a Python script.
Thanks in advance for any suggestions!
Well, how the PC's connected, LAN, WAN, Bluetooth? I assume they use a LAN. In this case you can use a socket library to send data from one PC to another.
The Linux will be a client and Win7 will be a server, check this link for example: Server/Client implementation

Categories