Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-4 votes
0 answers
58 views

Unable to install BeautifulSoup4 on Red Hat Linux

When I try to install BeautifulSoup4. I am getting this: $ pip install beautifulsoup4 Collecting beautifulsoup4 Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection ...
asha ganapathy's user avatar
1 vote
0 answers
30 views

simple python lambda sorting gives different results on different devices

this is my python code for apache hive udf: #!/usr/bin/python import sys counter=0 delay={"carrier":0, "nas":0,"weather":0, "security":0, "late_aircraft&...
Reungu Ju's user avatar
0 votes
0 answers
12 views

How can I add timeouts for each iteration inside a python os.walk loop?

I have the following def that stats all the directories on a server: def collectAllDirectories(): fullDirList = [] w = walk(parent_dir, topdown=True) # Get a complelte list of directories ...
Jesse90's user avatar
  • 11
0 votes
0 answers
31 views

How to cd to directory created by os.makedirs

I have a python snippet to create a directory using os.makedirs(). The directory gets created in the path /tmp. However, I am unable to cd to it. When i try to cd in bash it says no such file or ...
Su Fani's user avatar
0 votes
0 answers
31 views

pip reporting erorr Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-QW1_6h/setuptools/ [duplicate]

I am unable to get python pip working by any means. Please find below my commands and the output... subscription-manager repos --enable rhel-server-rhscl-7-rpms yum install python27-python-pip scl ...
learner's user avatar
  • 2,760
1 vote
1 answer
75 views

How can I resolve the '_ctypes' error when importing 'qi' module with Python-SDK for Nao on Linux?

Issues with installing Python-SDK for Nao I have installed python-sdk for the Nao robot in my VM which runs in Linux 5.10.0-20-arm64 #1 SMP Debian 5.10.158-2 (2022-12-13) aarch64 GNU/Linux. I have ...
Sumya Hoque's user avatar
0 votes
1 answer
55 views

Python 2 file.writelines() Unicode gives different results on Windows and Linux

For the same code below: import os filename = "text.txt" data = [ [ u"hello world1", u"hello world2", u"hello world3", ], [ u"...
chewing gum's user avatar
0 votes
1 answer
220 views

Python - How to exit the loop when data pipe has no incoming data?

I have been trying to write a python script that prints the first 10 lines of the CAN Bus data that is coming from a data pipe. The code works well when there is data in the pipe, but doesn't break ...
Suprava's user avatar
  • 91
0 votes
3 answers
4k views

How to use python module in termux

How can I install python module in our android linux environment Termux. If you anyone have Idea about this topic let me know I think I can solve my problem from here
Lahcsin Ayrahca's user avatar
0 votes
1 answer
487 views

How to wait until a certain output (string) occurs while executing subprocess.check_output?

I am trying to write a Python script which will download my software build. So the script will wait until certain output occurs and proceed for the next task: import os import subprocess out = ...
sbehera's user avatar
1 vote
1 answer
374 views

How to find if a network interface is using dhcp/static ip without relying on sh (e.g. `ip route`) using python?

I currently need to find out if any network interface (on RHEL) is configured to use dynamic IP (DHCP) using python (python2 preferably, but if there's a solution using python3, I'd like to hear it). ...
Paiusco's user avatar
  • 359
0 votes
2 answers
276 views

when I execute Linux split file command from Python , Files got split, but data being trucated

I am trying to execute Linux file Split command based on number of lines from Python. Below is the code cmd = 'split -a 4 --verbose --lines 1000 --additional-suffix=.csv master.csv split_file_' p = ...
chandramohan's user avatar
0 votes
0 answers
70 views

Python: How to Set Default Permissions for Created Files and Directories

We've been working in a RedHat 7.9 Linux environment with a Python 2.7 script that writes data to files in a directory structure. The directories and files created by the script in this environment ...
George Hernando's user avatar
0 votes
1 answer
177 views

Why python2 is working on xampp server and python3 not working?

I tried to use python on xampp server but it is not working It gives some server error message enter image description here Erreur du serveur! Le serveur a été victime d'une erreur interne et n'a pas ...
Soufiane amimi's user avatar
1 vote
1 answer
42 views

"methods inside method" - class python2

I have this situation: class ROUTER: ... def utils(self): def update(..) ... def reboot(..) ... and I would like to invoke the sub methods of utils like this: a=ROUTER() a.utils....
vincenzogianfelice's user avatar

15 30 50 per page
1
2 3 4 5
64