Python is a dynamically and strongly typed programming language that encourages readability.
Questions tagged [python]
1743 questions
17
votes
6 answers
IO Wait causing so much slowdown (EXT4 JDB2 at 99% IO ) During Mysql Commit
I am writing an indexer, using python, which indexes documents and insert them into Database, Before it was single process but now i made it to multiprocessing with 4 parallel processes running.After every text extraction , it insert into database…

Phyo Arkar Lwin
- 345
- 1
- 4
- 10
17
votes
2 answers
How to run php with SimpleHTTPServer?
I just found this awesome tip in the Apple SE:
Start a quick webserver from any directory:
python -m SimpleHTTPServer 8000
Is there a way to have this parse php scripts, or is this for html-only sites?

eykanal
- 335
- 1
- 2
- 13
16
votes
1 answer
Are Elastic Beanstalk's environment variables an appropriate place to store secret values?
I have deployed my Django application to Elastic Beanstalk with the intention of using its environment variable configuration interface to store my API keys instead of storing them in my source (as described here…

M. Keller
- 163
- 1
- 4
15
votes
2 answers
Not seeing Django logs on Heroku
I'm not seeing log entries (at a level of INFO) made by Django in my Heroku logs.
This is my configuration:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()':…

Ram Rachum
- 5,231
- 7
- 34
- 46
15
votes
1 answer
Is virtualenv suitable for a production server?
I'm planning to set up a Python app (Pyblosxom) on my server and considering to run it in its own virtualenv sandbox with --no-site-packages. I'm hoping that such a setup would be easily portable and maintainable over the years.
However, I've only…

gnufs
- 161
- 1
- 6
15
votes
3 answers
check admin rights inside python script
How to check that my python script is running under Administrator rights (sudo) under BSD-like OS? Need to display user-friendly warning in order it is executed without admin rights.

grigoryvp
- 3,655
- 11
- 39
- 59
14
votes
2 answers
how to do a graceful uwsgi reload via bash script?
I have a django application which is executing a bash script.
I require the nginx server to restart so I run /etc/init.d/nginx reload which works great. I have been using restart uwsgi for uwsgi but I need to do a graceful reload instead of a hard…

darren
- 243
- 1
- 2
- 7
14
votes
15 answers
Python Hosting
I would love to start learning python by setting up a little website, and for that I need hosting. What should I look for in a hosting provider to be sure I can use python?
EDIT:
to be complete: I don't want a list of hosting companies, but I want…
Fortega
13
votes
5 answers
How to connect to AWS ECR using python docker-py
When running from the command line, to pull from a specific registry I can run these commands:
dockerCommand=$("aws ecr get-login --profile profileName --region us-west-2")
$dockerCommand (which looks like docker login -u AWS -p ..longPassword.. -e…

efreedom
- 371
- 1
- 3
- 9
13
votes
2 answers
Deploying CherryPy apps: Standalone, WSGI Server or NGinx?
I intend to use a single VPS to deploy multiple low-traffic CherryPy apps as subdirectories; eg: example.com/app1, example.com/app2, etc.
After researching on WSGI deployment, it looks like the preferred method for deploying apps is to use a WSGI…

Stephen Malone
- 133
- 1
- 6
13
votes
8 answers
PIP not installing to virtualenv directory
I am attempting to install django to a virtualenv that already exists.
Following the instructions listed on the pip-install website here, I ran the following from SSH.
name@server:~$ . myenv.env/bin/activate
(myenv.env)nam@server:~$ pip install…

Leah Sapan
- 189
- 1
- 2
- 15
13
votes
6 answers
Python 3.0 RPMs for CentOS 5 (RHEL 5)
Where is the best repository you use to obtain RPMs for Python 3.0 which are well maintained?

Jonathan Prior
- 257
- 1
- 5
- 12
12
votes
1 answer
Accidentally deleted python and yum is not working in centos7
I am new to linux and was trying to delete python so I can install it from scratch. Instead of deleting only the python files in /usr/local/bin/ I also deleted…

jdhash
- 121
- 1
- 1
- 3
12
votes
3 answers
Different Python versions under the same uwsgi Emperor?
I'm running an uwsgi Emperor with various Vassals that each serve a specific Python app from a different virtualenv. Since uwsgi was compiled with it's own Python 2.7 interpreter, trying to use a virtualenv with Python 3 in it produces the following…

Jaap Joris Vens
- 601
- 3
- 8
- 20
12
votes
1 answer
How to undo "yum remove python"
I have a Centos 6 based VPS with an ssh connection. Recently wanting to install python 2.7.2, I bravely ran:
yum remove python
which apparently removed yum itself being written or depends on python.
Now I don't know what to do and to make matters…

Rabih Kodeih
- 261
- 2
- 3
- 9