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
5,602,488
2011-04-09T02:22:00.000
2
0
1
0
python,permutation,random-sample
5,602,512
6
false
0
0
I don't know how python implements its shuffle algorithm, but the following scales in linear time, so I don't see why a length of 10 is such a big deal (unless I misunderstand your question?): start with the list of items; go through each index in the list in turn, swapping the item at that index it for an item at a r...
2
3
1
How to randomly pick all the results, one by one (no repeats) from itertools.permutations(k)? Or this: how to build a generator of randomized permutations? Something like shuffle(permutations(k)). I’m using Python 2.6. Yeah, shuffle(r) could be used if r = list(permutations(k)), but such a list will take up too much t...
Random picks from permutation generator?
0.066568
0
0
4,221
5,602,488
2011-04-09T02:22:00.000
2
0
1
0
python,permutation,random-sample
5,603,207
6
false
0
0
There's no way of doing what you have asked for without writing your own version of permutations. Consider this: We have a generator object containing the result of permutations. We have written our own function to tell us the length of the generator. We then pick an entries at random between the beginning of the list...
2
3
1
How to randomly pick all the results, one by one (no repeats) from itertools.permutations(k)? Or this: how to build a generator of randomized permutations? Something like shuffle(permutations(k)). I’m using Python 2.6. Yeah, shuffle(r) could be used if r = list(permutations(k)), but such a list will take up too much t...
Random picks from permutation generator?
0.066568
0
0
4,221
5,603,962
2011-04-09T08:53:00.000
1
0
0
0
php,python,django,wordpress,content-management-system
5,603,994
6
false
1
0
If you are comfortable with hands-on programming, use Drupal. It is one of the, if not the most powerful, configurable and tested CMS around. There are lots of CMSs' available out there and most of them are good also but the three that always stand out are Drupal, Joomla and Wordpress. Joomla and wordpress are easier...
1
2
0
I want to build websites for multiple customers and want to take advantage of features that come with typical CMSs. But on top of that I need to do lots of customization like: Writing my own templates on top of any existing templates to show the data in a form more suitable for these sites. Extract some of the data fr...
Best open source CMS for developers to customize and add dynamic pages and content
0.033321
0
0
5,886
5,606,665
2011-04-09T17:37:00.000
0
0
0
0
python,mysql,mysql-error-1045
5,606,690
3
false
0
0
Looks like you have an incorrect username/password for MySQL. Try creating a user in MySQL and use that to connect.
1
1
0
I have a python program which makes use of MySQL database. I am getting following error. It would be very grateful if some one help me out a solution. Traceback (most recent call last): File "version2_1.py", line 105, in refine(wr,w)#function for replacement File "version2_1.py", line 49, in refine wrds=db_connect....
Error when trying to execute a Python program that uses MySQL
0
1
0
3,356
5,607,535
2011-04-09T20:03:00.000
3
0
0
0
python,ajax,django,credit-card,braintree
5,615,096
2
false
0
0
You're right that using credit card tokens with transparent redirect is slightly difficult to deal with using the current Braintree API. However if you already have the users credit card information stored in the vault, you can use a server to server request since you won't have to capture any sensitive information. A...
2
2
0
Braintree's transparent redirect works beautifully, I don't have to pass any credit card info through my servers, and I'd like to keep it this way. My question is what is the preferred method to allow returning customers to use vaulted credit card/billing information? Credit card token is a protected field, so it canno...
Braintree python transparent redirect with vault option
0.291313
0
1
799
5,607,535
2011-04-09T20:03:00.000
0
0
0
0
python,ajax,django,credit-card,braintree
5,849,277
2
false
0
0
I am a Python developer and just successfully integrated Django with Braintree. I used almost the same approach as BenMills's description: using S2S API rather than TR for credit card switching while having the ability to create a new credit card on the same page! But I think there might be a potential way to solve you...
2
2
0
Braintree's transparent redirect works beautifully, I don't have to pass any credit card info through my servers, and I'd like to keep it this way. My question is what is the preferred method to allow returning customers to use vaulted credit card/billing information? Credit card token is a protected field, so it canno...
Braintree python transparent redirect with vault option
0
0
1
799
5,608,019
2011-04-09T21:24:00.000
0
0
0
0
python,django,image,url
5,608,147
1
false
1
0
There is no general way that you can know anything about an image until you retrieve (download) it. However, if the site you're downloading from has some standardized size in the URL (http://example.com/images/64x64/scary_clown.jpg), you might be able to use that -- assuming you trust them to enforce those sizes.
1
2
0
I'm working on a Python app (using the Django framework and running on Google Appengine). I'm trying to obtain the dimensions (width/height) of a remote image, from its url. Is there any I can do this without having to download the image? I haven't found anything so far...
Python: Getting image dimensions from URL
0
0
0
1,778
5,608,319
2011-04-09T22:19:00.000
0
0
0
0
python,xml,linux,rest
5,609,144
2
false
1
0
Yes. Keep in mind that being RESTful is merely a way to organize your web application's URL's in a standard way. You can build your web application to do whatever you want.
1
0
0
I am somewhat new to RESTful APIs. I'm trying to implement a python system that will control various tasks across multiple computers, with one computer acting as the controller. I would like all these tasks to be divided amongst multiple users (ex. task foo runs as user foo, and task bar runs as user bar) while handlin...
RESTful API across multiple users
0
0
1
622
5,609,322
2011-04-10T02:12:00.000
1
0
0
0
python,mysql,programming-languages,network-programming
5,609,341
2
false
0
0
from MySQLdb import * and import MySQLdb do very different things.
1
0
0
from the interpreter i can issue >>> from MySQLdb just fine. so, I'm assuming the module did actually load. My source looks as follows: from Tkinter import * from MySQLdb import * """ Inventory control for Affordable Towing Functions: connection() - Controls database connection delete() - Remove item fro...
python2.6 with MySQLdb, NameError 'MySQLdb' not defined
0.099668
1
0
7,873
5,609,969
2011-04-10T05:27:00.000
3
0
0
0
python,pdf,matplotlib,raster
5,610,731
2
false
0
0
Not that I know, but you can use the 'convert' program (ImageMagick') to convert a jpg to a pdf: `convert file.jpg file.pdf'.
1
14
1
I have some complex graphs made using matplotlib. Saving them to a pdf using the savefig command uses a vector format, and the pdf takes ages to open. Is there any way to save the figure to pdf as a raster image to get around this problem?
How to save figures to pdf as raster images in matplotlib
0.291313
0
0
5,667
5,612,312
2011-04-10T14:13:00.000
6
0
1
0
python
5,612,965
2
true
0
0
The compiler module was a Python compiler written in Python. It was horribly slow and a pain to maintain. The ast module is a smarter solution to the same problem: it provides Python level access to the actual compiler used when importing modules. Since it is just a visible API for the builtin compiler, it isn't going ...
1
3
0
The compiler module has been deprecated in python 2.6. Does anybody know what is the reason behind the deprecation ? Is the ast module a direct replacement ? Will the ast module be supported in python 3k ?
Differences between compiler and ast module in python
1.2
0
0
583
5,612,390
2011-04-10T14:24:00.000
0
0
0
1
python,django,google-app-engine
5,612,643
2
true
1
0
Thanks Abdul you made me realize what the problem is. I had changed a URL in my application to point to the application that I had deployed to Google-App Engine. It should have been pointing to my local application. I had myapp.appspot.com/move instead of localhost/move
1
1
0
I'm wondering if anyone has experienced problems with Google-App Engine's logging facility. Everything was working fine for me until this morning, I ran my local server and no logging messages were being displayed (well, none of my logging messages, the server GET messages etc.. are being displayed). Even errors are no...
Google-App Engine logging problem
1.2
0
0
252
5,614,372
2011-04-10T20:07:00.000
3
1
1
0
python,c,encoding
5,614,405
2
true
0
0
C as a language does not facilitate string encoding. A C string is simply a null-terminated sequence of characters (8-bit signed integers, on most systems). A wide string (with characters of type wchar_t, typically 16-bit integers) can also be used to hold larger character values; however, again, C standard library fu...
1
0
0
How can i change character encoding of a string to UTF-8? I am making some execv calls to a python program but python returns the strings with the some characters cut of. I don't know if this a python issue or c issue but i thought if i can change the strings encoding in c and then pass it to python, it should do the t...
How to change a strings encoding as utf 8 in C
1.2
0
0
1,560
5,615,228
2011-04-10T22:47:00.000
7
0
0
0
python,html
5,615,253
5
false
1
0
Yes, but not directly; you can set the onclick handler to invoke a JavaScript function that will construct an XMLHttpRequest object and send a request to a page on your server. That page on your server can, in turn, be implemented using Python and do whatever it would need to do.
1
15
0
Is there a way to call a python function when a certain link is clicked within a html page? Thanks
Call a python function within a html file
1
0
1
101,647
5,616,446
2011-04-11T03:15:00.000
2
1
0
0
python,profile,stochastic
5,616,811
8
false
0
0
To implement an external statistical profiler for Python, you're going to need some general debugging tools that let you interrogate another process, as well as some Python specific tools to get a hold of the interpreter state. That's not an easy problem in general, but you may want to try starting with GDB 7 and the a...
1
18
0
I would need to run a python script for some random amount of time, pause it, get a stack traceback, and unpause it. I've googled around for a way to do this, but I see no obvious solution.
Is there a statistical profiler for python? If not, how could I go about writing one?
0.049958
0
0
3,341
5,617,246
2011-04-11T05:49:00.000
0
0
0
0
python
5,617,901
2
false
0
0
There's something not quite as nice in logilab.database, but which works quite well (http://www.logilab.org/project/logilab-database). Supports sqlite, mysql, postgresql and some versions of mssql, and some abstraction mechanisms on the SQL understood by the different backend engines.
1
0
0
Is there some module to allow for easy DB provider configuration via connection string, similar to PHP's PDO where I can nicely say "psql://" or "mysql://" or, in this python project, am I just going to have to code some factory classes that use MySQLdb, psycopg2, etc?
python and DB connection abstraction?
0
1
0
413
5,617,599
2011-04-11T06:34:00.000
1
0
0
0
python,apache,mod-wsgi,lxml,xml-validation
6,176,299
3
false
1
0
I had a similar problem on a Linux system. Try installing a more recent version of libxml2 and reinstalling lxml, at least that's what did it for me.
2
5
0
Python hangs on lxml.etree.XMLSchema(tree) when I use it on apache server + mod_wsgi (Windows) When I use Django dev server - all works fine if you know about other nice XML validation solution against XSD, tell me pls Update: I'm using soaplib, which uses lxml logger.debug("building schema...") self.schema = etree.X...
Python hangs on lxml.etree.XMLSchema(tree) with apache + mod_wsgi
0.066568
1
0
1,123
5,617,599
2011-04-11T06:34:00.000
2
0
0
0
python,apache,mod-wsgi,lxml,xml-validation
6,685,198
3
false
1
0
I had the same problem (lxml 2.2.6, mod_wsgi 3.2). A work around for this is to pass a file or filename to the constructor: XMLSchema(file=).
2
5
0
Python hangs on lxml.etree.XMLSchema(tree) when I use it on apache server + mod_wsgi (Windows) When I use Django dev server - all works fine if you know about other nice XML validation solution against XSD, tell me pls Update: I'm using soaplib, which uses lxml logger.debug("building schema...") self.schema = etree.X...
Python hangs on lxml.etree.XMLSchema(tree) with apache + mod_wsgi
0.132549
1
0
1,123
5,617,641
2011-04-11T06:40:00.000
2
0
1
0
python,fortran
5,618,401
2
false
0
0
Your basic problem is that you are storing large arrays of data on the stack. This is bad design and is probably due to the way the Fortran code is implemented. Large arrays need to be stored on the heap and dynamically allocated there. To solve this problem you will need to understand and modify your Fortran code acc...
1
0
0
I have a python code which imports dll's created by f2py (from fortran routines). Now the python program crashes if the arrays in fortran are too large. How do I manage with this? By increasing stack size? Or heap? I've tried to study the matter, but I still do not understand how I can increase the stack or should I us...
dll load error in python due to insufficient stack size?
0.197375
0
0
295
5,620,157
2011-04-11T10:44:00.000
1
0
1
0
parallel-python,modelica
5,975,943
1
true
0
0
Seems pp is only able to transfer python-code to remote ppserver() and not internal *.exe files or others wihich are executed in the code ...
1
2
0
i'm using parallel python for stearing Monte Carlo simulations in Modelica. Everything works perfectly if i'm working on a single computer with 8 ncpus, however, i fail in adding ppservers to the required job_server. I start ppserver.py on the computer i want to add but and use the ip-adress on my work computer, but t...
using ppserver with parallel python
1.2
0
0
657
5,621,952
2011-04-11T13:20:00.000
0
0
1
1
macos,uninstallation,python-3.2
23,726,032
3
false
0
0
just uninstall 3x version of python if you have already installed it. Eclipse has that option when you click "see whats already installed". Install later 2.7 version. It works for me on my OS X 10.9.2 with Eclipse Juno.
2
10
0
According to the documentation from python.org, python 3.2 install on mac os requires an upgrade to tcl/tk 8.5.9 (for use of IDLE). In my haste, I have done both. Now my friend told me that python 3 is not recommended yet because only the built-ins and a few modules have been released for 3. The stable one so far is 2....
Uninstall python 3.2 on mac os x 10.6.7
0
0
0
19,603
5,621,952
2011-04-11T13:20:00.000
4
0
1
1
macos,uninstallation,python-3.2
5,627,279
3
false
0
0
I did the same (3.2 on a mac 10.6) and: -Moved both the Python 3.2 folder and the ActiveState ActiveTcl folder from the Applications Folder to the Trash. -Moved the Python.framework folder from the Library/Frameworks folder to the Trash. Running System profiler shows only the 2.6 version of Python. Marcos
2
10
0
According to the documentation from python.org, python 3.2 install on mac os requires an upgrade to tcl/tk 8.5.9 (for use of IDLE). In my haste, I have done both. Now my friend told me that python 3 is not recommended yet because only the built-ins and a few modules have been released for 3. The stable one so far is 2....
Uninstall python 3.2 on mac os x 10.6.7
0.26052
0
0
19,603
5,625,771
2011-04-11T18:31:00.000
0
0
0
0
ironpython,memory-management
5,625,833
2
false
1
0
It looks like Python Memory Validator is a commercial product, I'd ask the creator.
1
1
0
I've downloaded Python Memory Validator and am trying to install Heapy to try to get a profile for my ironpython application. So far PMV seems to choke for some reason with the message: Failure injecting into executable image using CreateProcess() This seems to be an issue integrating ironpython with PMV. Can anyone pr...
memory profiler for ironpython
0
0
0
228
5,626,193
2011-04-11T19:05:00.000
3
0
1
0
python,terminology,monkeypatching
58,668,814
8
false
0
0
What is monkey patching? Monkey patching is a technique used to dynamically update the behavior of a piece of code at run-time. Why use monkey patching? It allows us to modify or extend the behavior of libraries, modules, classes or methods at runtime without actually modifying the source code Conclusion Monkey patchin...
4
746
0
I am trying to understand, what is monkey patching or a monkey patch? Is that something like methods/operators overloading or delegating? Does it have anything common with these things?
What is monkey patching?
0.07486
0
0
275,056
5,626,193
2011-04-11T19:05:00.000
5
0
1
0
python,terminology,monkeypatching
34,795,134
8
false
0
0
Monkey patching is reopening the existing classes or methods in class at runtime and changing the behavior, which should be used cautiously, or you should use it only when you really need to. As Python is a dynamic programming language, Classes are mutable so you can reopen them and modify or even replace them.
4
746
0
I am trying to understand, what is monkey patching or a monkey patch? Is that something like methods/operators overloading or delegating? Does it have anything common with these things?
What is monkey patching?
0.124353
0
0
275,056
5,626,193
2011-04-11T19:05:00.000
13
0
1
0
python,terminology,monkeypatching
5,626,835
8
false
0
0
Monkey patching can only be done in dynamic languages, of which python is a good example. Changing a method at runtime instead of updating the object definition is one example;similarly, adding attributes (whether methods or variables) at runtime is considered monkey patching. These are often done when working with m...
4
746
0
I am trying to understand, what is monkey patching or a monkey patch? Is that something like methods/operators overloading or delegating? Does it have anything common with these things?
What is monkey patching?
1
0
0
275,056
5,626,193
2011-04-11T19:05:00.000
19
0
1
0
python,terminology,monkeypatching
5,626,255
8
false
0
0
First: monkey patching is an evil hack (in my opinion). It is often used to replace a method on the module or class level with a custom implementation. The most common usecase is adding a workaround for a bug in a module or class when you can't replace the original code. In this case you replace the "wrong" code throug...
4
746
0
I am trying to understand, what is monkey patching or a monkey patch? Is that something like methods/operators overloading or delegating? Does it have anything common with these things?
What is monkey patching?
1
0
0
275,056
5,626,672
2011-04-11T19:46:00.000
0
0
0
0
python,django,testing,django-models,django-testing
5,626,840
1
true
1
0
You could try creating a whole new app that you only use on your development server. E.g., if your app is called myapp you would call your testing app myapp_test. Then in myapp_test's models.py you would from myapp import models and then subclass your models in there. Then in your settings.py you either just try and re...
1
1
0
Is it possible to have a set of models just for testing purposes? The idea is that I've written an app that contains some helper abstract model HelperBase. Now I'd like to provide some models that would inherit from it in order to test it, say DerivedTest1, DerivedTest2. However I wouldn't really like those test models...
Test specific models in Django
1.2
0
0
292
5,626,845
2011-04-11T20:01:00.000
3
0
1
0
python
5,626,895
1
true
0
0
Python will only import the module once. Any code that executes at load time will only be executed the first time a file imports the module.
1
0
0
I ran a python script to create a dict variable based on a database, and then I pickled this variable into disk file for later usage. Now I have a lot of feature classes which all need that variable to create different features. The thing is the dict variable is so large that cannot afford to import multiple times. I a...
Import variables in python
1.2
0
0
177
5,627,140
2011-04-11T20:26:00.000
1
0
0
0
python,sql,sqlite
5,627,582
3
false
0
0
I do something similar with SQLite too. In my experience it's not as fast as other db's in this type of situation so it pays to make your schema as simple as possible. Up to [n] additional columns per row, one for each word. Store all of the interesting words in a single, comma separated field. A new table, linked to ...
2
1
0
I have a sentence like the cat sat on the mat stored as a single sql field. I want to periodically search for keywords which are not not in a stop list, in this case cat sat mat What's the best way to store them in an SQL table for quick searching? As far as I can see it I see the following options Up to [n] additio...
Storing interesting words from a sentence
0.066568
1
0
290
5,627,140
2011-04-11T20:26:00.000
1
0
0
0
python,sql,sqlite
5,627,243
3
true
0
0
I would suggest giving your sentences a key, likely IDENTITY. I would then create a second table linking to your sentence table, with a row for each interesting word. If you'd like to search for say, words starting with ca- if you stored these words in a comma delimited you'd have to wildcard the start and end, wherea...
2
1
0
I have a sentence like the cat sat on the mat stored as a single sql field. I want to periodically search for keywords which are not not in a stop list, in this case cat sat mat What's the best way to store them in an SQL table for quick searching? As far as I can see it I see the following options Up to [n] additio...
Storing interesting words from a sentence
1.2
1
0
290
5,627,868
2011-04-11T21:37:00.000
1
0
0
0
python,django,unicode,utf-8,scrapy
5,628,065
3
false
1
0
U+FFFD is the replacement character that you get when you do some_bytes.decode('some-encoding', 'replace') and some substring of some_bytes can't be decoded. You have TWO of them: u'H\ufffd\ufffdftsitz' ... this indicates that the u-umlaut was represented as TWO bytes each of which failed to decode. Most likely, the si...
1
3
0
I'm using Scrapy and Python (as part of a Django project) to scrape a site with German content. I have libxml2 installed as the backend for Scrapy selectors. If I extract the word 'Hüftsitz' (this is how it is displayed on the site) through selectors, I get: u'H\ufffd\ufffdftsitz' (Scrapy XPath selectors return Unicod...
Unicode and UTF-8 encoding issue with Scrapy XPath selector text
0.066568
0
0
15,989
5,628,715
2011-04-11T23:25:00.000
2
1
0
0
python,email,scripting,mms
5,628,773
1
true
0
0
It seems you can send MMS messages to @mms.att.net That was easy.
1
1
0
One can send messages to an AT&T customer via [10-digit-cell-numer]@txt.att.net from their email client. I tried to send a file to my iPhone using this method (specifically an audio file) to no avail. The message came through but the file attachment was not present.
Sending file via email to MMS for ATT
1.2
0
0
1,545
5,629,135
2011-04-12T00:41:00.000
2
0
1
0
python,google-app-engine,bytecode,pyc
5,629,311
3
false
0
0
Did you check your system clock? I believe python determine whether to use the .pyc or .py based on timestamps. If your system clock got pushed back, then it would see the .pyc files as newer until the system clock caught up to the last time they were built.
2
2
0
Using the Google App Engine to develop in python yesterday it stopped running the current version of the script. Instead of executing the most recent version it seems to run the previously pre-compiled .pyc even if the .py source was changed. Error messages actually quotes the correct line from the most current source....
Python not interpreting changed files, using obsolete .pyc
0.132549
0
0
1,643
5,629,135
2011-04-12T00:41:00.000
2
0
1
0
python,google-app-engine,bytecode,pyc
5,629,353
3
false
0
0
Are you editing the .py files on a different system than where they are being compiled ? The compiler recompiles the .py files if its modification date is newer than the modification date of the .pyc file. The fact that it is picking the .pyc file for use points to the fact that your .py file has an older modification...
2
2
0
Using the Google App Engine to develop in python yesterday it stopped running the current version of the script. Instead of executing the most recent version it seems to run the previously pre-compiled .pyc even if the .py source was changed. Error messages actually quotes the correct line from the most current source....
Python not interpreting changed files, using obsolete .pyc
0.132549
0
0
1,643
5,630,152
2011-04-12T03:41:00.000
0
0
0
0
python,linux,security,passwords,openssl
5,630,477
2
false
1
0
For the sake of privacy for a user and other reasons passwords are generally not stored by servers. Typically users choose a password which is stored as a hash of some sort on the server. Users then authenticate with the web application by checking the stored hash against a hash supplied based on user input. Once the ...
1
0
0
I've implemented a HTTP server (CherryPy and Python) that receives an encrypted file from a client (Android). I'm using OpenSSL to decrypt the uploaded file. Currently I'm using openssl -enc -pass file:password.txt -in encryptedfile -out decryptedfile to perform to decryption on the server side. As you can see the pass...
Secure Options for storing Openssl password on a server (Linux, Python, CherryPy)
0
0
0
1,070
5,630,441
2011-04-12T04:32:00.000
5
1
1
0
python,r,rpy2,pyrserve,pyper
13,636,318
4
false
0
0
in pyper, i can't pass large matrix from python to r instance with assign(). however, i don't have issue with rpy2. it is just my experience.
3
63
0
I would like to access R from within a Python program. I am aware of Rpy2, pyrserve and PypeR. What are the advantages or disadvantages of these three options?
How do Rpy2, pyrserve and PypeR compare?
0.244919
0
0
18,829
5,630,441
2011-04-12T04:32:00.000
5
1
1
0
python,r,rpy2,pyrserve,pyper
28,990,370
4
false
0
0
From a developer's prospective, we used to use rpy/rpy2 to provide statistical and drawing functions to our Python-based application. It has caused huge problems in delivering our application because rpy/rpy2 needs to be compiled for specific combinations of Python and R, which makes it infeasible for us to provide bin...
3
63
0
I would like to access R from within a Python program. I am aware of Rpy2, pyrserve and PypeR. What are the advantages or disadvantages of these three options?
How do Rpy2, pyrserve and PypeR compare?
0.244919
0
0
18,829
5,630,441
2011-04-12T04:32:00.000
40
1
1
0
python,r,rpy2,pyrserve,pyper
5,643,423
4
true
0
0
I know one of the 3 better than the others, but in the order given in the question: rpy2: C-level interface between Python and R (R running as an embedded process) R objects exposed to Python without the need to copy the data over Conversely, Python's numpy arrays can be exposed to R without making a copy Low-level i...
3
63
0
I would like to access R from within a Python program. I am aware of Rpy2, pyrserve and PypeR. What are the advantages or disadvantages of these three options?
How do Rpy2, pyrserve and PypeR compare?
1.2
0
0
18,829
5,630,870
2011-04-12T05:41:00.000
1
1
0
0
python,android,json
5,630,896
1
true
0
0
Tasks is just a big string. To be a valid list, it would have to be ["1 task", "2 task", "3 task"] Same goes for Prob1 and Prob2. To be a valid list, the brackets should not be enclosed in quotes.
1
0
0
I have an Android appthat originally posted some strings in json format to a python cgi script, which all worked fine. The problem is when the json object contains lists, then python (Using simplejson) when it gets them is still treating them as a big string Here is a text dump of the json once it reaches python before...
Python grabbing JSON from POST method
1.2
0
0
439
5,631,240
2011-04-12T06:33:00.000
1
0
0
0
python,user-interface,command-line,wxpython,user-input
5,636,876
1
true
0
0
You ask about books related to the theory of this. The theory is one of separating presentation logic from business logic, or separation of concerns. This goes by many names such as model/view/controller, model/view/presenter, and many others, and there are plenty of books on the subject. If you design an application ...
1
1
0
Could I assume that every powerful application would provide a command line/script input? Even there are many many fancy widgets in current software, but I still think command line input mode in UI is still necessary nowadays, since command line/script input is more straight forward and neat. If application could provi...
Collaboration of command line and UI widgets
1.2
0
0
125
5,632,677
2011-04-12T08:54:00.000
66
0
0
0
python,sqlite,sqlalchemy
5,632,745
2
false
0
0
They're apples and oranges. Sqlite is a database storage engine, which can be better compared with things such as MySQL, PostgreSQL, Oracle, MSSQL, etc. It is used to store and retrieve structured data from files. SQLAlchemy is a Python library that provides an object relational mapper (ORM). It does what it suggests: ...
1
37
0
Beginner question- what is the difference between sqlite and sqlalchemy?
What is the difference between sqlite3 and sqlalchemy?
1
1
0
24,446
5,635,054
2011-04-12T12:19:00.000
12
0
0
0
python,excel,xlwt
5,635,203
6
true
0
0
Don't delete. Just copy what you need. read the original file open a new file iterate over rows of the original file (if the first column of the row does not contain the value X, add this row to the new file) close both files rename the new file into the original file
1
5
0
I have a really large excel file and i need to delete about 20,000 rows, contingent on meeting a simple condition and excel won't let me delete such a complex range when using a filter. The condition is: If the first column contains the value, X, then I need to be able to delete the entire row. I'm trying to automate t...
Python to delete a row in excel spreadsheet
1.2
1
0
51,378
5,636,251
2011-04-12T13:47:00.000
0
1
0
0
python
5,639,270
1
false
0
0
The description for the Digi 3G states that it is capable of python scripting, using a custom development environment. To make this work, you would have to use the python source code from paramiko; the executable would not be installable directly on the router (since the executable is designed to be run on a computer,...
1
0
0
I'm using a Digi 3G router that can be programmed with python, and I want it to make periodic SSH connections to another device. I've read everything about paramiko, but don't know how to install it in the router. I want to know if there is any other way of including paramiko into a device, apart from installing (i.e. ...
SSH connection with python from a device (not computer)
0
0
1
202
5,637,677
2011-04-12T15:25:00.000
1
0
0
0
python,wxpython,richtext
5,696,733
1
true
0
1
Download the wxpython demo from their site, it should provide you with an in-depth example of a wxRichTextCtrl. Without providing any information about your specific customizations, there is not much else I can help with.
1
0
0
Does anyone know of any articles or code samples to get me started customising the WxPython rich text control? I am trying to extend the rich text control to allow me to insert controls (buttons, text boxes etc) into the editing area e.g. instead of just inserting images or formatted text I would like to be able to ins...
Where do I start if I want to customise the WxPython rich text control?
1.2
0
0
328
5,642,537
2011-04-12T22:50:00.000
2
0
0
0
python,mysql,sql-server,pyqt
5,643,057
3
false
0
0
yes that will work, I do the same thing. I like a programming API, like what SQLAlchemy provides over the Raw SQL version of Qt's QtSql module. It works fine and nice, just populate a subclassed QAbstractTableModel with data from your sqlalchemy queries, like you would with data from any other python object. This tho...
1
1
0
After much study and investigation, I've decided to do my Python development with pyQT4 using Eric5 as the editor. However, I've run into a brick wall with trying to get MySQL to work. It appears that there's an issue with the QMySQL driver. From the discussions that I've seen so far, the only fix is to install the ...
pyQT and MySQL or MSSQL Connectivity
0.132549
1
0
6,327
5,642,592
2011-04-12T22:57:00.000
3
0
0
0
python,django,login,remember-me
5,643,001
2
false
1
0
Have it provide a cookie with no expire date or a very large one.
1
3
0
I am developing a django application and i would like some suggestions on what would be the best way to provide "Remember Me" option with the Login Form. I am really concerned about the performance of the application and am not sure if using sessions would be a good choice. Please Suggest What you think.
Django Login Form with "Remember Me" Option, What would be the best way?
0.291313
0
0
4,872
5,643,201
2011-04-13T00:37:00.000
1
0
0
0
python,django,postgresql
5,643,247
2
false
1
0
Check your settings.py file. The most likely reason for this issue is that the username for the database is set to "winepad". Change that to the appropriate value and rerun python manage.py syncdb That should fix the issue.
1
0
0
I am very new to python and Django, was actually thrown in to finish off some coding for my company since our coder left for overseas. When I run python manage.py syncdb I receive the following error psycopg2.OperationalError: FATAL: password authentication failed for user "winepad" I'm not sure why I am being prompte...
python manage.py syncdb
0.099668
1
0
3,164
5,643,400
2011-04-13T01:16:00.000
0
0
0
0
python,mysql,django,new-operator
5,643,494
4
false
1
0
Django uses its own ORM, so I guess it's not completely necessary to learn MySQL first, but I suspect it would help a fair bit to know what's going on behind the scenes, and it will help you think in the correct way to formulate your queries. I would start learning MySQL (or any other SQL), after you've got a pretty go...
2
1
0
I have just begun learning Python. Eventually I will learn Django, as my goal is to able to do web development (video sharing/social networking). At which point should I begin learning MySQL? Do I need to know it before I even begin Django? If so, how much should I look to know before diving into Django? Thank you.
Beginning MySQL/Python
0
1
0
1,826
5,643,400
2011-04-13T01:16:00.000
0
0
0
0
python,mysql,django,new-operator
5,654,701
4
false
1
0
As Django documents somehow Recommends, It is better to learning PostgreSQL. PostgreSQL is working pretty with Django, I never had any problem with Django/PostgreSQL. I all know is sometimes i have weird error when working with MySQL.
2
1
0
I have just begun learning Python. Eventually I will learn Django, as my goal is to able to do web development (video sharing/social networking). At which point should I begin learning MySQL? Do I need to know it before I even begin Django? If so, how much should I look to know before diving into Django? Thank you.
Beginning MySQL/Python
0
1
0
1,826
5,644,374
2011-04-13T04:23:00.000
0
0
0
0
python,mysql,python-module,mysql-python,setup.py
5,644,390
1
false
0
0
Install the MySQL client libraries. Install the MySQL client library development files, and build again.
1
0
0
I am new to Python and having some rudimentary problems getting MySQLdb up and running. I'm hoping somebody out there can help me. When I first tried to install the module using setup.py, the setup terminated because it was unable to find mysql_config. This is because I didn't realize the module expected MySQL to be ...
Help with MySQLdb module: corrupted installation and connecting to remote servers
0
1
0
125
5,646,679
2011-04-13T08:54:00.000
0
0
0
1
python,django,celery
5,647,566
1
false
1
0
It shouldn't be possible and even if, it should be very rare. My guess would be that the same task is executed a second time after your exception. Maybe there is a problem with your routing keys as the worker doesn't get the task? Or the broker has a problem, I've seen funny problems with RabbitMQ. Deleting it's databa...
1
1
0
I'm getting HardTimeLimit exception for my tasks. After log examination i found - task is not being received by celery ( No "Got task from broker:" message for task id) task with the same id was executed couple a days ago. Task ids are assigned automatically by @task decorator, tasks are started by django, there ar...
Celery - collision of task_ids
0
0
0
304
5,646,943
2011-04-13T09:17:00.000
0
0
0
0
python,multi-touch,kivy
5,647,086
2
false
0
1
It is technically possible, but you should not do it. Simply open up the source, get the code for the two main loops and stitch it together. The results will probably be broken, though.
1
2
0
hi i am working on a VR engine "vizard" it has (like any other game engine) its mainloop, i want to integrate it with a multi-touch framework "kivy" which has its own mainloop , is it possible to do so? and if you can help me finding references about this topic thank you in advance :D
how to integrate two apps (mainloop) together in python
0
0
0
368
5,647,118
2011-04-13T09:31:00.000
6
0
1
0
python,class,inheritance
5,647,133
4
false
0
0
Why don't you use composition instead? Have your class keep a reference to the desired object, and delegate to it.
2
24
0
I'm creating a class (class0) in Python that is a currently based off of one class (class1); however, I'd like to inherit from another class as well (class2). The thing about class2 is that I don't want all of it's methods and attributes, I just need one single method. Is it possible for class0 to only inherit a single...
Is it possible to do partial inheritance with Python?
1
0
0
10,888
5,647,118
2011-04-13T09:31:00.000
4
0
1
0
python,class,inheritance
5,647,134
4
false
0
0
create another base class implementing this one method and make class2 and class1 both inherit this class
2
24
0
I'm creating a class (class0) in Python that is a currently based off of one class (class1); however, I'd like to inherit from another class as well (class2). The thing about class2 is that I don't want all of it's methods and attributes, I just need one single method. Is it possible for class0 to only inherit a single...
Is it possible to do partial inheritance with Python?
0.197375
0
0
10,888
5,647,413
2011-04-13T10:02:00.000
1
0
0
0
python,parsing,screen-scraping
5,647,655
2
true
1
0
What scripting language should I use to do this? Python will do, as you've tagged your question. looks like Python (using urllib2 & BeautifulSoup) should do the job, but is it the best way of approaching the problem. It's workable. I'd use lxml.etree personally. An alternative is fetching the page in the raw format...
1
2
0
I am try to make a web application that needs to parse one specific wikipedia page & extract some information which is stored in a table format on the page. The extracted data would then need to be stored onto a database. I haven't really done anything like this before. What scripting language should I use to do this?...
How to parse a specific wiki page & automate that?
1.2
0
1
923
5,647,487
2011-04-13T10:08:00.000
2
1
0
0
python,email,smtp,imap,email-client
5,647,584
4
false
0
0
If I were you, I'd check out the source code of existing email-clients to get an idea: thunderbird, sylpheed-claws, mutt... Depending on the set of features you want to support, it is a big project.
2
23
0
I'm venturing in unknown territory here... I am trying to work out how hard it could be to implement an Email client using Python: Email retrieval Email sending Email formatting Email rendering Also I'm wondering if all protocols are easy/hard to support e.g. SMTP, IMAP, POP3, ... Hopefully someone could point me ...
How hard is it to build an Email client? - Python
0.099668
0
1
40,032
5,647,487
2011-04-13T10:08:00.000
8
1
0
0
python,email,smtp,imap,email-client
6,868,304
4
false
0
0
I think you will find much of the clients important parts prepackaged: Email retrieval - I think that is covered by many of the Python libraries. Email sending - This would not be hard and it is most likely covered as well. Email formatting - I know this is covered because I just used it to parse single and multipart e...
2
23
0
I'm venturing in unknown territory here... I am trying to work out how hard it could be to implement an Email client using Python: Email retrieval Email sending Email formatting Email rendering Also I'm wondering if all protocols are easy/hard to support e.g. SMTP, IMAP, POP3, ... Hopefully someone could point me ...
How hard is it to build an Email client? - Python
1
0
1
40,032
5,648,097
2011-04-13T11:02:00.000
2
0
0
0
python,graph,wxpython,visualization
5,651,029
6
false
0
0
You should ask on the official wxPython mailing list. There are people there that can probably help you. I am surprised that matplotlib isn't able to do this though. It may just require you to restructure your code in some way. Right now, the main ways to draw in wxPython are via the various DCs, one of the FloatCanvas...
1
12
1
I'm looking to visualize the data, hopefully make it interactive. Right now I'm using NetworkX and Matplotlib, which maxes out my 8gb when I attempt to 'draw' the graph. I don't know what options and techniques exist for handling such a large cluster** of data. If someone could point me in the right direction, that'...
Python tools to visualize 100k Vertices and 1M Edges?
0.066568
0
0
3,571
5,648,969
2011-04-13T12:12:00.000
1
0
1
0
python,file,nonblocking,eof
5,896,473
5
false
0
0
A nice trick that works well in c++ (YMMV) is that if the amount of data returned is less that the size of the buffer (i.e. the buffer is not full) you can safely assume that the transaction has completed. there then is a 1/buffersize probability that the last part of the file completely fills the buffer so for a high ...
3
20
0
How is end of file detected for a file in nonblocking mode?
End of nonblocking file
0.039979
0
0
2,534
5,648,969
2011-04-13T12:12:00.000
1
0
1
0
python,file,nonblocking,eof
5,924,361
5
false
0
0
Doesn't select tell you there is something to read even if its just the EOF? If it tells you there is something to read and you don't get anything back then it must be EOF. I believe this to be the case for sockets.
3
20
0
How is end of file detected for a file in nonblocking mode?
End of nonblocking file
0.039979
0
0
2,534
5,648,969
2011-04-13T12:12:00.000
1
0
1
0
python,file,nonblocking,eof
5,956,134
5
false
0
0
For files, setting the file descriptor as non-blocking does nothing - all IO is done blocking anyway. If you really need non-blocking file IO, you need to look in to aio_read and friends, which are the asynchronous IO facility for file access. These are pretty non-portable and work somewhat flakily at times - so most p...
3
20
0
How is end of file detected for a file in nonblocking mode?
End of nonblocking file
0.039979
0
0
2,534
5,649,540
2011-04-13T12:52:00.000
0
0
1
0
python
5,649,636
3
false
0
0
Well, logging.debug usually writes to a file. you can read that file by using the open() function.
1
3
0
Is there a way of obtaining/returning the message from a call to logging.debug()? Thanks
Capturing/Return the output message of python logging
0
0
0
3,068
5,651,101
2011-04-13T14:43:00.000
0
0
0
0
python,django,forms,csrf
59,506,095
3
false
1
0
Use the {% csrf_token %} validation inside your HTML form as sample below. <form> {% csrf_token %} </form>
3
0
0
I have put in the {% csrf_token %} and the context_instance=RequestContext(request)) but I still get the error CSRF token missing or incorrect. Thanks in advance! or not.
csrf_token problem django
0
0
0
1,058
5,651,101
2011-04-13T14:43:00.000
0
0
0
0
python,django,forms,csrf
5,653,153
3
false
1
0
You append {% csrf_token %} to the form ? (<form>{% csrf_token %} ...</form>)
3
0
0
I have put in the {% csrf_token %} and the context_instance=RequestContext(request)) but I still get the error CSRF token missing or incorrect. Thanks in advance! or not.
csrf_token problem django
0
0
0
1,058
5,651,101
2011-04-13T14:43:00.000
3
0
0
0
python,django,forms,csrf
5,653,770
3
false
1
0
Make sure the CSRF token template variable is inside your form. If you're sure it is, view the page's HTML source to make sure that it's actually printing out the hidden input field. If all else fails, check your settings to make sure the CSRF middleware is enabled and configured properly. Additionally, having the sour...
3
0
0
I have put in the {% csrf_token %} and the context_instance=RequestContext(request)) but I still get the error CSRF token missing or incorrect. Thanks in advance! or not.
csrf_token problem django
0.197375
0
0
1,058
5,652,093
2011-04-13T15:55:00.000
0
0
0
0
python,guid,uuid,tinyurl
5,659,017
1
false
0
0
You'd need to look at the source for Freebase where it generates that GUID. It's definitely not a standard RFC GUID of any sort.
1
1
0
Freebase's Python API uses GUIDs that have a set prefix and a zero-padded suffix: "guid":"#9202a8c04000641f8000000000211f52" (http://wiki.freebase.com/wiki/Guid) "Freebase guids are represented with 32 hexidecimal characters, the first 17 are the graph prefix and the remaining 15 are the item suffix" (http://tinyify.fr...
How do you construct a GUID with a set prefix and zero-padded suffix?
0
0
1
476
5,652,278
2011-04-13T16:11:00.000
1
0
1
0
python
69,348,306
3
false
0
0
from collections import deque d = deque() print(True) if len(d) == 0 else print(false)
1
91
0
Is try-catch the only method to do that?
How to check if a deque is empty
0.066568
0
0
76,408
5,652,908
2011-04-13T17:04:00.000
3
0
1
1
.net,python,winapi,trace,etw
5,653,820
1
true
0
0
Generally speaking, there are two approaches to intercepting system API calls; either user mode or kernel mode interception. For user mode API interception, you will have to hook every process to accurately capture/redirect every call to your desired API function. Kernel mode interception circumvents the need to hook e...
1
3
0
I am currently working on a tool in .NET/Python that monitors certain events on a system, like writing specific registry keys or creating files with a special name. I evaluated many possibilities, and as I don't have to care about WinXP support, I am using Event Tracing for Windows to get a real-time stream of all file...
Tracing windows API calls
1.2
0
0
1,707
5,653,150
2011-04-13T17:27:00.000
2
0
1
0
python,sqlalchemy
5,653,166
2
true
0
0
When you call a function, just a reference to the tuple gets passed, not a copy. The fact that it's immutable doesn't mean that it will be copied on a function call, just that you can't modify it.
2
2
0
I have an sqlalchemy query that returns a tuple. I pass this tuple to a function, and since it's an immutable type, a new instance of the tuple is created in the called function. How does python deal with this in terms of memory management? Is a complete copy of the tuple created, or is it using some clever 'copy on w...
Python immutable types in function calls
1.2
0
0
411
5,653,150
2011-04-13T17:27:00.000
0
0
1
0
python,sqlalchemy
5,653,321
2
false
0
0
Python passes references to objects by value. So you dont need to worry about it.
2
2
0
I have an sqlalchemy query that returns a tuple. I pass this tuple to a function, and since it's an immutable type, a new instance of the tuple is created in the called function. How does python deal with this in terms of memory management? Is a complete copy of the tuple created, or is it using some clever 'copy on w...
Python immutable types in function calls
0
0
0
411
5,653,478
2011-04-13T17:56:00.000
1
0
0
0
python,internet-explorer,zope
5,653,835
1
true
1
0
Is your page served on HTTPS? If so this is the expected behavior. By default IE will not cache a secured page on disk, nor will it automatically resubmit pages with POST data. This is security feature (prevent cache sniffing, etc) and is about the only thing IE does correctly.
1
1
0
I have an application developed in Python-Zope where only on some of the pages, I am getting "page has expired issue" and this does not come every time. This issue comes when I click on "Back" or "Cancel" buttons which use browser history to redirect to the earlier pages. I have reviewed my code and there is not code s...
Inconsistent page has expired message in internet explorer
1.2
0
1
110
5,654,001
2011-04-13T18:46:00.000
3
0
0
0
python,django,memcached
5,654,472
1
true
1
0
A) Use Google Analytics to determine within 2% your page views B) Build an app to hold request data (time, browser, IP, etc) and create middleware that stores info about each request in that app. Place this middleware above your cache middleware.
1
0
0
I've developed a web application in django, and I'm interested in accurately knowing how many people visited certain pages and keeping that info in my database. As I was already running some code whenever a page was loaded, I had a small bit of code that increased the counter in 1. However, when implementing memcached...
How to accurately obtain page hits on a django page when using memcached
1.2
0
0
124
5,654,107
2011-04-13T18:55:00.000
6
0
0
0
python,mysql,innodb,myisam
5,654,733
2
true
0
0
InnoDB is transactional. You need to call connection.commit() after inserts/deletes/updates. Edit: you can call connection.autocommit(True) to turn on autocommit.
1
3
0
I am facing a problem where I am trying to add data from a python script to mysql database with InnonDB engine, it works fine with myisam engine of the mysql database. But the problem with the myisam engine is that it doesn't support foreign keys so I'll have to add extra code each place where I want to insert/delete r...
Problem in insertion from python script in mysql database with innondb engine
1.2
1
0
1,182
5,656,238
2011-04-13T22:03:00.000
3
0
0
0
python,django
5,656,734
4
false
1
0
1500 records is far from being a large dataset, and seven seconds is really too much. There is probably some problem in your models, you can easily check it by getting (as Brandon says) the values() query, and then create explicitly the 1500 object by iterating the dictionary. Just convert the ValuesQuerySet into a lis...
2
7
0
I have a query set of approximately 1500 records from a Django ORM query. I have used the select_related() and only() methods to make sure the query is tight. I have also used connection.queries to make sure there is only this one query. That is, I have made sure no extra queries are getting called on each iteration...
How do I speed up iteration of large datasets in Django
0.148885
1
0
4,372
5,656,238
2011-04-13T22:03:00.000
1
0
0
0
python,django
5,657,066
4
false
1
0
Does your model's Meta declaration tell it to "order by" a field that is stored off in some other related table? If so, your attempt to iterate might be triggering 1,500 queries as Django runs off and grabs that field for each item, and then sorts them. Showing us your code would help us unravel the problem!
2
7
0
I have a query set of approximately 1500 records from a Django ORM query. I have used the select_related() and only() methods to make sure the query is tight. I have also used connection.queries to make sure there is only this one query. That is, I have made sure no extra queries are getting called on each iteration...
How do I speed up iteration of large datasets in Django
0.049958
1
0
4,372
5,656,345
2011-04-13T22:17:00.000
0
0
0
0
django,design-patterns,database-design,django-models,python
5,656,695
3
false
1
0
Option #1 is probably the cleanest choice. An Item has only one owner company and is possessed by only one possessing company. Put two FK to Company in Item, and remember to explicitly define the related_name of the two inverses to be different each other. As you want to avoid touching the Item model, either add the ...
1
2
0
I have a group of related companies that share items they own with one-another. Each item has a company that owns it and a company that has possession of it. Obviously, the company that owns the item can also have possession of it. Also, companies sometimes permanently transfer ownership of items instead of just lendin...
How to model lending items between a group of companies
0
1
0
198
5,657,800
2011-04-14T02:06:00.000
2
0
0
0
python,api,desktop-application
5,657,892
1
true
0
0
yes, urllib, urllib2 and urlparse are the core python libs for reading to/from urls. I would suggest PyQt for the gui framework (pyGTK, wxWidgets and tkinter would be fine also, they all run fine on the three os's you've mentioned). PyQt includes everything you would need, without reaching into any other library. It ...
1
2
0
I have a very random request from a client wanting a desktop based program that can retrieve information from web based APIs such as Google Analytics, SEOMoz and other similar services. They then want parts or all of these results stored in a central location. They have said they DO NOT want a web application at all, b...
Python Desktop Program Using Web APIs
1.2
0
1
2,666
5,658,529
2011-04-14T04:27:00.000
1
1
0
0
c#,c++,python,backend
5,658,631
1
false
0
0
We do backend development based on Zope, Python and other Python-related stuff since almost 15 years. Python gives you great flexibility and all-batteries included (likely true for C#, not sure about C++). If you do RDBMS development with Python: SQLAlchemy is the way to go. It provides a huge functionality and saved m...
1
1
0
I am working on a realtime data website that has a data-mining backend side to it. I am highly experienced in both Python and C++/C#, and wondering which one would be preferable for the backend development. I am strongly leaning towards Python for its available libraries and ease of use. But am I wrong? If so, why? As ...
Designing a Website Backend - Python or C++/C#?
0.197375
1
0
1,302
5,658,737
2011-04-14T04:55:00.000
0
0
0
0
python,mysql,unicode
5,658,972
1
false
0
0
I know this doesn't directly answer your question, but why aren't you using prepared statements? That will do two things: probably fix your problem, and almost certainly fix the SQLi bug you've almost certainly got. If you won't do that, are you absolutely certain your string itself is unicode? If you're just naively u...
1
0
0
I am trying to insert a query that contains é - or \xe9 (INSERT INTO tbl1 (text) VALUES ("fiancé")) into a MySQL table in Python using the _mysql module. My query is in unicode, and when I call _mysql.connect(...).query(query) I get a UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position X : ordi...
Python MySQL Unicode Error
0
1
0
522
5,659,117
2011-04-14T05:53:00.000
0
0
0
0
python,notifications,openerp
5,670,071
2
false
1
0
It looks like the form class in the client has a message_state() method that displays a message in the status bar. If you look through the client/bin/modules/gui/window/form.py file, you can find several calls. I didn't see any easy way to set that message from within a standard module, so you might have to hack the cl...
2
0
0
I have a very simple question. How to add own message to state on status bar?
How to add message to state in OpenERP
0
0
0
811
5,659,117
2011-04-14T05:53:00.000
0
0
0
0
python,notifications,openerp
5,903,115
2
false
1
0
Well U can custom message on form with changes in form.mako with understanding of mochikit.
2
0
0
I have a very simple question. How to add own message to state on status bar?
How to add message to state in OpenERP
0
0
0
811
5,659,931
2011-04-14T07:26:00.000
5
0
0
1
python,linux,distribution,pythonxy
5,660,288
5
false
0
0
For linux, you don't need something like PythonXY, because it's already very easy to install packages with your package manager. Things are actually a lot better integrated under linux than under windows. What you need to do is pick a good linux distribution, and install the packages you like with the package manager (...
1
1
0
I would like to find out if there is a Pythonxy.com equivalent for Linux/Mac OS X yet? any kind of pointers would be helpful? Thanks and best regards, Vishal Sapre
Python distribution for Scientists on Linux
0.197375
0
0
10,929
5,660,354
2011-04-14T08:14:00.000
0
0
1
0
python,gtk,wxpython
5,660,469
1
false
0
1
Add the directory containing the library given in the error to your ld search paths. See the ldconfig(8) man page for details.
1
0
0
I am a relative newbie with Python and was trying to install wxPython 2.9 using Python 2.6. I did a build from source and then installed the package both being done in a non-standard (local) path. When I try and import wx (having provided the path to the installation folder in my environment variable), I get the follow...
Error while installing wxPython package in a non-standard path
0
0
0
380
5,661,385
2011-04-14T09:49:00.000
3
0
1
1
python
5,733,166
9
false
0
0
This will vary depending on your target market. In specialized niche industries there is more variety in how stuff is distributed. In heavily commoditized areas I would expect native OS package (at least if I were a customer). I tend to take the quality of the deployment package as indicative of the quality of the s...
2
37
0
I have the task of packaging and shipping a commercial application bundle, which will include: a python library (developed by us) some python programs depending on the library above additional libraries not developed by us, but which are dependencies of our library. a complete python installation (python 2.6) addition...
Packaging and shipping a python library and scripts, the professional way
0.066568
0
0
8,155
5,661,385
2011-04-14T09:49:00.000
15
0
1
1
python
5,731,719
9
true
0
0
This is not a complete answer but just a bunch of ideas. I wrote an installer for a client that incorporated some ideas that might be useful to you. It was Linux only so I focussed on just that. We needed to ship specific custom versions of mySQL, lighttpd, python, memcached, a few 3rd party Python modules and some cu...
2
37
0
I have the task of packaging and shipping a commercial application bundle, which will include: a python library (developed by us) some python programs depending on the library above additional libraries not developed by us, but which are dependencies of our library. a complete python installation (python 2.6) addition...
Packaging and shipping a python library and scripts, the professional way
1.2
0
0
8,155
5,664,225
2011-04-14T13:46:00.000
2
1
0
0
php,python,node.js,real-time
5,664,340
2
false
1
0
I've looked at node js and nowjs, but I'm weary about coding a while site in Express (I wonder about security holes, code maintainability, lack of a good ORM). I can personally vouch for code maintainability if you can do JavaScript. I personally find JavaScript more maintainable then PHP but that's probably d...
1
3
0
I'm currently creating a website using PHP and the Kohana framework. I want to site to be able to use real time (or near real time) data (e.g. for chat and real time feeds). I need it to be able to scale to thousands of concurrent users. I've done a lot of reading and still have no idea what the best method is for t...
Creating a real time website using PHP
0.197375
0
0
1,845
5,664,513
2011-04-14T14:08:00.000
1
1
0
1
linux,ide,ironpython,monodevelop,pydev
5,667,841
3
false
0
0
I don't know about Eclipse, but there isn't currently an IronPython addin for MonoDevelop. If anyone's interested in developing one, please contact the MonoDevelop mailing list for advice on getting started.
2
2
0
I've been searching for an IDE with code completion (intellisence) for IronPython on Linux systems (typically Ubuntu). I've found references to MonoDevelop and Eclipse (PyDev) supporting IronPython, but I can't get any of them to work. Is this because MonoDevelop and PyDev only support IronPython code completion on Win...
IronPython IDE for Ubuntu and Linux
0.066568
0
0
2,128
5,664,513
2011-04-14T14:08:00.000
2
1
0
1
linux,ide,ironpython,monodevelop,pydev
5,883,279
3
false
0
0
Try JetBrains PyCharm
2
2
0
I've been searching for an IDE with code completion (intellisence) for IronPython on Linux systems (typically Ubuntu). I've found references to MonoDevelop and Eclipse (PyDev) supporting IronPython, but I can't get any of them to work. Is this because MonoDevelop and PyDev only support IronPython code completion on Win...
IronPython IDE for Ubuntu and Linux
0.132549
0
0
2,128
5,667,556
2011-04-14T18:05:00.000
1
1
0
0
python,dll,procmon,pyd
5,687,105
3
false
0
0
Ok here is the answer: The windows diagnostics (depends, procmon, etc) were showing the DLL (or pyd) loading fine. Python was showing that it was not loading fine. I found that the windows tools were referring to a different Python26.dll hiding in my C:\Window\SysWOW64 folder. This second Python26.dll (found in SysWO...
2
5
0
I am trying to load a *.pyd with Python, but I receive the well known "Import Error: DLL load failed: the specified procedure can not be found." error. I have already done the following: 1.) Investigated the *.pyd with Dependency Walker. GPSVC.DLL and IESHIMS.DLL came up as missing, but delay loaded, IEFRAME.DLL aslo...
*.pyd file fails to load, but DependancyWalker comes up clean, and ProcMon shows it loaded
0.066568
0
0
9,402
5,667,556
2011-04-14T18:05:00.000
5
1
0
0
python,dll,procmon,pyd
5,669,041
3
true
0
0
Is the .pyd file for the same version of Python you're using? Loading a .pyd file for the wrong Python version can produce that error message. Dependency Walker can show you which pythonNN.dll it links to.
2
5
0
I am trying to load a *.pyd with Python, but I receive the well known "Import Error: DLL load failed: the specified procedure can not be found." error. I have already done the following: 1.) Investigated the *.pyd with Dependency Walker. GPSVC.DLL and IESHIMS.DLL came up as missing, but delay loaded, IEFRAME.DLL aslo...
*.pyd file fails to load, but DependancyWalker comes up clean, and ProcMon shows it loaded
1.2
0
0
9,402
5,667,699
2011-04-14T18:17:00.000
0
0
0
0
python,forms,automation,urllib2,urllib
5,668,120
3
false
1
0
I’ve only done a little bit of this, but: You’ve got the HTML of the form page. Extract the name attribute for each form field you need to fill in. Create a dictionary mapping the names of each form field with the values you want submit. Use urllib.urlencode to turn the dictionary into the body of your post request. I...
1
9
0
I'm looking to be able to query a site for warranty information on a machine that this script would be running on. It should be able to fill out a form if needed ( like in the case of say HP's service site) and would then be able to retrieve the resulting web page. I already have the bits in place to parse the resulti...
Python urllib2 automatic form filling and retrieval of results
0
0
1
24,175
5,668,947
2011-04-14T19:58:00.000
81
0
1
0
python,regex
5,668,962
4
true
0
0
As long as you can make do with str.replace(), you should use it. It avoids all the pitfalls of regular expressions (like escaping), and is generally faster.
1
77
0
For Python 2.5, 2.6, should I be using string.replace or re.sub for basic text replacements? In PHP, this was explicitly stated but I can't find a similar note for Python.
Use Python's string.replace vs re.sub
1.2
0
0
69,681
5,669,785
2011-04-14T21:14:00.000
1
1
0
1
python,ruby,beagleboard
6,601,437
4
false
0
0
The interpreters do not need to be compiled from source, as the Ubuntu arm distribution has python in its repository as a deb. I was able to write my python scripts on my Ubuntu box and transfer them to the beagleboard without any changes. Performance so far has been surprisingly good, as I'm using the python script ...
3
3
0
I hi have just ordered a couple of beaglboards for experimenting. I know that it can rub Ubuntu and many other flavors of linux. Does that mean it can run all the trivial software that run on Ubuntu? Will the python and ruby interpreters work just the way they work on PC ?
Can beagleboard run python or Ruby programs?
0.049958
0
0
3,513
5,669,785
2011-04-14T21:14:00.000
4
1
0
1
python,ruby,beagleboard
5,669,819
4
true
0
0
The Beagleboard can run both of them, but you may have to compile the interpreters from source. And don't expect the performance of a desktop.
3
3
0
I hi have just ordered a couple of beaglboards for experimenting. I know that it can rub Ubuntu and many other flavors of linux. Does that mean it can run all the trivial software that run on Ubuntu? Will the python and ruby interpreters work just the way they work on PC ?
Can beagleboard run python or Ruby programs?
1.2
0
0
3,513
5,669,785
2011-04-14T21:14:00.000
1
1
0
1
python,ruby,beagleboard
8,717,516
4
false
0
0
The Angstrom Linux distribution (which runs on the Beagle Board) has binary packages for both Python and Ruby. I've worked on an application that uses Python and PyGTK. Never had any problems.
3
3
0
I hi have just ordered a couple of beaglboards for experimenting. I know that it can rub Ubuntu and many other flavors of linux. Does that mean it can run all the trivial software that run on Ubuntu? Will the python and ruby interpreters work just the way they work on PC ?
Can beagleboard run python or Ruby programs?
0.049958
0
0
3,513
5,669,878
2011-04-14T21:23:00.000
-6
0
0
0
python,mysql,mysql-python
5,670,056
5
false
0
0
I suggest to do it like php and mysql. Start i at the beginning of your code before printing of the first data. So if you get a connect error you can display a 50x(Don't remember what internal error is) error message. And keep it open for the whole session and close it when you know you wont need it anymore.
1
95
0
I'm building a WSGI web app and I have a MySQL database. I'm using MySQLdb, which provides cursors for executing statements and getting results. What is the standard practice for getting and closing cursors? In particular, how long should my cursors last? Should I get a new cursor for each transaction? I believe you ne...
When to close cursors using MySQLdb
-1
1
0
99,138
5,670,639
2011-04-14T22:55:00.000
0
0
0
0
python,backend
5,671,966
2
false
1
0
Use Apache, Django and Piston. Use REST as the protocol. Write as little code as possible. Django models, forms, and admin interface. Piston wrapppers for your resources.
1
0
0
I am now working on a big backend system for a real-time and history tracking web service. I am highly experienced in Python and intend to use it with sqlalchemy (MySQL) to develop the backend. I don't have any major experience developing robust and sustainable backend systems and I was wondering if you guys could poin...
Python Backend Design Patterns
0
1
0
4,070
5,671,527
2011-04-15T01:30:00.000
2
0
0
1
python,scheduled-tasks,distributed-computing
5,672,196
3
false
0
0
Fabric (http://docs.fabfile.org/en/1.0.1/index.html) is a pretty good toolkit for various sys admin and deployment tasks. It comes with a few pre defined tasks but also gives you the flexibility to add what you need. I highly recommend it.
1
3
0
Can you recommend on a python tool / module that allows scheduling tasks on remote machine in a network? Note that the solution must be able to not only run certain jobs/commands on remote machines, but also verify that jobs etc are still running (for example, consider the case where a machine dies after a task has be...
Task Scheduling Across a Network?
0.132549
0
0
1,351
5,671,653
2011-04-15T02:02:00.000
1
0
1
0
python,ruby,regex
5,671,679
5
false
0
0
The regular expression libraries for Ruby and Python are developed by two completely independent teams. Even if they are identical now (and I wouldn't be certain they are), there's no guarantee that they won't diverge sometime in the future. The safest position is to assume they're different now, and assume they will c...
4
9
0
Are there any real differences between Ruby regex and Python regex? I've been unable to find any differences in the two, but may have missed something.
Ruby Regex vs Python Regex
0.039979
0
0
4,592