Skip to main content

Questions tagged [python]

Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

Filter by
Sorted by
Tagged with
0 votes
1 answer
128 views

Here my salt dependencies and system version : #~: salt -V Salt Version: Salt: 3000 Dependency Versions: cffi: 1.11.5 cherrypy: Not Installed dateutil: Not ...
dubis's user avatar
  • 1,480
0 votes
2 answers
139 views

I want to execute a command which looks like $ sh -c 'exec python -c "print('$1$2MyString')"' with the desired result '$1$2MyString'. However, when I execute the command, I get Traceback (...
johnc's user avatar
  • 103
0 votes
0 answers
175 views

I execute a long running Python-process. To stop the annoying noise from the fans I use AppPolice to prevent this process from using more than 20 % CPU (I don't care when it finishes). I think that ...
d-b's user avatar
  • 2,077
0 votes
0 answers
171 views

I have a device running an embedded OS (Custom Linux buildroot). It is offline and has no package manager (apt, yum, et al.) and Python has several missing modules, one of which is key for our ...
WhiteRau's user avatar
  • 255
1 vote
4 answers
188 views

How do I append a numerical suffix to lines to remove duplicates? Pseudo code: if currLine.startsWith("tag:") x = numFutureLinesMatching(currLine) if (x > 0) currLine = currLine + ...
Steven's user avatar
  • 768
0 votes
1 answer
186 views

I have a python script to switch light/dark mode. At the end there's this line: process = subprocess.Popen(binDir + "/polybar.sh") That script it points to is this: #!/bin/env bash # ...
indeedwatson's user avatar
1 vote
0 answers
98 views

I have a script that takes several hours to finish (the script runs whisper and it is the whisper . At the end I echo and >> some results to a network volume mounted using SMB. This often fails ...
d-b's user avatar
  • 2,077
0 votes
1 answer
934 views

How can I import FreeCAD from the python console? I'm trying to write a script that can manipulate a given FreeCAD file, but I can't even get FreeCAD imported into the python console on a system where ...
Michael Altfield's user avatar
0 votes
1 answer
160 views

Here is a terminal session: db@air ~ % port select --list pip3 Available versions for pip3: none pip3-apple (active) pip311 db@air ~ % sudo port select --set pip3 pip311 ...
d-b's user avatar
  • 2,077
1 vote
2 answers
200 views

In OBSD ksh, I had a PS1 which prepended a blank line: PS1="\n[\u@\h] \w\n\$" The problem with this was that pyenv prepends the name of a virtual environment when that environment is ...
user1093043's user avatar
-1 votes
1 answer
108 views

I'm trying to do a compare between a config from an old box and a new box to verify Availability and State haven't changed. I have a file that is generated with about a thousand nodes but every node ...
MyWiseGuys's user avatar
0 votes
3 answers
589 views

I am trying to process a text file and omit a certain string literal if it occurs at the end of the line. E.g.: Source: ABC 123 DEF, characters I don't want GHI, these characters are ok Desired ...
Evan Harmon's user avatar
0 votes
0 answers
95 views

So I use Compute Engine VM in Google Cloud to download youtube videos. I use Youtube-dl to download it. I follow the documentation in here: https://github.com/ytdl-org/youtube-dl/blob/master/README....
Flitzcore's user avatar
  • 101
0 votes
1 answer
1k views

I want to be able to plot an array of functions that are stored as a 2-d array using matplotlib. They all have the same independent variable. Specifically, P=zerros((ntotx, ntoty),float) x=zeros(ntotx,...
nardis_miles's user avatar
0 votes
2 answers
996 views

I am trying to install and use vscode with jupyter extension for coding with python on my archlinux OS. but it does not found any kernel interpreter I installed both jupyter and python extension in ...
eugenio b's user avatar
0 votes
1 answer
1k views

After some manipulations with updating Python to version 3.9 and using the command "python" to invoke Python 3.9 (update-alternatives), or perhaps something else, I encountered a global ...
echos's user avatar
  • 1
0 votes
1 answer
4k views

I see most tutorials/online sources advice using either source or . (a bash built-in) to activate a python venv. For example, this page suggests to do the following in Linux: cd ~/<proj_name> . ...
tinlyx's user avatar
  • 1,086
1 vote
1 answer
174 views

I am running a bulk job submission to SGE (Sun Grid Engine) using python drmaa bindings. For the bulk job submission I am submitting a python script that takes in one argument and is command line ...
Melendowski's user avatar
1 vote
1 answer
666 views

I'm trying to write scripts in Python with the libvirt library, but there's one thing I'm currently stuck at. I can successfully create a VM, set it up how I want it, start it, access it, and shutdown ...
Florian Bach's user avatar
0 votes
0 answers
306 views

I have a python script in: /home/pi/auto/wake_up.py crontab -e: * * * * * /usr/bin/python /home/pi/auto/wake_up.py >> /tmp/wake_up.log log is created but with empty line same when I put #!/usr/...
JOC0N's user avatar
  • 13
0 votes
1 answer
125 views

I use a compiled Vim on my machine. This compiled vim attempts to load the shared libary libpython3.10.so.1.0 I just updated my system and apparently Python deleted the old Python 3.10 libaries and ...
Tyler Durden's user avatar
  • 6,243
0 votes
1 answer
529 views

I have an application I need to run in verbose mode to get the information I'm interested in. This produces an enormous log file that is <1% interesting for my requirements.I want some way of ...
Stephen Boston's user avatar
0 votes
0 answers
179 views

I've installed meld as a non-root user via pip install meld (on a relatively old distribution - SLES 15). After installation, I see a file named /home/joeuser/.local/lib/python3.6/site-packages/meld/...
einpoklum's user avatar
  • 11.1k
0 votes
1 answer
268 views

In my application, I have the following code: def ifdown(iface): rc = subprocess.run(['/sbin/ifdown', iface]).returncode if rc: print(f'ifdown({iface}) returned {rc}') return ...
Alexandr Zarubkin's user avatar
1 vote
3 answers
659 views

The input is a list of paths. Everything but the first directory should be ignored / deleted. For example a text file called dirnames or dirs is input with these 3 lines of text: /how-to-blah-blah/ /...
react_or_angluar's user avatar

1 2
3
4 5
47