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) instead.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Sort Bullet list alphabetically, maintaining formatting in Notepad++

Hello I am trying to sort lists alphabetically that contain entries separated by • and I need it to maintain formatting. I am using Notepad++ and can also use Python Script (Plugin). Example source: |[...
0
votes
0answers
6 views

I can see a package when I log in as the sudo user but not for a non-sudo user, how do I fix it?

I guess I've installed a python package on my Ubuntu 18.04. $ pip3 install flask ... Installing collected packages: MarkupSafe, Jinja2, Werkzeug, click, itsdangerous, flask Successfully installed ...
-1
votes
0answers
13 views

How can I expand timestamp into rows and columns?

I have a spreadsheet that looks like that I need to make each day a column and each row a minute of the day ranging from 00:00 to 23:59 This is a sample of the I extracted time and date and made a ...
0
votes
0answers
8 views

What tests can I run to test the integrity and consistency of a Python installation?

I'm preparing to pitch an upgrade of the Python interpreter on my client's IBM AIX machines, since the current installation is severely obsolete (v2.5). I'll have to use the AIX tool installp to ...
-3
votes
1answer
7 views

Unable to install pyinstaller using the pip command

Error output: pip install pyinstaller installing build dependencies Collecting wheel Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by '...
0
votes
0answers
13 views

Gpu not working in jupyterlab after reinstalling anaconda and VStudio , cuda

I have last version of anaconda, jupyterlab I installed visual studio community (desktop development with c++) I installed cuda_11.3.0_win10 I copy files of cudnn-11.3-windows to its places Gpu is not ...
0
votes
0answers
5 views

Issue with converting array or string to valid path [migrated]

I'm trying to make a function that will make my life easier converting images to pdf. I'm using img2pdf which is a Python script. I want to be able to pass files and directory to my function (with ...
0
votes
0answers
23 views

Find a string for which hash() starts with 0000 [migrated]

I've got a task from my professor and unfortunately I'm really confused. The task: Find a string D1 for which hash(D1) contains 4 first bytes equal 0. So it should look like "0000....." As I ...
0
votes
0answers
10 views

Python, webkit2 gtk - how to use a proxy in webkit within a python program [migrated]

This is a what I have until now for a simple web browser Now I want the page to be loaded using a proxy. I checked https://webkitgtk.org/reference/webkit2gtk/unstable/WebKitWebContext.html#webkit-web-...
0
votes
0answers
12 views

IndexError: list assignment index out of range in Python [migrated]

I'm trying to implement stack operations: If I try to avoid .append() and use self.size for indexing and returning the size instead of using len(self.stack) it's throwing this: Traceback (most recent ...
-2
votes
0answers
9 views

Track change in html elements using selenium [closed]

from selenium import webdriver from time import sleep username = "" password = "" url="" chrome_options = webdriver.ChromeOptions() chrome_options....
0
votes
0answers
11 views

How to repeat python lines for running commands? [migrated]

I'm beginner on python, and i tried to repeat my python command from line 3 until line 7 on this code print("Hello") print("World") print("Foo") print("Foo") ...
0
votes
0answers
4 views

Error in scapy python Debian [migrated]

Good afternoon, I created a simple sniffer on Debian but I can't run it. from scapy.all import * counter = 0 def analysis(pkt): global counter print(counter, ": Ethernet") print(&...
0
votes
0answers
10 views

Data Flags…TC in Wireshark

Currently I am working on 802.11 Packet Extraction using scapy in python. I found strange character showing with the "IEEE 802.11 Data, Flags......TC" from Wireshark UDP packet. Can anyone ...
0
votes
0answers
9 views

Python virtual environment has gone all weird

I just activated a VE which I have been using for about a week now. The System version is 3.9.4. OS: W10. When I then run a script (in a command prompt window) using this command: (doc_processing) D:\...
0
votes
0answers
38 views

How much memory does a 347 digit int take up? [migrated]

If I have a int in python equal to 2**1150 or ...
0
votes
0answers
10 views

Why the request from .NET MVC does not work? [migrated]

I am working on machine learning web application for disease prediction with flask. Also, I'm using C# .NET MVC platform for the web development. Now I am trying to send values to my flask and get a ...
0
votes
0answers
12 views

How to do two tasks at the same time in python [migrated]

I wanted to do two tasks together I tried import mulitprocessing multiprocessing.Process(target=print('hi') , args=(i,) , target=print('hello'),args=('hello') But it did not work. Any solutions?
0
votes
0answers
5 views

Integrating lists into Python/Selenium [migrated]

What I am trying do is use a web page to create art template files so I don't have to do it manually. The web page is hosted on our private domain so you can only access it through a computer on the ...
0
votes
0answers
7 views

Parse PE file using python 'pefile' module [migrated]

I am new to Python. I am using python 'pefile' module to parse a PE file. Need guidance on how to print the relocation & resources values contained in the PE file. My code: import pefile pe=...
0
votes
0answers
15 views

Nvida Incompatible Cuda Version

I am currently running the PixPro neural network: https://github.com/zdaxie/PixPro I am running into strange version compatibility issues with Nvidia Apex and Cuda. Since I am running on Google Colab, ...
0
votes
0answers
64 views

“Select Python Interpreter” button not showing (Pycharm)

In one of my PyCharm projects, it doesn't show the "Select Python interpreter" button on the lower right-hand side. Here is how it's supposed to be: However, it's not there. I need it to ...
0
votes
1answer
22 views

How to install python2 packages using pip while having python3?

I am on Parrot OS. I have both python 2 and Python 3 installed. ┌─[✗]─[jaysmito@parrot]─[~/] └──╼ $python --version Python 3.9.2 ┌─[jaysmito@parrot]─[~/] └──╼ $python2 --version Python 2.7.18 And pip:...
0
votes
0answers
26 views

Why does a finished python script still blocks memory?

I'm running a python3 script that is performing a lot of in-memory operations, thus using a lot of RAM. My machine has 256GB of RAM. I noticed, that even my script finishes (the program get's to the ...
0
votes
1answer
24 views

Different Imphash for same PE file

I am analyzing a windows executable (C:\Windows\System32\xcopy.exe). The Imphash value calculated with Python is different from the one shown with PE studio. How can Imphash for a same file be ...
0
votes
0answers
16 views

'ls' is not showing any files but on opening one of the files with vi editor , ls starts working again

On doing an ls inside my docker container on '/usr/lib64/python3.6/xml/parsers/' I am getting empty result, however the files are readable, I am able to display their contents Files that are supposed ...
0
votes
0answers
14 views

Netmiko - handling confirmation from Cisco

I just start using netmiko and have a problem with one script. The script should delete a user and create another one in Cisco device. The problem that I have is with confirmation in configuration ...
0
votes
1answer
14 views

Install OpenDR in CentOS 7 for native Python 3 (not Anaconda Python)

The following command didn't work. Could you please guide me on how to fix it? $ pip install opendr Collecting opendr Downloading opendr-0.78.tar.gz (581 kB) |████████████████████████████████| ...
0
votes
0answers
5 views

Calculate the sum of a list in python [migrated]

I try to make this calculation quite simple 1^2 + 2^2 + 3^2 + 6^2 = 12 But I can't find the right function. I tried to do it with sum av = [1,2,3,6] print(sum(av)**2) But the result is not good ...
1
vote
1answer
41 views

Pip3 not working at all

So a couple days ago, I had a problem where pip3 just stopped working. I was planning on upgrading my WSL2 anyway, so I just migrated to Ubuntu 20. But the same problem has occurred here too! I can't ...
0
votes
1answer
20 views

Python, Eclipse or Windows 10 won't recognize matplotlib

I'm using Eclipse on Windows 10. I would like to make a function plotter so I started a program as import tkinter from matplotlib.backends.backend_tkagg import ( FigureCanvasTkAgg, ...
1
vote
1answer
23 views

Latex Doesn't Render Properly on Windows 10 But Does on Linux

I installed MikTex on Windows 10 (basic-miktex-2.9.6520-x64.exe) and ghostscript (gs922w64.exe), and I am using "latex2svg.py." I'm wanting to generate SVG files from Python. This is the ...
0
votes
0answers
16 views

How to keep three cards on the same line in bootstrap-5? [migrated]

I have a Django template for loop, which loops over the first three cards in the database. But they aren't staying on the same line. Only 2 of them are, but I want three cards on the same line. <...
0
votes
0answers
12 views

Removing an attached application from ConEmu/undoing “Attach to…”

I just started using ConEmu as I liked the tabbed feature (sometimes I hate having a python CLI and CMD and R and git and whatever else all open in their own windows - gets tricky to immediately ...
2
votes
1answer
57 views

Start Python script with Task Scheduler via PowerShell

With PowerShell, I want to create a new task that starts a Python script: Setting it this way via the GUI Task Scheduler works, but in my PowerShell code below, I don't know how to specify the "...
1
vote
0answers
32 views

Text categorization. How to count word occurrences in Excel? [closed]

I have excel sheets that contain written reviews of apartment complexes. Currently my team and I go through the reviews by hand and color code sentences by certain complaint categories. Ex. Noise, ...
1
vote
1answer
59 views

YouCompleteMe unavailable: requires Vim compiled with Python (2.7.1+ or 3.4+) support. Press ENTER or type command to continue

I was editing my vimrc but after I had added tabnine (or I don't know is that's the problem), it shows this message every time I open a file with vim. The vim version is 8.1 and I'm on Linux. This is ...
0
votes
0answers
22 views

How to append time of creation to a file and to all WikiLinks instances where appear inside a text?

I'm using Obsidian as a zettlekasten app. I have a vault of 1000+ .md files with my notes. Some of them are linked inside other notes via wiki links. I want to change all my .md file's name by ...
0
votes
0answers
23 views

How to properly upgrade gcc on Centos 7?

I did this to upgrade gcc from 4.8.5 to gcc 7: sudo yum install centos-release-scl sudo yum install devtoolset-7-gcc* source /opt/rh/devtoolset-7/enable This does give me the gcc 7 in the current ...
0
votes
0answers
7 views

pivot table not working as expected when the dataset contains NaN values

I am fairly new to using Python but am scratching my head with this probably simple problem. I have used the below dataframe as an example , I have changed Jane's age to a NaN value as below to create ...
1
vote
0answers
40 views

Word replacement between symbols

I have a translation file that looks like this: Apple=Apfel Banana=Banane Cherry=Kirsche Train=Zug ...500+ more lines like that now I have a file I need to work on with text. Only certain parts of ...
1
vote
0answers
25 views

“python” typed in powershell does not work although it is in the PATH [duplicate]

I'm trying to add python to my PATH to use it in the powershell. C:\Users\<user>\AppData\Local\Programs\Python\Python39\python.exe is in the PATH. I removed the alias that triggered the ...
0
votes
0answers
20 views

TaskScheduler failure - should I be surprised?

Yesterday I spent several hours of my life which I'll never recover finding that, to my great surprise, W10 TaskScheduler is, apparently, crap. I had two repeating tasks, both intended to do backups ...
1
vote
1answer
238 views

Ansible - Python - Docker: Module not found docker / docker-py — WHY No module found error is coming in Python prompt and in Ansible

Ansible 2.8.3 When I run my playbook, I see the following error. TASK [deployer_role : Creating network] ************************************************************************************************...
0
votes
2answers
13 views

Ansible Run Analysis tool :Exception during the install of mysqlclient using pip3

I want to use a mysql engine/database with ARA instead of the default sqlite engine that comes with the tool in order to have a more robust engine for multiple entries but I am facing an issue that ...
0
votes
0answers
14 views

python 2 sh 1.11 and sh from 1.12 to 1.14 fileno error

I am working with sh in python 2, the script works well when the version of sh is 1.11 but when upgrading the version to 1.12 and above an error occurs while running the program. The error is: ...
0
votes
0answers
11 views

How to start multiple file on a directory with screen?

I have a directory where I have 10 .py files. In future I may have more. And structure is like file.py another_file.py yet_another_file.py Now I want to start each file in a different screen, but ...
0
votes
1answer
18 views

error while Changing the mac address using a python script

getting errors while executing the program #!/usr/bin/env python import subprocess subprocess.call("ifconfig wlan0 down", shell=True) subprocess.call("ifconfig wlan0 hw ether 00:11:22:...
0
votes
0answers
18 views

Can't mount config partition on QNAP TS-431K

I asked this question over at StackOverflow and have been advised to better put it in here. I recently bought a QNAP TS-431K NAS, installed 4 harddisks and set it up as a RAID. Then I configured the ...
0
votes
2answers
44 views

I can't install Pygame Zero or Pygame library

I am using Windows 10 and have version 3.9.2 of Python. I tried using the command: pip install pygame and trying the command: pip install pgzero I get the following message back at the Command prompt: ...

1
2 3 4 5
58