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

learn more… | top users | synonyms

0
votes
1answer
1k 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
1answer
16 views

Seafile “ImportError: No module named Image” After upgrade 3.0 -> 4.2

I recently upgraded our seafile server from 3.0.4 to 4.2.3. All the upgrade scripts went fine. It's running on CentOS 6.6. But now when I try to start seahub after the upgrade like seahub.sh ...
0
votes
0answers
12 views

nginx auth_request configuration

I'm running nginx and I wanna configure it to authenticate via a python script that will look up in my database. I need to receive the password and username in my python script but I can't figure out ...
1
vote
0answers
24 views

Nginx - How to authorize access to repositories using python script

I have set up a local Git server using Nginx ( in Ubuntu ) ,Now I want to authorize users using external python script , which should authorize them against predefined database . AFAIK, I have to ...
0
votes
0answers
20 views

IIS-8 - Python CGI needs to access a library outside of the web directory structure

I've got a python script that calls a dll in a directory off of C:\ (ctypes module). When I access the script, the errror I get back is in <module> mydll = ...
1
vote
1answer
11 views

rabbitmq server does not receive messages from a python client

I am trying to publish a message to rabbitmq. this works in production environment env with the same code so I suspect this is a configuration issue. rbqueue = RabbitMQClientQueue('cn-dip-v3', host = ...
0
votes
0answers
149 views

Error installing Python packages on an AWS Ubuntu server

I am trying to install the Ansible control server on Ubuntu 14.x (an AWS instance). When trying to install the dependencies, I saw an error. I'm not sure what I need to do. Is this an ignorable ...
3
votes
2answers
3k views

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 ...
0
votes
0answers
13 views

how to generate a list of currently active proxies in python

I have a python script where I get connected to some sites through proxy if direct connection fails. What I want to do is get a list of currently active proxies and I cant figure out how to do so
0
votes
0answers
8 views

General SOCKS server failure while using tor proxy

I am proxying traffic over tor, so letter on when I need to call localhost port, it gives failure error. def create_connection(self, address, timeout=None, source_address=None): sock = ...
0
votes
1answer
104 views

Not able to use mysql in google app engine - Error loading MySQLdb module: No module named _mysql. I am using cloudSQL

I am using googleAppEngineLauncher to try mysql connection. It gives the log File "/Users/kakshilshah/Desktop/hope/skeduleBackend/django/utils/importlib.py", line 40, in import_module ...
0
votes
0answers
27 views

How do I to run a python script only once on multiple machines remotely? [closed]

I have a deployment scenario where I need to run a python script on multiple Linux machines. The script will then download and install software from cloud. Since it is downloading and installing a ...
0
votes
3answers
2k views

Getting a list of patches in an HPSA patch policy

I'm trying to get a list of patches contained in a Patch Policy in HPSA -- I can get what I need via the Twister web interface (under PatchPolicy.getPatches(), give it an ID, and it happily returns a ...
2
votes
2answers
3k views

Celery daemon as a Ubuntu service does not consume tasks while running from terminal does

On Ubuntu 11.10, I have to issue python tasks from django using celery. I'm currently testing on the same machine but eventually the celery worker should run on a remote machine. django uses the ...
0
votes
1answer
2k views

Error while installing with Python “pip”: Cannot fetch index base URL http://

I am trying to install a local version of ScrumDo for testing. Only then I come to the point in my installation that I have to run: source bin/activate pip install -r requirements.txt I get ...
0
votes
1answer
926 views

How can I install Zope on Ubuntu 10.04 with Python 2.6.5?

I tried to install Zope on Ubuntu server 10.04: mnk@srv:~/zope-plone/Zope-3.4.0$ ./configure --prefix=/opt/zope-3.4.0 Configuring Zope installation Testing for an acceptable Python interpreter... ...
0
votes
0answers
24 views

Windows - Flask app deploy on IIS 7 - IOError

For internal needs, I have to deploy a Flask application on IIS7 (Windows Server 2008 R2 Standard), following a resource that I found on the web: http://netdot.co/2015/03/09/flask-on-iis/ the ...
2
votes
1answer
38 views

How to establish new connection through proxy using Squid in Python script? [closed]

I am new to networking and proxy. For a project I need to give a proxy connection. I already have a connection and I want change the connection behavior of the process to connect through that proxy. ...
-1
votes
0answers
17 views

nginx + uwsgi - Flask app deployment with sqlite concurrency

I have a Flask app that uses SQLite for almost every request. GET will do SELECT and POST will do INSERT or UPDATE. SQLite connections are opened and closed properly using @app.before_request and ...
1
vote
0answers
57 views

Nagios python plugin not working properly

I have installed Icinga for monitoring my azure infrastructure. I want to monitor my DB Servers using python script which is here Now it is making connection to DB server but mode options are not ...
0
votes
1answer
182 views

OpenVPN Python plugin

I have a task about authentication OpenVPN users using database which is located on remote server (not a host with OpenVPN server instance). And we use Python as main language for all our tools. ...
0
votes
2answers
141 views

How to install python3.4-pip in Freebsd 10.1

I searched in the ports and can't find a pip installation package other than the pip for python27 py27-pip-6.1.1 Which way is the best for installing pip for python 3.x in FreeBSD 10.1 ? Or is it ...
1
vote
1answer
29 views

vCSA command line installer fails to deploy with the error “Failed to login to host… is not a VIM server”

I'm using the vcsa-cli-installer utility under Linux (CentOS 6) to deploy VCSA 6.0 (vCenter Server Appliance). It is failing with the following: # ./vcsa-deploy -v ~/full_conf.json Start vCSA ...
0
votes
0answers
43 views

MySQL connection hanging intermittently

I'm having an intermittent bug where, on some queries, a MySQL database I'm using never responds to my queries. I am running a MySQL server and querying it through the python mysql connector module. I ...
1
vote
2answers
988 views

Lighttpd with FastCGI won't create /tmp/fcgi.sock on startup?

I'm running lighttpd-1.4.19 on a debian 5 box and try to run web2py with fastcgi. The problem with that is, that lighttpd does not create the socket file /tmp/fcgi.sock. If I'm creating the file by ...
0
votes
0answers
13 views

Pyinstaller configfile not found error after executing the binarie [migrated]

I tried of building the python main.py source files using pyinstaller. main.py having local import statements. So while building the main.py i have specified the absolute path for all the dependent ...
0
votes
1answer
941 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
11 views

Python/CGI on IIS - find user ID

I have a very basic Python/CGI based front end hosted on an IIS server. I'm trying to find the users within my shop that have accessed this site. All users on the network sign on with their LAN ...
0
votes
0answers
24 views

How do I create an SQLAlchemy class with two foreign keys (to different tables)?

Contrived example: class Person(Base): __tablename__ = 'person' id = Column(Integer, primary_key=True) name = Column(Unicode) class Location(Base): __tablename__ = 'address' id = ...
2
votes
2answers
469 views

Non-responsive apache + mod_wsgi after installing scipy

I am currently running a Centos 6.4 server, with Apache 2.2.15 and mod_wsgi 3.2. The server is hosting a django-based site (django 1.5.1, python 2.6.6). Everything was running fine until I installed ...
3
votes
2answers
773 views

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 ...
22
votes
4answers
28k views

How to run easy_install in cygwin?

I am trying to install some package in cygwin's python, but I'm getting the following error: "easy_install: command not found". I have tried to run "easy_install.py", the result is also ...
0
votes
1answer
19 views

Redirect to Python script in .htaccess while maintaining request URL

I have a website configured with Apache for http://www.example.com located in /var/www/example.com/. For an arbitrary sub-path of this website I would like to have all requests handled by a Python ...
1
vote
4answers
891 views

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:~$ . ...
1
vote
1answer
316 views

Apache not serving my python app

So here's my apache config: LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so <VirtualHost *:80> ServerAdmin marijus.merkevicius@gmail.com ServerName 31.220.49.197 ...
0
votes
1answer
2k views

syslog-ng not flushing the pipe to external program

I have written a python script that takes log entries from syslog-ng and writes them to MongoDB (I couldn't do it with afmongodb driver because I need to do some special processing). This is how it ...
0
votes
1answer
22 views

Two mod_wsgi Django apps on one Apache are trying to use each other's config files

I have two unrelated mod_wsgi Django apps, which need to be served from two virtual hosts in one instance of Apache2. I've made each a virtual host, each with its own directory, settings.py and ...
0
votes
0answers
17 views

Running lpr through command line and through python different outcome [migrated]

When I run lpr <filename>.jpg the file prints out boderless (this is what I want). When I run subprocess.call("/usr/bin/lpr " + tmp.name, shell=True) from a Python program, it prints out with ...
0
votes
0answers
31 views

How use namespaces and fabric

I am using python and fabric, I have a hypervisor (KVM) defined as follows: env.hypervisor_address = 'hypervisor' # 192.168.0.250 From one VM (in the hypervisor) I want to SSH to other VMs with ...
-1
votes
1answer
1k 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
20 views

Staticfiles for Django cannot be located on IIS 8

I have a Django 1.7 website configured on IIS 8 platform. The staticfiles are kept in a folder generated after running collectstatic command. As mentioned in the tutorials I have made that folder a ...
5
votes
5answers
8k views

How can I create multiple, numbered copies of a file in Windows?

I have a file named poll001.html, and need to create 100 copies that are named incrementally (i.e poll002.html, poll003.html...etc). I know this is stupid, but it is what boss-man wants. any ...
0
votes
1answer
28 views

OpsCenter 5.1.2 fails to start with SSL enabled on CentOS 5

This applies to OpsCenter 5.1.0 and 5.1.1 as well. I got the following error when trying to run OpsCenter 5.1.2 on a CentOS 5 server: Unhandled Error Traceback (most recent call last): File ...
0
votes
0answers
61 views

NGINX + uWSGI + Flask. Some requests very slow

We're running a fairly large Flask application and finding that at random times we'll end up with a very slow request (sometimes a minute or more) I presume the issue is related to lazy-loading ...
0
votes
1answer
86 views

Python Requests image upload HTTP POST

I am having some problem with a POST request that is driving me crazy. I am trying to upload an image using a POST using python requests by replicating the original request First of all, this is the ...
2
votes
3answers
3k views

Make mod_wsgi use python2.7.2 instead of python2.6?

i am running Ubuntu 10.04.1 LTS and it came pre-packed with python2.6 but i need to replace it with python2.7.2. (The reason is simple, 2.7 has a lot of features backported from 3 ) i had ...
1
vote
2answers
720 views

Configuring mod_wsgi to use Python 2.7 [duplicate]

I am trying to configure mod_wsgi to use Python 2.7. I downloaded and unpacked the source and ran ./configure --with-python=/usr/local/bin/python2.7 After this mod_wsgi.so-2.4 and mod_wsgi.so-2.5 ...
3
votes
3answers
2k views

Setting up xpra for client use in OS X

I've been trying to get xpra to run on OS X for the last few days to connect to my Ubuntu server. Note that there's a GUI for it called shifter, but that (at least on OS X) is still far too buggy. ...
0
votes
0answers
17 views

Celery worker timeouts

I'm trying to run a celery worker with each task having a timeout of 30 seconds. However whenever I run celery with the --time-limit option, it simply quits. This is the command I use. python ...
0
votes
1answer
37 views

Can I double my throughput when I double my cores? [duplicate]

I currently have an server with an E5-2620V3 6 cores cpu. I run an python app using nginx and gunicorn. If I load test the app with 150 clients in a continuous loop it has a throughput of 20k ...