Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

Python is an interpreted, general, high-level programming language. Programming questions are off topic. Questions about the use of Python should be asked at [Stack Overflow](http://www.stackoverflow.com).

0
votes
0answers
10 views

python 2.7 WMI script speed up

I am a beginner in Python. I want to check who was the last user logged on a Windows PC in domain. My Script works fine but it's very slow. The script needs about 12 hours because there are many pcs ...
0
votes
1answer
18 views

Is this ok to install python on d drive?

I am using window 10 and want to install python on d drive because after reinstalling Windows, I don't want to reinstall python again and don't want to take backup of python before reinstalling ...
0
votes
0answers
4 views

Monit process permission issues

I have a celery consumer which is written in python and it executes a Perl script for every task in the queue. I have added the celery to init.d configuration, everything works as expected but when ...
0
votes
0answers
4 views

How to pass arguments to Python script in Alfred Workflows [migrated]

I am trying to pass the {query} parameter to my python script (python newbie) so I can create a really simply calculation. Heres what the workflow looks like: My python script looks like this: ...
0
votes
0answers
9 views

conda auto try `conda-forge` if `install fail`

Some packages are not provided in conda default channel. Usually I have to conda install pyarrow found nothing. Then tried conda install -c conda-forge pyarrow successful. How can I make it auto ...
0
votes
0answers
13 views

Add a static site in to django system

Is that possible to add external html site to django system? while requiring user to log-in lets say, I have to include a user manual in to my system and it is a set of (html, css, js) files. the ...
0
votes
0answers
19 views

Setting up pyenv virtualenv in Mojave

I'm trying to setup a clean python environment in Mojave 10.14 following this guideline. It most closely matches what I would like to have: both python 2.7.15 and 3.7.0 usable, and a single jupyter ...
-2
votes
0answers
36 views

Why are some commands on windows really slow? [on hold]

Recently, running some commands on Windows takes a really long time. This includes python,powershell,and pip. For instance, python --version takes over a minute to run. Surprisingly, npm,node,git and ...
0
votes
1answer
33 views

Win10 python called from 'cmd' different than 'run' (2 versions installed)

I installed python 2.7 then needed to switch to python 3.5. I changed all my environment variables (system & user) to remove 2.7 from PATH (I don't want to remove python 2.7, just keep it in ...
0
votes
0answers
12 views

ffprobe with python - syntax error [closed]

I am new to programming so please excuse any silly mistakes. I am trying to ger information of service_provider using ffprobe in python but I am getting syntax error. Below is the code I am using. ...
0
votes
0answers
56 views

How to connect from windows bash ssh to a synology docker and view a picture using python [on hold]

I'm doing some work with python on a Synology ds218. To do it, I download a docker python image. I'm connecting to the container using windows bash ssh. The python script dynamically modifies images. ...
0
votes
0answers
16 views

Error installing Pysam in Cygwin

I'm new to Cygwin and Python. I'm trying to install Pysam, but am getting the following errors at the end: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-...
0
votes
0answers
12 views

What's the relationship Outlook email format (.msg)" to Office 365 and IMAP?

I'm writing a Python CLI script with IMAPClient to parse MS Office 365 email messages. Right now I'm learning about MIME emails and looking for solutions to parse multipart messages to get to HTML ...
0
votes
0answers
26 views

ffmpeg not generating bandwidth into my mpd file (dash)

We are developing a built-in player which streams via DASH protocol. One stop is to first convert all media sent by the user to MP4 (h264), the problem is, when ffmpeg generates the manifesto for the ...
0
votes
0answers
12 views

pip install numpy gives no return message at all

I've recently made a huge mistake by running the following command. $rm /usr/bin/python I fixed it by https://stackoverflow.com/questions/52625122/i-accidentally-removed-python2-7-executable/...
0
votes
0answers
13 views

No such file or directory: mod_wsgi

My Apache seems to be running okay, except for two things. 1) Message in error.log: [wsgi:warn] [pid 1234:tid 12345678] (2)No such file or directory: mod_wsgi (pid=1234): Unable to stat Python ...
0
votes
0answers
17 views

unable to symlink /usr/bin/python2.7 to /usr/bin/python or to /usr/bin/python2

My ubuntu version is 16.04. I'd accidentally removed /usr/bin/python2.7 executables by $rm /usr/bin/python2.7 This problem was fixed by https://stackoverflow.com/questions/52625122/i-accidentally-...
1
vote
1answer
34 views

Pass local environment variables to Python script on Windows server using SSH

I am trying to execute a Python script on Windows server 2016. I have Win32-OpenSSH installed on Windows server. The python script expects two environment variables (BITBUCKET_REPO_SLUG and ...
0
votes
0answers
22 views

vim if_pyth and python GIL: is vim.current.buffer thread safe?

vim does not provide multi-threads support, but the python extension make it possible to create multiple threads. vim if_pyth provide access to vim variable via object like vim.current.buffer. The ...
0
votes
0answers
12 views

How to make my python program bypass Linux openssl and use my compiled one

I am running an experiment program in python using python3.6.5 and Openssl. I use Ubuntu 18 which comes shipped with OpenSSL 1.1.0g: openssl version -a OpenSSL 1.1.0g 2 Nov 2017 built on: ...
0
votes
0answers
16 views

Python 2.x.x how to add a comma in print statement of python without preceding space character? [migrated]

I am new to python and learning, name = "Andrew" print name,"," Andrew , A space character is injected in before the comma, which is undesirable. How may we print the comma immediately after name ...
0
votes
1answer
17 views

Return to ec2-user from a custom user

When creating an ec2 instance I use a bootstrap script. On the instance I install and configure an nginx web server. For security reasons, I need to create a new user (www-data). The www-data user ...
0
votes
0answers
23 views

Issues with Task Scheduler when using python script through Powershell

I have a powershell script and at the end it call a python script. Everything works fine. When I am trying to run it through Scheduled task the powershell scripts works fine but when it come for the ...
-1
votes
0answers
20 views

TensorFlow profiler: how to know GPU and CPU load

I am working in a Python script that calls TensorFlow to train a neural network. I am executing it on a server with a Nvidia's GeForce GTX 780. Now I am debugging code and optimizing the system. So, I ...
0
votes
1answer
11 views

launch application at boot in root environment, then monitor and if closes or crashes relaunch

I have a question regarding how i can launch an application, written in python, as soon as boot has been completed. This application needs to run with full permissions, so that passwords are not ...
0
votes
0answers
11 views

Getting VM network information

I am trying to get vLAN information from a Virtual Machine in vcenter.I have a vm object created and tried to get it from that like vm_obj.network. it gives me 2 network details but not sure which is ...
0
votes
1answer
18 views

Catching error codes of python processes outside of them in linux?

I am using a python code, not mine, that runs for days or even weeks. It might have some bugs left, so it might crash once in a while. But I dont want to check it every couple of hours. I know that ...
0
votes
0answers
14 views

Wrong configuration of AT-SPI in macOS

Working with Python and Gtk+, I'm using Aloe tests to validate the correction of some modules. The tests are designed in such a way that they use the AT-SPI services behind, but in my installation it ...
0
votes
0answers
3 views

Navigating a website headless in Chrome using Selenium Python [migrated]

I'm trying to figure out how to manipulate a webpage in headless mode using Selenium Python but I keep getting an error message. When I run the below code visible it runs without an issue. from ...
-1
votes
0answers
24 views

IronPython can't run Python after changing server

I am asking my question here after doing a huge research in other groups, even out of Stackoverflow, and there seems to be no particular solution for me. for a review of my question you can check ...
0
votes
0answers
10 views

In Windows, can I install a python library on Linux subsystem, and run it from Windows?

I work on Windows, and have Windows Subsystem for Linux that I use for installing Python with some Python libraries. I can run these Python libraries from within the Linux subsystem. But, I also want ...
-1
votes
0answers
25 views

Cant install some packages in Kali Linux : ImportError: No module named 'logging'

I have this very frustrating problem which doesn't let me install packages that rely on python copied a small portion of the result after running apt-get install -f Traceback (most recent call ...
2
votes
1answer
51 views

Refactoring Code in Sublime Text 3

Currently I do this with Find All (Cntrl+F old_var, alt+enter new_var), but this replaces words in my comments and strings. A comment in this answer suggested the PyRefactor plugin which requires ...
0
votes
0answers
29 views

ImportError: undefined symbol: GDALDatasetTestCapability when installing gdal2tiles on Linux Centos 7.5

How can I resolve this error? ImportError: /home/a/b.com/live-charts/live-chart-example/lib/python3.6/site-packages/osgeo/_gdal.cpython-36m-x86_64-linux-gnu.so: undefined symbol: ...
0
votes
1answer
44 views

Video frame capture: I-frame vs P-frames

I'm trying to capture various frames within a x264-encoded video files into png files (in python), and then compare the quality of them: cap = cv2.VideoCapture(filename); //get frame_number for ...
2
votes
0answers
34 views

What is the installation structure of python on Linux? [closed]

So I completely broke my python. I am not really interested in fixing it, I am going to do a reinstall of my OS anyways. This got me thinking however. How does a python install work on Linux? ...
0
votes
0answers
6 views

Interactive labeling/annotating of time series data

I have a data set of time series data. I'm looking for an annotation (or labeling) tool to visualize it and to be able to interactively add labels on it, in order to get annotated data that I can use ...
0
votes
1answer
32 views

Can I re-compile python with an older version of gcc on ubuntu 18.04?

Yesterday, I upgraded my OS from ubuntu 16.04 to 18.04. Since then, one of my python modules (on python 2.7) does not work anymore. Trying to import it yielded an error. This module uses fortran ...
0
votes
0answers
102 views

Installing Twisted wheel on Windows 7

I am trying to install Scrapy on Windows 7. Thanks to problems with the installation, I got to installing Twisted first. If i try pip install twisted I get "failed building wheel for Twisted". Is ...
0
votes
1answer
32 views

Why do I get an error “no module named lal”, when there is clearly a directory named 'lal'?

When I enter certain commands at the command prompt or in the python interpreter, I get an error message, no module named lal. But there is clearly a directory called lal in the same path from which I ...
0
votes
0answers
14 views

Run python script after OS is visible

I'm trying to autostart a python script on a Raspberry Pi 3b+. The Shell script is working when i run it from my Desktop. When i want to start it with rc.local or crontab i get an error. The python ...
0
votes
0answers
26 views

Apache CGI Music Player daemon Commands to a Remote Client via Reverse ssh Tunnel

Hi so my friend has a Debian Linux box at his house with Music Player Daemon he uses to play music in his house. Well he wants to be able to control it remotely from anywhere but he cannot do port ...
0
votes
0answers
76 views

Apache with Django and Python 3.6 and 2.7 with mod_wsgi

I am trying to set up a virtual environment for Django using Python 3.6 and Django 1.11 with Django CMS 3.5.2. It is working on my local CentOS7 machine. However when I try to install it on another ...
0
votes
1answer
23 views

Open with Idle not working on python program I have created

Hi I am getting option of 'open with idle' for my python program files. but on clicking it, its not able to open the file. Any guidance will be appreciable. Thanks.
1
vote
1answer
30 views

Why does the CPython interpreter ignore TERM when run in container?

If I start a Python process in a container with docker run --name python python python3 -c "import time; time.sleep(3600)" And try to terminate this on another console with docker stop python the ...
0
votes
2answers
64 views

How to delete lines after : if value is >5 in Notepad++ or Python

Hoping someone can help. I'm trying to delete any string that has 5 or less chars after : For example : test:test test:test12 (would be the only line kept) cobra:abcd I've tried solving it for ...
0
votes
0answers
41 views

how to write image with yuv420 format data with PIL or other Python library?

I'm using ffmpeg and Python to extract frames, do some processing and write these frames into a new file. At first I extract the frame by setting the pixel format as rgb24. So each time I read ...
2
votes
2answers
57 views

How do I transpose a table with repeated key values?

I have a table that looks like this: Column A | Column B 10 | 0.1 10 | 0.2 10 | 0.3 20 | 0.4 20 | 0.5 20 | 0.6 I need to transpose ...
0
votes
0answers
34 views

VirtualBox Agent.py in Cuckoo startup error

I am new to the Malware Analysis field. I installed Cuckoo and VirtualBox and did all the necessary configuration that is required. However the problem I am facing is that when I run cuckoo after ...
0
votes
1answer
24 views

Can a process that was started in a tmux session fall asleep?

Can a process that was started in a tmux session fall asleep? If yes, what is the cause(s), how to prevent it? Example reason for the question: I started a process on a server yesterday (training ...