I’m trying to make a python script which is going run a bash script on a remote machine via ssh and then parse its output. The bash script outputs lot of data (like 5 megabytes of text / 50k lines) in stdout and here is a problem – I’m getting all the data only in ~10% cases. In other 90%
Tag: python
What is the best way to give a Linux command from one machine to a different machine? [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
CALL multiple procedures with python
I have a linux server and I would like to run a python script every day to run mysql procedures but I do not know how to run multiple procedures and put a condition if there is an error that it sends me an email with the description of the error. Here is my script with only one procedure: Thank
Invoke Python as Executable
I have a Python script, a simple Hello, World. I need to invoke it as I would an executable and take piped input: How do I generate the command python3 myprogram.py and handle the piped input? Answer If you’re on a *Nix system, you’ll need to follow 3 steps: Make sure your script has executable permissions Add the shebang line
python3 import error: while running with sudo -u python3
For my python script I need to change the user. Therefore I start the script with: sudo -u eval python3 run_aufgabe2.pythere is no problem running the script until I import modules from the same directory, then I get an import-error: Running the script without sudo -u eval, the import is working and the script is running without errors. I first
Authenticate from Linux to Windows SQL Server with pyodbc
I am trying to connect from a linux machine to a windows SQL Server with pyodbc. I do have a couple of constraints: Need to log on with a windows domain account Need to use python3 Need to do it from Linux to Windows Need to connect to a specific instance I set up the environment as described by microsoft
Directus custom filter/search with python machine learning
I want to implement my own filter in directus based on python machine learning. User posts a message/question to the Server Directus save the message/question at this moment, a python script search for similar message/question (machine learning) Directus answers with the answer found by the python script Is this possible ? How can I implement something like this? Thanks in
Run bash command from python and capture file object
in jupyter notebook I can run the following command and get a list of file objects that I can then open: I have tried the following: But I can only get a string object not file objects that I can then open and get data from. Answer Filenames are strings. That’s what you pass to open to get a file
389 Directory server testing with lib389
I am testing 389 Directory server testing with lib389. I am following the bellow link. https://fedorapeople.org/~spichugi/html/guidelines.html#add-modify-and-delete-operations What is the meaning of “standalone” here? Answer Its the name of ldap server instance:
Remove lines are between two line numbers (or patterns) with sed [no duplicate]
I saw and read many topics about my problem, but they didn’t help me. a close topic to my problem but it didn’t help me: removing lines between two patterns (not inclusive) with sed Question: I have a text file and I want to remove lines are between two patterns. note1: between these patterns, i don’t want to remove lines