Q_Id
int64
337
49.3M
CreationDate
stringlengths
23
23
Users Score
int64
-42
1.15k
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
Tags
stringlengths
6
105
A_Id
int64
518
72.5M
AnswerCount
int64
1
64
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
6
11.6k
Available Count
int64
1
31
Q_Score
int64
0
6.79k
Data Science and Machine Learning
int64
0
1
Question
stringlengths
15
29k
Title
stringlengths
11
150
Score
float64
-1
1.2
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
8
6.81M
9,780,717
2012-03-20T02:43:00.000
1
0
1
1
python,macos,pip,python-2.6
51,316,425
36
false
0
0
What I did to overcome this was sudo apt install python-pip. It turned out my virtual machine did not have pip installed yet. It's conceivable that other people could have this scenario too.
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
0.005555
0
0
1,748,193
9,780,717
2012-03-20T02:43:00.000
2
0
1
1
python,macos,pip,python-2.6
54,471,268
36
false
0
0
Not sure why this wasnt mentioned before, but the only thing that worked for me (on my NVIDIA Xavier) was: sudo apt-get install python3-pip (or sudo apt-get install python-pip for python 2)
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
0.011111
0
0
1,748,193
9,780,717
2012-03-20T02:43:00.000
1
0
1
1
python,macos,pip,python-2.6
62,098,214
36
false
0
0
The problem seems that your python version and the library yoıu want to install is not matching versionally. Ex: If Django is Django3 and your python version is 2.7, you may get this error. "After installing is running 'python' still ran Python 2.6 and PATH was not updated." 1- Install latest version of Python 2- Chan...
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
0.005555
0
0
1,748,193
9,780,717
2012-03-20T02:43:00.000
4
0
1
1
python,macos,pip,python-2.6
60,697,532
36
false
0
0
To overcome the issue "bash: pip: command not found" in Mac Found two versions on Mac 1 is 2.7 and the other is 3.7 when I say sudo easy_install pip, pip got installed under 2.7 when I say sudo easy_install-3.7 pip, pip got installed under 3.7 But, whenever I would require to do pip install , I wanted to install the ...
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
0.022219
0
0
1,748,193
9,780,717
2012-03-20T02:43:00.000
6
0
1
1
python,macos,pip,python-2.6
62,380,015
36
false
0
0
It solved my problem by using sudo easy_install pip
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
1
0
0
1,748,193
9,780,717
2012-03-20T02:43:00.000
15
0
1
1
python,macos,pip,python-2.6
64,437,923
36
false
0
0
Latest update 2021. In Ubuntu 20 64bit works perfectly Installation of python3 sudo apt install python3 Pip Installation sudo apt install python3-pip Add following alias in $HOME/.bash_aliases in some cases file may be hidden. alias pip="/usr/bin/python3 -m pip " Refresh current terminal session. . ~/.profile ...
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
1
0
0
1,748,193
9,780,717
2012-03-20T02:43:00.000
23
0
1
1
python,macos,pip,python-2.6
38,888,588
36
false
0
0
Installing using apt-get installs a system wide pip, not just a local one for your user. Try this command to get pip running on your system ... $ sudo apt-get install python-pip python-dev build-essential Then pip will be installed without any issues and you will be able to use "sudo pip...".
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
1
0
0
1,748,193
9,780,717
2012-03-20T02:43:00.000
15
0
1
1
python,macos,pip,python-2.6
9,781,267
36
false
0
0
To solve: Add this line to ~/.bash_profile export PATH="/usr/local/bin:$PATH" In a terminal window, run source ~/.bash_profile
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
1
0
0
1,748,193
9,780,717
2012-03-20T02:43:00.000
0
0
1
1
python,macos,pip,python-2.6
69,341,076
36
false
0
0
If on Windows and using the Python installer, make sure to check the "Add Python to environment variables" option. After installation, restart your shell and retry to see if pip exists.
10
580
0
I downloaded pip and ran python setup.py install and everything worked just fine. The very next step in the tutorial is to run pip install <lib you want> but before it even tries to find anything online I get an error "bash: pip: command not found". This is on Mac OS X, which I'm new to, so I'm assuming there's some ki...
bash: pip: command not found
0
0
0
1,748,193
9,782,972
2012-03-20T07:42:00.000
6
0
0
0
python,pdf,pdf-scraping
9,803,283
4
false
0
0
This is a very complex problem and not solvable in general. The reason for this is simply that the format PDF is too flexible. Some PDFs are only bitmaps (you would have to do your own OCR then—obviously not our topic here), some are a bunch of letters literally spilled out over the pages; this means that by parsing t...
1
4
0
I am working on a pdf file. There is number of tables in that pdf. According to the table names given in the pdf, I wanted to fetch the data from that table using python. I have worked on html, xlm parsing but never with pdf. Can anyone tell me how to fetch tables from pdf using python?
Working on tables in pdf using python
1
0
0
12,830
9,783,482
2012-03-20T08:27:00.000
0
1
1
1
python,coding-style,shebang
9,783,492
3
false
0
0
if you want your script to be an executable, you have to include this line
1
8
0
Should Python library modules start with #!/usr/bin/env python? Looking at first lines of *.py in /usr/share/pyshared (where Python libs are stored in Debian) reveals that there are both files that start with the hashbang line and those that do not. Is there a reason to include or omit this line?
Should Python library modules start with #!/usr/bin/env python?
0
0
0
1,029
9,784,627
2012-03-20T10:02:00.000
2
0
0
0
python,django
9,784,966
2
false
1
0
First of all, avoid any design where you need to do this. Perhaps you should be getting separate parent objects? However, you can do this by examining the ._meta.fields property of any django model instance.
1
1
0
I have a parent class and a child class which inherits parent. In a child class object, I need to differentiate between parent class fields and child class fields. Is this information available? If so, where. Need solution in Python, specifically Django.
How to detect parent class fields
0.197375
0
0
139
9,787,621
2012-03-20T13:23:00.000
0
0
0
0
python,django,web-applications,backend
9,787,902
4
false
1
0
Write a management command and daemonize it with supervisord. By the way, technically django itself is running continuously and not only when view is called. What are you trying to acheive?
2
0
0
I am creating a web application in django and I want to create a backend app which runs continuously instead of running only when the "view" is called. How do I do this ? Any help would be appreciated. Thank you.
django code which runs event independent
0
0
0
91
9,787,621
2012-03-20T13:23:00.000
0
0
0
0
python,django,web-applications,backend
9,787,680
4
false
1
0
Django is not especially for this; that said, you can use django's facilities, and just write a programme that executes continuously.
2
0
0
I am creating a web application in django and I want to create a backend app which runs continuously instead of running only when the "view" is called. How do I do this ? Any help would be appreciated. Thank you.
django code which runs event independent
0
0
0
91
9,788,264
2012-03-20T13:58:00.000
0
0
0
1
django,google-app-engine,github,development-environment,python-2.7
9,793,302
1
true
1
0
I'm on a pretty similar setup, though I'm still runing on py2.5, django-nonrel. 1) I usually use 'git status' or 'git gui' to see if I forgot to check in files. 2) I personally don't check in my datastore. Are you familiar with .gitignore? It's a text file in which you list files for git to ignore when you run 'git s...
1
1
0
Here is my current setup: GitHub repository, a branch for dev. myappdev.appspot.com (not real url) myapp.appspot.com (not real url) App written on GAE Python 2.7, using django-nonrel Development is performed on a local dev server. When I'm ready to release to dev, I increment the version, commit, and run "manage.py u...
Google App Engine Development and Production Environment Setup
1.2
0
0
398
9,788,635
2012-03-20T14:21:00.000
5
0
0
1
python,multithreading,google-app-engine,queue
9,790,858
2
false
1
0
You can use "backends" or "task queues" to run processes in the background. Tasks have a 10-minute run time limit, and backends have no run time limit. There's also a cronjob mechanism which can trigger requests at regular intervals. You can fetch the data from external servers with the "URLFetch" service.
2
0
0
I am currently trying to develop something using Google AppEngine, I am using Python as my runtime and require some advise on setting up the following. I am running a webserver that provides JSON data to clients, The data comes from an external service in which I have to pull the data from. What I need to be able to do...
Google AppEngine and Threaded Workers
0.462117
0
0
152
9,788,635
2012-03-20T14:21:00.000
1
0
0
1
python,multithreading,google-app-engine,queue
9,809,659
2
false
1
0
Note that using memcache as the communication mechanism between front-end and back-end is unreliable -- the contents of memcache may be partially or fully erased at any time (and it does happen from time to time). Also note that you can't query memcache of you don't know the exact keys ahead of time. It's probably bet...
2
0
0
I am currently trying to develop something using Google AppEngine, I am using Python as my runtime and require some advise on setting up the following. I am running a webserver that provides JSON data to clients, The data comes from an external service in which I have to pull the data from. What I need to be able to do...
Google AppEngine and Threaded Workers
0.099668
0
0
152
9,789,410
2012-03-20T15:08:00.000
2
0
1
0
python,sockets,udp
9,789,514
1
true
0
0
You can connect() each UDP socket to it's target. That way the ephemeral ports will be fixed (and different) for each thread.
1
1
0
I have a multi threaded python application communicating with a separate service trough UDP. Each thread is similar, at some point need a response from the separate service. So practically for each thread I create e new client socket and start to communicate. The problem is on the server side each UDP packet seems to c...
Python UDP client Ephemeral Reception Port
1.2
0
1
566
9,790,715
2012-03-20T16:19:00.000
0
1
0
1
python,usb,midi,pyportmidi
9,790,821
1
false
0
0
lsusb should do the trick. All devices and their respective hubs are listed there.
1
3
0
I'm connecting a several identical USB-MIDI devices and talking to them using Python and pyportmidi. I have noticed that when I run my code on Linux, occasionally the MIDI ports of the devices are enumerated in a different order, so I send messages to the wrong devices. As the devices do not have unique identifiers, I ...
Is it possible to find out which USB port a MIDI device is connected to in portmidi / pyportmidi
0
0
0
455
9,791,587
2012-03-20T17:09:00.000
0
0
0
0
python,mysql,macos
9,792,010
2
true
0
0
Turns out the newest MySql_python worked great. just had to run sudo python setup.py install
1
1
0
Is there a new way to connect to MySQL from Python with Mac OS X Lion (10.7.x)? All the material I can find only seems to support Snow Leopard (10.6) and older. I've tried installing pyodbc, but can't get the odbc drivers to register with the operating system (maybe a 10.6 -> 10.7 compatibility issue?)
Python MySQL On Mac OS X Lion
1.2
1
0
391
9,793,680
2012-03-20T19:36:00.000
0
0
1
0
python,string,list,search
9,796,995
2
false
0
0
What you need is a trie data structure, which is perfect for what you seek. Your code needs to handle heavy read/retrieval. Look up trie. if you need implementation let me know.
1
0
0
I'm developing a dictionary kind of application using python. In my code, there is a list which consists of sorted set of strings. when a user give some text, I want to get all the string starting with the given string. In other words, I just want to suggest words while user is typing. Example : If user typed the word ...
Search a list of string with a given substring in python
0
0
0
328
9,795,135
2012-03-20T21:18:00.000
0
0
1
0
python,decorator,introspection
9,795,269
5
false
0
0
I've never done anything like this, but in general python relies on "duck-typing" in situations like this. So you could just try to decorate a dummy function and see if a callable is returned.
2
2
0
Is it possible to inspect a function/method to see whether it can be used as a decorator? In that it follows the usual way decorators wrap other functions and return a callable? Specifically, I'm looking to validate 3rd party code.
How can I see if a method is a decorator?
0
0
0
216
9,795,135
2012-03-20T21:18:00.000
2
0
1
0
python,decorator,introspection
9,795,551
5
true
0
0
By applying a suspected decorator, catching exceptions, and then testing whether the result contains a __call__ method, you could produce a guess as to whether a given callable is a decorator or not. But it will be only a guess, not a guarantee. Beyond that, I do not believe what you want will be possible in general, ...
2
2
0
Is it possible to inspect a function/method to see whether it can be used as a decorator? In that it follows the usual way decorators wrap other functions and return a callable? Specifically, I'm looking to validate 3rd party code.
How can I see if a method is a decorator?
1.2
0
0
216
9,795,645
2012-03-20T21:58:00.000
2
0
0
1
python,winapi,wndproc
10,608,464
1
true
0
1
You are going about this the wrong way. If you think about it, you'll realize that responding to menu events with your custom "actions" must require some code to run in the process that you're targeting. This means you'll need to inject code into the other process in order to achieve what you want. Since you're going t...
1
7
0
I have a small question hoping someone will help me. Is there any way to hook into other applications WNDPROC? The situation is that I want to insert a menu in the other app menubar and I want to define the commands for every menu item. I was able to insert the menu with menu items using some Win32 API functions (user3...
hook into wndproc of another application?
1.2
0
0
1,449
9,796,492
2012-03-20T23:20:00.000
0
0
1
0
python,garbage-collection,python-3.x,weak-references
9,833,642
4
false
0
0
Since It seems that all weak references being released coherently is not guaranteed (as per Guido's post). One thing that you could do is to use a single weak reference across every location where you would otherwise generate a new weak reference (since the single reference must look the same to all that are using it)....
3
2
0
From what I understand, Python 3 does not make any guarantees about when the memory for an object is released except that it is not released as long as at least one non-weak reference points to an object. Does the language make any other guarantees about the weak references? In particular, suppose I create a weakref wr...
can weakref not evaluate to None even though no non-weak references point to an object?
0
0
0
521
9,796,492
2012-03-20T23:20:00.000
1
0
1
0
python,garbage-collection,python-3.x,weak-references
9,810,870
4
true
0
0
The weakref either gives you a valid object (from Python's POV), or None. At which point an object is actually deallocated (causing the weakref to go to None) is undefined except that there cannot be any non-weak references to the object from any other live objects. The reference counting behavior you observe in CPyt...
3
2
0
From what I understand, Python 3 does not make any guarantees about when the memory for an object is released except that it is not released as long as at least one non-weak reference points to an object. Does the language make any other guarantees about the weak references? In particular, suppose I create a weakref wr...
can weakref not evaluate to None even though no non-weak references point to an object?
1.2
0
0
521
9,796,492
2012-03-20T23:20:00.000
1
0
1
0
python,garbage-collection,python-3.x,weak-references
9,796,551
4
false
0
0
No, Python doesn't make any guarantees as to when an object is actually collected and the weakref will return None. It could happen right away (and it often is in CPython, which uses reference counting plus a cyclic-reference garbage collector, but much less often in other Python implementations that don't use refcount...
3
2
0
From what I understand, Python 3 does not make any guarantees about when the memory for an object is released except that it is not released as long as at least one non-weak reference points to an object. Does the language make any other guarantees about the weak references? In particular, suppose I create a weakref wr...
can weakref not evaluate to None even though no non-weak references point to an object?
0.049958
0
0
521
9,796,643
2012-03-20T23:38:00.000
11
0
1
0
python,garbage-collection,python-3.x,destructor
9,796,689
3
true
0
0
Python doesn't make any guarantees about when __del__ is called, or whether it is called at all. As it is, __del__ methods are unlikely to be called if the object is part of a reference cycle, because even if the cycle as a whole is cleaned up, Python has no way to decide where to break the cycle and in what order the ...
1
4
0
How soon after the reference count reaches zero is __del__ method called? Does the language promise that it's done right away, before any other use code can execute? Or can each implementation do what it likes, potentially delaying the call to __del__ arbitrarily long? Please ignore the situation when the program is ab...
how soon is `__del__` called after reference count drops to zero?
1.2
0
0
743
9,797,253
2012-03-21T01:02:00.000
18
0
0
0
jquery,python,ajax,django
9,799,831
5
true
1
0
If you return a response with a status code of 4xx or 5xx this is a an error and will trigger jQueries error handler. While it is certainly possible to simple return status 200 every time and use a "error" field in the JSON response (like suggested by dm03514) this is bad for two reasons: It violates good HTTP practic...
1
12
0
I'm using ajax to improve user experience in my Django project. My concern here is how to respond error to browser properly. As far as I know, I can either: validate request data piece by piece and guard exception one by one. If something bad happens, raise Http404 or other exception to explicitly announce an error ha...
Django ajax error response best practice
1.2
0
0
10,297
9,797,308
2012-03-21T01:08:00.000
1
0
1
0
python,garbage-collection,binary-tree
9,797,324
1
true
0
0
Yes, Python will discard the unreferenced nodes in the tree. CPython uses reference counting to do most of is garbage collection. In your case, one or more of the tree nodes will have no references left, so they will be freed. Then the nodes that were pointed to by the freed node may have no references, and those will ...
1
2
0
Say I have a binary tree which contains pointers at each node going to the parent and the child, and I want to remove some part of an internal subtree, patching the remainder of the tree back together in a sensible way. Does Python know to garbage collect the discarded piece of the subtree, even though the nodes within...
Python memory management
1.2
0
0
318
9,797,613
2012-03-21T01:53:00.000
0
0
0
0
python,path,beautifulsoup,easy-install
19,903,084
3
false
1
0
I'd Try to download the source .py files, find the setup.py files and run in command line: <path_to_source_archive>\setup.py install this usually works when easy_install stutters.
1
1
0
I am trying to install easy_install in order to use BeautifulSoup... However I have no clue what my PATH directory is... when I run easy_install BeautifulSoup.. I get error: Not a recognized archive type: C:\docume~1\tom\locals~1\temp\weasy_install-w6haxs\BeautifulSoup-3.2.1.tar.gz I am guessing this has someth...
Installing easy_install, NOT SO EASY
0
0
0
4,633
9,798,910
2012-03-21T05:07:00.000
0
0
0
0
python,unit-testing,twisted
9,799,162
2
false
1
0
I don't know much about Twisted or how you set up your system under test, but could you start two servers on a single thread? One of them would be the one you are testing and another would be just a dummy that can accept any request. In addition to that, the dummy would store info that it has received the call. After i...
1
3
0
In my latest Python project, utilizing Twisted, I've tried to be good at using the unittest module. At a high level, I'm building two RESTful APIs designed specifically to talk to each other. For most requests, I can just use DummyRequest and test the rendered values against an expected constant and that's been working...
Unit-testing client-server interaction in Twisted
0
0
1
963
9,800,396
2012-03-21T07:39:00.000
0
0
1
0
python,caching,key-value-store
9,836,752
6
false
0
0
You could just cache last data in dict, nobody prohibits about it and it works in one-server environment When new data added - store it to some redis (memcachedb) When server restarts - just load newest N records to dictionary All depends on data volume. I believe it takes more memory to keep complex structures in dic...
3
5
0
I need something like a temporary in-memory key-value store. I know there are solutions like Redis. But I wonder if using a python dictionary could work? And potentially be even faster? So think a Tornado (or similar) server running and holding a python dictionary in memory and just return the appropriate value based o...
Using python dictionary as a temporary in-memory key-value database?
0
0
0
8,859
9,800,396
2012-03-21T07:39:00.000
3
0
1
0
python,caching,key-value-store
14,378,319
6
false
0
0
An in process Python dictionary is way faster than a memcached server. According to a non-rigorous benchmark that I performed some days ago, a single get takes around 2us using an in process python dictionary and around 50us using a memcached server listening on localhost. In my benchmark, I was using libmemcached as C...
3
5
0
I need something like a temporary in-memory key-value store. I know there are solutions like Redis. But I wonder if using a python dictionary could work? And potentially be even faster? So think a Tornado (or similar) server running and holding a python dictionary in memory and just return the appropriate value based o...
Using python dictionary as a temporary in-memory key-value database?
0.099668
0
0
8,859
9,800,396
2012-03-21T07:39:00.000
0
0
1
0
python,caching,key-value-store
9,800,438
6
false
0
0
It's possible and it is much faster than redis/memcache because of no network latency. You can use cPickle to dump the dictionary every once in a while. It's tricky though if your program spawns sub processes, then updating the values in one process doesn't affect the other.
3
5
0
I need something like a temporary in-memory key-value store. I know there are solutions like Redis. But I wonder if using a python dictionary could work? And potentially be even faster? So think a Tornado (or similar) server running and holding a python dictionary in memory and just return the appropriate value based o...
Using python dictionary as a temporary in-memory key-value database?
0
0
0
8,859
9,801,235
2012-03-21T08:48:00.000
3
0
0
0
python,numpy,magic-methods,type-coercion
9,802,282
1
true
0
0
The term "arraylike" is used in the numpy documentation to mean "anything that can be passed to numpy.asarray() such that it returns an appropriate numpy.ndarray." Most sequences with proper __len__() and __getitem__() methods work okay. Note that the __getitem__(i) must be able to accept a single integer index in rang...
1
1
1
I'm implementing a Matrix Product State class, which is some kind of special tensor decomposition scheme in python/numpy for fast algorithm prototyping. I don't think that there already is such a thing out there, and I want to do it myself to get a proper understanding of the scheme. What I want to have is that, if I s...
python/numpy: Using own data structure with np.allclose() ? Where to look for the requirements / what are they?
1.2
0
0
416
9,803,409
2012-03-21T11:09:00.000
0
0
1
0
python,mongodb,pymongo,bson
9,895,718
1
true
0
0
Currently son_manipulators always return instances of SON. If you need to use as_class you will need to handle DBRef in your client.
1
0
0
I have a very special question about son manipulation and the as_class parameter by find. After I add the AutoReference manipulator I get a SON object from the curser and not a object from the class which I defined in the as_class parameter. Is there someone with the same problem, is this a bug in pymongo or I am only...
pymongo as_class and son manipulation
1.2
0
0
573
9,804,674
2012-03-21T12:32:00.000
0
0
0
0
python,sockets,wsgi
9,805,325
2
false
1
0
In my opinion HTTP is an ideal protocol for sending files or large data, and its very common use, easy to suit any situation. If you use a self-created protocol, you may find it hard to transform when you get other client needs, like a web API. Maybe the discussions about HTTP's lack of instantaneity and agility make y...
1
0
0
I am working out how to build a python app to do image processing. A client (not a web browser) sends an image and some text data to the server and the server's response is based on the received image. One method is to use a web server + WSGI module and have clients make a HTTP POST request (using multipart/form-data)....
Sending image to server: http POST vs custom tcp protocol
0
0
1
739
9,805,426
2012-03-21T13:17:00.000
1
0
0
0
python
10,435,892
2
false
0
0
openpyxl is definitely worth a test drive, but keep in mind that it support only XLSX files, while xlrd/xlwr support only XLS files.
1
2
0
Are there any alternative to xlrd, xlwt and xlutils for handling MS Excel in python? As far as I know, their licensing does not allow it to be used for commercial purpose and I was wondering if there are any alternative to that other than using COM.
Alternative to xlrd, xlwt and xlutils in python
0.099668
1
0
3,189
9,806,058
2012-03-21T13:55:00.000
0
0
1
0
python,regex,dictionary
9,806,271
5
false
0
0
I'm not sure I understand your usecase correctly. I guess it is about the fact that you are handling suffixes and they are hard to detect. A typical approach (typically in indexing situations) would be to turn your string around and handle the suffix as a prefix. Then you can do a simple binary search in a sorted li...
2
3
0
I need to separate all possible suffixes (about 1000) from a given word. I am thinking about using a dict. In doing so I would have suffixes as keys (and some additional information about the suffixes as values needed in the further process). If the longest possible suffix is 4 letters long I would search the dict for ...
Separating suffixes using a dictionary
0
0
0
199
9,806,058
2012-03-21T13:55:00.000
3
0
1
0
python,regex,dictionary
9,806,191
5
true
0
0
If the suffixes aren't too long, your solution sounds fine -- it's only a few dictionary look-ups per word, and dictionary look-ups are fast. I don't think any more complex solution (like using a trie) would be worth it here. For only removing the suffix, you could also use a set instead of a dictionary, but since yo...
2
3
0
I need to separate all possible suffixes (about 1000) from a given word. I am thinking about using a dict. In doing so I would have suffixes as keys (and some additional information about the suffixes as values needed in the further process). If the longest possible suffix is 4 letters long I would search the dict for ...
Separating suffixes using a dictionary
1.2
0
0
199
9,807,215
2012-03-21T15:01:00.000
0
0
1
0
java,python,abstract-class,jython
9,993,155
1
false
0
0
Code would really be needed, but my gut feeling is, that your system has access to the compiled .class file from Jython but not the .py source file
1
1
0
We need to use in Java written software some Python subclasses of an abstract Python class. Trying to do it with Jython we had some troubles that we haven't experienced importing not-abstract Python classes. More specifically, the error that we get is this the source attachment is not contain the source for the file P...
How to import in Java Python subclasses that use abstract methods of other classes?
0
0
0
189
9,807,920
2012-03-21T15:39:00.000
0
0
0
0
python,django
9,808,401
2
false
1
0
This is probably a place where lots and lots of tests will help you. It's not my project, but here's what I'd probably do: Start a completely new project in Django 1.4 Write front-end tests for the current application Write a script to migrate the database from 0.93 to 1.4 (it sounds like you have lots of special case...
1
0
0
So herein lies my question. Django project that was originally developed several years ago when django was still 0.97 version. The code was continuously built on to the point where I think band aids upon bandaids on top of bandaids is not going to cut it. How can I start with untangling this django project? Currently...
Untangle Django (How should I start going at a lot of legacy code of several years with django that started in 0.97)
0
0
0
166
9,808,250
2012-03-21T15:56:00.000
1
0
0
1
android,python,http,google-app-engine
9,808,831
1
false
1
0
You don't seem to have understood how web applications work. They don't wait for signals - or, rather, that's all they do. Every page served by a Web service is in response to a signal, ie a request. Your web service just needs to respond to normal requests in the normal way.
1
0
0
I don't know how to present the title more clearly. I want build a site on Google app engine (GAE), and one app on android. The site on GAE should wait the signal which is from the app on android and handle the signal to do something. I don't know how to search the "keyword" on Google of waiting signal on GAE, or wha...
GAE wait response from other source
0.197375
0
0
68
9,808,628
2012-03-21T16:17:00.000
1
1
0
0
python,celery,pyramid,celeryd
9,813,506
1
true
1
0
There are technically ways you could use Apache/mod_wsgi to manage a process distinct from that handling web requests, but the pain point is that Celery will want to fork off further worker processes. Forking further processes from a process managed by Apache can cause problems at times and so is not recommended. You a...
1
0
0
I've been able to deploy a test application by using pyramid with pserve and running pceleryd (I just send an email without blocking while it is sent). But there's one point that I don't understand: I want to run my application with mod_wsgi, and I don't understand if I can can do it without having to run pceleryd from...
using celery with pyramid and mod_wsgi
1.2
0
0
530
9,811,655
2012-03-21T19:38:00.000
0
1
0
0
python,web-services,open-source,reverse
9,811,793
3
false
1
0
Yes, All they could do is treat your web service as a black box, query the WSDL for all the parameters it accepts and the data that it returns. They could then submit different variables and see what different results are. The "code" could not be seen or stolen (with proper security) but the inputs and outputs coul...
3
1
0
First I want to clearify that I mean by reverse engineering something like "decompiling" and getting back the original source code or something similiar. Yesterday I read a question about someone who wanted to protect his python code from "getting stolen" in other words: he didn't like that someone can read his python ...
Reverse Engineer a program working as a webservice, the future?
0
0
0
276
9,811,655
2012-03-21T19:38:00.000
1
1
0
0
python,web-services,open-source,reverse
9,812,028
3
true
1
0
Wow, this is awesome! I've never thought it this way, but you could create a program that crawls an api, and returns as an output a django/tastypie software that mimics everything the api does. By calling the service, and reading what it says, you can parse it, and begin to see the relationships between objects inside ...
3
1
0
First I want to clearify that I mean by reverse engineering something like "decompiling" and getting back the original source code or something similiar. Yesterday I read a question about someone who wanted to protect his python code from "getting stolen" in other words: he didn't like that someone can read his python ...
Reverse Engineer a program working as a webservice, the future?
1.2
0
0
276
9,811,655
2012-03-21T19:38:00.000
0
1
0
0
python,web-services,open-source,reverse
9,812,274
3
false
1
0
It depends on what you mean by reverse engineering: by repeatedly sending input and analyzing the output the behaviour of your code can still be seen. I wouldn't have your code but I can still see what the system does. This means I could build a similar system that does the same thing, given the same input. It would be...
3
1
0
First I want to clearify that I mean by reverse engineering something like "decompiling" and getting back the original source code or something similiar. Yesterday I read a question about someone who wanted to protect his python code from "getting stolen" in other words: he didn't like that someone can read his python ...
Reverse Engineer a program working as a webservice, the future?
0
0
0
276
9,812,084
2012-03-21T20:10:00.000
0
0
1
0
c#,python,vb.net,visual-studio
9,812,140
5
false
0
0
If the arguments are of a different type you could overload the method Alternatively, you can just pass in a value indicating the sequence of arguments and have logic within the method to treat it accordingly.
1
0
0
In C#, Python and/or VB.NET, how can I write a method of a class that can accept different sequences of arguments? As an indication, the multiple choices of arguments sequence would be accessible when pressing shift+shift+space in Visual Studio.
How do I define a method which can accept different sequences of arguments?
0
0
0
290
9,812,369
2012-03-21T20:32:00.000
4
0
1
0
python,dictionary,infinite
9,812,420
5
false
0
0
You will want to create a class with the special method __getitem__(self,key) that returns the appropriate value for that key.
1
1
0
Is there something like an "infinite dictionary" in Python? More precisely, is there something where - i can put in values like in a dictionary, - but maybe also a function which tells me how to map a key to a value, - and maybe also something that maps a key to a (finite) set of keys and then gives the corresponding v...
Is there an "infinite dictionary" in Python?
0.158649
0
0
2,092
9,815,655
2012-03-22T02:33:00.000
0
1
0
1
python,bash,cgi,apache
9,815,735
2
false
0
0
What? Surely you don't mean that your scripts rely on configurations in some account's personal home directory. Apache config files can export environment variables to CGI scripts, etc. Maybe your program is too dependent on too many environment variables. How about supporting a configuration file: /etc/mypythonprogram...
1
2
0
I'm running Python scripts as a CGI under Apache 2.2. These scripts rely on environment variables set in my .bashrc to run properly. The .bashrc is never loaded, and my scripts fail. I don't want to duplicate my bashrc by using a bunch of SETENV commands; the configuration files will easily get out of sync and cause ha...
Apache httpd doesn't load .bashrc
0
0
0
2,452
9,817,712
2012-03-22T06:56:00.000
6
0
0
1
python,linux,doc
9,818,314
9
false
0
0
If you use the Fedora distribution, then yum install python-docs. Other distributions may provide similar packages.
1
31
0
In Windows, Python has a chm type document, and it is very convenient to read. But in the Linux, is there any document let me to read?
How do I see the Python doc on Linux?
1
0
0
15,843
9,817,995
2012-03-22T07:22:00.000
1
0
0
0
python,path,numpy,matplotlib
9,820,025
1
true
0
0
You'll generally need to install numpy, matplotlib etc once for every version of python you use, as it will install itself to the specific 'python2.x/site-packages' directory. Is the above output generated from a 2.6 or 2.7 session? If it's a 2.6 session, then yes, pointing your PYTHONPATH at 2.7 won't work - numpy in...
1
1
1
I'm on OSX Snow Leopard and I run 2.7 in my scripts and the interpreter seems to be running 2.6 Before I was able to import numpy but then I would get an error when trying to import matplotlib so I went looking for a solution and updated my PYTHONPATH variable, but I think I did it incorrectly and have now simply screw...
Python import works in interpreter, doesn't work in script Numpy/Matplotlib
1.2
0
0
2,566
9,819,233
2012-03-22T09:14:00.000
1
0
0
0
python,google-reader,calibre
10,144,450
1
false
0
0
You can use https://www.google.com/reader/api/0/subscription/list to list the user's subscriptions. The folders each subscription is in are given by the categories list. You can append ?output=json to get the list of subscriptions as JSON.
1
0
0
I'm writing a python script (in fact a Calibre Recipe) to retrieve all the items under a specific tag or category in my readlist. I'm able to retrieve the whole items from the category but I'ld like to retrieve items feed-by-feed, so I need a way to list the feeds filed under a specific category (just as Google Reader...
Google Reader API Listing feed from a single tag or category
0.197375
0
1
358
9,819,260
2012-03-22T09:15:00.000
0
0
0
1
python,google-app-engine
9,819,945
2
false
1
0
It depends on how nested threads you expect to get and if you want to optimize reading or writing. If we guess that the threads normally are quite shallow and that you want to optimize reading all subcomments on all levels of a comment, I think you should store each comment in a separate entry and then put a reference ...
1
1
0
I am trying to write a comments model which can be threaded (no limits to the number of child threads). How do I do this in Appengine? and what is the fastest way to read all comments? I am trying to do this in a scalable way so that app engine's new pricing does not kill my startup :)
Model to create threaded comments on Google Appengine with Python
0
0
0
380
9,820,182
2012-03-22T10:12:00.000
2
0
1
0
python,class
9,820,311
2
false
0
0
Undeclare a class using del className as usual.
1
2
0
is there any possible to override class, or undeclare class or redeclare a Class in python?
how to override class, or undeclare class or redeclare a Class in python?
0.197375
0
0
984
9,821,512
2012-03-22T11:37:00.000
1
0
0
0
python,django,cookies
9,821,596
2
false
1
0
setcookie("user", $username, time()+604800); /* Expires in a week */ "604800" represents the time the coockie will "live" for example One Minute: 60 Ten Minutes: 600 Half-an-Hour: 1800 One Hour: 3600 One Day: 86400 One Week: 604800 Two Weeks: 1209600 One Month (30 days): 2592000 One Year (365 days): 31536000
1
0
0
I have a requirement where I want to set a cookie in the browser. This cookie is not 100% related to the user session, am trying to capture the desktop preferred setting. I want to store this setting into a cookie that will not expire when the user logs out. Am using django in my implementation, Please advise if ther...
maintain cookie for browser even when user session is expired in django
0.099668
0
0
535
9,826,313
2012-03-22T16:16:00.000
0
1
0
1
python,django,posix,sh
9,826,394
4
false
0
0
./script.py runs the interpreter defined in the #! at the beginning of the file. For example, the first line might be #! /usr/bin/env python or #! /usr/bin/python or something else like that. If you look at what interpreter is invoked, you might be able to fix that problem.
2
6
0
One difference is that "./script.py" only works if script.py is executable (as in file permissions), but "python script.py" works regardless. However, I strongly suspect there are more differences, and I want to know what they are. I have a Django website, and "python manage.py syncdb" works just fine, but "./manage.py...
When invoking a Python script, what is the difference between "./script.py" and "python script.py"
0
0
0
2,513
9,826,313
2012-03-22T16:16:00.000
1
1
0
1
python,django,posix,sh
9,826,923
4
false
0
0
In Linux using terminal you can execute any file -if the user has execute permission- by typing ./fileName. When the OS sees a valid header like #! /usr/bin/python (or for perl #! /usr/bin/python), It will call the python or perl (appropriate) interpreter to execute the program. You can use the command python script.p...
2
6
0
One difference is that "./script.py" only works if script.py is executable (as in file permissions), but "python script.py" works regardless. However, I strongly suspect there are more differences, and I want to know what they are. I have a Django website, and "python manage.py syncdb" works just fine, but "./manage.py...
When invoking a Python script, what is the difference between "./script.py" and "python script.py"
0.049958
0
0
2,513
9,826,322
2012-03-22T16:16:00.000
1
1
0
0
python,django,deployment,distutils,project-organization
9,826,658
1
true
1
0
There's different philosophies on how apps should be packaged, but most Python developers adhere to a very minimalistic approach. In other words, you package up the smallest units of logic you can. So, your goal here shouldn't be to cram everything together, but to package each discrete application separately. By appli...
1
0
0
We have multiple Python projects that have dependencies on each other. Hierarchically, these are organized like this: P1 P2 ... Pn Each of these is an PyDev project within Eclipse and they co-exist just fine within that environment. We are in the process of structuring out build process to enable us to deploy these a...
Multiple Python projects organization for deployment and/or distribution
1.2
0
0
180
9,827,057
2012-03-22T17:06:00.000
1
0
0
0
python,django,validation,django-forms,django-validation
9,827,518
3
false
1
0
ModelChoiceFields are meant to be used to select between a choice of existing model instances. This is almost always best represented by some form of Select field. That said do you really have a FK from address to postal_code as you're implying. What are you storing on a PostalCode table to justify the extra table ...
1
12
0
Say I have an address table and it has a postal_code field -- ModelChoiceField does not allow me to use something other than PKs to validate existence correct? What would be the way to go? Normal input and use clean_*()?
Django ModelChoiceField - use something other than id?
0.066568
0
0
5,882
9,829,516
2012-03-22T19:55:00.000
1
0
1
0
python,multithreading,signals
9,829,825
1
true
0
0
Use threading.Semaphore where your main thread will call acquire after calling start on the second thread. When the second thread is started to the point you want it will call release on the same semaphore. If the second thread calls release first then the main thread will return from the acquire immediately. If the ma...
1
0
0
I am in this scenario: at a certain point, the main thread need to wait until another thread is started(alive). How can I notify the main thread? I do not want to write a loop and keep the main thread busy waiting. Thanks a lot.
In python, how can I be notified when another thread is started(alive) and avoid busy waiting
1.2
0
0
215
9,833,698
2012-03-23T03:09:00.000
0
0
0
0
python,text,fonts,resize,tkinter
56,558,354
3
false
0
1
..tested this: this works on the frame size, but not on the (scrolled)text-widgets size. my setup is a bit more complicated, with a masterframe for 2 sites, mainframes for each site and frames with various content, i.a. a scrolledtext widget. adding grid_propagate, *_row- and *_columnconfigure warded the masterframe fr...
2
6
0
I'm trying to create a simple word processor for starters to learn Python a bit better. I'm using the Tkinter Text widget for the main editing program, the only problem is the height and width are defined by characters. This creates a problem when I change fonts, for not all fonts are the same width. Every time the fo...
How to stop Tkinter Text widget resize on font change?
0
0
0
8,150
9,833,698
2012-03-23T03:09:00.000
0
0
0
0
python,text,fonts,resize,tkinter
62,726,391
3
false
0
1
Use the pack geometry manager to pack the widgets. I was creating a notepad and wanted the font sample area to display the font size. So I created a label frame and added a label in it - i.e. AabYyZz - to display the font sample.  When I increased the font size the size of the label frame also increased, so I've tried ...
2
6
0
I'm trying to create a simple word processor for starters to learn Python a bit better. I'm using the Tkinter Text widget for the main editing program, the only problem is the height and width are defined by characters. This creates a problem when I change fonts, for not all fonts are the same width. Every time the fo...
How to stop Tkinter Text widget resize on font change?
0
0
0
8,150
9,834,761
2012-03-23T05:58:00.000
2
1
1
0
python,c,cpython,python-c-api,python-c-extension
9,834,834
1
true
0
0
String lookups on a dict are very cheap in Python, but if desired you can cache them in a struct. There usually is no provision for doing so, since these libraries are meant to be accessed via Python and not C. It is still possible to generate your own headers that match the definitions in the C modules, but they would...
1
1
0
Are there any best practices for the use of higher-level Python constructs such as threading.Condition, and collections.deque from modules written in C? In particular: Avoiding dict lookup costs, for methods and members Accessing parts of these constructs that are in C directly where possible When to reimplement desir...
Using higher-level Python constructs from C
1.2
0
0
120
9,835,762
2012-03-23T07:59:00.000
-4
0
1
0
python,list,duplicates
35,319,181
40
false
0
0
Use the sort() function. Duplicates can be identified by looping over it and checking l1[i] == l1[i+1].
1
613
0
How can I find the duplicates in a Python list and create another list of the duplicates? The list only contains integers.
How do I find the duplicates in a list and create another list with them?
-1
0
0
1,110,841
9,835,895
2012-03-23T08:14:00.000
2
0
1
1
python,google-app-engine,google-cloud-datastore
9,838,594
1
true
0
0
If it's small and read-only, it's a much better idea to store data in locally - nothing beats the latency of local memory. Note you don't have to store it as a Python module - any data file will work, if you write the code to read it into memory.
1
0
0
I am developing a simple data visualization application in python with Google AppEngine. The data has the following properties: structure : simple key - tuple-of-int size : in the order (1-10mb on disk or in memory when loaded by the python interpreter) read-only (uploaded once and for all by me, not modified by users)...
Storing constant data: python module v. the datastore
1.2
0
0
269
9,837,104
2012-03-23T09:55:00.000
2
0
1
0
python,ncurses,curses
12,128,291
1
false
0
0
Yes you can call "resize()" on a pad object. It is another type of "window" object in the Python curses model. The thing about Python's "pad" objects is that their .refresh() method is rather non-intuitive (and poorly documented). I can get it working, but I still find the six argument tuple that it requires to be b...
1
4
0
How can I resize curses pad, created with newpad? There is window.resize function and although window is similar object as pad, nothing explicitly says I can use this function to resize pad.
How to resize curses pad?
0.379949
0
0
1,686
9,839,240
2012-03-23T12:32:00.000
1
1
0
1
python,command-line
9,839,781
13
false
0
0
This is typically done manually/, I don't think there is an automatic way to do it that works for every case. You should add a --pause argument to your script that does the prompt for a key at the end. When the script is invoked from a command line by hand, then the user can add --pause if desired, but by default ther...
1
36
0
Background I would like my Python script to pause before exiting using something similar to: raw_input("Press enter to close.") but only if it is NOT run via command line. Command line programs shouldn't behave this way. Question Is there a way to determine if my Python script was invoked from the command line: $ pytho...
How to determine if Python script was run via command line?
0.015383
0
0
35,970
9,839,515
2012-03-23T12:49:00.000
0
0
0
0
python,django
10,146,928
4
true
1
0
Decide to go with sub-classes with each Product as each has a limited set of specific attributes that won't change much or at all over time. Thanks for all the great feedback. Learned a lot :-)
1
0
0
I'm building my first Django app to manage multiple SaaS products. This entails storing custom attributes for each Version of each Product. For example, a new version of a Product is released that includes new configuration options that the earlier versions of the Product do not support. I need to be able to keep tr...
Given Products, each with multiple Versions, what is the preferred/best way to support custom attributes at the Product/Version level in my Django app
1.2
0
0
68
9,844,014
2012-03-23T17:43:00.000
1
0
1
0
python
9,844,107
1
true
0
0
The main difference between using the decorative pattern and monkey patching is that monkey patching can lead to hard-to-debug code. The problem is that monkey patching does not explicitly show the fact that you modified the class: users/readers/maintainers might be confused by the fact that the patched class behaves d...
1
3
0
Decorative pattern in Python allows to wrap the core object with other object capable of changing its behavior. It is also suggested that monkey-patching can be used to achieve similar effect? How does two compare? When is decorative pattern more useful than monkey-patching when used for the same task?
Decorative pattern versus monkey-patching in Python
1.2
0
0
271
9,844,679
2012-03-23T18:33:00.000
0
1
0
0
python,security,encryption
9,852,214
3
false
0
0
This is a workable zero-knowledge proof. However, if you have the co-operation of the military, one would think you could do better... You could get a (otherwise non-sensical) serial number and initial password from the military, and then have the recruits sign in using that. This will solve the problem of people not h...
3
2
0
Suppose the following imagined scenario: I have a site that is used for military recruits. Military recruits and only military recruits may sign up on this site. - The easiest way to authenticate would be to get a list of pre-authorized email addresses. However, the military obviously will not release their email add...
Authenticating email address without being able to view email address
0
0
0
134
9,844,679
2012-03-23T18:33:00.000
0
1
0
0
python,security,encryption
9,852,047
3
false
0
0
I think it is insecure to have just a hash of the email address as hashing algorithm is not reversible but it is theoretically possible to have incorrect email that has the same hash as correct one. It is true for md5 hash algorithm and theoretically true for any other. I suggest to use some kind of salt (additional ha...
3
2
0
Suppose the following imagined scenario: I have a site that is used for military recruits. Military recruits and only military recruits may sign up on this site. - The easiest way to authenticate would be to get a list of pre-authorized email addresses. However, the military obviously will not release their email add...
Authenticating email address without being able to view email address
0
0
0
134
9,844,679
2012-03-23T18:33:00.000
1
1
0
0
python,security,encryption
9,851,795
3
true
0
0
Sounds good, as long as the "military" is convinced, correctly or not, that the hashing is truly irreversible, and is willing to trust you with the hashed list of addresses. (What is sha5, by the way? Afaik sha3 is the latest generation). If they will not entrust you with even the cryptographically hashed list, the al...
3
2
0
Suppose the following imagined scenario: I have a site that is used for military recruits. Military recruits and only military recruits may sign up on this site. - The easiest way to authenticate would be to get a list of pre-authorized email addresses. However, the military obviously will not release their email add...
Authenticating email address without being able to view email address
1.2
0
0
134
9,846,683
2012-03-23T21:27:00.000
0
1
1
0
python,colorama
51,990,615
11
false
0
0
Re-installing colorama might not work right away. If there is a colorama .egg in site-packages, you need to remove that file first and then pip install colorama.
3
17
0
I downloaded the colorama module for python and I double clicked the setup.py. The screen flashed, but when I try to import the module, it always says 'No Module named colorama' I copied and pasted the folder under 'C:\Python26\Lib\site-packages' and tried to run the setup from there. Same deal. Am I doing something wr...
How to install Colorama in Python?
0
0
0
125,711
9,846,683
2012-03-23T21:27:00.000
3
1
1
0
python,colorama
68,844,752
11
false
0
0
Run the following command in Google shell: sudo pip3 install colorama
3
17
0
I downloaded the colorama module for python and I double clicked the setup.py. The screen flashed, but when I try to import the module, it always says 'No Module named colorama' I copied and pasted the folder under 'C:\Python26\Lib\site-packages' and tried to run the setup from there. Same deal. Am I doing something wr...
How to install Colorama in Python?
0.054491
0
0
125,711
9,846,683
2012-03-23T21:27:00.000
0
1
1
0
python,colorama
54,669,213
11
false
0
0
I have also experienced this problem. Following the instructions to install sudo pip install colorama I receive the message: Requirement already satisfied: colorama in /usr/lib/python2.7/dist-packages. The problem for me is that I am using python3 in my header code #!usr/bin/env python3. Changing this to#!usr/bin/env...
3
17
0
I downloaded the colorama module for python and I double clicked the setup.py. The screen flashed, but when I try to import the module, it always says 'No Module named colorama' I copied and pasted the folder under 'C:\Python26\Lib\site-packages' and tried to run the setup from there. Same deal. Am I doing something wr...
How to install Colorama in Python?
0
0
0
125,711
9,847,451
2012-03-23T22:47:00.000
5
1
0
0
python,email,smtp,rabbitmq,amqp
9,847,881
3
true
0
0
Why are you considering RabbitMQ ? it is better to consider using a MTA/Mail relay like Postfix where you submit your emails and it handles them for you in a queue. You can configure it to dispatch the queue on different mail relays, set the email throughput, how much retry shall be made on a failed sending ...
2
2
0
I have an application that emails individuals on different occurrences. The entire application is on a single server. I am currently sending emails through SendGrid. At what volume of emails would it make sense to use a system like RabbitMQ to send out emails? Maximum rate = 1 email per minute? 1 email per second? 10 ...
At what email volume to use AMQP
1.2
0
0
1,146
9,847,451
2012-03-23T22:47:00.000
1
1
0
0
python,email,smtp,rabbitmq,amqp
27,737,869
3
false
0
0
Having Rabbitmq is good option when your are considering scaling in future, I mean in terms of new smpt send mail workers or new email server, as of now if you have single server and not going to more in it then rabbitmq will load your server even more and will be issue to maintain, but if your going to have more then ...
2
2
0
I have an application that emails individuals on different occurrences. The entire application is on a single server. I am currently sending emails through SendGrid. At what volume of emails would it make sense to use a system like RabbitMQ to send out emails? Maximum rate = 1 email per minute? 1 email per second? 10 ...
At what email volume to use AMQP
0.066568
0
0
1,146
9,847,956
2012-03-24T00:06:00.000
2
0
1
0
editor,default,ipython,python-idle,notepad
9,868,486
1
false
0
0
Yes, I'm using the Qt console. But setting c.IPythonWidget.editor_line = 'idle -e' didn't help. But setting editor_line in C:\Python27\Lib\site-packages\IPython\frontend\qt\console\ipython_widget.py helped! Thank you for your comment, Thomas K.! (Can I reward you for the comment somehow?)
1
1
0
The magic command %edit in IPython defaults to notepad despite setting EDITOR=idle environment variable and [c.]TerminalInteractiveShell.editor in ipython_config.py to idle. I have tried editing all ipython_config.py in subdirectories of my C:\Python27 and setting user as well as system environment variables. Please ad...
IPython EDITOR defaulting to notepad instead of invoking IDLE [Windows]
0.379949
0
0
1,398
9,850,022
2012-03-24T07:45:00.000
7
0
1
0
python,cygwin
9,850,189
3
false
0
0
Install python 2.7 from python.org or EPD, etc. Then put the location of python.exe (default is C:\Python27\python.exe ) in your Environment Variables (Right click "Computer" from start menu -> select "properties" -> Environment Variables ) and remove python 2.6 from cygwin, before you do all this.
2
13
0
I'm on Windows trying to run a Python script. The problem I'm facing is that this script requires Python 2.7. Cygwin is currently installed with the Python 2.6 package. I tried searching for a 2.7 package in the installation wizard but couldn't find any. So I'm kinda stuck. Does anybody have a solution?
Cygwin Python 2.7 package
1
0
0
27,535
9,850,022
2012-03-24T07:45:00.000
1
0
1
0
python,cygwin
10,720,998
3
true
0
0
The problem was that I had downloaded a corrupt package of the source code. I tried it again and it worked fine. The solution to this problem is to compile the package yourself till its not officially available. I had downloaded a corrupt package of the source code, md5 checksum turned out to be different. I tried it a...
2
13
0
I'm on Windows trying to run a Python script. The problem I'm facing is that this script requires Python 2.7. Cygwin is currently installed with the Python 2.6 package. I tried searching for a 2.7 package in the installation wizard but couldn't find any. So I'm kinda stuck. Does anybody have a solution?
Cygwin Python 2.7 package
1.2
0
0
27,535
9,850,143
2012-03-24T08:14:00.000
0
0
0
0
python,file,sockets
9,855,161
1
true
0
0
I think you may want to read the socket module doc of python.
1
0
0
I am looking to send an img file created using Qemu snapshot feature through the network using Python. Its file is of varying size.
Sending an img file using Python
1.2
0
1
103
9,850,933
2012-03-24T10:23:00.000
1
0
1
0
python,regex
9,850,963
3
true
0
0
Your problem is that you're using re.match. That function looks for matches at the beginning of the string. So, either you change your regexp to '.*/\?', or use re.search instead.
1
1
0
I'm trying to write a regex to match any path that contains /? to determine whether it is a querystring or not. a sample string to be matched would be this: /mysite/path/to/whatever/?page=1 so far I thought this would match re.match(r'/\?', '/mysite/path/to/whatever/?page=1') but it doesn't seem to be matching
python regex match querystring path
1.2
0
0
1,465
9,852,614
2012-03-24T14:43:00.000
0
0
0
0
python,distributed,zeromq
9,853,246
2
true
0
0
I don't know zmq. Here's a pattern that might not work, just to get started: a master node send the same request to all workers (about 200) master PUB bind *:3140 send worker SUB connect masterhost:3140 SUBSCRIBE recv the then collect the answers worker PUSH connect masterhost:3141 send master PULL bind *:3141 rec...
1
3
0
I have a working application using python and zeromq and I would like to optimize it. Briefly, a master node send the same request to all workers (about 200) and the then collect the answers. Based on the answer, it sends a message back to one node and the node answers back. Right now I implemented a very simple patte...
Distributing task with python and zeromq
1.2
0
1
3,007
9,857,067
2012-03-25T00:58:00.000
2
1
0
0
php,python
9,857,192
3
false
0
0
Both PHP and Python can be used for long running programs. PHP was designed as a embeddable programing language for web servers. In the environment it is commonly set up in the web server (generally Apache with mod_php) has PHP running in it and the entire PHP environment is set up and torn down for each request. ...
1
0
0
I am confused about using php or python for implementing server program. I seems that there are not only syntax differences. For example, the php program is short-lived (only exist when request comes and die when response is generated) and it can only store things in DB rather than memory. But for python (using Twisted...
php vs python for server program
0.132549
0
0
763
9,858,228
2012-03-25T06:00:00.000
2
0
0
0
python,qt,pyqt
9,858,246
1
false
0
1
Set the signals and slots in Python. When you export the ui to Python using pyuic4 or pyside-uic, the signals and slots are set using python anyways.
1
2
0
Howdo, I've just started getting into Python and QT. I have a very simplistic question. I wanted to create a Qt window to display the output and accept input from a program that I am attempting. My question is, in Qt Designer I have made said window, but I'm not sure if I have to set the signals and slots in designer ...
Qt and Python, where to configure signals and slots
0.379949
0
0
277
9,859,046
2012-03-25T09:14:00.000
2
0
0
0
python,django,authentication
11,165,359
3
false
1
0
Integrating separate packages can be a real pain. If you use django-allauth this work has already been done for you....
1
2
0
I'm a newbie in Django and I'm trying to port my vanilla php application to Python/Django. In my project, I want to let users authenticate using regular registration/login form or through social authentications like facebook, google and twitter. I searched on google and stackoverflow for similar questions and came to k...
How to implement normal site registration/login together with social authentication(mainly facebook) in Django?
0.132549
0
0
1,363
9,859,343
2012-03-25T10:09:00.000
1
0
0
0
python,database,sqlite,sqlalchemy
9,860,250
2
false
0
0
You would be better off using an ORM (Object Relational Library) Library that would allow you to design in an OOP way, and let it take care of the database for you. There are many advantages; but one of the greatest is that you won't be tied to a database engine. You can use sqlite for development, and keep your projec...
2
2
0
I am writing a music catalogue application with PyQt using to display GUI. I have a problem about choosing database engine. There are simply too many options. I can use: -PyQt build-in QSql -sqlite3 -SQLAlchemy (Elixir) -SQLObject -Python DB-API Probably there are far more options, this list is what I got from google (...
Databases and python
0.099668
1
0
475
9,859,343
2012-03-25T10:09:00.000
4
0
0
0
python,database,sqlite,sqlalchemy
9,859,423
2
false
0
0
SQLite3 has the advantage of shipping with Python, so it doesn't require any installation. It has a number of nice features (easy-of-use, portability, ACID, storage in a single file, and it is reasonably fast). SQLite makes a good starting-off point. Python's DB API assures a consistent interface to all the popular...
2
2
0
I am writing a music catalogue application with PyQt using to display GUI. I have a problem about choosing database engine. There are simply too many options. I can use: -PyQt build-in QSql -sqlite3 -SQLAlchemy (Elixir) -SQLObject -Python DB-API Probably there are far more options, this list is what I got from google (...
Databases and python
0.379949
1
0
475
9,860,029
2012-03-25T12:14:00.000
0
1
0
0
java,python,reflection,jython,scons
9,865,039
2
false
0
0
If your current scons files are very regular and consistent it may be easier to do something "dumb" with standard text-editing tools. If you want to get smarter, you should notice that scons is itself a Python program, and it loads your build files which are also Python. So you could make your own "special" version o...
2
0
0
I'm thinking about trying to convert a Scons (Python) script to another build system but was wondering if there was a Python-analysis library available in order to 'interrogate' the Scons/Python script? What I'm [possibly] after is something along the lines of Java's reflection mechanism, in fact, if this is possible ...
"Analyse" the Python language to dissect a Scons build script?
0
0
0
95
9,860,029
2012-03-25T12:14:00.000
0
1
0
0
java,python,reflection,jython,scons
9,874,850
2
false
0
0
I doubt it's the best tool for migrating scons, but python's inspect module offers some reflection facilities. For the rest, you can simply poke inside live classes and objects: Python has some data hiding but does not enforce access restrictions.
2
0
0
I'm thinking about trying to convert a Scons (Python) script to another build system but was wondering if there was a Python-analysis library available in order to 'interrogate' the Scons/Python script? What I'm [possibly] after is something along the lines of Java's reflection mechanism, in fact, if this is possible ...
"Analyse" the Python language to dissect a Scons build script?
0
0
0
95
9,860,262
2012-03-25T12:54:00.000
-1
0
0
0
python,html,http,audio,streaming
9,861,360
1
false
0
0
Think about what you're asking: A stream of bytes is arriving over the network, and you want random access over it? You can't. What you can do is implement buffering yourself, which you could do reasonably transparently with the io module. If you want to seek forward, discard the intermediate blocks; if you want to see...
1
1
0
I have developed a server that serves audio files over HTTP. Using the Content-Length header I was able to view the current position, but this source isn't seekable. How can I make it seekable? Some people recommended sending Accept-Range: bytes, but when I tried that the audio doesn't even play anymore.
Can't seek in streamed file
-0.197375
0
1
718
9,860,276
2012-03-25T12:56:00.000
0
1
0
0
php,python,mysql
9,860,314
3
false
0
0
Assuming your real ID is the auto_incremented field in your customer table, then just have a second table that maps your public ID to the real ID. Assuming you're using some sort of hashing algorithm to generate your public ID, it'd be a simple process to do a lookup on that table when you create a new user to detect a...
1
1
0
I am planning to build, for lack of a better term, a multi user Customer Relationship Manager (CRM) and I want to create a unique identifier that is easy to transmit in email, via text, and verbally to other team members. For Example: I upload my list of 100 customers and John Smith and his phone number are included in...
Unique Key Generation Logic
0
0
0
739
9,860,588
2012-03-25T13:41:00.000
42
0
1
0
python
9,860,722
8
false
0
0
Python long can be arbitrarily large. If you need a value that's greater than any other value, you can use float('inf'), since Python has no trouble comparing numeric values of different types. Similarly, for a value lesser than any other value, you can use float('-inf').
1
117
0
How can I assign the maximum value for a long integer to a variable, similar, for example, to C++'s LONG_MAX.
Maximum value for long integer
1
0
0
268,050
9,860,591
2012-03-25T13:42:00.000
1
0
1
0
python,crash,installation,py2exe
9,870,016
1
true
0
1
You can always try using Pyinstaller. It worked better than py2exe in my case to make a standalone .exe from Tkinter
1
1
0
I wrote a Python GUI script with Tkinter, and now I want to convert it to a standalone .exe. I have already used py2exe on another pc with WinXP, but on my own pc, where I use Win7 32bit, I can't indtall it. I took the original installer from py2exe.org for 32bit, but when I start it, after half a minute or so it says ...
py2exe Installer crashes
1.2
0
0
426
9,861,344
2012-03-25T15:26:00.000
1
0
0
0
python,mongodb,openshift
9,862,914
2
false
0
0
You could write a python script using pymongo (or any other mongodb client library) that does the necessary cleanup and configure cron to run it regularly.
1
1
0
I have a python web app that essentially allows 2 computers to talk with one another. If a session ends abruptly the record is still stored in pymongo, I want to be able to run a cron job to clean up old records, but I am not clear on how to do that, can't figure how to use bash to talk to pymongo... What else could I...
Openshift, python, mongodb, and cron guidance needed
0.099668
0
0
457
9,862,655
2012-03-25T18:11:00.000
1
0
0
0
python
9,862,717
2
true
0
0
You cannot trigger anything unless your local script is continuously listening for some kind of data feed (like a fixed URL serving an XML/JSON feed of paths) which is, IMHO, over-complicating your system. You could also use a Java applet ran locally instead of a remote website, but you'll have to sign it to be able to...
2
0
0
I have large video files (~100GB) that are local on my machine. I have a non-local website where I enter information about the video file. In addition, I need to get the checksum of the video file (and I do not want to manually trigger the script locally and copy and paste the value). To get a checksum of the video fil...
Remote website trigger a local action
1.2
0
0
446
9,862,655
2012-03-25T18:11:00.000
1
0
0
0
python
9,862,854
2
false
0
0
In general browsers run in a sandbox that has very limited access to the OS. In particular you can't run shell scripts from a browser. As I see it you have two options: Adapt your checksum.py script to send the checksum info directly to your website using the urllib2 calls, or pipe the results to a "curl" command. (N...
2
0
0
I have large video files (~100GB) that are local on my machine. I have a non-local website where I enter information about the video file. In addition, I need to get the checksum of the video file (and I do not want to manually trigger the script locally and copy and paste the value). To get a checksum of the video fil...
Remote website trigger a local action
0.099668
0
0
446
9,863,578
2012-03-25T20:08:00.000
2
0
0
0
python,ruby-on-rails,ruby,django,linux
9,863,652
1
true
1
0
I would do neither. Use an event subsystem such as Twisted, glib, Qt, etc. and have it act as both a GUI mainloop and a web server.
1
0
0
I am going to write a hybrid Web/Desktop app. The main purpose of the app is to be something like a daemon, running on a Linux machine. But it should also provide a rich interface via web for doing configuration, reporting and management. I have two things in mind for doing this: Ruby on Rails Django with Python ...
Hybrid Web/Desktop app - Ruby on Rails or Django on Python?
1.2
0
0
736