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

learn more… | top users | synonyms

0
votes
1answer
456 views

centos 6.4 - django deploy with apache and mod_wsgi

I'm trying to deploy on a VM with centos 6.4 a basic django project with apache and mod_wsgi. This is the project tree: myproj/ ├── manage.py ├── myapp │   ├── __init__.py │   ├── models.py │   ├── ...
0
votes
4answers
2k views

Python-devel for python 2.7 on CentOS 6.4

Ok, i want to run django web-application on production VPS. Operation system of the VPS is CentOS. Application code written on Python 2.7. I have already installed Python 2.7 with configured virtual ...
0
votes
0answers
237 views

is there a way to get PSEXEC to output the results of python

The situation: I am running psexec.exe from one windows machine to another and would like to run a python script on the remote machine and look at the output of the script without having to pipe it ...
0
votes
1answer
35 views

Python app with wsgi apache2 returns *.py file content

I have a small Flask app that I managed to get running using apache2 and mod-wsgi. I set it up to run on a subdomain like test.example.com The app is in /var/www/flasktest . Now if I go to ...
0
votes
2answers
171 views

How to run python script which required root privilage for execution in apache with mod_python at openbsd

I am trying to run python script in Apache 2.x with mod_python. I edited httpd.conf with publisher LoadModule python_module /usr/local/apache2/modules/mod_python.so <Directory ...
1
vote
1answer
102 views

how to understand what Apache is busy with?

I have Apache on a Linux server, and a Python script inside it (Trac, to be more specific). With a minimum traffic it consumes 99% of CPU and load average is above 3.00. Is it possible to understand ...
1
vote
3answers
902 views

How to connect remote windows machine from linux terminal?

I want to execute windows command on remote windows machine from linux terminal.
0
votes
1answer
354 views

OpenStack over NGINX+uWSGI

Following this not so popular question: OpenStack & NGINX+uWSGI I've start to build my dashboard node using well... NGINX and uWSGI of course, but I'm now facing a path problem. Indeed, uWSGI is ...
0
votes
1answer
200 views

Getting future feature absolute_import is not defined error while installing lxml on centos

I am getting this error while installing libxml I tried this python27 setup.py build_ext -i -I /usr/include/libxml2 --with-xslt-config=/opt/xslt/bin/xslt-config ...
1
vote
0answers
185 views

Executing a python script from PHP to open a socket

I have a python script chatserver.py that includes:- #!/usr/bin/python from twisted.internet.protocol import Protocol, Factory from twisted.internet import reactor <SNIP> ...
1
vote
1answer
597 views

Linux RDesktop Lockups

I have a script I wrote to create RDP connections from Linux workstations to Windows servers. Everything is great when used on a machine plugged into an Ethernet jack but when used on a wireless ...
2
votes
2answers
805 views

Can I run two server applications on port 80?

I am currently running nginx on port 80, with the configured server names as example.com and www.example.com. I also have a Flask application that I would like to have accessible through port 80, but ...
3
votes
4answers
2k views

Slow Memcached: Average 10ms memcached `get`

We're using Newrelic to measure our Python/Django application performance. Newrelic is reporting that across our system "Memcached" is taking an average of 12ms to respond to commands. Drilling down ...
1
vote
1answer
135 views

amazon EC2 x11 problems

We are trying to set up a virtual development / research cloud environment for our students. Students need to be able to log-in, launch python IDE, and plot some graphs for their homework. We are ...
0
votes
1answer
39 views

Options for Executing Scheduled Scripts on a PHP Server

I have a server that I've setup running PHP. This serves JSON files and is running fine. I also have several scripts that reads data from an outside source, connects to my MySQL Database Server, and ...
0
votes
1answer
279 views

Upgrading from Django 1.3 (Python 2.6) to Django 1.5 + Python 2.7 CentOS

We currently have a server running python2.6 + apache and mod_wsgi that runs with Django 1.3. I plan to use the following guide to install python 2.7 ...
1
vote
1answer
189 views

Setup Pootle on Uberspace Webspace

I tried to setup Pootle on my uberspace server, but after installing all the required apps/software i get the following error message: (pootle)[tundem@phoenix ~]$ pootle start Loading custom settings ...
0
votes
1answer
349 views

Why is pop.gmail.com network is unreachable?

I am trying to connect to pop.gmail.com using the following python script, running as root: import poplib pop_conn = poplib.POP3_SSL('pop.gmail.com', 995) and after minutes of waiting I finally ...
2
votes
1answer
218 views

What is preferred approach to deploy Python app using RPM? [closed]

I am new to the dev-ops side of things, and I've been working to get a Python application packaged into an RPM (using python setup.py bdist_rpm) deployed onto a centos VM via Yum. Chef is used to ...
-1
votes
1answer
212 views

How to create Python (2.7.3) RPM package? [closed]

No matter what I try, I cannot do this. I'm on Centos 5.6 x86_64 1 python setup.py bdist_rmp gives me syntax error: [root@localhost Python-2.7.3]# python setup.py bdist_rpm File "setup.py", line ...
2
votes
3answers
2k views

Unable to install python2.7-dev due to unmet dependencies Ubuntu 12.04

Having exactly the same problem described on this page: http://qnundrum.com/answer.php?q=431114 Below is directly quoted from that page: I am unable to install python-dev becasue of unmet ...
0
votes
0answers
135 views

Postgres segfault on Ubuntu 12.04 64

i have a unbelivable problem: Ubuntu server 12.04 64 bit running on Wmware Infrastructure, postgres 9.2 and django connecting via psycopg. Randomly postgres crashes with segfault, si i restart it an ...
1
vote
3answers
132 views

How do I find installed packages which depend on Python on a CentOS machine?

Is there a command to find out such information on a CentOS machine?
0
votes
1answer
1k views

Ubuntu - Supervisord and virtualenv

I'm attempting to run a series of Python apps from supervisor. It works fine on Mac OSX, but when I attempt to run the same app on Ubuntu, supervisor doesn't seem to be activating the virtualenv so my ...
-2
votes
1answer
1k views

How to set up SUDO rights for execution of Python script from PHP [closed]

I run Raspbian Wheezy on my Raspberry Pi, and i want to call a Python script from PHP. That all works great (i call 'exec python go.py' from php) but now i want to call a script which needs root ...
2
votes
3answers
3k views

RHEL 6.x - yum gives “ImportError: No module named cElementTree” errors

I'm making a set of changes to a group of 150 servers. All systems were able to successfully download and install a specific set of RPM's via yum, except for one. One this particular system, all yum ...
0
votes
2answers
405 views

How can I serve static files with nginx but use a slightly different url for tornado?

I have a directory structure I want to serve, that contains files as binary and some meta-information about them as json. for some directories, I need to compute some things on the fly and serve that. ...
0
votes
3answers
435 views

EC2 servers are slower than local machine

We have been trying to do some performance benchmarking for our webapp written using python that uses mongodb heavily and we have found the following. We tried using 1st Gen Extra Large ec2 servers ...
2
votes
2answers
1k views

Create an Amazon EC2 instance with automatic access to private S3

I was wondering. Say I have a file in a private S3 bucket, and I then deploy an EC2 instance which has something like that in its rc.local: GET http://privateamazons3url.com How can I make it so ...
0
votes
1answer
1k views

How can I check Windows Server 2008 health status and use them with Python

I am working on a project for which I need to create a Python class which can determine underlying OS on which it is running and performs a sequence of checks if OS is found to be Windows Server ...
0
votes
1answer
693 views

gunicorn working vs uwsgi timeout

I've setup my Python / Django app on a vmware machine with CentOS, uwsgi and gunicorn along with all my apps dependencies. After running my app with gunicorn with the following command: gunicorn ...
0
votes
1answer
514 views

nginx, gunicorn and django weird 504 gateway timeout

I have an nginx / gunicorn / django setup as follows: Nginx server { listen 80; server_name myserver.com; root /www/python/apps/pyapp/; access_log ...
0
votes
1answer
73 views

Manipulating Launchd from Python?

I have a simple python script for manipulating a plist file. Once this file is updated, I'd like to have that same script unload and then load that plist file in launchd. Normally, I'd use launchctl ...
-1
votes
2answers
3k views

Python - socket.error: [Errno 98] Address already in use [closed]

I'm currently attempting to setup a SiriServer (that's beside the point) on Xubuntu 12.10 x64, when I run the server python returns error socket.error: [Errno 98] Address already in use. The ...
0
votes
1answer
92 views

EC2 and Mongo, best practices

When hosting web applications with EC2 is it best practice to use a separate EC2 instance for the database (mongo in this case) or is it ok just to keep the web server and database server on the same ...
0
votes
1answer
390 views

How to find timestamp of file on FTP server

I need to find the latest created file in a FTP folder. However the FTP server is not returning full timestamps for files with the LIST command (missing the year): drwxr-xr-x 2 owner group ...
1
vote
2answers
2k views

yum error No module named CElementTree

I've the following problem with yum: $ yum There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: No module named cElementTree Please ...
3
votes
1answer
131 views

Deploy a Python project on a server with no compiler and no internet connection [closed]

There's a Python project I want to deploy on a production server which has no internet connection and no compiler. The project is using SQLAlchemy and pip install sqlalchemy requires a compiler to ...
1
vote
1answer
281 views

Counting the number of flows in a tcpdump file

I have a large tcpdump file which I need to parse to identify the number of flows in the capture based on the ( source ip + source port , destination ip + destination port ) pairs. Does tcpdump / any ...
1
vote
2answers
423 views

kill -HUP is not working with celery daemon

So I have a shell script that daemonizes celery, and creates a bunch of workers running as a daemon. I would like to have a way to restart the celery task when the underlying source gets changed since ...
2
votes
1answer
475 views

Causes of crash doing matrix multiply in Python/mod_wsgi/apache app

I am building a web app using Python 2.7, its bottle micro framework, and apache (via mod_wsgi). This app has some RESTish endpoints, one of which results in a connection error in the browser (Firefox ...
0
votes
2answers
419 views

How can I get event details in a transform with Zenoss 3.x

I need to get the event details from a trap in an event transform. The traps come with oids in the event details. The problem is that the OIDs are not predictable because the last digit is the event ...
0
votes
1answer
107 views

split array element with special character

I would like to write a bash script (that would be better if the script is in python) which executes a Perl script ( https://github.com/MangeshBiradar/Check_mk/blob/master/check_jenkins_jobs.pl) ...
1
vote
1answer
791 views

Port 80 redirect does not work for localhost

I want to run a simple python webserver on my ubuntu linode with the following command (it simply puts the current dir up on the port specified) python -m SimpleHTTPServer 8080 I am using port 8080 ...
0
votes
1answer
199 views

beaker: downgrade to 1.6.3 fails without error message

Since I am having problems with rhodecode (db problems when upgrading) I reverted rhodecode to an old version (1.3.6->1.5.1->1.3.6). Beaker is a dependency and should have been reverted to 1.6.3 but ...
2
votes
3answers
192 views

Access 127.0.0.1 on a local network

I usually write code, not administer servers, so bear with me here! I'm running a python script to act as a webserver and I also have Apache installed on the same machine. When I run the python ...
1
vote
2answers
77 views

Download with the bash or Python while keeping the directory tree/structure

I have a list of files that I need to download such as www.domain.com/files/archive.zip www.domain.com/img/icon.ico www.domain.com/files/backup/archive.zip www.domain.com/backup/img/icon.ico ...
1
vote
1answer
294 views

nginx uwsgi flask rewrite directory as base directory within app

So I have a flask application running using uWSGI on Nginx. Nginx is set to call my app at the location /app. So in my flask application I have to take into account the /app part when I map the url to ...
0
votes
1answer
962 views

uwsgi nginx web.py interal server error: application not found

Within my nginx sites-available/default this is the relevant portion for my app: location /app/ { include uwsgi_params; uwsgi_pass unix:///tmp/uwsgi.socket; } ...
0
votes
2answers
157 views

CherryPy 3 with Apache 2 using ModWSGI: stack traces?

I am trying to show stack traces or at least some sort of errors rendered to the HTML response while using a WSGI script. A ModuleNotFound exception is raised when I tried to import a module the ...