Title
stringlengths
15
150
A_Id
int64
2.98k
72.4M
Users Score
int64
-17
470
Q_Score
int64
0
5.69k
ViewCount
int64
18
4.06M
Database and SQL
int64
0
1
Tags
stringlengths
6
105
Answer
stringlengths
11
6.38k
GUI and Desktop Applications
int64
0
1
System Administration and DevOps
int64
1
1
Networking and APIs
int64
0
1
Other
int64
0
1
CreationDate
stringlengths
23
23
AnswerCount
int64
1
64
Score
float64
-1
1.2
is_accepted
bool
2 classes
Q_Id
int64
1.85k
44.1M
Python Basics and Environment
int64
0
1
Data Science and Machine Learning
int64
0
1
Web Development
int64
0
1
Available Count
int64
1
17
Question
stringlengths
41
29k
search sequence in genome with mismatches
16,360,951
0
1
979
0
python,perl,awk,biopython,bioperl
I think you should consider using an alignment tool designed for this data for a couple of reasons: Those tools will also find reverse complemented matches (though, you could also implement this). Aligners will properly handle paired-end reads and multiple matches. Most aligners are written in C and use data structure...
0
1
0
0
2013-05-02T17:17:00.000
2
0
false
16,343,985
0
0
0
1
i have a fastq file with more than 100 million reads in it and a genome sequence of 10000 in length i want to take out the sequences from the fastq file and search in the genome sequence with allowing 3 mismatches I tried in this way using awk i got the sequences from fastq file: 1.fq(few lines) @DH1DQQN1:269:C1UKCACX...
How do I receive and manage multiple TCP connections on the same port?
16,352,065
0
0
1,496
0
python,networking,tcp,client-server
Use select.select() to detect events on multiple sockets, like incoming connections, incoming data, outgoing buffer capacity and connection errors. You can use this on multiple listening sockets and on established connections from a single thread. Using a websearch, you can surely find example code.
0
1
1
0
2013-05-03T03:50:00.000
2
0
false
16,351,298
0
0
0
2
I have a number of clients who need to connect to a server and maintain the connection for some time (around 4 hours). I don't want to specify a different connection port for each client (as there are potentially many of them) I would like them just to be able to connect to the server on a specific predetermined port e...
How do I receive and manage multiple TCP connections on the same port?
16,354,390
1
0
1,496
0
python,networking,tcp,client-server
I don't want to specify a different connection port for each client (as there are potentially many of them) You don't need that. I would like them just to be able to connect to the server on a specific predetermined port e.g., 10800 and have the server accept and maintain the connection but still be able to receive o...
0
1
1
0
2013-05-03T03:50:00.000
2
1.2
true
16,351,298
0
0
0
2
I have a number of clients who need to connect to a server and maintain the connection for some time (around 4 hours). I don't want to specify a different connection port for each client (as there are potentially many of them) I would like them just to be able to connect to the server on a specific predetermined port e...
Consuming from queues based upon external event (event queues)
18,451,136
0
0
689
0
python,erlang,rabbitmq,celery,eventqueue
Two more exotic options to consider: (1) define a custom exchange type in the Rabbit layer. This allows you to create routing rules that control which tasks are sent to which queues. (2) define a custom Celery mediator. This allows you to controls which tasks move when from queues to worker pools.
0
1
0
0
2013-05-03T21:40:00.000
2
0
false
16,367,953
0
0
1
1
I am running into a use case where I would like to have control over how and when celery workers dequeue a task for processing from rabbitmq. Dequeuing will be synchronized with an external event that happens out of celery context, but my concern is whether celery gives me any flexibility to control dequeueing of tasks...
GAE: Logs from tasks does not appears in dashboard
16,476,151
0
0
63
0
python,google-app-engine
Is your application running on the appspot.com domain or your own custom domain? In the former case it should work without you specifiying the target. In the case of a custom domain we are aware of problems with this scenario. Please file a bug in either case.
0
1
0
0
2013-05-04T01:23:00.000
2
0
false
16,369,685
0
0
1
1
I'm working with the Google App Engine Tasks Queue feature (Push). In local, with the dev server, everything is working fine but once deployed my task fails. I have put logs in it (logging python module) but they do not appear in my dashboard logs. Is there anything to do to make it works? Thanks for your help.
How to setup Git to deploy python app files into Ubuntu Server?
16,375,343
0
1
1,205
0
python,windows,git,ubuntu
Create a bare repository on your server. Configure your local repository to use the repository on the server as a remote. When working on your local workstation, commmit your changes and push them to the repository on your server. Create a post-receive hook in the server repository that calls "git archive" and thus tra...
0
1
0
1
2013-05-04T03:28:00.000
2
0
false
16,370,283
0
0
0
1
I setup a new Ubuntu 12.10 Server on VPN hosting. I have installed all the required setup like Nginx, Python, MySQL etc. I am configuring this to deploy a Flask + Python app using uWSGI. Its working fine. But to create a basic app i used Putty tool (from Windows) and created required app .py files. But I want to setup ...
Using Python3 with Pymongo in Eclipse Pydev on Ubuntu
16,379,374
1
0
1,303
0
python,ubuntu,pydev,pymongo
You can install packages for a specific version of Python, all you need to do is specify the version of Python you want use from the command-line; e.g. Python2.7 or Python3. Examples Python3 pip your_package Python3 easy_install your_package.
0
1
0
1
2013-05-04T21:52:00.000
1
1.2
true
16,379,321
1
0
0
1
I am currently trying to run Pydev with Pymongo on an Python3.3 Interpreter. My problem is, I am not able to get it working :-/ First of all I installed Eclipse with Pydev. Afterwards I tried installing pip to download my Pymongo-Module. Problem is: it always installs pip for the default 2.7 Version. I read that you sh...
Choosing Python3.3 interpreter in Eclipse problems
19,039,512
0
1
986
0
eclipse,python-3.x,settings,pydev,interpreter
Use the auto-config option. It will automatically find the libraries.
0
1
0
1
2013-05-05T08:30:00.000
2
0
false
16,382,769
0
0
0
2
I am new to Eclipse & PyDev (on Ubuntu 13.04) and want to try Python3.3 programming. But I cannot choose python3.3 iterpreter, - I try to choose it in usr\lib\python3.3 , but: - when I try to choose PYTHONPATH by clicking "New folder" - window doesn't open (I can do it onl after choosing auto-config, which will add pyt...
Choosing Python3.3 interpreter in Eclipse problems
19,208,342
0
1
986
0
eclipse,python-3.x,settings,pydev,interpreter
You set the path usr\lib\python3.3 by typing it directly in the 'Interpreter Executable' field! You don't have to search for the Interpreter file. This will do the Auto Config for you. Afterwards you declare a name and you're done.
0
1
0
1
2013-05-05T08:30:00.000
2
0
false
16,382,769
0
0
0
2
I am new to Eclipse & PyDev (on Ubuntu 13.04) and want to try Python3.3 programming. But I cannot choose python3.3 iterpreter, - I try to choose it in usr\lib\python3.3 , but: - when I try to choose PYTHONPATH by clicking "New folder" - window doesn't open (I can do it onl after choosing auto-config, which will add pyt...
Python & Django on a Mac: Illegal hardware instruction
16,386,760
0
4
3,921
0
python,django,homebrew
that kind of problem smells like architecture mess. You may try to execute a 64bit library from a 32bit interpreter or vice versa… As you're using homebrew, you shall be really careful of which interpreter you're using, what is your path etc… Maybe you shall trace your program to know more exactly where it fails, so yo...
0
1
0
0
2013-05-05T16:36:00.000
2
1.2
true
16,386,707
0
0
1
2
Here is my issue: I installed Python and Django on my mac. When I run "django-admin.py startproject test1" I get this error: 1 11436 illegal hardware instruction django-admin.py startproject test1 (the number is always different) I've tested with multiple Django versions, and this only happens with version 1.4 and h...
Python & Django on a Mac: Illegal hardware instruction
68,527,402
0
4
3,921
0
python,django,homebrew
I had the same, but went around this issue by using Docker/docker-compose.
0
1
0
0
2013-05-05T16:36:00.000
2
0
false
16,386,707
0
0
1
2
Here is my issue: I installed Python and Django on my mac. When I run "django-admin.py startproject test1" I get this error: 1 11436 illegal hardware instruction django-admin.py startproject test1 (the number is always different) I've tested with multiple Django versions, and this only happens with version 1.4 and h...
Gedit plugin for python autocomplete: how to install?
45,171,475
0
2
1,116
0
python,plugins,autocomplete,installation,gedit
If you have gedit3, have you checked that this is a plugin for gedit3, not gedit2? Take a look at *.plugin file. It should say IAge=3.
0
1
0
0
2013-05-06T11:03:00.000
1
0
false
16,397,384
0
0
0
1
Of course I tried to copy the files in the .gnome2/gedit/plugins and in the .local/share/gedit/plugins directories. But it doesn't work at all. How do I install the plugin? I'm on Fedora 18. Lxde desktop manager.
Google App Engine urlfetch loop
16,406,284
1
0
81
0
python,google-app-engine,loops
Take a look at the GAE cron functionality.
0
1
0
0
2013-05-06T19:46:00.000
2
0.099668
false
16,406,080
0
0
1
1
Can I make a loop in Google App Engine that fetches information from a site? I have made a small code that already gets the information I want from the site, but I don't know how to make this code run every lets say, 20 minutes. Is there a way to do this? P.S.: I have looked at TaskQueue, but I'm not sure if it is mean...
Running binary WSGI app
16,407,922
0
1
717
0
python,nginx,wsgi,uwsgi,pyinstaller
The binary you get is just your program and a python interperter stuffed together into an executable with all dependencies so that it can be easier distributed. It won't give you any speed boost, and it's not really 'compiled' into a binary. By using a binary of this kind you would loose all the advantages that WSGI pr...
0
1
0
0
2013-05-06T21:20:00.000
1
0
false
16,407,471
1
0
0
1
I have a working wsgi app developed in python. I know that pyinstaller will compile and get me a binary of this application. I have a nginx and uwsgi running. can i use this binary instead of the python script to run the whole thing from uwsgi to boost the speed ..
data bridge between Java and Python daemons
16,444,115
1
1
368
0
java,python,database,distributed-computing,in-memory-database
Given the relatively low volume of data you need, I would say the easiest way would be to use a TCP socket to communicate between the two processes. The data speed on the loopback interface is more than enough for your needs.
0
1
0
0
2013-05-08T05:05:00.000
3
0.066568
false
16,433,047
0
0
1
1
I have two background processes running on linux machine. One is Java and second one is in Python. What would be most efficient way to exchange data between these two apps ? I am talking about text / images data below < 10Mb approx each 5 minutes (not streamed). Due high cost of refactoring we cannot migrate fully to P...
How to directly access a resource in a Py2app (or Py2exe) program?
17,084,259
4
5
1,524
0
python,resources,py2app
By default the 'Resource' folder is current working directory for applications started by py2app. Futhermore the environment variable "RESOURCEPATH" is set to the absolute path of the resource folder.
1
1
0
0
2013-05-08T07:05:00.000
1
0.664037
false
16,434,632
0
0
0
1
This is mostly for Py2app, but I plan to also port to Windows so Py2exe is also applicable. For Mac: How can I access the Resources folder of my app bundle from Python code? The ideal way for me would be to get the path to this folder into a variable that my classes prepend to any file they need to access. Given the po...
openCV install Error using brew
16,495,361
0
0
447
0
python,macos,opencv
Try using macports it builds opencv including python bindings without any issue. I have used this for osx 10.8.
0
1
0
0
2013-05-08T08:45:00.000
1
0
false
16,436,260
0
1
0
1
i am trying to install opencv on my MacbookPro OSX 10.6.8 (snow leopard) and Xcode version is 3.2.6 and result of "which python" is Hong-Jun-Choiui-MacBook-Pro:~ teemo$ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python and i am suffering from this below.. Linking CXX shared library ../../li...
Any advantage of using node.js for task queue worker instead of other languages?
16,471,242
0
2
1,154
0
php,python,ruby,node.js,redis
I have used Node.js for task worker for jobs that call runnable webpages written in PHP or running commands on certain hosts. In both these instances Node is just initializing (triggering) the job, waiting for and then evaluating the result. The heavy lifting / CPU intensive work is done by another system / program. Ho...
0
1
0
1
2013-05-09T07:31:00.000
2
0
false
16,456,682
0
0
1
1
Will i have any advantage of using Node.js for task queue worker instead of any other language, like PHP/Python/Ruby? I want to learn Redis for simple task queue tasks like sending big ammounts of email and do not want keeping users to wait for establishing connection etc. So the questions is: does async nature of node...
Can't connect to localhost:8080 when trying to run Google App Engine program
18,885,291
1
1
10,838
0
google-app-engine,python-2.7
I have to manually start python and make it point to my app folder, for instance in a command line window on Windows I am using python. I installed python in C:\Python27 and my sample app is in c:\GoogleApps\guestbook C:\Python27>dev_appserver.py c:\GoogleApps\guestbook and then I can start my app in the Google App En...
0
1
0
0
2013-05-10T02:00:00.000
5
0.039979
false
16,474,027
0
0
1
2
I'm trying to run the Google App Engine Python 2.7 Hello World program and view it in a browser via Google App Engine Launcher. I followed the install and program instructions to the letter. I copied and pasted the code in the instructions to the helloworld.py file and app.yam1 and verified that they are correct and in...
Can't connect to localhost:8080 when trying to run Google App Engine program
18,226,152
1
1
10,838
0
google-app-engine,python-2.7
I had the same problem. This seemed to fix it: cd to google_appengine, run python dev_appserver.py --port=8080 --host=127.0.0.1 /path/to/application at this point there is a prompt to allow updates on running, I said Yes. At this point the app was running as it should, also when I quit this and went in using the launch...
0
1
0
0
2013-05-10T02:00:00.000
5
0.039979
false
16,474,027
0
0
1
2
I'm trying to run the Google App Engine Python 2.7 Hello World program and view it in a browser via Google App Engine Launcher. I followed the install and program instructions to the letter. I copied and pasted the code in the instructions to the helloworld.py file and app.yam1 and verified that they are correct and in...
How to count the threads and process of WSGI?
16,480,852
2
3
1,298
0
multithreading,wsgi,python-multithreading
You mean why do you have 3 extra per mod_wsgi daemon process. For your configuration, 15 new threads will be created for handling the requests. The other 3 in a process are due to: The main thread which the process was started as. It will wait until the appropriate signal is received to shutdown the process. A monitor...
0
1
0
0
2013-05-10T09:35:00.000
1
1.2
true
16,479,249
0
0
1
1
I have deployed a wsgi application on the apache and I have configured it like this: WSGIDaemonProcess wsgi-pcapi user= group= processes=2 threads=15 After I restart the apache I am counting the number of threads: ps -efL | grep | grep -c httpd The local apache is running only one wsgi app but the number I get back is...
Get-WmiObject without PowerShell
16,491,345
0
1
1,863
0
python,windows,wmi,wmic
From CMD.EXE, I think the command I need is wmic path Win32_USBControllerDevice get * So most likely the general pattern is: PowerShell: gwmi MYCLASSNAME translates into: CMD.EXE: wmic path MYCLASSNAME get *
0
1
0
1
2013-05-10T21:27:00.000
2
0
false
16,491,077
0
0
0
1
I am writing a Windows python program that needs to query WMI. I am planning to do this by using the subprocess module to call WMIC with the arguments I need. I see a lot of examples online of using WMI via PowerShell, usually using the "commandlet" Get-WmiObject or the equivalent gwmi. How do you do the equivalent of ...
Is there any ipdb print pager?
16,565,699
3
4
725
0
python,debugging,printing,pager,pdb
You might want to create a function which accepts a text, puts this text into a temporary file, and calls os.system('less %s' % temporary_file_name). To make it easier for everyday use: Put the function into a file (e.g: ~/.pythonrc) and specify it in your PYTHONSTARTUP. Alternatively you can just install bpython (pip ...
0
1
0
1
2013-05-14T11:20:00.000
1
1.2
true
16,541,847
0
0
0
1
I am using ipdb to debug a python script. I want to print a very long variable. Is there any ipdb pager like more or less used in shells? Thanks
Where I should put my python scripts in Linux?
16,565,499
13
12
14,785
0
python,linux,open-source
For sure, if this program is to be available only for root, then the main execution python script have to go to /usr/sbin/. Config files ought to go to /etc/, and log files to /var/log/. Other python files should be deployed to /usr/share/pyshared/. Executable scripts of other languages will go either in /usr/bin/ or /...
0
1
0
1
2013-05-15T12:45:00.000
2
1.2
true
16,565,363
1
0
0
2
My python program consists of several files: the main execution python script python modules in *.py files config file log files executables scripts of other languages. All this files should be available only for root. The main script should run on startup, e.g. via upstart. Where I should put all this files in Linu...
Where I should put my python scripts in Linux?
16,565,490
1
12
14,785
0
python,linux,open-source
If only root should access the scripts, why not put it in /root/ ? Secondly, if you're going to distribute your application you'll probably need easy_install or something similar, otherwise just tar.gz the stuff if only a few people will access it? It all depends on your scale.. Pyglet, wxPython and similar have a hugh...
0
1
0
1
2013-05-15T12:45:00.000
2
0.099668
false
16,565,363
1
0
0
2
My python program consists of several files: the main execution python script python modules in *.py files config file log files executables scripts of other languages. All this files should be available only for root. The main script should run on startup, e.g. via upstart. Where I should put all this files in Linu...
How to query and manage Debian package repositories in Python?
20,988,427
1
5
1,224
0
python,debian,apt
A very effective way is to create local apt caches for all the relevant distributions. The tool chdist from the devscripts package allows you to create a number of these caches without the need to use root privileges. You can then use the tools you are used to (e.g. apt-rdepends) to query those caches by wrapping them ...
0
1
0
0
2013-05-15T15:04:00.000
3
0.066568
false
16,568,621
1
0
0
1
I want to be able to look at local .deb files and at remote repositories and deduce dependencies etc so that I can build my own repositories and partial mirrors (probably by creating config files for reprepro). The challenge is that many of the command-line tools to help with this (apt-rdepends etc) assume that you're ...
Is it possible to queue sendkey commands in Windows?
16,609,920
0
1
248
0
python,clipboard,timing,sendkeys,queuing
No, I don't think so. You're talking about separate message queues here. Alt+Esc is a global hotkey, presumably handled by windows explorer. Ctrl+A and Ctrl+C are handled by the source app, and should be processed in order. However, there will be a lag after the Ctrl+C, as the clipboard must be locked, cleared, and ...
0
1
0
0
2013-05-16T15:12:00.000
1
0
false
16,591,244
0
0
0
1
We are writing a Python application that relies on copying and pasting content from the top windows. To do that we issue sendkey commands: Ctrl-Esc for going to the previous windows Ctrl-A followed by Ctrl-C to copy all text from the window And Cnrl-V to paste the the clipboard content to the top window. Unfortunatel...
Azure - Running an http server on an VM
16,604,662
0
1
453
0
python,azure,azure-virtual-machine
Could it be that port 81 is blocked by firewall in Ubuntu?
0
1
0
0
2013-05-17T08:10:00.000
1
0
false
16,604,372
0
0
1
1
I have created a VM on Windows Azure with Ubuntu 12.04 running on it. I have two end-points End-point1 public port: 50348 private port: 22 End-point2 public port: 81 private port: 81 Now, I have a simple python HTTP server running on the Virtual Machine, which is listening on port 81. When I try to connect to localho...
Trying to install wxpython on Mac OSX
20,097,953
8
6
7,577
0
python,macos,wxpython
Go to System preferences --> Security and privacy --> Allow applications downloaded from..select 'Anywhere'
1
1
0
0
2013-05-19T20:08:00.000
3
1
false
16,638,977
0
0
0
1
I am trying to install wxpython onto my Mac OSX 10.8.3. I download the disk images from their downloads page and mount it. When I try to install the package I get an error that saying that the package is damaged and can't be opened. Any suggestions on how I can fix this? I have also tried opening the package through th...
Python: How can I test my package if it runs on Linux, Mac and Windows
63,363,093
0
2
808
0
python,linux,windows,macos,testing
You can use travis to run tests on linux, mac and windows. Travis supports these platforms. This is the most convenient option. If the repo is open source, travis is free.
0
1
0
0
2013-05-20T14:01:00.000
3
0
false
16,651,259
1
0
0
2
I need to test my Python package if it works properly on different systems. I found Tox for different Python versions, but what about different operating systems like Windows, Linux and Mac. Can you recommend me a convenient way to test if my code works on all systems?
Python: How can I test my package if it runs on Linux, Mac and Windows
68,606,338
0
2
808
0
python,linux,windows,macos,testing
Just assuming you use Windows... I use Ubuntu on WSL2 (Windows Subsystem for Linux 2). It is basically a virtual machine, but is much faster than Hyper-V or Virtual box. It doesn't come with a GUI unless you're in the Windows Insiders Dev Channel, but that is likely not needed just to test code, and you can install GW...
0
1
0
0
2013-05-20T14:01:00.000
3
0
false
16,651,259
1
0
0
2
I need to test my Python package if it works properly on different systems. I found Tox for different Python versions, but what about different operating systems like Windows, Linux and Mac. Can you recommend me a convenient way to test if my code works on all systems?
How to install various files other than Python code using Python packages?
16,656,024
1
2
78
0
python,pip,software-distribution
I'm sorry, but Python knows nothing about bash, or man, or other things you might take for granted. For instance, Windows, a widely deployed platform supported by Python, has neither. Other platforms, even Unix-like, may not have bash, too (e.g. using busybox) and would rather not spend storage space on man pages. Some...
0
1
0
0
2013-05-20T17:44:00.000
1
1.2
true
16,655,156
1
0
0
1
My Python project includes some manpages and bash completion script. I want those to be installed when user installs a package with, for example, pip install mypackage. How do I do that? I only came across a very barbaric way of doing so by calling an external script (for example an .sh script) in the setup.py. Is ther...
How to get google ID from email
16,673,012
2
1
1,883
0
python,google-app-engine,authentication,google-plus
First of all you should store the email property always in lowercase since the case is not relevant. Now if you also want to take into the account the dot or the plus symbols and being able to query on them, you should then store in another (hidden) property the stripped out version of the email and execute your querie...
0
1
0
0
2013-05-21T14:43:00.000
2
1.2
true
16,672,846
0
0
1
1
I'm using google ID as the datastore id for my user objects. Sometimes I want to find a user by email. The gmail address can appear with dots or without, capital letters and other variations. How can I retrieve the user id from the given email?
Windows: get default microphone name
16,702,788
1
2
2,638
0
python,windows,audio,portaudio
Apparently I can get the full string from ffmpeg, as follows: ffmpeg -list_devices true -f dshow -i dummy And then the name of the mic will be on the line after "DirectShow audio devices"
0
1
0
0
2013-05-22T06:29:00.000
2
0.099668
false
16,684,894
0
0
0
1
In python2.7 on Windows, I need to get the name of the default microphone, which will be a string such as "Microphone (2- High Definition Audio Device)". My first attempt was to query WMI using subprocess: wmic path Win32_SoundDevice get * /format:list. Unfortunately, this seems to return speakers as well as mics, and ...
Google App Engine import NLTK error
16,700,974
0
0
423
0
google-app-engine,python-2.7,nltk
Where do you have nltk installed? GAE libraries need to be available in your app folder. If you have nltk elsewhere in your pythonpath it won't work.
0
1
0
0
2013-05-22T17:38:00.000
1
0
false
16,698,260
0
0
1
1
I am trying to import NLTK library in Google App Engine it gives error, I created another module "testx.py" and this module works without error but I dont know why NLTK does not work. My code nltk_test.py import webapp2 import path_changer import testx import nltk class MainPage(webapp2.RequestHandler): def get...
Use Python to Access Battery Status in Ubuntu
56,511,789
0
5
5,179
0
python,linux,ubuntu
You do not need to use any module for this. Simply you can navigate to /sys/class/power_supply/BAT0. Here you will find a lot of files with information about your battery. You will get current charge in charge_now file and total charge in charge_full file. Then you can calculate battery percentage by using some math...
0
1
0
1
2013-05-22T19:15:00.000
4
0
false
16,699,883
0
0
0
2
I am trying to come out with a small python script to monitor the battery state of my ubuntu laptop and sound alerts if it's not charging as well as do other stuff (such as suspend etc). I really don't know where to start, and would like to know if there is any library for python i can use. Any help would be greatly ap...
Use Python to Access Battery Status in Ubuntu
39,884,293
0
5
5,179
0
python,linux,ubuntu
The the "power" library on pypi is a good bet, it's cross platform too.
0
1
0
1
2013-05-22T19:15:00.000
4
0
false
16,699,883
0
0
0
2
I am trying to come out with a small python script to monitor the battery state of my ubuntu laptop and sound alerts if it's not charging as well as do other stuff (such as suspend etc). I really don't know where to start, and would like to know if there is any library for python i can use. Any help would be greatly ap...
optimizing google protocol buffer
19,603,923
0
2
1,004
0
java,python,protocol-buffers
Unfortunately the Python protobuf deserialization is just pretty slow (as of 2013) compared to the other languages.
0
1
0
0
2013-05-22T20:01:00.000
2
0
false
16,700,600
0
0
1
1
I'm new to google's protocol buffers and looking into some insight. I have a large object that is serialized in java which I am de-serializing in python. The upstream tells me that the file is serialized in about 4 to 5 seconds. Where it takes me 37 seconds to de-serialize. Any ideas on why it is such a huge difference...
What's the Google App Engine equivalent of ASP.NET's Server.Transfer?
16,705,889
0
0
210
0
python,google-app-engine,webapp2
Usually, you just have to call the corresponding method. For being more specific... Which flavour of AppEngine are you using? Java, Python, Go... Php?
0
1
0
0
2013-05-23T04:29:00.000
3
0
false
16,705,684
0
0
1
1
Server.Transfer is sort of like a Redirect except instead of requesting the browser to do another page fetch, it triggers an internal request that makes the request handler "go to" another request handler. Is there a Python equivalent to this in Google App Engine? Edit: webapp2
Does twisted epollreactor use non-blocking dns lookup?
16,717,175
1
2
591
0
python,dns,twisted
I'm not massively familiar with twisted, I only recently started used it. It looks like it doesn't block though, but only on platforms that support threading. In twisted.internet.base in ReactorBase it looks like it does the resolving through it's resolve method which returns a deferred from self.resolver.getHostByName...
0
1
0
0
2013-05-23T14:04:00.000
2
0.099668
false
16,716,049
0
0
0
1
It seems obvious that it would use the twisted names api and not any blocking way to resolve host names. However digging in the source code, I have been unable to find the place where the name resolution occurs. Could someone point me to the relevant source code where the host resolution occurs ( when trying to do a co...
Why when use sys.platform on Mac os it print "darwin"?
16,722,274
9
21
12,731
0
python,macos
To expand on the other answers: Darwin is the part of OS X that is the actual operating system, in a stricter sense of that term. To give an analogy, Darwin would be the equivalent of Linux - or Linux and the GNU utilities - while Mac OS X would be the equivalent of Ubuntu or another distribution. I.e. a kernel, the ba...
0
1
0
0
2013-05-23T19:05:00.000
2
1
false
16,721,940
1
0
0
1
In Python, when I type sys.platform on the Mac OS X the output is "darwin"? Why is this so?
Does GoogleAppEngine(Python SDK) disturb GoogleAppEngine(PHP SDK)?
17,073,068
0
0
209
0
php,python,google-app-engine
Thanks very much, hakre. I know what happened. The problem is I also have a python version Google-App-Engine.Thus, I need to specify the "development server" to GAE-PHP-SDK and it works well now!! Thanks again, I think I will deliver such a kindness to others in the future. – moshaholo May 26 at 12:16 Can any one tell ...
0
1
0
0
2013-05-24T14:25:00.000
1
0
false
16,737,308
0
0
1
1
The new launched GoodleAppEngine(PHP Version) does not work on my computer. Every time I type in "localhost:8080", the running server returns me a "GET / HTTP/1.1" 500". And it give me a fatal ERROR: Fatal error: require_once(): Failed opening required 'google/appengine/runtime/ApiProxy.php' (include_path='/Users/...
Beautiful Soup "not supported" Google App Engine
16,737,623
0
0
1,031
0
python,google-app-engine,beautifulsoup
It seems uploading the whole directory where the bs4 module resides in to the GAE app folder would work.
0
1
0
0
2013-05-24T14:29:00.000
2
0
false
16,737,386
0
0
1
1
I am working in python on a GAE app. Beautiful soup, which the app uses, works fine on my dev server locally. When I try and upload it to google's servers however, I get the following error: "Error parsing yaml file: the library "bs4" is not supported". I am not sure how to fix this. Does anyone have any idea? Thank yo...
celery.chord gives IndexError: list index out of range error in celery version 3.0.19
18,938,559
1
2
859
0
python,runtime-error,celery
This is an error that occurs when a chord header has no tasks in it. Celery tries to access the tasks in the header using self.tasks[0] which results in an index error since there are no tasks in the list.
0
1
0
0
2013-05-25T01:12:00.000
1
0.197375
false
16,745,487
0
1
0
1
Has anyone seen this error in celery (a distribute task worker in Python) before? Traceback (most recent call last): File "/home/mcapp/.virtualenv/lister/local/lib/python2.7/site-packages/celery/task/trace.py", line 228, in trace_task R = retval = fun(*args, **kwargs) File "/home/mcapp/.virtualenv/lister/local/...
IPython command not found Terminal OSX. Pip installed
65,625,644
0
22
34,234
0
macos,bash,command-line,terminal,ipython
For me the only thing that helped was: python -m pip install --upgrade pip Upgrading pip did the work and all the installations started working properly! Give it a try.
0
1
0
0
2013-05-25T02:45:00.000
7
0
false
16,745,923
1
0
0
4
Using Python 2.7 installed via homebrew. I then used pip to install IPython. So, IPython seems to be installed under: /usr/local/lib/python2.7/site-packages/ I think this is true because there is a IPython directory and ipython egg. However, when I type ipython in the terminal I get: -bash: ipython: command not fou...
IPython command not found Terminal OSX. Pip installed
22,583,681
25
22
34,234
0
macos,bash,command-line,terminal,ipython
I had this issue too, the following worked for me and seems like a clean simple solution: pip uninstall ipython pip install ipython I'm running mavericks and latest pip
0
1
0
0
2013-05-25T02:45:00.000
7
1.2
true
16,745,923
1
0
0
4
Using Python 2.7 installed via homebrew. I then used pip to install IPython. So, IPython seems to be installed under: /usr/local/lib/python2.7/site-packages/ I think this is true because there is a IPython directory and ipython egg. However, when I type ipython in the terminal I get: -bash: ipython: command not fou...
IPython command not found Terminal OSX. Pip installed
59,742,054
0
22
34,234
0
macos,bash,command-line,terminal,ipython
After trying to a number of solutions like above with out joy, when I restarted my terminal, Ipython command launched. Don't forgot to restart your terminal after all the fiddling! P.S. I think the brew install Ipython did it ... but can't be sure.
0
1
0
0
2013-05-25T02:45:00.000
7
0
false
16,745,923
1
0
0
4
Using Python 2.7 installed via homebrew. I then used pip to install IPython. So, IPython seems to be installed under: /usr/local/lib/python2.7/site-packages/ I think this is true because there is a IPython directory and ipython egg. However, when I type ipython in the terminal I get: -bash: ipython: command not fou...
IPython command not found Terminal OSX. Pip installed
59,297,333
2
22
34,234
0
macos,bash,command-line,terminal,ipython
I use pip3 install ipython is OK. maybe ipython rely on python3
0
1
0
0
2013-05-25T02:45:00.000
7
0.057081
false
16,745,923
1
0
0
4
Using Python 2.7 installed via homebrew. I then used pip to install IPython. So, IPython seems to be installed under: /usr/local/lib/python2.7/site-packages/ I think this is true because there is a IPython directory and ipython egg. However, when I type ipython in the terminal I get: -bash: ipython: command not fou...
Does Apache really "fork" in mod_php/python way for request handling?
21,819,195
0
4
459
0
apache,webserver,cgi,mod-python,mod-php
With a modern version of Apache, unless you configure it in prefork mode, it should run threaded (and not fork). mod_python is threadsafe, and doesn't require that each instance of it is forked into its own space.
0
1
0
1
2013-05-25T07:06:00.000
1
0
false
16,747,301
0
0
0
1
I am a dummy in web apps. I have a doubt regaring the functioning of apache web server. My question is mainly centered on "how apache handles each incoming request" Q: When apache is running in the mod_python/mod_php mode, then does a "fork" happen for each incoming reuest? If it forks in mod_php/mod_python way, then...
Which platform as a service/infrastructure as a server provider gives the most backend resources for their free tier?
16,754,484
1
1
184
0
java,python,node.js,paas,iaas
Redhat Openshift - 3 container instances ("gears") that can each run multiple items. Max 40,000 files, 1GB of storage, 512MB Memory, 250 threads per small gear. Appears to be a hybrid of PaaS & IaaS. Amazon EC2 - Single linux microinstace. 64-bit 640mb server. 30Gb block storage, 5Gb "standard" storage, 100Mb nosql...
0
1
0
0
2013-05-25T22:30:00.000
1
0.197375
false
16,754,483
0
0
0
1
I realize there is quite a difference between IaaS and PaaS, but there is some overlap. I'm particularly interested in getting the most number of "backend" server instances at the free tier (or for cheap). In particular for testing the scalability of an app I'm writing.
: bad interpreter: No such file or directory in python
16,758,687
13
21
70,614
0
python
You're probably using the #!python hashbang convention that's inexplicably popular among Windows users. Linux expects a full path there. Use either #!/usr/bin/python or (preferably) #!/usr/bin/env python instead.
0
1
0
0
2013-05-26T08:07:00.000
2
1
false
16,757,349
1
0
0
1
I originally coded in python IDE on windows. Now when I pasted my code in a file on Linux server. Now when I run the script, it gives me this error: bad interpreter: No such file or directory Please tell how to resolve this error.
Using fabric with namespaces, is there a way to specify per-file env.shell
16,776,049
1
2
181
0
python,fabric
I ended up overriding the @task decorator like this: from functools import wraps from fabric.api import task as real_task def task(func): @wraps(func) def wrapper(*args, **kwargs): with settings(shell='/path/to/my/shell'): return func(*args, **kwargs) return real_task(wrapper) I can't ...
0
1
0
0
2013-05-27T12:41:00.000
1
1.2
true
16,773,454
0
0
0
1
I use a fabric with namespaces to separate commands for dev and production servers the structure is fabfile/ __init__.py dev.py prod.py dev.py and prod.py both define different env.shell and one of them overrides another. Is there a way to use per-file env configuration for fabric?
A way to optimize reading from a datastore which updates once a day
16,775,062
1
1
53
1
python,django,google-app-engine
Your total amout of data is very small and looks like a dict. Why not save it (this object) as a single entry in the database or the blobstore and you can cache this entry.
0
1
0
0
2013-05-27T13:08:00.000
1
1.2
true
16,773,961
0
0
1
1
I am running my Django site on appengine. In the datastore, there is an entity kind / table X which is only updated once every 24 hours. X has around 15K entries and each entry is of form ("unique string of length <20", integer). In some context, a user request involves fetching an average of 200 entries from X, which...
"writing a python binding" vs "using command-line directly"
16,788,200
3
3
619
0
python,python-bindings
I can hardly imagine a case where one would prefer wrapping a library's command line interface over wrapping the library itself. (Unless there is a library that comes with a neat command line interface while being a total mess internally; but the OP indicates that the same functionality available via the command line i...
0
1
0
0
2013-05-28T07:27:00.000
1
1.2
true
16,786,183
1
0
0
1
I have a question regarding python bindings. I have a command-line which exposes some functionality and code is re-factored to provide the functionality through a shared library. I wanted to know what the real advantage that I get from "writing a python binding for the shared library" vs "calling the command line dire...
pyparsing not working on windows text file but works on linux text file
16,822,978
1
1
147
0
python,pyparsing
Try Suppress("\r\n") instead of Suppress(LineEnd())
0
1
0
0
2013-05-29T18:03:00.000
1
0.197375
false
16,820,895
1
0
0
1
I have a simple pyparsing construct for extracting parts of a log message. It looks like this log_line = timestamp + task_info + Suppress(LineEnd()) This construct parses a log file generated in Linux very well but doesn't parse a similar file generated in windows. I am pretty sure it is because of the new line represe...
When does Python write a file to disk?
17,035,837
2
4
1,521
0
python,file,unix,file-io,operating-system
It is almost certainly not python's fault. If python closes the file, OR exits cleanly (rather than killed by a signal), then the OS will have the new contents for the file. Any subsequent open should return the new contents. There must be something more complicated going on. Here are some thoughts. What you describe ...
0
1
0
0
2013-05-29T20:21:00.000
1
1.2
true
16,823,109
1
0
0
1
I have a library that interacts with a configuration file. When the library is imported, the initialization code reads the configuration file, possibly updates it, and then writes the updated contents back to the file (even if nothing was changed). Very occasionally, I encounter a problem where the contents of the conf...
How do I install Python modules on OSX if I don't have admin privs?
16,824,528
2
0
709
0
python,beautifulsoup,ipython
Just install virtualenv once, then work on local environments. It's a good practice too.
0
1
0
0
2013-05-29T21:46:00.000
3
0.132549
false
16,824,419
0
0
0
1
I don't have admin privileges on my work computer (OSX) and do some light Python scripting (mostly web scraping). I don't have admin privileges at work and don't really want to learn OSX but I also don't want to lug my Ubuntu laptop around everyday just to write scrapers. Is there a straightforward way for me to insta...
pydev eclipse, jython scripting , syspath
18,384,815
0
2
205
0
python,eclipse,pydev,jython
The version that PyDev uses internally is Jython 2.1, so, you can't add newer libraries to that version unless they're compatible... If you need to use a different version, you'd need to first update the version used inside PyDev itself (it wasn't updated so far because the current Jython size is too big -- PyDev has ...
0
1
0
1
2013-05-29T22:26:00.000
1
0
false
16,824,942
1
0
0
1
PyDev has its own jython interpreter, inside pydev.jython.VERSION that jython has its own python libraries i.e. pydev.jython.VERSION/LIB/zipfile.py Now if I write a jython script for pydev-jython-scripting, it will load only its internal Lib pydev.jython.VERSION/LIB/ How do I have this pydev-jython recognize PYTHONPAT...
Is it possible to return a value from one Python file to another?
16,846,327
2
6
1,474
0
python
Not with os.startfile(), no; it provides no way of communicating with the launched process. You could use the subprocess module, though; this will allow you to send data to and receive data from the launched process through standard in/out. Or, since the thing you want to call is another Python script, simply import th...
0
1
0
0
2013-05-30T21:36:00.000
2
0.197375
false
16,846,264
1
0
0
1
I'm wondering if it is possible to run another file: os.startfile('File.py') and have that file return a value to the file that called the other file. For example, you have File1. Is it possible for File1 to call and run File2 and have File2 return a value to File1?
Test if string is valid key prior to memcache.get()
16,866,096
0
1
581
0
python,google-app-engine,python-memcached
Any object is a valid key, provided that the object can be serialized using pickle. If pickle.dumps(key) succeeds, then you shouldn't get a BadKeyError.
0
1
0
0
2013-05-31T14:27:00.000
3
0
false
16,859,674
0
0
1
2
Is there a function in Google App Engine to test if a string is valid 'string key' prior to calling memcache.get(key) without using db.get() or db.get_by_key_name() first? In my case the key is being passed from the user's get request: obj = memcache.get(self.request.get("obj")) Somehow I'd like to know if that string...
Test if string is valid key prior to memcache.get()
16,867,410
1
1
581
0
python,google-app-engine,python-memcached
A db module key sent to a client should pass through str(the_key) which gives you an URL safe encoded key. Your templating environment etc.. will do this for you just by rendering the key into a template. On passing the key back from a client, you should recreate the key with key = db.Key(encoded=self.request.get("ob...
0
1
0
0
2013-05-31T14:27:00.000
3
0.066568
false
16,859,674
0
0
1
2
Is there a function in Google App Engine to test if a string is valid 'string key' prior to calling memcache.get(key) without using db.get() or db.get_by_key_name() first? In my case the key is being passed from the user's get request: obj = memcache.get(self.request.get("obj")) Somehow I'd like to know if that string...
Enthought Canopy Encoding Error
16,913,698
1
0
763
0
python,unicode,encoding,enthought,canopy
are you running this code from an unsaved buffer? If yes, this is a known issue in Canopy 1.0 and should be fixed in the next update. If no, can you provide a minimal example to reproduce your problem, so this can be fixed? Thanks!
0
1
0
0
2013-06-01T01:54:00.000
1
1.2
true
16,868,320
1
0
0
1
I've been using python from time to time for some small projects and just started using it again after quite a while. I'm using Enthoughts Canopy IDE and get the following error: UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 1: ordinal not in range(128) I know that I have to define the en...
Virtualenv is installing with wrong version of Python
54,860,786
2
2
3,193
0
python,virtualenv
virtualenv --python=python3 mynewenv
0
1
0
0
2013-06-01T20:30:00.000
2
0.197375
false
16,876,974
1
0
0
1
I recently have started learning python and have run into an issue. When I run python on my mac without virtualenv, the version number is Python 2.7.5. Unfortunately, when I go into my virtualenv, and run Python, the version number is Python 2.6.1. I tried, creating another virtualenv using: virtualenv -p /usr/bin/pyth...
how to clone a repo to a virtualenv on mac Mountain Lion
16,885,929
1
3
2,468
0
python,github,virtualenv,github-for-mac
Open terminal. cd into your virtualenv directory, and run git clone from there.
0
1
0
0
2013-06-02T18:25:00.000
2
0.099668
false
16,885,902
1
0
0
1
I could be missing something fundamental here, but I'm struggling to work out what. I'm using Github for Mac for the first time. I've found a repo i want to look at, so I've logged into GH and installed and configured the mac app. I've created a virtualenv that I want to work in. added python 2.7. I've forked the repo ...
/usr/local/lib/python2.6/dist-packages/joblib/parallel.py:40: UserWarning: [Errno 30] Read-only file system. joblib will operate in serial mode
16,894,057
0
0
776
0
python,python-module
You need to change the permissions for the directory the process wants to write to. Find out what directory joblib wants to put things in and change its permissions or use a different directory with the needed permissions for this. In order to be able to give the permissions and to allow Python to write to the filesyst...
0
1
0
0
2013-06-03T09:43:00.000
2
0
false
16,893,882
1
0
0
1
Anyone knows what this error is and how to fix it? I've already tried to chmod -R 777 /usr/local/python2.6/dist-packages/joblib but with no luck.
How to shutdown all dynamic instances in Google App Engine without re-deploying the app?
23,557,544
1
1
1,179
0
java,python,google-app-engine,load-testing
We had a similar problem - I found that disabling the app in Application Settings and then re-enabling it terminated all 88 instances we had running, without any other adverse effects.
0
1
0
0
2013-06-03T20:29:00.000
2
0.099668
false
16,905,303
0
0
1
2
We are running multiple load tests every day against one of our GAE apps. We use the following pattern: Start a load test and let it run for a few hours. Look at graphs. Optionally deploy a new version of our app with performance improvements. Go back to 1. Each load test creates a couple hundred front end instances....
How to shutdown all dynamic instances in Google App Engine without re-deploying the app?
16,909,149
0
1
1,179
0
java,python,google-app-engine,load-testing
Maybe have them all periodically probe the datastore (or memcache) for a kill value?
0
1
0
0
2013-06-03T20:29:00.000
2
0
false
16,905,303
0
0
1
2
We are running multiple load tests every day against one of our GAE apps. We use the following pattern: Start a load test and let it run for a few hours. Look at graphs. Optionally deploy a new version of our app with performance improvements. Go back to 1. Each load test creates a couple hundred front end instances....
Cannot start Canopy's IPython from Windows command shell
28,218,590
0
2
1,361
0
ipython,enthought
If you want to launch web interactive then the command ipython notebook in windows shell or in canopy shell works.
0
1
0
0
2013-06-05T19:24:00.000
1
0
false
16,948,154
0
0
0
1
I have been using EPD for some time and recently started using Canopy. So now I have both EPD and Canopy installed on my machine, which runs Windows 7 Pro x64. But I just realized I cannot launch Canopy's IPython interactive session (located in the directory C:\Users\User\AppData\Local\Enthought\Canopy\User\Scripts) in...
Reading out version of cc1plus (SCons script-based)
16,966,985
1
0
229
0
python,gcc,scons
You might want to give it something to compile. Maybe be redirecting input from null: (not sure if that's correct for windows). Though if so, that looks like a moderately strange compiler
0
1
0
0
2013-06-06T13:50:00.000
1
1.2
true
16,963,865
0
0
0
1
Actually I'm trying to read out the version of my cc1plus executable in windows. This is a rather simple job: cc1plus -version I need this for a scons script (Tool), to integrate an ARM cross compiler. Because of that I directly call cc1plus instead of using some compiler driver. There is no useful compiler driver ava...
automated build of python eggs
16,966,255
0
0
97
0
python,setuptools,distutils,setup.py,distribute
I would use subprocess. I believe setup.py command line arguments should be your interface. Check setup.py clean --all
0
1
0
1
2013-06-06T15:26:00.000
2
0
false
16,966,095
1
0
0
2
I have a directory containing N subdirectories each of which contains setup.py file. I want to write a python script that iterates through all subdirectories, issues python setup.py bdist_egg --dist-dir=somedir, and finally removes build and *.egg-info from each subdirectory and I have two questions: Can I invoke bdis...
automated build of python eggs
17,346,341
0
0
97
0
python,setuptools,distutils,setup.py,distribute
It turned out that Fabric is the right way!
0
1
0
1
2013-06-06T15:26:00.000
2
1.2
true
16,966,095
1
0
0
2
I have a directory containing N subdirectories each of which contains setup.py file. I want to write a python script that iterates through all subdirectories, issues python setup.py bdist_egg --dist-dir=somedir, and finally removes build and *.egg-info from each subdirectory and I have two questions: Can I invoke bdis...
Configuring MySQL with python on OS X lion
16,985,650
2
1
141
1
python,mysql,macos
You probably need Xcode's Command Line Tools. Download the lastest version of Xcode, then go to "Preferences", select "Download" tab, then install Command Line Tools.
0
1
0
0
2013-06-07T13:41:00.000
1
1.2
true
16,985,604
0
0
0
1
MySQL is installed at /usr/local/mysql In site.cfg the path for mysql_config is /usr/local/mysql/bin/mysql_config but when i try to build in the terminal im getting this error: hammads-imac-2:MySQL-python-1.2.4b4 syedhammad$ sudo python setup.py build running build running build_py copying MySQLdb/release.py -> build/l...
Twistedmatrix, rotate log on a weekly basis and customizing name of the log
17,023,178
2
1
113
0
python,logging,twisted
You can definitely do this with Twisted's logging system. You're on the right track by looking at DailyLogFile. However, consider that the best solution might involve idiomatically integrating with the target deployment platform. If the convention on the platform is for applications to manage their own log files, the...
0
1
0
0
2013-06-10T10:55:00.000
1
1.2
true
17,022,237
0
0
0
1
what should be the better way to use Python twistedmatrix log file, and customize it so that it can be : - rotating on a weekly basis (sunday) - with a custom naming convention (replace the current date _underscore glued that can be seen in the DailyLogFile with something like myfile.yyyymmdd.log or so) shoud it be by ...
Implementing UDP traceroute in Python without root
17,045,881
0
2
1,380
0
python,sockets,permissions,udp,traceroute
The conclusion I've come to is that I'm restricted to parsing the output of the traceroute using subprocess. traceroute is able to overcome the root-requirement by using setuid for portions of the code effectively allowing that portion of the code to run as root. Since I cannot establish those rights without root privi...
0
1
1
0
2013-06-10T15:54:00.000
1
1.2
true
17,027,970
0
0
0
1
I'm trying to implement a UDP traceroute solution in Python 2.6, but I'm having trouble understanding why I need root privileges to perform the same-ish action as the traceroute utility that comes with my operating system. The environment that this code will run in will very doubtfully have root privileges, so is it mo...
Ipython - Notebook error: Tornado.application : "Module" object has no attribute 'XREQ'
17,628,850
1
1
494
0
ipython-notebook
For those who end up on this page, here's the solution. This is happening because your OS package manager (in my case 12.04) is lagging pypi in python packages - but not in core libraries (like zeromq). To solve this, my recommended solution is to install python-pandas using your package manager, but also install syste...
0
1
0
0
2013-06-10T18:41:00.000
1
0.197375
false
17,030,589
1
0
0
1
I am using python 2.6, ipython 0.12.1, tornado 3.02, pyzmq 13.1 , I am getting this error when I start ipython notebook. "Websocket connection cannot be made" In the ipython console window I get torado.application error , in line 183 in create_shell_stream shell_stream = self.create_connected_stream(ip.....,zmq.XREQ)...
Set break points in Tornado app
20,555,024
2
3
1,963
0
debugging,python-2.7,tornado
If you are running your app using foreman you would set you environment variable in .env file in root project folder. Setting the below env variable in my .env file did the tick form me. PYTHONUNBUFFERED=true Now I can set code breakpoints in my app, and also print output to server logs while running the app using for...
0
1
0
0
2013-06-10T18:46:00.000
2
1.2
true
17,030,677
0
0
1
1
How could I set a break point in my tornado app? I tried pdb, but Tornado app seams to be ignoring my pdb.set_trace() command in my app.
How to implement unsubscribe usecase for website
17,033,151
1
0
138
0
google-app-engine,email,python-2.7,webapp2,unsubscribe
Each new class implies a new query, which adds to the total cost. Pack as much information that is practical into the User class. A simple boolean in the User class should work for active/inactive or subscribe/unsubscribe. Your app needs to accept emails to receive the Unsubscribe request and set the associated bool...
0
1
0
0
2013-06-10T19:12:00.000
1
1.2
true
17,031,075
0
0
1
1
I'm sending automated emails and hence I should deliver an unsubscribe function. I have a User entity that is not used much, only when a user registers and the emails can be send to users who are not registered as Users. So when I send an email and I must include an unsubscribe link, should I keep a whole separate enti...
celery beat HA - using pacemaker?
18,737,345
1
2
1,055
0
python,celery,pacemaker
The short answer is "yes." Pacemaker will do what you want, here. The longer answer is that your architecture is tricky due to the requirement to restart in the middle of a sequence. You have two solutions available here. The first is to use some sort of database (or a DRBD file system) to record the fact that 25 of th...
0
1
0
0
2013-06-10T20:55:00.000
1
0.197375
false
17,032,676
0
0
0
1
As far as I know about celery, celery beat is a scheduler considered as SPOF. It means the service crashes, nothing will be scheduled and run. My case is that, I will need a HA set up with two schedulers: master/slave, master is making some calls periodically(let's say every 30 mins) while slave can be idle. When mast...
How to track the functions used by a python command?
17,218,519
0
2
135
0
python,cloud,openstack,openstack-nova
most of the python clients for openstack have a not so well documented --debug flag, this will show the api queries occurring in incredibly unsafe verbosity.
0
1
0
0
2013-06-11T06:16:00.000
1
1.2
true
17,037,621
0
0
0
1
I want to trace the functions used by a particular command, specifically for OpenStack. Now, I have a command, let's say 'nova image-list', which shows the images available in the repository. I want to know what functions is this command calling? I tried with strace, but the maximum I could get was the files that the c...
Alternative IDE supporting debugging for Google App Engine in Python (Eclipse + PyDev no debug support on SDK 1.7.6+)
18,138,699
0
2
927
0
python,google-app-engine,debugging,ide,breakpoints
The latest version of PyDev (2.8.1) supports GAE debugging. However, "Edit and Continue Debugging or Interactive Debugging" feature seems to have stopped working.
0
1
0
0
2013-06-11T09:01:00.000
2
0
false
17,040,209
0
0
0
1
I'm developing on GAE-Python 2.7 using Eclipse+PyDev as IDE. Since GAE SDK 1.7.6 (March 2013), where Google "broke" support for breakpoints*, I've been using the old dev server to continue debugging the application I'm working on. However, Google will drop support of the old dev server as of July 2013 and, since I do ...
Why am I getting IOError: [Errno 13] Permission denied?
52,801,091
0
6
27,894
0
python,python-2.7,permissions,permission-denied,ioerror
Although your code seems correct, I think it's better to assign an absolute path. If you develop on your local machine and the app runs on another server, there is probably some differences, like, who calls the process. Logs are recommended to be written to /var/log/app_name
0
1
0
0
2013-06-11T12:13:00.000
3
0
false
17,043,814
0
0
0
2
I am creating Log file for the code but I am getting the following error : [Tue Jun 11 17:22:59 2013] [error] [client 127.0.0.1] import mainLCF [Tue Jun 11 17:22:59 2013] [error] [client 127.0.0.1] File "/home/ai/Desktop/home/ubuntu/LCF/GA-LCF/mainLCF.py", line 10, in [Tue Jun 11 17:22:59 2013] [error] [client ...
Why am I getting IOError: [Errno 13] Permission denied?
17,044,205
0
6
27,894
0
python,python-2.7,permissions,permission-denied,ioerror
Looks like logging tried to open the logfile as /genetic.log. If you pass filename as a keyword argument to logging.basicConfig it creates a FileHandler which passes it to os.path.abspath which expands the filename to an absolute path based on your current working dir. So you're either in your root dir or your code cha...
0
1
0
0
2013-06-11T12:13:00.000
3
0
false
17,043,814
0
0
0
2
I am creating Log file for the code but I am getting the following error : [Tue Jun 11 17:22:59 2013] [error] [client 127.0.0.1] import mainLCF [Tue Jun 11 17:22:59 2013] [error] [client 127.0.0.1] File "/home/ai/Desktop/home/ubuntu/LCF/GA-LCF/mainLCF.py", line 10, in [Tue Jun 11 17:22:59 2013] [error] [client ...
Install package on multiple python versions using easy_insatll
17,045,827
0
0
103
0
python,easy-install
It's hard to say without providing us operation system information you use. For example in OSX, easy_install has it's own versions, I just type easy_install[tab][tab] to get all available version of easy_install. In OSX and debian and redhat I've got these: easy_install easy_install-2.5 easy_install-2.6 easy_install-...
0
1
0
0
2013-06-11T13:24:00.000
2
0
false
17,045,229
1
0
0
1
I'm trying to install a python package using easy_install. There are several python versions installed. This causes the package to be installed on python2.7, whereas I want it to be installed on python2.4. Suggestions? Thanks Edit: I already have tried easy_install-2.4. I get -bash: easy_install-2.4: command not found
How to Detect File Rename / Move in Windows
17,046,562
3
2
1,402
0
java,python,file,rename,move
If you use java 7, you can simply use WatchService and WatchKey. This is a observer to watch a directory and each time something is changed, created or deleted you can do an action/file handling.
0
1
0
0
2013-06-11T14:21:00.000
3
1.2
true
17,046,461
0
0
0
1
I'm trying to detect when a file is being moved or renamed in windows and I want to then use that change to update a database. When I say file move: I mean moving from one directory to another from ".../A/foo.txt" to ".../B/foo.txt". When I say file rename: I mean renaming but staying in the same directory ".../A/foo....
Command history in interpreters in emacs
17,047,535
0
12
1,865
0
python,emacs,command,interpreter
AFAIS the keys are the same as in M-x shell. See menu In/Out for available keys/commands.
0
1
0
0
2013-06-11T14:41:00.000
2
0
false
17,046,929
0
0
0
1
Inside emacs I am running interpreters for several different languages (python, R, lisp, ...). When I run the interpreters through the terminal in most cases I can use the up arrow to see the last command or line of code that I entered. I no longer have this functionality when I am running the interpreters in emacs. Ho...
can't get stderr value from a subprocess
17,054,413
0
0
221
0
python,subprocess,pipe
It sounds like you might be confusing stderr and the process's return code (available in proc.returncode after you've called proc.communicate()). stderr is the second output stream available to the process. It's generally used for printing error messages that shouldn't be mixed with the process's normal ("standard") ou...
0
1
0
0
2013-06-11T21:38:00.000
2
0
false
17,054,291
0
0
0
1
I have code proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = proc.communicate() I tried invalid commands assigning to cmd, but stderr always is Null An invalid command like 'ls fds' returns 'ls: cannot access fds: No such file or directory' But the message doesn't appear in ...
Why won't PySys_SetPath() work?
44,001,898
0
1
3,054
0
c++,python,c,api
I had the same problem but when I fixed all the \ to / and added a . at the beginning of the path it worked ie. the path should look sth like that PySys_SetPath("./Python/") or PySys_SetPath("C:/full/path/Python/")
0
1
0
1
2013-06-11T23:25:00.000
2
0
false
17,055,472
0
0
0
1
I'm using the Python C API, and numerous times now I've tried using PySys_SetPath() to redirect the interpreter to a path where I've stored all of my scripts. Yet, every time I try it, I get the following error: Unhandled exception at 0x1e028482 in app.exe: 0xC0000005: Access violation reading location 0x00000004. I us...
is it possible to unzip a .apk file(or generally any zipped file) into memory instead of writing it to fs
64,447,721
0
2
14,330
0
android,python,unzip
A late entry...but all I had to do was rename the file to a .ZIP extension.
1
1
0
0
2013-06-11T23:28:00.000
3
0
false
17,055,496
0
0
0
1
I am doing research with mobile apps and need to analyze their code after unzipping the .apk file. However, the process of unzipping naturally involves lots of IO, which doesn't make it scalable, I am thinking if it's possible to hold the unzipped data in memory, with several variables representing it, thus saving the ...
How to use Jenkins Environment variables in python script
64,924,366
0
8
30,579
0
python,bash,jenkins,environment-variables
import os os.environ.get("variable_name")
0
1
0
0
2013-06-12T17:24:00.000
2
0
false
17,071,584
0
0
0
1
so I have a bash script in which I use the environment variables from Jenkins for example: QUALIFIER=echo $BUILD_ID | sed "s/[-_]//g" | cut -c1-12 Essentially I'm taking the build id, along with job name to determine which script to call from my main script. I want to use python instead so I was wondering whether I c...
Google App Engine Launcher not starting
17,086,966
1
1
291
0
python,windows,google-app-engine
I was having same problem with google app engine 1.8.0 then i installed the latest 1.8.1 and the issue fixed!
0
1
0
0
2013-06-13T04:38:00.000
1
0.197375
false
17,079,358
0
0
1
1
I'm install google app engine on my laptop and when i clicked on google app engine launcher icon, mouse change to loading icon then nothing run, nothing display and no error reported, just nothing. My laptop running with WIN7 64bit, Python27 installed. Please help.
Error in devstack script. nova-api did not start?
17,218,560
0
0
3,196
0
python,openstack,openstack-nova
General rule of thumb for devstack. Always unstack.sh before re-running stack.sh or pulling from repositories and re-running stack.sh
0
1
0
0
2013-06-13T05:39:00.000
2
0
false
17,079,919
1
0
0
1
I have installed openstack on Ubuntu 12.04 single node using devstack. Now, it was running smoothly till yesterday. When i ran ./stack.sh today, it showed an error ./stack.sh:672 nova-api did not start I have python-paste and python-pastedeploy installed. How to fix this error?
Sending out IMs to Lync/OCS programmatically
17,125,543
1
2
3,151
0
java,python,sip,lync,office-communicator
Well, if you are on Lync 2013, you can have a look at UCWA ucwa.lync.com. It's a web service that allows to log in to Lync and use IM, presence, etc. You can use then any language you want. I played with it using Node on Mac OS X, for example.
0
1
0
1
2013-06-14T01:00:00.000
2
0.099668
false
17,099,581
0
0
0
1
I need to send out Instant Messages to a Lync/OCS server from Linux programmatically as an alerting mechanism. I've looked into using python dbus and pidgin-sipe with finch or pidgin, but they aren't really good for sending one-off instant messages (finch and pidgin need to be running all the time). Ideally, I'd have ...
how to access my 127.0.0.1:8000 from android tablet
17,116,746
1
31
33,438
0
android,python,django,web,localhost
If both are connected to the same network, all you need to do is provide the IP address of your server (in your network) in your Android app.
0
1
0
0
2013-06-14T20:24:00.000
9
0.022219
false
17,116,718
0
0
1
6
I am developing a webpage in django (on my pc with windows 7) and now i need to test some pages in tablet pcs. suddenly the thought came if i can have an access to my localhost in windows from android tablet. is that possible? I am in the same wifi connection in both devices at home. i read a lot questions and answers...
how to access my 127.0.0.1:8000 from android tablet
61,816,349
0
31
33,438
0
android,python,django,web,localhost
Try this python manage.py runserver then connect both tablet and system to same wifi and browse in the address eg: python manage.py runserver 192.168.0.100:8000 In tablet type that url in adress bar
0
1
0
0
2013-06-14T20:24:00.000
9
0
false
17,116,718
0
0
1
6
I am developing a webpage in django (on my pc with windows 7) and now i need to test some pages in tablet pcs. suddenly the thought came if i can have an access to my localhost in windows from android tablet. is that possible? I am in the same wifi connection in both devices at home. i read a lot questions and answers...
how to access my 127.0.0.1:8000 from android tablet
17,116,796
1
31
33,438
0
android,python,django,web,localhost
need to know the ip address of your machine .. Make sure both of your machines (tablet and computer) connected to same network 192.168.0.22 - say your machine address do this : 192.168.0.22:8000 -- from your tablet this is it !!!
0
1
0
0
2013-06-14T20:24:00.000
9
0.022219
false
17,116,718
0
0
1
6
I am developing a webpage in django (on my pc with windows 7) and now i need to test some pages in tablet pcs. suddenly the thought came if i can have an access to my localhost in windows from android tablet. is that possible? I am in the same wifi connection in both devices at home. i read a lot questions and answers...
how to access my 127.0.0.1:8000 from android tablet
17,116,791
16
31
33,438
0
android,python,django,web,localhost
You can find out what the ip address of your PC is with the ipconfig command in a Windows command prompt. Since you mentioned them being connected over WiFi look for the IP address of the wireless adapter. Since the tablet is also in this same WiFi network, you can just type that address into your tablet's browser, wi...
0
1
0
0
2013-06-14T20:24:00.000
9
1.2
true
17,116,718
0
0
1
6
I am developing a webpage in django (on my pc with windows 7) and now i need to test some pages in tablet pcs. suddenly the thought came if i can have an access to my localhost in windows from android tablet. is that possible? I am in the same wifi connection in both devices at home. i read a lot questions and answers...
how to access my 127.0.0.1:8000 from android tablet
17,116,785
6
31
33,438
0
android,python,django,web,localhost
127.0.0.1 is a loopback address that means, roughly, "this device"; your PC and your android tablet are separate devices, so each of them has its own 127.0.0.1. In other words, if you try to go to 127.0.0.1 on your Android tab, it's trying to connect to a webserver on the Android device, which is not what you want. Ho...
0
1
0
0
2013-06-14T20:24:00.000
9
1
false
17,116,718
0
0
1
6
I am developing a webpage in django (on my pc with windows 7) and now i need to test some pages in tablet pcs. suddenly the thought came if i can have an access to my localhost in windows from android tablet. is that possible? I am in the same wifi connection in both devices at home. i read a lot questions and answers...
how to access my 127.0.0.1:8000 from android tablet
48,594,665
23
31
33,438
0
android,python,django,web,localhost
Though this thread was active quite a long time ago. This is what worked for me on windows 10. Posting it in details. Might be helpful for the newbies like me. Add ALLOWED_HOSTS = ['*'] in django settings.py file run django server with python manage.py 0.0.0.0:YOUR_PORT. I used 9595 as my port. Make firewall to allo...
0
1
0
0
2013-06-14T20:24:00.000
9
1
false
17,116,718
0
0
1
6
I am developing a webpage in django (on my pc with windows 7) and now i need to test some pages in tablet pcs. suddenly the thought came if i can have an access to my localhost in windows from android tablet. is that possible? I am in the same wifi connection in both devices at home. i read a lot questions and answers...
Inter-process communication for python
17,118,788
3
2
1,821
0
python,process
Python has good support for ZeroMQ, which is much easier and more robust than using raw sockets. The ZeroMQ site treats Python as one of its primary languages and offers copious Python examples in its documentation. Indeed, the example in "Learn the Basics" is written in Python.
0
1
0
0
2013-06-14T23:35:00.000
1
1.2
true
17,118,747
1
0
0
1
I'm having a problem creating a inter-process communication for my python application. I have two python scripts at hand, let's say A and B. A is used to open a huge file, keep it in memory and do some processing that Mysql can't do, and B is a process used to query A very often. Since the file A needs to read is real...
Python Request Module - Google App Engine
35,530,496
0
4
4,323
0
python,google-app-engine
You need to add the requests/requests sub-folder to your project. From your script's location (.), you should see a file at ./requests/__init__.py. This applies to all modules you include for Google App Engine. If it doesn't have a __init__.py directly under that location, it will not work. You do not need to add the m...
0
1
0
0
2013-06-15T21:36:00.000
2
0
false
17,128,130
0
0
1
1
I'm trying to import the requests module for my app which I want to view locally on Google App Engine. I am getting a log console error telling me that "no such module exists". I've installed it in the command line (using pip) and even tried to install it in my project directory. When I do that the shell tells me: "Re...