Python is a dynamically and strongly typed programming language that encourages readability.

learn more… | top users | synonyms

-6
votes
2answers
118 views

How to get public/private key from cacert.pem [closed]

i has download cacert.pem from internet, but how to get cacert.key ? How to get public/private key from cacert.pem ?
-1
votes
1answer
46 views

Frozen exe crashes in System Center Configuration Manager 2007

We are using SCCM 2007 to deploy a custom script (written in Python) which upgrades some software and performs additional configuration on client machines. The script is frozen into an exe using ...
3
votes
1answer
518 views

Serving django with nginx and uWSGI

I followed this post to serve my django project. The project runs well with manage.py runserver and I want to set it up for production. Here are my setting files: nginx.conf: upstream django { ...
0
votes
2answers
284 views

fail2ban error about python?

I have just installed fail2ban on my debian7 machine but whenever i start it i get a lot of error which seems to be about python? [....] Restarting authentication failure monitor: fail2banTraceback ...
2
votes
2answers
902 views

How do I authenticate a user on specific tasks using Ansible?

I'm getting 'msg: Failed to lock apt for exclusive operation' when trying to install some dependencies in a playbook using apt, with the vagrant user. I'm suspecting it tells me this because it can't ...
0
votes
2answers
567 views

fabric how to define complex env.hosts

i am working on Fabric for my deploying tools and also distribute the command on multiple hosts. but i don't know how can define a complex hosts in my fabfile.py for example: i have 4 servers. ...
0
votes
1answer
715 views

Python script to send mail through Amazon SES

I'm setting up Splunk to send e-mails through Amazon SES. But before doing this, I found a Python script (Splunk uses Python to send the mails) that I wanted to test which is not working on my Linux ...
0
votes
1answer
184 views

PAM exec stdout issue

I am having an issue with a dead simple python script; called with pam_exec. I added a line at the end of that file /etc/pam.d/common-session : session optional pam_exec.so /bin/python ...
2
votes
1answer
322 views

Running multiple Django projects within Apache, sys.path being over written

I have been trying to research how to do a multiple Python / Django deployment using Apache VirtualHosts. The issue I am encountering seems straight forward, ImportError: Could not import settings ...
3
votes
1answer
34 views

Being notified when Python security updates are made

I maintain a few Python-based web apps. I need to be notified immediately when new Python releases are made, especially micro level releases that fix security issues, so I could update my sites to use ...
0
votes
1answer
88 views

WMS Service Tilecache Python 403 error

I´m trying to migrate a Webserver + Mapserver to a new Ubuntu 12.04 machine. Everythings (apache2, mapserver 6.2.1 ) working so far, except a tilecached wms service (tilecache 2.11-2 is installed) ...
0
votes
2answers
446 views

How to kill the process using the name of the program instead of PID?

I started my Python program in the background using nohup as mentioned below - nohup zook.py & Now I am trying to kill this process so I did the ps command as mentioned below ...
1
vote
1answer
244 views

Django WSGI application in a subdirectory?

Recently, I wanted to put one of my WSGI applications into a subdirectory, so that the other directories that cointain various scripts would work as before. In order to do that, I added the following ...
0
votes
0answers
87 views

utcoffset drift with celery

I have quite a problem with celery on my distribted system. I have couple of machines among different localizations and I've got a lot of warnings in my log files like: "Substantial drift from ...
0
votes
1answer
176 views

Puppet Init VirtualEnv Just Once

So here's a snippet from my manifest (based on this module: https://github.com/stankevich/puppet-python): python::virtualenv { $virtualenv_dir: ensure => present, version => 'system', ...
0
votes
2answers
607 views

how to test as local SYSTEM account? (accessing remote files from Python)

I'm trying to access some remote files from a web application server. Let's call them servers M and R. Both are running Windows Server (2008 and 2003). The remote files are on server R on a file ...
2
votes
2answers
2k views

Should I install Ansible with python pip or homebrew on Mac OSX Mavericks? [closed]

I recently moved to using OSX to administrate my linux box, so I'm very new to using linux programs on OSX. I want to use Vagrant with Ansible to bootstrap my development environment, so I need to ...
1
vote
1answer
213 views

Trying to run gunicorn from supervisor gives error - error: class uri 'simple' invalid or not found

I am already running successfully 2 django projects (in same virtualenv with python 2.7) with Django + gunicorn + virtualenv + Supervisord environment. But now i am trying to run another project in ...
4
votes
4answers
638 views

Telnet connection to an AS400 system via telnetlib (Python)

I use telnetlib - Python - to create a telnet client - port 23 - to communicate with an AS/400 server. communication with the telnet command that is no problem, but with telnetlib I do not get any ...
2
votes
1answer
741 views

Run python script inside /etc/rc.local doesn't work

I modified /etc/rc.local on my Amazon AWS AMI #!/bin/sh touch /var/lock/subsys/local # setup hostname properly /usr/bin/python /root/automation/initSystem.py so last line calls Python script that ...
1
vote
1answer
835 views

Django doesn't find CSS files for admin pages using uWSGI

Even if I followed the official instructions, when I start a Django test site using uWSGI, CSS files for the admin interface are not loaded. If I open the URL of a CSS file, for example ...
0
votes
2answers
327 views

pipe raw email message to python script

In exim4, I use following pipe to send a message to a python script, process it, and upload it to django: send_to_django_mailbox: driver = pipe command = /usr/local/bin/python ...
0
votes
1answer
762 views

How to use a different version of python duing NPM install?

Salam (means Hello) :) I have terminal access to a VPS running centos 5.9 and default python 2.4.3 installed. I also installed python 2.7.3 via these commands: (I used make altinstall instead of make ...
1
vote
0answers
290 views

Ubuntu Locales Incorrect for Python Application

I have a NGINX -> UWSGI -> Django(python) stack installed on an Ubuntu AMI on Amazon EC2. I've run into a problem when accessing a file with unicode characters in the name. The exact output from the ...
-1
votes
2answers
84 views

Python script to log name, date, and command of every command users have entered

I want to create a script, possibly in python, open to suggestions, it logs every command typed on the server. so it would log, user, timestamp and command. Is this possible?
0
votes
0answers
541 views

uwsgi Import Error: No module named 'encodings'

I'm trying to setup flask with uwsgi. This is my directory structure: /srv/http/www/myapp | +-- env -> virtualenv | +-- mpd -> the project directory | +-- main.py -> main application ...
0
votes
0answers
113 views

How to use cmd_yaml in external pillar

I'm trying to figure out how to use external pillars in SaltStack. I've added the following lines to /etc/salt/master: ext_pillar: - cmd_yaml: cat /srv/mysql.sls The file /srv/mysql.sls has the ...
0
votes
0answers
70 views

Is there any way to 'describe-instances' for another AWS account from awscli?

I've added a role to allow another account to list instances, but there doesn't appear to be any option to choose which account I'm listing instances from. Is there some undocumented option to pass in ...
0
votes
1answer
88 views

Installing pip to a custom location

I am a little bit stuck when it comes to installing pip. Securely download get-pip.py. [2] Then run the following (which may require administrator access), to install (or upgrade to) the latest ...
0
votes
1answer
176 views

Installing PIP on debain - Unknown command pip

I'm having a bit of a hard time installing PIP on a debian linux machine. This is the code I am using in a shell script: # Install setuptools python -c 'import setuptools' > /dev/null 2>&1 ...
6
votes
1answer
689 views

Active Directory 2012 LDAP Integration Service Principal Name Entry is Disappearing?

Creating Python Service to Query AD Attributes I'm integrating our AD with web services running Python on linux using Python-LDAP over SASL(DIGEST-MD5) to query AD 2012 user attributes (division, ...
-2
votes
1answer
103 views

Python's 3.4a LEFOVERS [closed]

root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a ...
0
votes
0answers
69 views

How do I get debug symbols for the Python 2.7.5 executable installed from the “python-2.7_1,2” port?

I have a runaway process to debug. The problem only manifests on two FreeBSD 9.1 servers I'm using. I have a core file that might contain useful information. My first two thoughts were to attach to ...
-1
votes
1answer
1k views

python pip installation under CentOS 6.4

Will someone please tell me how to install pip My website is not working because modules are missing and the only way I can install them is by installing python's module manager pip yum install ...
3
votes
2answers
161 views

Managing Python versions with environment-modules

I'm trying to configure a RHEL6 server to allow multiple users to run multiple versions of Python, multiple versions of various python modules, and multiple versions of various other programs (e.g. ...
0
votes
0answers
235 views

Using Charles to sniff http traffic from reverse proxy on localhost

I have a django app running on my localhost which sends requests to a 3rd party server. I'm try to send a multipart form to the 3rd party but the request always fails. I presume it is because the ...
0
votes
2answers
181 views

Running python script in incrontab in Debian

I have a user, dropbox, that runs the Dropbox daemon, I want to monitor the directories in the Dropbox directory for new files and run a python script when they appear. I have the python script that ...
0
votes
1answer
174 views

How to have PHP and mod_wsgi python app on the same domain?

I am using apache with mod_wsgi (python3) on ubuntu 12.04. I have a python app (bottle) which is at www.mysite.com/ In my python app I have routes like www.mysite.com/abbb?q=blab I would like a ...
0
votes
1answer
360 views

How do I tell if a Python pip install is working correctly or hanging?

I am trying to install the python pandas package in a virtualenv using pip. On my development machine it installed correctly, but now I am trying on the server, it gets so far then it seems to get ...
0
votes
1answer
36 views

Pip timeouts with host reset mesage every time under VirtualBox [closed]

When trying to install requirements.txt (or anything else for the matter), pip just time-outs every time with host reset message. This happens only under VirtualBox (guest CentOS 6.4 64-bit, host ...
1
vote
5answers
259 views

How to start process as a daemon?

I have created a service which consists of a web fronted (nginx), python runner glue handler (uwsgi) and my own python code (fetcher). I have made a script (deploy.sh) to start the difference ...
0
votes
2answers
100 views

How to choose a web server for a Python application? [closed]

Information and prerequisites: I have a project which is, at its core, a basic CRUD application. It doesn't have long running background processes which it forks at the beginning and talks to later ...
0
votes
0answers
98 views

Ubuntu 12.04 64-bit virtualenv memory limit

We have a server running 64-bit Ubuntu 12.04, which is serving a django application running under virtual environment, along with a celery worker. The problem is no process in the server uses more ...
0
votes
0answers
47 views

Running two different versions of the same django code using Apache named virtual hosts

We have a machine running Apache2 that we would like to use for trying out different branches for our Django code. For instance, accessing sitea.example.com should server branch sitea, while ...
1
vote
1answer
281 views

Sending email with Python/Django through Microsoft Exchange (IMAP)

I have a Django web application which sends email through a standard SMTP, but I want it to use a mailbox from the corporate Exchange server. I would like the emails sent from the application to be ...
-1
votes
1answer
916 views

Permission denied error while creating files from a python script using mod_wsgi on apache

I'm running a python script under mod_wsgi on apache. The script attempts to create some files under a directory. The path of that directory is defined by this variable named tmpdir in the script. ...
0
votes
0answers
31 views

Communication between different servers

I have a dynamic site which has a database and a static file generator. I now want to detach the static file generator from the dynamic site and host it on a different server. The issue is I still ...
1
vote
0answers
167 views

How to tell uWSGI to prefer processes to threads for load balancing

I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all ...
1
vote
0answers
382 views

mod_wsgi ImportError with a flask app

I'm trying to deploy a Flask app using apache and mod_wsgi. I've been following the directions here. The simple hello-world example that is on that site works perfectly. When I try to substitute my ...
2
votes
1answer
495 views

Bottle.py app can't be found by nginx+uwsgi

I have a Python 3 bottle.py app that I install into a virtual environment (letting pip automatically fetch dependencies). I'm trying to get it to run under nginx and uwsgi on my raspberry pi. When I ...