Beginner advice on how to use FTP or SSH? (django) [closed] - python

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm in the midst of trying to get my first website up and running all of the sudden I get to the point where I need to get my file online and I have zero idea on how to do that. I thought it would be as easy as selecting your files and clicking upload but so far it has not been that easy. Currently I'm using djangoeurope.com. So if anyone has experience with that site that would help extra.

If you have ssh access, confirm that it's working by using
ssh [username]#[hostname]
If you can log in using ssh, you can use scp to put your files onto the server (log out of the remote server first)
scp [local_file_path] [hostname]:[remote_file_path]
For example,
scp local.txt files.server.com:/home/local.txt
This should work from a terminal on a Mac or Linux system. If you're on Windows, you should look at WinSCP

If you sign up with Heroku, your deployment process is very straightforward, and as an added bonus you do not have to deal with FTP and server configuration.

There are different tools for FTP and SSH file transfer. Which one is best for you depends on your environment (e.g. operating system) and your needs (do you want a graphical or command line interface?). But basically it's always a program you run on your machine that connects to a server to upload files. You don't do anything through a web site (except finding out which server to connect to and maybe setting up an account / password).

Related

Is there a way to deploy a python desktop app in an organization? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
So the company I work for is very restrictive in giving software out to a large number of employees. I was asked to create a small desktop app that takes in certain parameters from the user and queries an internal database and outputs a csv with the results. I made this app in python. However, the organization is being stringent and not allowing me to load python onto everyone's laptops. Is there anyway to make this app usable by everyone without having python downloaded onto their computers?
As of right now, the app is hosted in an application and database server only accessible by my team and IT. We have access to docker but I'm not too experienced with that so I'm not sure if that would help.
You could run your app through pyinstaller. That creates a .exe installer file. Your network overlords may, or may not, allow you to distribute that installer to employees. You should ask before you do any more work in that direction. Big orgs are really reluctant to deploy desktop apps widely. Because cybercreeps and security compliance.
You could rework it into a web app that people can use via their web browsers. Downloading .csv files from web apps is simple. And, hitting your database from the server running the web app is plenty more secure and scalable than hitting it from lots of desktop apps. And, web apps are easier to update when needed.
There are a whole mess of web app frameworks for python available. Ask whether your org has chosen a particular one. If so, use it: you'll have programming and deployment expertise to draw on as you finish this project.

how does ansible executes on a remote host? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Im trying to figure out how ansible executes the commands on the remote host, I get that it uses ssh/winrm to connect to the remote host but from there it would have to assume the remote host has python/powershell (depends on the os) and all the libraries their code need to run.
so basically what im asking is :
does ansible require the remote host to have python in the right version on it.
does it require the remote host to have the libraries their code uses.
if not does it transfer the modules when it connects and removes them afterwards.
else it may "compile" the modules and transfer them
Ansible works by connecting to your nodes and pushing out small programs, called "Ansible modules" to them. These programs are written to be resource models of the desired state of the system. Ansible then executes these modules (over SSH by default), and removes them when finished.

Using SSH to connect to an Ubuntu Server to develop remotely. How can I actually run my programs and see visual outputs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
So I am using VSCode Insiders to connect via SSH to my Ubuntu Server where I have all my project clones. Everything up to here works so far. I am doing a bit of pandas/matplotlib in python and say, I wanted to plot a graph and see it. Is it possible to do this?
In order to view graphical linux applications over SSH, you need to do a couple of things. First of all, you need to make sure that your Ubuntu Server is running an X windows server so the system knows how to process GUI events. Once you've verified this, you need to configure your SSH client to communicate with the X windows server. This will vary based on your host operating system and the SSH client you're using.
This guide could be helpful:
https://statistics.berkeley.edu/computing/x11-forwarding

How to run python script with selenium all the time but not on my PC [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I made python script using Selenium webdriver. I use that script to login onto system of my faculty and looking on posts. Script refresh page every 60s to see if there is any new post, if there is new post I would recieve Telegram message on my phone. There is no problem with that, problem is that I have to run that script on my laptop 24h to get notifications, which is not possible since I carry it around.
Question is, how can I run that script 24h? Is there any better solution to monitor that page and send messages if there is new post?
I tried pythonanywhere but I don't have too much experience in that field so I didn't manage to make it work since always some module is missing...
You could get your own private server, e.g. DigitalOcean or a raspberry pi.
Once you have this you can install the 'screen' package which allows scripts to be run as if in terminal once disconnected.
list of commands for screen
Welcome !
The best way for you would be to use a server so you don't have to run it locally on your computer.
You can use an online VPS on which you install your software or you may even try to run it locally on something like a Raspberry Pi.
In both case, you will have to deal with linux commands.
Good luck
I'd just use a Windows virtual machine from AWS/Microsoft Azure/Google/etc. This may be a bit overdoing it in your situation, but you could have one VM connected to another VM that'd be running your script, if it's something that requires an always-on user interface and can't be run in a Linux headless browser.
Installing something like AppRobotic personal macro edition on any of the above cloud services would work great. The pro version that's on AWS Marketplace would also work great, but it'd be overdoing it in your use case.

Web server to run python code [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm sorry if my question is too elementary. I have some python code, which makes the machine act as a transparent proxy server using "twisted" library. Basically I want my own transparent proxy OUTSIDE my internal network and since I want to be able to monitor traffic, I need to have my own server. So I need a machine that runs my script 24/7 and listens for http connections. What kind of server/host do I need? Any host provider suggestions?
Go for Amazon Ec2 instance, Ubantu server. If your process is not much memory consuming , you can go with Micro instance(617 Mb ram, 8 Gb HD) which is free for first year. Or you could go with small instance (1.7 GB ram and 8Gb HD), which might cost you little more.
For setting up the python code to run 24/7 , you can create a daemon process in the instance. You can also put the twisted library/ any other library in it. Should not take much time if you have worked with Amazon AWS.
There are many specialized commercial hosts for python. Python maintains a list of them on their wiki. Some even have the twisted framework available. The other alternative is to get a virtual private server and install all of the specialized libraries that you need.

Categories