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,122,070 | 2011-02-25T20:06:00.000 | 1 | 0 | 0 | 0 | python,rest,service,standards,port | 5,122,409 | 4 | false | 1 | 0 | If you mean problem-free for yourself, a separate port like 8080 would be appropriate.
If you mean problem-free for your users, ports 80 (http) and 443 (https) are the only choices that make sense because they're the least likely to be blocked by firewalls. Of course, that means your application and web service would ... | 4 | 0 | 0 | I want to create a website which will serve more like a web-application. There will be two parts: the front-end (probably in PHP, Apache) and the back-end services (in Python, using Twisted)
The front-end will usually provide some JavaScript which would send Ajax requests to the Python services and receive data back.
... | Which port should I set my service to listen to? | 0.049958 | 0 | 0 | 422 |
5,122,070 | 2011-02-25T20:06:00.000 | 1 | 0 | 0 | 0 | python,rest,service,standards,port | 5,122,137 | 4 | false | 1 | 0 | If you're intending for this to be distributed, you'd have to use a port above 1024, otherwise people using it on a Unix-type system would have to run it as root, which opens very large can of worms as far as security is concernted. | 4 | 0 | 0 | I want to create a website which will serve more like a web-application. There will be two parts: the front-end (probably in PHP, Apache) and the back-end services (in Python, using Twisted)
The front-end will usually provide some JavaScript which would send Ajax requests to the Python services and receive data back.
... | Which port should I set my service to listen to? | 0.049958 | 0 | 0 | 422 |
5,122,070 | 2011-02-25T20:06:00.000 | 3 | 0 | 0 | 0 | python,rest,service,standards,port | 5,122,114 | 4 | true | 1 | 0 | The normal choice is http-alt(8080). | 4 | 0 | 0 | I want to create a website which will serve more like a web-application. There will be two parts: the front-end (probably in PHP, Apache) and the back-end services (in Python, using Twisted)
The front-end will usually provide some JavaScript which would send Ajax requests to the Python services and receive data back.
... | Which port should I set my service to listen to? | 1.2 | 0 | 0 | 422 |
5,122,070 | 2011-02-25T20:06:00.000 | 1 | 0 | 0 | 0 | python,rest,service,standards,port | 5,122,117 | 4 | false | 1 | 0 | You can be blocked all and everywhere. Any uncommon port is likely to be blocked by serious firewall configurations. Either get a dedicated IP address and listen to port 80. Best to talk to your IT network guys. | 4 | 0 | 0 | I want to create a website which will serve more like a web-application. There will be two parts: the front-end (probably in PHP, Apache) and the back-end services (in Python, using Twisted)
The front-end will usually provide some JavaScript which would send Ajax requests to the Python services and receive data back.
... | Which port should I set my service to listen to? | 0.049958 | 0 | 0 | 422 |
5,123,030 | 2011-02-25T21:42:00.000 | 2 | 0 | 0 | 0 | python,django,ide | 5,123,178 | 4 | false | 1 | 0 | This is going to quickly dissolve into a which editor is better discussion. The reality is that with django's "testserver" your choice of editor / ide become less important. The IDE does not have to be tightly bound to the running code with django. We use eclipse w/ pydev here at work almost exclusively. A few develop... | 2 | 4 | 0 | I've been programming with PHP for about 6 years, and wanna start developing on django.
Now I have some questions for you django pros. I've been using PHPDesigner for about a year, because I could never be relieved and code well with eclipse/aptana/similar. I just feel weird with them.
I also have used Komodo Edit and ... | Need Advice on ide choice for Django Development | 0.099668 | 0 | 0 | 959 |
5,123,030 | 2011-02-25T21:42:00.000 | 3 | 0 | 0 | 0 | python,django,ide | 5,123,296 | 4 | false | 1 | 0 | There are lots of good choices. What you should mostly look for is a good IDE for Python, although support for Django templates has some benefits too.
Personally I use Eclipse plus PyDev, with a vim plugin. This way I can keep my favorite editor, and get the benefits of simple code refactoring, instant code navigat... | 2 | 4 | 0 | I've been programming with PHP for about 6 years, and wanna start developing on django.
Now I have some questions for you django pros. I've been using PHPDesigner for about a year, because I could never be relieved and code well with eclipse/aptana/similar. I just feel weird with them.
I also have used Komodo Edit and ... | Need Advice on ide choice for Django Development | 0.148885 | 0 | 0 | 959 |
5,123,363 | 2011-02-25T22:22:00.000 | 1 | 0 | 0 | 0 | python,computer-science | 5,123,398 | 2 | false | 0 | 0 | Do you mean you want to calculate the distance between the two points? If so, you just use the Pythagorean theorem: √((y1-y2)2+(x1-x2)2). | 1 | 0 | 0 | I'm constructing a program where the user clicks two points in the graphics window and the length of x and y must be shown. I've creating a clone and multiplying it by itself, but no luck. Any ideas? Thanks!
Edit:
My program is supposed to create a 'money bin' based off the users data and 2 point clicks in the graphics... | How do I calculate the length of an x/y coordinate in Python? | 0.099668 | 0 | 0 | 1,821 |
5,124,408 | 2011-02-26T01:17:00.000 | 3 | 0 | 0 | 0 | python,rest,soap,rpc,corba | 5,124,484 | 2 | false | 0 | 0 | Use REST. It's the simplest, and therefore the most widely accessible. If you really find a need for SOAP, RPC, or CORBA later, you can add them then. | 2 | 3 | 0 | I need to do a client-server application, the client will be made with python-gtk,
all procedures will be on server-side to free the client of this workload.
So i did search on google about client-server protocols and i found that CORBA and RPC are closer from what i had in mind, BUT also i want to made this app ready... | What protocol to use in client-server app communication with python? | 0.291313 | 0 | 1 | 490 |
5,124,408 | 2011-02-26T01:17:00.000 | 4 | 0 | 0 | 0 | python,rest,soap,rpc,corba | 5,124,630 | 2 | true | 0 | 0 | I've implemented webservices using SOAP/XMLRPC (it was easy to support both, the framework I was using at the time made it pretty trivial) before; I had thought about using standard HTTP without the SOAP/XMLRPC layer (before I was aware that REST had a name :) but decided against it in the end because "I didn't want to... | 2 | 3 | 0 | I need to do a client-server application, the client will be made with python-gtk,
all procedures will be on server-side to free the client of this workload.
So i did search on google about client-server protocols and i found that CORBA and RPC are closer from what i had in mind, BUT also i want to made this app ready... | What protocol to use in client-server app communication with python? | 1.2 | 0 | 1 | 490 |
5,124,975 | 2011-02-26T04:04:00.000 | 4 | 0 | 0 | 0 | python,django,django-debug-toolbar | 5,126,825 | 4 | false | 1 | 0 | Ddt plugs itself into a response, which means that there is no standard way of browsing its panels for AJAX request. Also, AJAX response can be in JSON format, which makes it impossible for ddt to plug into it.
Personally I'd find a way of logging ddt output to a text file, or maybe it supports client-server architectu... | 1 | 64 | 0 | I'm curious if there's a reasonable way to use the (amazing) django-debug-toolbar with AJAX queries.
For example, I use a jQuery $.get with a bunch of parameters to hit a Django URL and load it inline. If I have an error with that, it isn't registered on the toolbar. I also can't use it by copying the AJAX URL because... | How to use django-debug-toolbar on AJAX calls? | 0.197375 | 0 | 0 | 15,546 |
5,125,544 | 2011-02-26T06:58:00.000 | 4 | 1 | 0 | 0 | python,django,email,smtp,email-confirmation | 5,126,778 | 1 | true | 1 | 0 | List of delivered emails is outside of the scope of Django, which is a web framework and not a replacement for services like Mailchimp. | 1 | 1 | 0 | I want use send_mass_mail() in django and then want receive list of delivery mail
list with email address and problem for failed or delivered ok status
how i can make this modules ? | receive delivery list of send mail in django | 1.2 | 0 | 0 | 415 |
5,126,346 | 2011-02-26T10:26:00.000 | 0 | 1 | 0 | 0 | java,python,programming-languages | 5,126,443 | 5 | false | 1 | 0 | CPython has a lot of libraries with bindings to native libraries--not so Java. | 1 | 13 | 0 | I would to pick up a new programming language - Java, having been using Python for some time. But it seems most things that can be done with Java can be done with Python. So I would like to know
What kind of things can be done with Java but not Python?
mobile programming (Android).
POSIX Threads Programming.
Convers... | What kind of things can be done with Java but not Python? | 0 | 0 | 0 | 13,215 |
5,126,776 | 2011-02-26T12:03:00.000 | 2 | 0 | 1 | 0 | python,object-oriented-database | 5,127,794 | 7 | false | 0 | 0 | One major difference between what SQL does and what you can do in idiomatic python, in SQL, you tell the evaluator what information you are looking for, and it works out the most efficient way of retrieving that based on the structure of the data it holds. In python, you can only tell the interpreter how you want the ... | 1 | 17 | 0 | I'm looking for a library that lets me run SQL-like queries on python "object databases". With object database I mean a fairly complex structure of python objects and lists in memory. Basically this would be a "reverse ORM" - instead of providing an object oriented interface to a relational database, it would provide ... | Query language for python objects | 0.057081 | 1 | 0 | 9,831 |
5,127,401 | 2011-02-26T14:22:00.000 | 2 | 0 | 1 | 0 | python,multithreading | 29,458,809 | 5 | false | 0 | 0 | Module Queue has been renamed queue starting with Python3 to better reflect the fact that there are several queue classes (lifo, fifo, priority) in the module.
so please make the changes while using this example | 1 | 36 | 0 | I am a newbie in python programming, what I understand is that a process can be a daemon, but a thread in a daemon mode, I couldn't understand the usecase of this, I would request the python gurus to help me in understanding this. | setDaemon() method of threading.Thread | 0.07983 | 0 | 0 | 62,284 |
5,127,521 | 2011-02-26T14:43:00.000 | 0 | 1 | 1 | 0 | python,performance | 5,128,723 | 1 | true | 0 | 0 | SPE has an object explorer, and debugger. Maybe these slow things down a bit. | 1 | 2 | 0 | Am just curious and wondering why it takes longer for python code to execute when run from inside Stani Python Editor in comparison to when run from IDLE or the terminal or even inside gvim. | Performance of running code in stani python editor vs IDLE/terminal/gvim | 1.2 | 0 | 0 | 177 |
5,127,921 | 2011-02-26T15:57:00.000 | 17 | 0 | 1 | 0 | python,gzip,mmap | 5,127,976 | 2 | false | 0 | 0 | Well, not the way you want.
mmap() can be used to access the gzipped file if the compressed data is what you want.
mmap() is a system call for mapping disk blocks into RAM almost as if you were adding swap.
You can't map the uncompressed data into RAM with mmap() as it is not on the disk. | 1 | 13 | 0 | I'm trying to figure how to use mmap with a gzip compressed file. Is that even possible ?
import mmap
import os
import gzip
filename = r'C:\temp\data.gz'
file = gzip.open(filename, "rb+")
size = os.path.getsize(filename)
file = mmap.mmap(file.fileno(), size)
print file.read(8)
The output data is compressed. | Can mmap and gzip collaborate? | 1 | 0 | 0 | 4,463 |
5,127,991 | 2011-02-26T16:05:00.000 | 0 | 0 | 0 | 0 | python,numpy | 21,030,654 | 4 | false | 0 | 0 | You could theoretically create an object that performs the role of a 'fancy view' into another array, and I can think of plenty of use cases for it. The problem is, that such an object would not be compatible with the standard numpy machinery. All compiled numpy C code relies on data being accessible as an inner produc... | 1 | 19 | 1 | What i need is a way to get "fancy indexing" (y = x[[0, 5, 21]]) to return a view instead of a copy.
I have an array, but i want to be able to work with a subset of this array (specified by a list of indices) in such a way that the changes in this subset is also put into the right places in the large array. If i just ... | Can I get a view of a numpy array at specified indexes? (a view from "fancy indexing") | 0 | 0 | 0 | 3,684 |
5,128,072 | 2011-02-26T16:19:00.000 | 1 | 0 | 1 | 0 | python,multithreading | 5,128,175 | 6 | false | 0 | 0 | The threading is efficient in CPython, but threads can not run concurrently on different processors/cores. This is probably what was meant. It only affects you if you need to do shared memory concurrency.
Other Python implementations does not have this problem. | 3 | 12 | 0 | I heard threading is not very efficient in Python (compared to other languages).
Is this true? If so, how can a Python programmer overcome this? | How efficient is threading in Python? | 0.033321 | 0 | 0 | 6,444 |
5,128,072 | 2011-02-26T16:19:00.000 | 12 | 0 | 1 | 0 | python,multithreading | 5,128,162 | 6 | false | 0 | 0 | CPython uses reference counting with a cyclic garbage collector for memory management. To make this practical, it has a mechanism called the "global interpreter lock" which protects the reference counting system, along with all the other interpreter internals.
On a single-core machine, this doesn't matter - all threadi... | 3 | 12 | 0 | I heard threading is not very efficient in Python (compared to other languages).
Is this true? If so, how can a Python programmer overcome this? | How efficient is threading in Python? | 1 | 0 | 0 | 6,444 |
5,128,072 | 2011-02-26T16:19:00.000 | 22 | 0 | 1 | 0 | python,multithreading | 5,128,129 | 6 | true | 0 | 0 | The reason people say that multi-threading is not very efficient in python is because of the Global Interpreter Lock. Because of the way the interpreter is written, only one thread can safely execute code in the interpreter at the same time.
This means that if you have threads which are quite heavily compute bound, tha... | 3 | 12 | 0 | I heard threading is not very efficient in Python (compared to other languages).
Is this true? If so, how can a Python programmer overcome this? | How efficient is threading in Python? | 1.2 | 0 | 0 | 6,444 |
5,128,454 | 2011-02-26T17:18:00.000 | 0 | 0 | 1 | 0 | javascript,python,json | 5,128,524 | 5 | false | 0 | 0 | I don't know Javascript or json, but...
if you've ever seen an Unix-like operating system, you know about pipes. Like program1 | program2 | program3 ... Why don't you just connect Python and Javascript programs with pipes? The first one writes to stdout, and the next one reads from stdin. | 3 | 1 | 0 | the same problem haunting me a month ago is still haunting me now. i know ive asked several questions regarding this on this site and i am truly sorry for that. your suggestions have all been excellent but the answer is still elusive. i now realize that this is a direct result of me not being able to phrase my question... | is json the answer to this: python program will talk and javascript will listen? | 0 | 0 | 0 | 950 |
5,128,454 | 2011-02-26T17:18:00.000 | 0 | 0 | 1 | 0 | javascript,python,json | 5,128,547 | 5 | false | 0 | 0 | This probably isn't the answer that you are looking for, and without links to your previous posts, I don't have much to go on, but nonetheless...
javascript is client side. I can interpret your question 2 different ways...
Your python script is running on your computer, and you want a script to actually alter your cu... | 3 | 1 | 0 | the same problem haunting me a month ago is still haunting me now. i know ive asked several questions regarding this on this site and i am truly sorry for that. your suggestions have all been excellent but the answer is still elusive. i now realize that this is a direct result of me not being able to phrase my question... | is json the answer to this: python program will talk and javascript will listen? | 0 | 0 | 0 | 950 |
5,128,454 | 2011-02-26T17:18:00.000 | 1 | 0 | 1 | 0 | javascript,python,json | 5,128,601 | 5 | false | 0 | 0 | I assume you mean: Python is on the web server, and Javascript is running in the client's web browser.
Because browsers are all different (IE6 is terrible, Chrome is great), there are a huge number of ways people found to "hack" this "cellphone" into place. These techniques are called AJAX and COMET techniques. There i... | 3 | 1 | 0 | the same problem haunting me a month ago is still haunting me now. i know ive asked several questions regarding this on this site and i am truly sorry for that. your suggestions have all been excellent but the answer is still elusive. i now realize that this is a direct result of me not being able to phrase my question... | is json the answer to this: python program will talk and javascript will listen? | 0.039979 | 0 | 0 | 950 |
5,128,999 | 2011-02-26T18:47:00.000 | 5 | 0 | 1 | 1 | python,macos,py2app | 5,164,580 | 1 | true | 0 | 0 | Check the Console (Applications > Utilities). All stack traces from py2app applications get printed there.
I had this problem today, and my solution was that there was something broken with argv_emulation in py2app itself, so I had to set it to False in the OPTIONS dict. It's set to True by default. | 1 | 2 | 0 | I have a program that I'm trying to distribute with py2app. When I run the program from the command line, it works without any problems. It also works if I go into the package that py2app creates and find the exec inside the package contents and run it from there. There are not any errors in the output during the build... | Py2app build runs perfectly when run from command line or the executable in the pkg, but not when the app is double clicked | 1.2 | 0 | 0 | 1,028 |
5,129,840 | 2011-02-26T21:20:00.000 | 3 | 0 | 1 | 0 | python,flat-file,transpose | 5,129,970 | 4 | false | 0 | 0 | Flat files are not good with what you're trying to do. My suggestion is to convert the files to SQL database (using sqlite3) and then reading just the columns you want. SQLite3 is blazing fast. | 2 | 2 | 0 | I'm interested in reading fixed width text files in Python in as efficient a manner as I can. Specifically, most of the time I'm interested in one or more columns in the flat file but not entire records.
It strikes me as inefficient to read the file a line at a time and extract the desired columns after reading the e... | Read flat file as transpose, python | 0.148885 | 0 | 0 | 868 |
5,129,840 | 2011-02-26T21:20:00.000 | 1 | 0 | 1 | 0 | python,flat-file,transpose | 5,130,003 | 4 | false | 0 | 0 | If it's truly fixed width, then you should be able to just call read(N) to skip past the fixed number of bytes from the end of your column on one line to the start of it on the next. | 2 | 2 | 0 | I'm interested in reading fixed width text files in Python in as efficient a manner as I can. Specifically, most of the time I'm interested in one or more columns in the flat file but not entire records.
It strikes me as inefficient to read the file a line at a time and extract the desired columns after reading the e... | Read flat file as transpose, python | 0.049958 | 0 | 0 | 868 |
5,130,057 | 2011-02-26T22:05:00.000 | 0 | 0 | 1 | 0 | python,jython,gstreamer | 5,130,162 | 2 | true | 0 | 0 | I suspect that it uses c bindings so you can not use in jython, sorry. | 1 | 3 | 0 | Does anyone know where I can find a tutorial on how to use GStreamer with Jython? I have tried searching but with no luck. Using the Gstreamer-Python bindings I can get a python file to run with python but jython gives me ImportError: No module named pygst. | Jython Gstreamer | 1.2 | 0 | 0 | 278 |
5,132,648 | 2011-02-27T10:26:00.000 | 39 | 1 | 0 | 0 | python,django,twisted,rabbitmq | 19,206,575 | 7 | false | 0 | 0 | Let me tell you a few reasons that makes using MOM (Message Oriented Middleware) probably the best choice.
Decoupling:
It can decouple/separate the core components of the application. There is no need to bring all the benefits of the decoupled architecture here. I just want to point it out that this is one of the main ... | 3 | 68 | 0 | Why do we need RabbitMQ when we have a more powerful network framework in Python called Twisted. I am trying to understand the reason why someone would want to use RabbitMQ.
Could you please provide a scenario or an example using RabbitMQ?
Also, where can I find a tutorial on how to use RabbitMQ? | Why do we need to use rabbitmq | 1 | 0 | 0 | 20,812 |
5,132,648 | 2011-02-27T10:26:00.000 | 6 | 1 | 0 | 0 | python,django,twisted,rabbitmq | 27,416,485 | 7 | false | 0 | 0 | RabbitMQ is a bit more than mere messaging... It's a common platform that has ability to inter-connect applications. Using RabbitMQ a Java application can speak to a Linux server and/or a .NET app, to a Ruby & rails + almost anything that finds its place in the corporate web development. And most importantly it impleme... | 3 | 68 | 0 | Why do we need RabbitMQ when we have a more powerful network framework in Python called Twisted. I am trying to understand the reason why someone would want to use RabbitMQ.
Could you please provide a scenario or an example using RabbitMQ?
Also, where can I find a tutorial on how to use RabbitMQ? | Why do we need to use rabbitmq | 1 | 0 | 0 | 20,812 |
5,132,648 | 2011-02-27T10:26:00.000 | 14 | 1 | 0 | 0 | python,django,twisted,rabbitmq | 5,132,740 | 7 | false | 0 | 0 | Twisted is not a queue implementation. Apart from that RabbitMQ offers enterprise-level queuing features and implements the AMQP protocol which is often needed in an enterprise world. | 3 | 68 | 0 | Why do we need RabbitMQ when we have a more powerful network framework in Python called Twisted. I am trying to understand the reason why someone would want to use RabbitMQ.
Could you please provide a scenario or an example using RabbitMQ?
Also, where can I find a tutorial on how to use RabbitMQ? | Why do we need to use rabbitmq | 1 | 0 | 0 | 20,812 |
5,134,142 | 2011-02-27T15:51:00.000 | 0 | 0 | 1 | 0 | python,nlp,fuzzy-comparison | 5,136,520 | 3 | false | 0 | 0 | Please edit your question with answers to the following:
You say "we want to automate this filter, to look for the most likely match" -- match to what?? Do you have a list of the standard names of all of the possible football clubs, or do the many variations of each name need to be clustered to create such a list?
How ... | 1 | 2 | 0 | The title for this one was quite tricky.
I'm trying to solve a scenario,
Imagine a survey was sent out to XXXXX amount of people, asking them what their favourite football club was.
From the response back, it's obvious that while many are favourites of the same club, they all "expressed" it in different ways.
For e... | Compensating for "variance" in a survey | 0 | 0 | 0 | 176 |
5,134,860 | 2011-02-27T18:00:00.000 | 1 | 0 | 1 | 0 | python,list,hash,md5,checksum | 5,134,890 | 2 | false | 0 | 0 | You don't have 4 lists. You're printing the contents of the md5s each time after you call getmd5 which adds one md5 hash to the list. You just happen to be doing this 4 times, because you have 4 items in your files list.
This means you have one list and it contains all the digests at the end of last for loop. You are p... | 1 | 0 | 0 | I'm working on a bit of a project in Python. I have a list of files that I want to get the md5checksums for. Then it stores the checksums in another list. Then it checks again and checks to see if they're different. I have the function for getting the checksums working but now I can't figure out how I'd add them to a l... | Computing MD5 checksums for files in a list | 0.099668 | 0 | 0 | 2,384 |
5,135,325 | 2011-02-27T19:20:00.000 | 2 | 0 | 0 | 0 | php,python,ruby-on-rails,django | 5,135,982 | 5 | false | 1 | 0 | Moodle seems the only more or less usable open source LMS out there, although it's far from well written IMO. There are good payed LMS like Canvas. I don't think what you are looking for exists at this moment! | 2 | 10 | 0 | I am looking for an alternative to Moodle.
I searched and found pinax-lms-demo, which was Django-based;
and Astra which was Rails-based, but both were empty repo...
I need a LMS which has the following functions:
create class
Assign faculty
Upload materials
Take quiz
forum
scorm
chat
I spent more th... | LMS in Python/Django/Ruby/Rails/PHP | 0.07983 | 0 | 0 | 15,406 |
5,135,325 | 2011-02-27T19:20:00.000 | 2 | 0 | 0 | 0 | php,python,ruby-on-rails,django | 5,136,052 | 5 | false | 1 | 0 | This is a real problem as open-source LMS are all in PHP, with the exception of Sakai which is in Java.
As I've written a LMS which tries to be compatible with SCORM I can say that it's not a small work to create a SCORM implementation.
The only project in Python I know is Cloud Course, created by Google on GAE (http:... | 2 | 10 | 0 | I am looking for an alternative to Moodle.
I searched and found pinax-lms-demo, which was Django-based;
and Astra which was Rails-based, but both were empty repo...
I need a LMS which has the following functions:
create class
Assign faculty
Upload materials
Take quiz
forum
scorm
chat
I spent more th... | LMS in Python/Django/Ruby/Rails/PHP | 0.07983 | 0 | 0 | 15,406 |
5,135,453 | 2011-02-27T19:45:00.000 | 5 | 0 | 0 | 0 | python,django,satchmo | 5,233,036 | 3 | true | 1 | 0 | What I have done which works is to copy the application that I have changed. In this case satchmo\apps\product.
I copied the app into my project folder
Amended my setting.py INSTALLED_APPS from 'product', to 'myproject.product',
This now carries the changes I've made to this app for this project only and leaves the or... | 3 | 5 | 0 | I'm running Satchmo. There are many apps and I've changed some of the source in the Product app.
So my question is how can I override this properly because the change is site specific. Do I have to copy over the whole Satchmo framework and put it into my project or can I just copy one of the apps out and place it in s... | How to override an app in Django properly? | 1.2 | 0 | 0 | 2,057 |
5,135,453 | 2011-02-27T19:45:00.000 | 2 | 0 | 0 | 0 | python,django,satchmo | 5,135,687 | 3 | false | 1 | 0 | Normally, I'd say the best thing is to fork Satchmo and keep a copy with your changes.
If you are willing to play with the python path, make sure that your app's directory appears before the other (default) directory. From my tests, if you have two apps/modules with identical names, the first one found is used. | 3 | 5 | 0 | I'm running Satchmo. There are many apps and I've changed some of the source in the Product app.
So my question is how can I override this properly because the change is site specific. Do I have to copy over the whole Satchmo framework and put it into my project or can I just copy one of the apps out and place it in s... | How to override an app in Django properly? | 0.132549 | 0 | 0 | 2,057 |
5,135,453 | 2011-02-27T19:45:00.000 | 4 | 0 | 0 | 0 | python,django,satchmo | 5,137,813 | 3 | false | 1 | 0 | When you add a 'Django App' to INSTALLED_APPS in your settings.py file, you're telling Django that there exists an importable python module with that name on your "python path". You can view your python path by viewing the contents of the list stored at sys.path.
Whenever Python (and in this case Django) attempts to im... | 3 | 5 | 0 | I'm running Satchmo. There are many apps and I've changed some of the source in the Product app.
So my question is how can I override this properly because the change is site specific. Do I have to copy over the whole Satchmo framework and put it into my project or can I just copy one of the apps out and place it in s... | How to override an app in Django properly? | 0.26052 | 0 | 0 | 2,057 |
5,136,266 | 2011-02-27T21:54:00.000 | 3 | 0 | 1 | 0 | python,function,time,sleep | 10,023,537 | 3 | false | 0 | 0 | If you're running your script on command line, try using the -u parameter. It runs the script in unbuffered mode and did the trick for me.
For example:
python -u my_script.py | 1 | 8 | 0 | Hey I need to know how to sleep in Python without interfering with the current script. I've tried using time.sleep() but it makes the entire script sleep.
Like for example
import time
def func1():
func2()
print("Do stuff here")
def func2():
time.sleep(10)
print("Do more stuff here")
func1()
I want i... | Python sleep without interfering with script? | 0.197375 | 0 | 0 | 14,596 |
5,136,533 | 2011-02-27T22:35:00.000 | 3 | 0 | 1 | 0 | python | 5,136,547 | 5 | false | 0 | 0 | Since a dice has 6 possible outcomes, if you get a 2 three times, this would be :
0 3 0 0 0 0 | 2 | 1 | 1 | I was wondering if someone can clarify this line for me.
Create a function die(x) which rolls a
die x times keeping track of how many
times each face comes up and returns a
1X6 array containing these numbers.
I am not sure what this means when it says 1X6 array ? I am using the randint function from numpy so th... | python random number | 0.119427 | 0 | 0 | 688 |
5,136,533 | 2011-02-27T22:35:00.000 | 1 | 0 | 1 | 0 | python | 5,136,717 | 5 | false | 0 | 0 | if you have the results of the die rolls in a list lst, you can determine the number of times a 4 appeared by doing len([_ for _ in lst if _ == 4]). you should be able to figure the rest out from there. | 2 | 1 | 1 | I was wondering if someone can clarify this line for me.
Create a function die(x) which rolls a
die x times keeping track of how many
times each face comes up and returns a
1X6 array containing these numbers.
I am not sure what this means when it says 1X6 array ? I am using the randint function from numpy so th... | python random number | 0.039979 | 0 | 0 | 688 |
5,137,126 | 2011-02-28T00:32:00.000 | 1 | 1 | 0 | 0 | python,django,twitter | 5,137,217 | 2 | false | 1 | 0 | You should store the twitter user's ID because the username can change at any time, but the id will always be the same. You should be comparing the id's, not the usernames in the intersection_set that Ofri recommends. | 1 | 2 | 0 | I'm wondering if someone could help guide the approach to this fairly common problem:
I'm building a simple site which a user connects their twitter account to sign up. I'd like to create an interface which shows them which of their twitter friends are already using the site.
So I can get a list the user's twitter frie... | Comparing user's facebook/twitter friends to site's users in Python/Django | 0.099668 | 0 | 0 | 323 |
5,137,497 | 2011-02-28T01:51:00.000 | 17 | 0 | 1 | 1 | python,directory | 18,185,825 | 13 | false | 0 | 0 | If you're searching for the location of the currently executed script, you can use sys.argv[0] to get the full path. | 1 | 2,737 | 0 | In Python, what commands can I use to find:
the current directory (where I was in the terminal when I ran the Python script), and
where the file I am executing is? | Find the current directory and file's directory | 1 | 0 | 0 | 4,064,701 |
5,138,801 | 2011-02-28T06:15:00.000 | 5 | 0 | 1 | 0 | python,installation,makefile | 5,138,840 | 4 | false | 0 | 0 | There is no such option - and it is a good thing keeping the installation as it is (perhaps you can chop of the test files manually). The .py files are handy for debugging. Apart from that: you really want to keep the full installation as it is. Dealing with stripped down Python installations as we see it on various Li... | 2 | 6 | 0 | If you follow the simple configure -> make -> make install process for compiling python from source code, you end up with a very large install that includes a whole lot of files that are not necessary for a functional python environment. eg: All .py files are left in the installation (not just the .pyc or .pyo files),... | How to compile python from source and get a clean/minimal install? | 0.244919 | 0 | 0 | 10,716 |
5,138,801 | 2011-02-28T06:15:00.000 | 1 | 0 | 1 | 0 | python,installation,makefile | 10,233,455 | 4 | false | 0 | 0 | Such options (if they exist in the software itself) are usually found in the configure script. Check configure -h.
Alternatively, you could try removing .py files if an identically named .pyc file exists. You can also remove the .pyo files. Removing .py and .pyo files would save 72396 kB under /usr/local/lib/python2.7 ... | 2 | 6 | 0 | If you follow the simple configure -> make -> make install process for compiling python from source code, you end up with a very large install that includes a whole lot of files that are not necessary for a functional python environment. eg: All .py files are left in the installation (not just the .pyc or .pyo files),... | How to compile python from source and get a clean/minimal install? | 0.049958 | 0 | 0 | 10,716 |
5,139,249 | 2011-02-28T07:29:00.000 | 0 | 0 | 0 | 0 | url-encoding,python-unicode | 5,139,350 | 6 | false | 0 | 0 | '%C3%A7%C3%B6asd+fjkls%25asd' - this is not a unicode string.
This is a url-encoded string. Use urllib2.unquote() instead. | 1 | 12 | 0 | I have a unicode string like '%C3%A7%C3%B6asd+fjkls%25asd' and I want to decode this string.
I used urllib.unquote_plus(str) but it works wrong.
expected : çöasd+fjkls%asd
result : çöasd fjkls%asd
double coded utf-8 characters(%C3%A7 and %C3%B6) are decoded wrong.
My python version is 2.7 under a linux distro.
What... | python url unquote followed by unicode decode | 0 | 0 | 1 | 15,321 |
5,139,767 | 2011-02-28T08:44:00.000 | 4 | 0 | 0 | 1 | python,google-app-engine | 5,139,865 | 1 | true | 1 | 0 | Store the count in another entity (named Statistics for example), and modify your application so that the stored count is updated each time a new entity is inserted or deleted. | 1 | 0 | 0 | I am using python with Django to develop application on google app engine.
Now my entity in data store contain millions or billions of record and I want to count those records in real time.
By using count() it takes more time then what I can afford
I want to count those record with in 2 or 3 second..
So can any one tel... | Counting records from datastore | 1.2 | 0 | 0 | 122 |
5,142,192 | 2011-02-28T12:48:00.000 | 0 | 0 | 0 | 1 | python,google-app-engine,model | 5,143,851 | 3 | false | 1 | 0 | If your are looking for join - there is no joins in GAE. BTW, there is pretty easy to make 2 simple queries (Softwares and UserSoftware), and calculate all additional data manually | 1 | 1 | 0 | I have three tables, 1-Users, 2-Softwares, 3-UserSoftwares.
if suppose, Users table having 6 user records(say U1,U2,...,U6) and Softwares table having 4 different softwares(say S1,S2,S3,S4) and UserSoftwares stores the references if a user requested for given software only.
For example: UserSoftwares(5 records) have on... | Querying on multiple tables using google apps engine (Python) | 0 | 1 | 0 | 873 |
5,142,418 | 2011-02-28T13:11:00.000 | 3 | 0 | 1 | 0 | python,assert,assertion | 31,445,076 | 22 | false | 0 | 0 | If you ever want to know exactly what a reserved function does in python, type in help(enter_keyword)
Make sure if you are entering a reserved keyword that you enter it as a string. | 1 | 1,340 | 0 | What does assert mean? How is it used? | What is the use of "assert" in Python? | 0.027266 | 0 | 0 | 1,150,877 |
5,142,908 | 2011-02-28T13:58:00.000 | 0 | 0 | 1 | 1 | python,subprocess | 5,142,966 | 3 | false | 0 | 0 | You need a time-out while waiting for your tasks to complete and then have your script kill or terminate the process (in addition to raising the error). | 1 | 1 | 0 | I have a python script that runs on a server after hours and invokes many shell subprocesses. None of the programs that are called should be prompting, but sometimes it happens and the script hangs, waiting for input until the user (me) notices and gets angry. :)
Tried: Using p.communicate() with stdin=PIPE, as written... | python subprocess: raising an error when a process prompts | 0 | 0 | 0 | 354 |
5,143,325 | 2011-02-28T14:36:00.000 | 1 | 1 | 0 | 0 | python,curl | 5,143,397 | 2 | false | 0 | 0 | you can do the same stuff with urllib2, pycurl hasn't been updated in a while, so I wouldn't recommend it. Especially on Windows. Always better to use a native module rather than a 3rd party plugin | 1 | 0 | 0 | I'm a PHP programmer. What module can I use in Python to do the same that cURL does?
Best Regards, | What module to use in Python to do the same as cURL in Php? | 0.099668 | 0 | 0 | 602 |
5,143,769 | 2011-02-28T15:13:00.000 | 41 | 0 | 1 | 0 | python,string,substring | 5,143,806 | 3 | false | 0 | 0 | string.find("substring") will help you. This function returns -1 when there is no substring. | 1 | 328 | 0 | I have two strings and I would like to check whether the first is a substring of the other. Does Python have such a built-in functionality? | How do I check if a given Python string is a substring of another one? | 1 | 0 | 0 | 448,744 |
5,145,015 | 2011-02-28T16:59:00.000 | 0 | 0 | 1 | 0 | c#,java,.net,python | 5,145,420 | 2 | false | 0 | 0 | "Code 39 is just about the only type of barcode in common use that does not require a checksum" (http://www.mecsw.com/specs/code_39.html).
If you are determining what the code should be, you are perfectly welcome to add whatever checksum values you like - modulo-43 is apparently pretty standard - or simply demand that ... | 1 | 0 | 0 | we are currently printing code 39 barcodes. The operator of the scanner scans the barcodes very quickly and the barcode is outputted incorrectly once out of every 1000 scans. I would like to implement a checksum to catch this output error. Has anyone done something like this in C sharp Python or Java? Can someone help ... | checksum middleware software for barcode scanner | 0 | 0 | 0 | 536 |
5,145,664 | 2011-02-28T17:58:00.000 | 5 | 0 | 1 | 0 | python,serialization,pygame,pickle | 5,145,756 | 2 | false | 0 | 1 | The basic point of pickling is that you should be able to serialise the object somehow. An SDL surface is an in memory object holding a lot of run time state. Trying to serialise it is not totally sensible.
What you should do is to decouple the state of your game from the rendering components so that you can serialise... | 1 | 3 | 0 | So I've got a problem - I'm writing a game prototype in Python, using Pygame, and I want to save my games. All of the game-related data is in three instances of certain classes, and I want to save these three instances to a file. However, I've tried pickling these instances, and it doesn't work. Instead, I get "Type... | Storing unpicklabe pygame.Surface objects in external files | 0.462117 | 0 | 0 | 1,353 |
5,145,846 | 2011-02-28T18:13:00.000 | 4 | 1 | 1 | 0 | python,r,matlab,installation,administrator | 5,148,866 | 4 | false | 0 | 0 | For R you can do install.packages("foo",lib="~/R/") - create the directory ~/R/ first - and then the packages will install there. Then do library(foo,lib="~/R/") to load it.
You can use the .libPaths function in your R startup files to add this automatically. Most of the Ubuntu boxes I've used are set up something like... | 3 | 1 | 0 | A problem I frequently run into when using Python, R, Matlab etc. is installing packages or libraries when I don't have admin privileges on the server I'm using. I was wondering if there is a way to get around this?
I was thinking of "installing" the libraries somewhere in my own account, and adding that directory to m... | Install Python / Matlab libraries without admin priviledges? | 0.197375 | 0 | 0 | 1,195 |
5,145,846 | 2011-02-28T18:13:00.000 | 0 | 1 | 1 | 0 | python,r,matlab,installation,administrator | 30,807,406 | 4 | false | 0 | 0 | In python you can do python setup.py install --user or pip install --user foo. This will install it in a user-specific directory appropriate for your platform. | 3 | 1 | 0 | A problem I frequently run into when using Python, R, Matlab etc. is installing packages or libraries when I don't have admin privileges on the server I'm using. I was wondering if there is a way to get around this?
I was thinking of "installing" the libraries somewhere in my own account, and adding that directory to m... | Install Python / Matlab libraries without admin priviledges? | 0 | 0 | 0 | 1,195 |
5,145,846 | 2011-02-28T18:13:00.000 | 0 | 1 | 1 | 0 | python,r,matlab,installation,administrator | 14,704,458 | 4 | false | 0 | 0 | In Matlab you typically can just download the m files anywhere you like, and then add their location to the path. Not sure but I would suspect that getting a complete toolbox may require admin rights but for anything less you should be fine.
To conveniently add the location to your path automatically when you run matla... | 3 | 1 | 0 | A problem I frequently run into when using Python, R, Matlab etc. is installing packages or libraries when I don't have admin privileges on the server I'm using. I was wondering if there is a way to get around this?
I was thinking of "installing" the libraries somewhere in my own account, and adding that directory to m... | Install Python / Matlab libraries without admin priviledges? | 0 | 0 | 0 | 1,195 |
5,148,790 | 2011-02-28T23:23:00.000 | 0 | 0 | 1 | 0 | python,casting | 5,148,795 | 2 | false | 0 | 0 | ord(val) will give you the integer value of a character. int(val) will cast a value into an integer. | 1 | 0 | 0 | I had a postgresql query where I need to take column defined as character from table and then pass this value to the function where it only accepts integer.So in this case, how can i solve the problem??Can anyone help?? | how to convert value of column defined as character into integer in python | 0 | 1 | 0 | 126 |
5,149,127 | 2011-03-01T00:12:00.000 | 0 | 1 | 0 | 0 | python,ruby,django,apache,ruby-on-rails-3 | 5,149,250 | 5 | false | 1 | 0 | I use rackspace, it's 10$ /month for the basic setup, they just give you a clean install of whatever OS you want so it will support any packages/configurations you choose to install. | 2 | 2 | 0 | I love Python and Ruby equally and I simply cannot standardize on one. I love Heroku, but it can get a speck pricey and is totally specific to Rails.
Is there a decently inexpensive host, or many, that adequately supports both Ruby and Python frameworks as well as offering common LAMPish support?
Yeah... I wanna know i... | Good Web hosts that support Ruby and Python? | 0 | 0 | 0 | 1,466 |
5,149,127 | 2011-03-01T00:12:00.000 | 0 | 1 | 0 | 0 | python,ruby,django,apache,ruby-on-rails-3 | 5,149,489 | 5 | false | 1 | 0 | I'm in accordance with elithrar. I switched to webfaction and I'm very happy with the change. They've a very good support (I got answers in less than half hour for my problems/questions) and when my question is got by one of the IT guys, the same guy cares about all the subsequent communications until problem, doubts a... | 2 | 2 | 0 | I love Python and Ruby equally and I simply cannot standardize on one. I love Heroku, but it can get a speck pricey and is totally specific to Rails.
Is there a decently inexpensive host, or many, that adequately supports both Ruby and Python frameworks as well as offering common LAMPish support?
Yeah... I wanna know i... | Good Web hosts that support Ruby and Python? | 0 | 0 | 0 | 1,466 |
5,149,832 | 2011-03-01T02:13:00.000 | 36 | 0 | 1 | 0 | python,bytecode | 5,149,853 | 4 | true | 0 | 0 | A *.pyc file is created for imported modules, and they are placed in the same directory containing the .py file. However... no .pyc file is created for the main script for your program. In other words... if you call "python myscript.py" on the command line, there will be no .pyc file for myscript.py.
This is how Pyth... | 2 | 24 | 0 | I am a complete newb to python, hence a silly question.
As i understand, upon first execution of a *.py program, byte code is created into *.pyc and used until a change in *.py file.
Where might this *.pyc bytecode be found in a project?
I would think bin, but nothing is there | where are the .pyc files? | 1.2 | 0 | 0 | 19,433 |
5,149,832 | 2011-03-01T02:13:00.000 | 0 | 0 | 1 | 0 | python,bytecode | 5,149,848 | 4 | false | 0 | 0 | The .pyc files are normally created in the same directory as the files that they correspond to. E.g., both my_file.py and my_file.pyc should be in the same location. | 2 | 24 | 0 | I am a complete newb to python, hence a silly question.
As i understand, upon first execution of a *.py program, byte code is created into *.pyc and used until a change in *.py file.
Where might this *.pyc bytecode be found in a project?
I would think bin, but nothing is there | where are the .pyc files? | 0 | 0 | 0 | 19,433 |
5,150,053 | 2011-03-01T03:03:00.000 | 2 | 0 | 0 | 0 | python | 5,150,092 | 1 | true | 0 | 0 | I would go with NLTK since it's written in Python | 1 | 0 | 1 | I want to use a easy-to-use text miner with my python code. I will be mainly using the classification algorithms - Naive Bayes, KNN and such.
Please let me know what's the best option here - Weka? NLTK? SVM? or something else?
Thanks! | Best text miner to use with python | 1.2 | 0 | 0 | 142 |
5,150,550 | 2011-03-01T04:46:00.000 | 3 | 0 | 1 | 0 | c++,python,multithreading | 5,150,977 | 1 | true | 0 | 0 | Python is, in general, quite slow at raw number crunching. This is because it uses its full, general purpose object model for everything, including numbers. You can contrast this with Java and C++, which have "native types" which don't offer any of the niceties of a real class (methods, inheritance, data attributes, et... | 1 | 0 | 0 | I wrote a simple program(calculating the number of steps for the numbers 1-10^10 using the collatz conjecture)in both python and c++. They were nearly identical, and neither were written for multithreading. I ran the one in python and according to my system manager, one core went straight to 100% usage, the others stay... | Python maxes one core while c++ doesn't | 1.2 | 0 | 0 | 181 |
5,150,768 | 2011-03-01T05:17:00.000 | 2 | 0 | 1 | 0 | python | 5,150,830 | 6 | false | 0 | 0 | I don't know if there's a pattern for this, really. You could just file.readlines() the entire thing and use array slicing. If you're concerned about memory consumption, iterate over the file handle using itertools.compress() on a pattern generated by itertools.cycle(). Or, you know, just write a loop or list comprehen... | 1 | 2 | 0 | I have a text file like
1
2
3
4
5
6
7
8
9
10
... and so on.
How do I write a program to print the first 2 lines then skip 3 then print 2 lines (that's the pattern.)
I'm a complete noob.
Any help will be appreciated.
thanks. | Printing alternate lines using python | 0.066568 | 0 | 0 | 3,669 |
5,150,958 | 2011-03-01T05:45:00.000 | -1 | 0 | 1 | 0 | python,list | 5,151,771 | 7 | false | 0 | 0 | Your question does not make much sense since everything in Python is an object.
And a list can hold arbitrary instances of objects if needed. | 2 | 3 | 0 | Is the List in python homogeneous or heterogeneous? | Lists in Python | -0.028564 | 0 | 0 | 7,178 |
5,150,958 | 2011-03-01T05:45:00.000 | 0 | 0 | 1 | 0 | python,list | 5,151,893 | 7 | false | 0 | 0 | It depends if you talk about the direct elements of a list or its indirect elements.
I believe that a list is in reality a list of references, not of objects, and that when the interpeter has to use a list, it knows that in fact it must manipulate the objects to which the references are pointing, not the references the... | 2 | 3 | 0 | Is the List in python homogeneous or heterogeneous? | Lists in Python | 0 | 0 | 0 | 7,178 |
5,154,479 | 2011-03-01T12:25:00.000 | 0 | 0 | 0 | 1 | python,django,ubuntu-10.10 | 5,154,551 | 1 | true | 1 | 0 | Install python2.5 with synaptic, then you will be able to use easy_install2.5 to install django. If you don't have the python2.5 in your package list you can put django on your python2.5 system path and be with it
to view the system path do:
python2.5
import sys
sys.path | 1 | 0 | 0 | AppEngine needs Python2.5.
Ubuntu 2010.10 comes with Python 2.6.6 and I didn't want to interfere with it, so I downloaded and compiled Python 2.5 in my home directory.
Then I downloaded Django-1.2.5.tar.gz, and ran "sudo python setup.py install".
Problem: "import django" says "ImportError: No module named django"
I gu... | Django on python2.5 | 1.2 | 0 | 0 | 238 |
5,155,597 | 2011-03-01T14:09:00.000 | 1 | 0 | 0 | 0 | c++,python,numpy,python-c-api | 5,159,762 | 2 | false | 0 | 0 | Short answer, no.
Numpy expects all the data to be laid it in a simple, strided pattern. When iterating over the array, to advance in a dimension, it adds a constant, the stride size for that dimension, to the position in memory. So unless your 2-d slices are laid out regularly (e.g. every other row of a larger 3-d a... | 1 | 2 | 1 | Is it possible to use PyArray_NewFromDescr to create numpy array object from a set of contiguous 2d arrays, without copying the data? | creating a 3d numpy array from a non-contigous set of contigous 2d slices | 0.099668 | 0 | 0 | 444 |
5,156,422 | 2011-03-01T15:17:00.000 | 0 | 1 | 0 | 0 | python,email | 5,156,532 | 2 | false | 0 | 0 | This question does not make sense. You can access GMail either using IMAP or POP3.
And for parsing retrieved emails you use the 'email' module of Python. Python provides support for all this out-of-the-box "all batteries included". | 1 | 0 | 0 | Are there libraries for email message parsing (particularly, from Gmail's IMAP server) in Python (except for the standard email library)?
Or if not, maybe there is some C++ library for this purpose (and I'll be able to use it through SWIG)? | python: libraries for parsing email | 0 | 0 | 1 | 909 |
5,156,496 | 2011-03-01T15:24:00.000 | 1 | 1 | 0 | 0 | python,ruby,gwt | 5,156,600 | 6 | false | 1 | 0 | GWT is really a frontend development technology. It includes components that make it play nice with the backend, but it is primarily a UI framework. | 3 | 1 | 0 | I want to embark on learning a totally new language for web back-end development and I've narrowed down my choice between these three:
GWT
Ruby
Python
Do you know or recommend of any sites that walks you through building a simple site using these technologies that could be easily deployed and tested?
By the way, I a... | GWT or Python or Ruby for Web Development | 0.033321 | 0 | 0 | 3,022 |
5,156,496 | 2011-03-01T15:24:00.000 | 0 | 1 | 0 | 0 | python,ruby,gwt | 5,156,700 | 6 | false | 1 | 0 | @Finbarr...but it contains a full fledged Java Servlet Backend.
And this is probably why I'd suggest you to use RoR or Django or something too cook up a simple website.
GWT Applications are usually made of Server components written in Java and Client Side code (mostly JavaScript) that has been generated from Java. Us... | 3 | 1 | 0 | I want to embark on learning a totally new language for web back-end development and I've narrowed down my choice between these three:
GWT
Ruby
Python
Do you know or recommend of any sites that walks you through building a simple site using these technologies that could be easily deployed and tested?
By the way, I a... | GWT or Python or Ruby for Web Development | 0 | 0 | 0 | 3,022 |
5,156,496 | 2011-03-01T15:24:00.000 | 0 | 1 | 0 | 0 | python,ruby,gwt | 5,164,844 | 6 | false | 1 | 0 | I would personally go with Python/Django (you can get nice overview of the technology on djangobook.com) but Ruby/Rails is probably equally good.
And about GWT ... hmm we are about to start GWT project at work and I am really scared. Code looks terrible bloated , generated HTML is huge , performance can be a problem an... | 3 | 1 | 0 | I want to embark on learning a totally new language for web back-end development and I've narrowed down my choice between these three:
GWT
Ruby
Python
Do you know or recommend of any sites that walks you through building a simple site using these technologies that could be easily deployed and tested?
By the way, I a... | GWT or Python or Ruby for Web Development | 0 | 0 | 0 | 3,022 |
5,157,696 | 2011-03-01T16:59:00.000 | 1 | 0 | 0 | 0 | python,caching,memcached | 5,158,057 | 2 | false | 1 | 0 | Beaker as said is the way to go. It supports multiple backends including Memcached. | 1 | 4 | 0 | Before reinventing the wheel, I was wondering if there was a non-Django cache library that was similar to the one provided with Django. Basically, it would allow different backends (ideally, file and memcached to start) to be used just like Django's cache, and then behave identically regardless of backend used.
I've se... | python cache library | 0.099668 | 0 | 0 | 1,693 |
5,158,781 | 2011-03-01T18:35:00.000 | 3 | 0 | 1 | 1 | python,installation,download,32bit-64bit | 5,158,909 | 3 | false | 0 | 0 | Even though you have a 64-bit processor, your OS is of a 32-bit flavour. The Windows installer for Python targets the OS it is built on, not just the processor. Since your OS is 32-bit, you can only install the regular 32-bit Python 2.7.1 Windows installer.
Note that you can install both 32-bit (under a 32-bit emulatio... | 1 | 2 | 0 | I have an Intel T9550 64-bit processor with 32-bit Windows Vista. I want to install Python 2.7.1 onto my PC. From the python.org website, which installer should I use:
"Python 2.7.1 Windows Installer"?
or "Python 2.7.1 Windows X86-64 Installer"?
The latter one is for x86-64. I don't understand if this bit refers to t... | I'm running 32-bit Windows on an x86-64 PC. Should I download the 32-bit or 64-bit Python installer? | 0.197375 | 0 | 0 | 533 |
5,159,259 | 2011-03-01T19:21:00.000 | 3 | 0 | 0 | 1 | python,twisted,reactor | 5,160,794 | 1 | true | 0 | 0 | No. The reactor does not implement priority-based scheduling; it just runs events in whatever order they happen to come back from your multiplexing/timing mechanism, depending on the particular reactor implementation (it's slightly different for the different ones).
Implementing a scheduling or fair queueing API in th... | 1 | 4 | 0 | Two simple questions about twisted reactor:
Is there a way to explicitly assign a priority while scheduling a task ?
Is it possible to inspect the reactor in order to list all the pending tasks? | twisted reactor: priority and insights | 1.2 | 0 | 0 | 724 |
5,159,351 | 2011-03-01T19:30:00.000 | 6 | 0 | 0 | 0 | python,urllib2,urllib | 5,159,377 | 2 | true | 0 | 0 | What does sending data to a URL mean? The usual way to do that is just via an HTTP POST, and urllib (and urllib2) handle that just fine. | 1 | 0 | 0 | urllib fetches data from urls right? is there a python library that can do the reverse of that and send data to urls instead (for example, to a site you are managing)? and if so, is that library compatible with apache?
thanks. | python library that is the inverse of urllib? | 1.2 | 0 | 1 | 174 |
5,159,674 | 2011-03-01T20:02:00.000 | 0 | 0 | 1 | 0 | python | 5,159,749 | 2 | false | 0 | 0 | If you have access to any server-side scripting language, its easy. | 2 | 0 | 0 | Say I have a paragraph in a site I am managing and I want a python program to change the contents of that paragraph. Is this plausible with urllib? | Filling out paragraph text via urllib? | 0 | 0 | 1 | 54 |
5,159,674 | 2011-03-01T20:02:00.000 | 0 | 0 | 1 | 0 | python | 5,160,286 | 2 | true | 0 | 0 | Quite possibly; it depends on how the site is designed.
If the site is just a collection of static pages (ie .html files) then you would have to get a copy of the page, modify it, and upload the new version - most likely using sftp or WebDAV.
If the site is running a content management system (like Wordpress, Drupal, J... | 2 | 0 | 0 | Say I have a paragraph in a site I am managing and I want a python program to change the contents of that paragraph. Is this plausible with urllib? | Filling out paragraph text via urllib? | 1.2 | 0 | 1 | 54 |
5,160,308 | 2011-03-01T21:03:00.000 | 1 | 1 | 0 | 0 | c++,python,python-imaging-library | 5,161,325 | 1 | false | 0 | 1 | Have you considered looking into using Boost.Python? | 1 | 3 | 0 | I started using SWIG on a huge C++ library (made of of several inter-dependent static libs) to expose it to python. This library defines many primitive classes that are used throughout as parameters (images of different types for example). There is extensive use of STL, inheritance and templating in the lib as well.
So... | Exposing C++ library to Python + PIL | 0.197375 | 0 | 0 | 982 |
5,160,577 | 2011-03-01T21:28:00.000 | 4 | 0 | 0 | 0 | python,pyqt | 5,186,213 | 2 | false | 0 | 1 | I agree with Neil G, and would add this:
If you do not call QApplication.exec_() to start the event loop, and instead execute your program in an interactive python shell (using python -i), then pyqt will automatically process events whenever the interactive prompt is waiting, and Ctrl-C should again behave as expected.... | 1 | 23 | 0 | Why doesn't Ctrl+C work to break a Python program that uses PyQt? I want to debug it and get a stack trace and for some reason, this is harder to do than with C++! | Ctrl-C doesn't work with PyQt | 0.379949 | 0 | 0 | 10,443 |
5,161,424 | 2011-03-01T22:55:00.000 | 3 | 0 | 1 | 0 | python,immutability | 5,161,684 | 3 | false | 0 | 0 | I believe you would have to keep a dict {args: object} of instances already created, then override the class' __new__ method to check in that dictionary, and return the relevant object if it already existed. Note that I haven't implemented or tested this idea. Of course, strings are handled at the C level. | 1 | 15 | 0 | In Python, how is it possible to reuse existing equal immutable objects (like is done for str)? Can this be done just by defining a __hash__ method, or does it require more complicated measures? | Reuse existing objects for immutable objects? | 0.197375 | 0 | 0 | 3,644 |
5,162,773 | 2011-03-02T02:28:00.000 | 4 | 0 | 1 | 0 | python,list,wxpython,instance | 5,162,963 | 3 | true | 0 | 1 | Assuming wxPython is playing by the rules and by "destroyed" you mean "is no longer referenced", then the weakref module in the standard library should let you do what you want (specifically, you can register a callback when creating a weak reference that is invoked just before the target of the weak reference is destr... | 2 | 1 | 0 | I have a list of instances of objects (wxPython widgets). I'd like to be able to tell if an instance within my list has been destroyed. How would one go about this? | Telling if an Instance has been Destroyed | 1.2 | 0 | 0 | 803 |
5,162,773 | 2011-03-02T02:28:00.000 | 0 | 0 | 1 | 0 | python,list,wxpython,instance | 40,513,866 | 3 | false | 0 | 1 | This is applicable to all wx.Window derived objects. If it has been destroyed or disposed, it won't be None, but it will be False. | 2 | 1 | 0 | I have a list of instances of objects (wxPython widgets). I'd like to be able to tell if an instance within my list has been destroyed. How would one go about this? | Telling if an Instance has been Destroyed | 0 | 0 | 0 | 803 |
5,164,307 | 2011-03-02T06:50:00.000 | 0 | 0 | 0 | 0 | python,django | 5,164,550 | 3 | false | 1 | 0 | Post.objects.all(catagory__title="My catagory title")? | 1 | 1 | 0 | how in django find list of post related with special many to many field?
for example
catagory have title
post have many to many relation to catagory
how find all post from category title | many to many problem django | 0 | 0 | 0 | 352 |
5,166,700 | 2011-03-02T11:15:00.000 | 1 | 0 | 0 | 1 | python,debugging,trace,scons,circular-dependency | 5,221,496 | 1 | false | 0 | 0 | Ok, I've solved the problem. It seems the reason was that a directory slipped into the list of targets, and directories create their own set of implicit dependencies. At least that's what I think, because after removing the directory the scripts work as expected. Can anyone clarify if my assumption is correct?
I still ... | 1 | 2 | 0 | I've written a rather complicated set of SCons scripts, and I have some errors I cannot find, for example intermediate files are removed or there are cyclic dependencies reported, and I want to know the reason. Unfortunately, I don't see any means to get good verbose debugging output of what SCons is doing and where. F... | Debugging SCons | 0.197375 | 0 | 0 | 2,486 |
5,167,213 | 2011-03-02T12:06:00.000 | 2 | 0 | 1 | 0 | silverlight,ironpython,dynamic-language-runtime | 5,169,799 | 2 | false | 0 | 0 | You'll have to make sure that __future__.py is available for import. I'm not sure how to do that for Silverlight, though. | 1 | 1 | 0 | I am using IronPython as a math parser with the DLR in my Silverlight project: it works, but computes incorrect results in cases involving division, as it uses integer instead of floating point math at times (so 4/3 returns 1). Google suggests adding from __future__ import division to the python script, but doing so th... | Ironpython and future statements | 0.197375 | 0 | 0 | 386 |
5,168,207 | 2011-03-02T13:36:00.000 | 0 | 0 | 0 | 0 | python,django | 5,168,529 | 6 | false | 1 | 0 | I'd go for separate boolean columns.
It'll be a lot easier for you to then query, say, for users that are available on mondays; or to count the number of users that available through every weekday, or whatever. | 2 | 5 | 0 | I want to store users preferences for day(s) of week he might be available. e.g. A user can be available on saturday, sunday but not on other days.
Currently I am using array of 7 checkboxes(values=1,2,...7) so that user can select individual days of his availability.
Now the first question is how can i store this in d... | Best way to save availability of user over days of week in python/django | 0 | 0 | 0 | 1,639 |
5,168,207 | 2011-03-02T13:36:00.000 | 1 | 0 | 0 | 0 | python,django | 5,168,522 | 6 | false | 1 | 0 | One other option is the more-or-less obvious one: define a table of the days of the week, and have a ManyToManyField map one to the other. The admin would just work, you can do searches based on dates, and it works on SQLite unlike some of the functions in django-bitfield. Searches can be fast, since they're within the... | 2 | 5 | 0 | I want to store users preferences for day(s) of week he might be available. e.g. A user can be available on saturday, sunday but not on other days.
Currently I am using array of 7 checkboxes(values=1,2,...7) so that user can select individual days of his availability.
Now the first question is how can i store this in d... | Best way to save availability of user over days of week in python/django | 0.033321 | 0 | 0 | 1,639 |
5,168,588 | 2011-03-02T14:10:00.000 | 1 | 1 | 0 | 0 | python,html | 5,168,637 | 5 | false | 1 | 0 | Use Cheetah or another templating engine. | 3 | 24 | 0 | Is there a way of writing Python embedded in HTML like I do with PHP or JSP? | Can Python be embedded in HTML like PHP and JSP? | 0.039979 | 0 | 0 | 41,257 |
5,168,588 | 2011-03-02T14:10:00.000 | 7 | 1 | 0 | 0 | python,html | 5,168,640 | 5 | false | 1 | 0 | There is... But you're highly suggested to use a templating engine, or some other means of separating the presentation from the business layer.
There are some available that use python as the templating language, but it's nasty because python is sensitive to whitespace, so special syntax hacks have to be added. | 3 | 24 | 0 | Is there a way of writing Python embedded in HTML like I do with PHP or JSP? | Can Python be embedded in HTML like PHP and JSP? | 1 | 0 | 0 | 41,257 |
5,168,588 | 2011-03-02T14:10:00.000 | 2 | 1 | 0 | 0 | python,html | 5,168,647 | 5 | false | 1 | 0 | Several templating engines support this in one way or another: Mako, Jinja, and Genshi are all popular choices.
Different engines support different features of Python and may be better suited to your needs. Your best bet is to try them out and see what works. | 3 | 24 | 0 | Is there a way of writing Python embedded in HTML like I do with PHP or JSP? | Can Python be embedded in HTML like PHP and JSP? | 0.07983 | 0 | 0 | 41,257 |
5,169,001 | 2011-03-02T14:37:00.000 | 3 | 0 | 0 | 1 | python,google-app-engine,caching,memcached | 5,170,495 | 3 | true | 1 | 0 | The distributed memcache architecture has a pool of memcache instances that serves all the Google App Engine applications; the stored data is not replicated between memcache servers.
After successfully saving data on memcache, your data will be there* for any subsequent requests because it is stored in one specific me... | 1 | 1 | 0 | On Google App Engine (python), I need to save data with memcache and quickly read it on another page.
But before I start coding to have memcache saved, then on the next page I open up that data with the known key, I'm starting to wonder if the data will always be there on the next page? How long does it take to cache ... | After saving memcache data, is it immediately available on GAE? | 1.2 | 0 | 0 | 699 |
5,169,702 | 2011-03-02T15:31:00.000 | 21 | 0 | 1 | 0 | python,pdb | 5,169,808 | 4 | false | 0 | 0 | Well, I don't think there's a command similar to . in perl debugger, but you can always find the current line using the where / w command. That will show you both the current (contextual) frame as well as the most recent frame, which I believe is where the debugger was triggered. | 2 | 53 | 0 | In the perl debugger, if you repeatedly list segments of code taking you away from the current line, you can return to the current line by entering the command . (dot).
I have not been able to find anything comparable using the python PDB module. If I list myself away from the current line and want to view it again... | How do I list the current line in python PDB? | 1 | 0 | 0 | 16,736 |
5,169,702 | 2011-03-02T15:31:00.000 | 24 | 0 | 1 | 0 | python,pdb | 52,363,325 | 4 | false | 0 | 0 | This question is 7 years old now..
If there’s anyone who are curious about this problem, just use the dot
(pdb) l .
This now works. | 2 | 53 | 0 | In the perl debugger, if you repeatedly list segments of code taking you away from the current line, you can return to the current line by entering the command . (dot).
I have not been able to find anything comparable using the python PDB module. If I list myself away from the current line and want to view it again... | How do I list the current line in python PDB? | 1 | 0 | 0 | 16,736 |
5,170,442 | 2011-03-02T16:29:00.000 | 3 | 1 | 0 | 0 | c++,python,encryption,aes | 5,171,081 | 1 | false | 0 | 0 | PyCrypto uses 8-bit CFB mode by default. I guess the other end uses block-size CFB mode. The segment size in bits is set by the segment_size keyword argument to AES.new, for block-size CFB mode it should be AES.block_size*8.
For the first block OFB mode is identical to block-size CFB mode. | 1 | 2 | 0 | While trying to get a python application to talk to a C++ application using an encrypt link, we could not get them to talk. Trying various combinations of parameters we accidentally found that if we told python to encrypt in OFB mode it would successfully decrypt in the C++ in CFB mode.
Both the python pycrypt library... | AES encryption problem: Python pycrypt OFB = C++ Gladman CFB | 0.53705 | 0 | 0 | 1,060 |
5,171,511 | 2011-03-02T18:05:00.000 | 1 | 1 | 0 | 1 | python,linux | 5,171,542 | 2 | false | 0 | 0 | An easier alternative to using mount might be to invoke df <directory>.
This prints out the filesystem. Also, on my Ubuntu box, passing -P to df makes the output a little bit easier to parse. | 1 | 1 | 0 | First, sorry for my bad English.
I'm writing a python script, which compares the files in two different directories. But for performance, I want to know that: "Are the directories on the same physical disk or not?", so I can read them simultaneously for performance gain.
My current idea is getting "mount" commands outp... | Learning the directory's physical disk on Linux with Python | 0.099668 | 0 | 0 | 515 |
5,171,905 | 2011-03-02T18:44:00.000 | -1 | 0 | 0 | 0 | iphone,python,django,google-app-engine | 5,259,777 | 1 | false | 1 | 0 | You can try using the OAuth framework | 1 | 0 | 0 | The behaviour I want is simple:
User starts up the application.
User is prompted for their Facebook username and password.
On successful login, user is now authenticated for the application and the web server. There is now a user in the server associated with the Facebook ID. All further HTTP requests will have a cook... | How can I authenticate my mobile application and underlying server using Facebook? | -0.197375 | 0 | 0 | 771 |
5,172,214 | 2011-03-02T19:15:00.000 | 0 | 0 | 0 | 0 | python,django,pythonpath,pycharm,syncdb | 5,173,224 | 2 | false | 1 | 0 | Did you select the right python install for your project in Settings > Python Interpreter? | 1 | 1 | 0 | Shouldn't it be the same by default? If not, is there some way to fix this so that the same PYTHONPATH is used? | WIth PyCharm, why is the PYTHONPATH when running a Django project different from when running the manage.py syncdb task? | 0 | 0 | 0 | 1,737 |
5,172,735 | 2011-03-02T20:02:00.000 | 0 | 0 | 0 | 0 | python,facebook,facebook-graph-api,facebook-fql | 5,365,134 | 1 | true | 0 | 0 | I don't think it's possible to edit a Video object at all with the Graph API at the moment. You can't create objects through the API, therefore I don't think you can edit or modify existing ones either. | 1 | 1 | 0 | How can I update the title/description of a previously updated video? I am using python and pyfacebook... but any starting point would be fine and I can write it in python. | how do I use the facebook api to modify a video title or description? | 1.2 | 0 | 0 | 137 |
5,173,024 | 2011-03-02T20:28:00.000 | 13 | 0 | 0 | 0 | python,django,ide,syntax-highlighting,pydev | 6,933,282 | 5 | false | 1 | 0 | For clarity
Django Templates Editor is only available with Aptana 3.0 and later. Pydev in eclipse alone does not support it. Aptana is available as an eclipse plugin or stand alone.
As mentioned by mcoconnor Window -> Preferences -> General -> Editor -> File Associations will give you a list of extensions.
Choose ... | 2 | 27 | 0 | I use Eclipse and pydev for django development. This has worked more or less ok, including debugging. Syntax highlighting doesn't seem to work everywhere though. I couldn't get any highlighting for the templates thought. Is there a way to get the highlighting and code suggestions for the templates? | Django templates syntax highlighting in Eclipse | 1 | 0 | 0 | 15,866 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.