Python is a dynamically and strongly typed programming language that encourages readability.
Questions tagged [python]
1761 questions
5
votes
3 answers
Compile Python 3.1.1 with --enable-shared
This is a two pronged question... The context of the question is getting a good Python 3.1.1 build to use with building and running mod_wsgi. See this document for more information on why a shared library is a good idea.
What are the ramifications…
gahooa
- 266
4
votes
2 answers
How To Manage Python In a Restricted Environment?
The Need:
Support several hundred Python developers and/or prod servers running Python code in a highly restrictive environment.
Be able to provide any compatible module found in PyPi.org that a developer needs.
Environment:
No external access.…
Ifrit
- 143
4
votes
1 answer
Installation Python 3.6.x on Windows using command line installer (without GUI)
I need to installed Python 3.6.x on Windows as part of an automated process without user-interaction. Recently Python releases provided MSI files for installation using the "msiexec" utility however there are no more MSI release files available for…
Jens
- 41
3
votes
2 answers
Crossplatform way to check admin rights in python script?
Is it any cross-platform way to check that my python script is executed under admin rights? Unfortunately, os.getuid() is UNIX-only and is not available under windows :(.
grigoryvp
- 3,795
2
votes
1 answer
Get pyenv working for a specific directory
In my ~ directory, typing "python" will start, well, python.
However, in my /usr/python/cgi-bin directory, typing python gets me an error message
pyenv: python3: command not found
The `python3' command exists in these Python versions:
…
bharal
- 133
- 1
- 7
2
votes
1 answer
Beginner, trying to setup Python
I'm a PHP programmer, but I want to learn Python. I'm a bit confused with how to actually execute a script. I've created test.py in my web server root, in the file I've written:
#!/usr/bin/python
import jon.cgi as cgi
import jon.fcgi as fcgi
print…
amba88
- 513
1
vote
0 answers
“[Errno 13] Permission denied” in mailman mailing lists after upgrade to 2.1.29-6 in Fedora 30
I've seen several suggestions to fix this including one here on SE.
Does mailman 2.1 now need to run as the same user as Apache runs? In our case httpd runs as the user ‘apache’ and mailman runs as ‘mailman’. I reinstalled mailman and no difference.…
RobbieTheK
- 400
1
vote
2 answers
Confusing Python version
On my Mac OS X Lion, I type the following in Terminal:
hobbes3@hobbes3:~$ which python
/usr/local/bin/python
hobbes3@hobbes3:~$ python
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build…
hobbes3
- 635
1
vote
1 answer
mac ports python32 tkinter module not loading
not able to launch my python script. It is complaining that Tkinter module is nowhere to be found....
Uhm, what am I missing?
from Tkinter import *
ImportError: No module named Tkinter
$ sudo port installed | grep py
py32-tkinter @3.2.2_0…
CMag
- 707
1
vote
3 answers
upgrading python
My dedicated server is centos with Cpanel. I need to upgrade python for eyeD3 program. How do I upgrade to latest python stable? From cPanel or SSH?
Utku Dalmaz
- 1,369
- 2
- 14
- 18
1
vote
2 answers
multiple portion selection of a string in python
I have a log file as below:
12-02-2022 15:18:22 +0330 SOCK5.6699 00000 user144 97.251.107.125:38605 1.1.1.1:443 51766 169369 0 CONNECT 1.1.1.1:443
12-02-2022 15:18:27 +0330 SOCK5.6699 00094 user156 32.99.193.2:51242 1.1.1.1:443 715 388 0 CONNECT…
Zareh Kasparian
- 765
0
votes
2 answers
python regex to exclude multiple words
I need to parse a file like this:
Nmap scan report for pc15393.foster.xxx.com (192.168.2.211)
Nmap scan report for lab-776.foster.xxx.com (192.168.2.212)
Nmap scan report for 78T458Y.foster.xxx.com (192.168.2.213)
I'd like to get rid of "Nmap scan…
knud
- 1
0
votes
1 answer
Can not import random with python2
In Python 2 I can not import random. The error indicates an OS function is not implemented, but it does list the function.
The OS is Arch Linux on kernel 3.14.79-1-ARCH and the server is arm based cubox-i.
# python2
Python 2.7.13 (default, Apr 24…
user192749
- 391
0
votes
2 answers
Python ssh user validation
4:15 PM (3 minutes ago)
Hello,
Im wondering if there is a way without using send_pexpect to validate a host. I have hundreds of IPs where i need to validate if my tacacs username is valid and if not then to expect a comment. The issue im running…
D' go
- 1
0
votes
1 answer
linkchecker: 100% first core, 0% on all others
I have an ecommerce site which I'd like to check the links to. There's a few factors that make the check complex:
filter navigation
a large main menu included in every page (>500 links)
So far, every checker I used couldn't cope with the scope of…
Dabu
- 359