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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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
9 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
9 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 ...
0
votes
0answers
13 views

Is there a way to directly make this code triggerable using a button — Raspberry Pi? [on hold]

I have a piece of code in Python on my Raspberry Pi (Model 2 B). Can you guys review this code and see if it can be triggered with the press of a button? import pygame import pygame.camera #init the ...
0
votes
0answers
14 views

How do Internet Explorer and python pip connect to the internet? [closed]

At my workplace, I can browse almost any websites through Intenet Explorer/Chrome without issues. But when I attempt to update some python packages through pip install <package>, I will ...
0
votes
0answers
15 views

Negative start time for ffmpeg to download part of ongoing livestream?

I am running a live stream and I would like to record some key moments using ffmpeg and youtube-dl. I know a key moment has just happened when a certain file is edited by another script of mine. I ...
0
votes
0answers
6 views

installing debian packages programmitically using apt_pkg package (python-apt) [migrated]

I've built some debian packages and put them on my host. I want to install these packages in a python script. So I've written the install function using apt_pkg as follows : #!/usr/bin/env python # -*...
1
vote
0answers
18 views

Changing the TCP Destination address using WinDivert or PyDivert

I'm trying to "route" TCP traffic by using WinDivert to change the Destination Address (and port) of certain outbound traffic. I began with using PyDivert as I am a total and complete programming ...
0
votes
1answer
32 views

How to use return value of a Bash command such as “ifconfig” to be used as an argument for an if statement in Bash script

I'm relatively new to Bash scripting but I'm very familiar with Python and many Bash commands. I was wondering if it's possible to use a command such as ifconfig eno1 and use the output as a condition ...
0
votes
1answer
29 views

Which versions of python do I need to have on my machine

It is known that on Linux I should have python2.x, however to take advantage of the newest features of the language I want to also have and use a new version of python. That makes already two versions ...
0
votes
1answer
20 views

Create thumbnails of video in django using ffmpeg

Currently i am creating a website where users can upload videos and play them back . The video upload method works fine , the problem is i am trying to create a thumbnail for each video . Instead of ...
0
votes
0answers
17 views

Different TLS versions in the ClientHello from the same client

I have a python client. Using ssl.SSLContext() (documentation here) and set_ciphers(myciphers) (where myciphers is my list of ciphersuites that I change with every handshake, i.e., with every socket ...
2
votes
1answer
12 views

How to link python to the manually compiled OpenSSL rather than the system's one

I need to manually compile OpenSSL from source. I use Ubuntu 18. The OpenSSL shipped with Ubuntu 18 does not support specific cipher I need. But it can be enabled if I compile OpenSSL manually. I ...
0
votes
3answers
74 views

Get the list of I-Frames in a video in FFMPEG / Python

I'm trying to select say 10 frames from a given video, possibly with highest variety and scenes. I would like to experiment with various selection scenarios, but the good thing is that the notion of I-...
0
votes
2answers
19 views

cd in parent shell with python script

I want my python program to cd into a directory via terminal as a parent process. Is there any way to do this? I was hoping for something like this: $ ./cd.py Desktop/scripts $ pwd /home/mfto/...
0
votes
2answers
52 views

How to quickly encrypt/decrypt files in folder with python/bash in Ubuntu & Mac?

I would like to use a MSDOS formatted USB disk to be able to safely transfer data between them. Therefore I want to decrypt and encrypt easily all files in a folder (and sub folders), possibly with a ...
1
vote
1answer
25 views

pip does not detect user-installed packages after upgrading system python?

I use Python on my Fedora KDE (x64) PC. I used to have Fedora 25, and I had installed Python 3.5 using sudo dnf install python3 and several packages like numpy and scipy using commands like sudo dnf ...
0
votes
0answers
13 views

Tensorflow error script [migrated]

Here is my file: vim hello.py from sklearn.preprocessing import PolynomialFeatures from sklearn import linear_model X = [[0.44, 0.68], [0.99, 0.23]] vector = [109.85, 155.72] predict= [0.49, 0.18] ...
1
vote
0answers
16 views

RSS parser interacting with another software using Bash or Python

I'm trying to create a program or script (let's call it Worker) running in Linux environment (desirable would be Raspbian or Debian), that collects links from RSS feeds and sends them to another 2 ...
0
votes
1answer
28 views

sudo python vs python

I have an instance in EC2 running Linux. I am trying to use the AWS Python DAX Client. The Dax Client is operating at the TCP level. I am running one of their example sample code https://github.com/...
1
vote
0answers
22 views

script to enable ICS service

I try to build script to select private network and enable part of ICS services. I select the private network with these code: { # Constants $public = 0 $private = 1 Write-Host "Creating netshare ...
0
votes
0answers
15 views

Run OpenCV commands on command Prompt

I am completely new to doing these things, so please bear with me. To learn more about using OpenCV, I installed it with pip for python 3.6.5. This worked fine at first, but eventually, I started ...
0
votes
1answer
18 views

Few queries regarding DNS record management

I recently purchased a domain, karthikts.com(just for example but this is not the actual domain registered) and on the registrar(crazydomains.com) dashboard i could see below configs: I have been ...
0
votes
0answers
18 views

CentOS rc.local python redirect

Scenario is as follows: I need to execute two python scripts on boot, and redirect their stdout and stderr to a file (each script to a file). In /etc/rc.local, I've tried (among plenty others) the ...
0
votes
0answers
333 views

Cannot run lxterminal from LXsession autostart

I'm trying to run a script right after my Raspberry pi's X server is on, because it runs with a GUI. After a lot of search, I found out that I could make a script run in the following file ....
0
votes
0answers
8 views

Preserve file/folder permissions while creating tar and extracting using python

Is there a way to Preserve file/folder permissions while creating and extracting tar file using python.. Many thanks in advance..
0
votes
1answer
19 views

ImportError: No module named _winreg, Installing pypiwin32==219 on MacOS X

I am trying to install pypiwin32==219 in my virtual environment from a requirements.txt file. requirements.txt pypiwin32==219 I have setup a virtualenv denv in which I am working. (denv) Nehas-...
0
votes
0answers
18 views

How to reliably list _http._tcp services over network in windows 10?

I am trying to discover NAO Aldebaran robots over Ethernet+Wifi networks. I have found this python library https://github.com/jstasiak/python-zeroconf that lets me discover _http._tcp services over ...
0
votes
1answer
133 views

Recent brew upgrade breaking vim

This question is closely related to this question where I got a very similar error message when launching vim after doing a brew upgrade: dyld: Library not loaded: /usr/local/opt/python/Frameworks/...
0
votes
0answers
28 views

How to capture python interactive session on command line in windows?

I'd like to "log" all of the text (python shell prompts, my commands, python shell output) that displays on my console window after I start the python shell. I read about powershell's Tee-Object but ...
0
votes
0answers
18 views

Restoring file after zipping, when it become binary [duplicate]

I zip my python file into file.py.gz on Linux. After that my file become something like a binary file. When I am open file with vim, on the bottom was a text " [noeol] [converted]. I want to restore ...
1
vote
0answers
54 views

Can Python Interpreter be run remotely on Windows with PSSession

Running the Python Interpreter on a particular Windows machine locally and remotely using ssh works great. However, Windows does not have a Linux screen equivalent, so I want to switch to using ...
0
votes
0answers
49 views

Automate Plink serial connection

To open Plink using Python in Windows, I use Subprocesss.Popen(). I would like to create a script that interacts with the Plink console, after the opening of the Serial session, by entering the login ...
0
votes
0answers
14 views

pyodbc issue - the session is in the kill state

I have an issue when run python script. I've got this error: pyodbc.Error: ('HY000', u'[HY000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot continue the execution because the session is in ...
0
votes
0answers
23 views

Python package installation

I have been using Python for years, both versions 2.x and 3.x and both are installed on my machine. But I am still unable to install packages properly, this is still black art for me ! When I ...
0
votes
0answers
20 views

how to make vim to have python interactive runtime window

Is it possible to have python live program mode window open in python so we can call program and see the live outcome straightaway instead of jumpout vim to CMD? It is a bit like VisualStudio setup.
1
vote
1answer
26 views

Difficulty importing numpy into python shell after installation

After installing numpy through pip in my command prompt then entering a python shell, I can't import numpy into the shell for use. I've uploaded a picture for reference; I have tried restarting my ...
4
votes
1answer
209 views

Difficulty running pip from command prompt

I'm trying to install numpy on my computer following the instructions here. I've got the command prompt working to find python after adding it to my path and I installed it from python.org which ...
0
votes
2answers
136 views

Adding python to windows path not working

After following the instructions on the answer to this quetion, my computer still doesn't recognize python as an internal or external command, operable program or batch file. I've uploaded a picture ...
2
votes
0answers
52 views

stitch multiple microscope images using python

I'm trying to stitch a scan of a large area made using a microscope but I'm not having a whole lot of luck. I started testing with 3 images extracted from a scanning video. I stitched each 2 matching ...
2
votes
0answers
152 views

How to download all files and folders from artifactory using curl command?

We are using artifactory for uploading and downloading project dependencies. Able to upload the required content using curl script having parameter "--upload-file". Now, I want to download required ...
0
votes
1answer
10 views

Lubuntu; switch between screens on a time loop

Im going to a conference and I want to set my laptop to cycle between the four standard workspaces/screens on an automated time loop. I can do a bit of python, so thats a good answer for me, I guess ...
0
votes
0answers
11 views

How do I set the BEETSDIR environment variable on Windows (for beets)?

The documentation doesn't make this clear. I'd like to change the home directory for my beets library - then use relative paths for the config file. I edited the Windows environment variables with ...
2
votes
1answer
264 views

pip cannot fetch URL because of an error with the SSL certificate

All of a sudden pip, Python's package manager, could no longer install new modules. The problem is fetching the URL and the cause seems to be the SSL certificate. I sort of understand what this means, ...
1
vote
0answers
69 views

MinGW: Python enabled GDB on Windows

I use QtCreator 4.6.2, which apparently requires Python-enabled GDB if I want to use it as a debugger. I tried to install mingw32-gdb-python version 7.5-1 with MinGW installer (graphical interface), ...
0
votes
1answer
105 views

Python version update

I updated the python version on my Dell machine from 2.7.15 to 3.6.5, but after typing python -V I noticed that python is still at version 2.7.15 Here are the lines of code: remus@remus-Inspiron-...
0
votes
1answer
17 views

Error message after upgrading pip

When using pip, I kept getting a message about me using an old version and I could upgrade, so I did: pip install --upgrade pip --user while in my account on a computing cluster. Now when I even ...
0
votes
1answer
50 views

pip command error during installation of requirements.txt

When I run the command py -2.7 -m pip install requirements.txt, I'm getting the error but I have already upgraded it but I'm still getting error in installing requirements.txt. When I use the ...
0
votes
0answers
86 views

need <unrar/dll.hpp> to pip install unrardll on Ubuntu

After upgrading to Ubuntu 18.04, Calibre gives this error when opening a .cbr file: calibre, version 3.21.0 ... File "/usr/lib/calibre/calibre/utils/unrar.py", line 53, in extract from ...
0
votes
1answer
62 views

spaCy English language module not downloading on Ubuntu

I am working on Ubuntu 16.04.I downloaded spaCy using conda and am working on jupyter notebooks. I tried downloading the english module using python -m spacy download en which gave me the following ...
0
votes
1answer
76 views

Sublime Text 3 - sporadic indentation errors on Python files

Sublime Text, build 3175, Macos Every so often I will randomly get an IndentationError: unexpected indent message on a previously working Python file. Inspecting the file in the editor does not ...