Title
stringlengths
11
150
A_Id
int64
518
72.5M
Users Score
int64
-42
283
Q_Score
int64
0
1.39k
ViewCount
int64
17
1.71M
Database and SQL
int64
0
1
Tags
stringlengths
6
105
Answer
stringlengths
14
4.78k
GUI and Desktop Applications
int64
0
1
System Administration and DevOps
int64
0
1
Networking and APIs
int64
0
1
Other
int64
0
1
CreationDate
stringlengths
23
23
AnswerCount
int64
1
55
Score
float64
-1
1.2
is_accepted
bool
2 classes
Q_Id
int64
469
42.4M
Python Basics and Environment
int64
0
1
Data Science and Machine Learning
int64
0
1
Web Development
int64
1
1
Available Count
int64
1
15
Question
stringlengths
17
21k
How to connect to a WCF Service with IronPython
783,626
0
2
2,231
0
wcf,ironpython
Is your WCF service interface available in a shared assembly? If so, you could look at using the ChannelFactory to create your client proxy dynamically (instead of using the generated C# proxy). With that method you can supply all the details of the endpoint when you create the ChannelFactory and you won't require an...
1
0
0
0
2009-04-23T19:08:00.000
2
0
false
783,120
0
0
1
1
Has anyone done this? I've tried generating a c# proxy class and connecting through it, but I cannot figure out how to get IronPython to use the generated app.config file that defines the endpoint. It tries to connect, but I just get an error about no default endpoint. I would ideally like to make the connection usi...
Convincing others of Ruby over Python and PHP
784,667
5
2
1,888
0
python,ruby
Devil's advocate maybe... Everything's an object. This is a feature of Ruby, but it is not self-explanatory as to why this is a benefit. You would need to pre-prepare an argument for why that is a benefit. When convincing somebody of something's superiority, always think in terms of showing the benefits, not the ...
0
0
0
1
2009-04-24T05:02:00.000
11
0.090659
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
Convincing others of Ruby over Python and PHP
784,633
0
2
1,888
0
python,ruby
All 3 languages have their place. As with any programming task you must pick the language best suited for the task. Python has list comprehensions, php is much better when embedding and generating html. Ruby is a great language too. One of the things I have found myself using in ruby a few times is the 'a'...'zzzzz...
0
0
0
1
2009-04-24T05:02:00.000
11
0
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
Convincing others of Ruby over Python and PHP
784,656
0
2
1,888
0
python,ruby
If you are inclined towards a language or a software then you will tend to see only the goodies compared to others. If you want to do real comparison then comapre pros and cons and see if Ruby is clear winner in terms of what you want to achieve with that language in your company. If you do this and your company see be...
0
0
0
1
2009-04-24T05:02:00.000
11
0
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
Convincing others of Ruby over Python and PHP
1,227,135
0
2
1,888
0
python,ruby
This kind of post gives Ruby programmers a bad name. Ruby is Beethoven, Python is Bach. If you prefer one style to the other, fine, but don't try to argue the superiority of one over the other.
0
0
0
1
2009-04-24T05:02:00.000
11
0
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
Convincing others of Ruby over Python and PHP
785,273
1
2
1,888
0
python,ruby
Actually no one ever conviced me (at least directly), to use one programming language or another. I used to have a certain need for clearness (if you might call it that way) and some other criteria, a language and its ecosystem should meet. And you definitively will end up using some stdlib, and third-party resources,...
0
0
0
1
2009-04-24T05:02:00.000
11
0.01818
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
Convincing others of Ruby over Python and PHP
785,262
2
2
1,888
0
python,ruby
You're going to have a tough sell over python. GitHub is written in Ruby, not for ruby per se, by the way. For python one has BitBucket (even though I do prefer git), as well as pypi. Correct me if I'm wrong, but it sounds like you haven't looked at python code all that much. (I've written buckets of both python and R...
0
0
0
1
2009-04-24T05:02:00.000
11
0.036348
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
Convincing others of Ruby over Python and PHP
785,060
5
2
1,888
0
python,ruby
If you really want to show Ruby is better (assuming it is for your application!), why not try writing a small app from scratch in front of them? It doesn't have to be big, but something relavent to what you'll eventually be using it for is a good idea. Write the app in all three languages including any configuration fo...
0
0
0
1
2009-04-24T05:02:00.000
11
0.090659
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
Convincing others of Ruby over Python and PHP
784,626
29
2
1,888
0
python,ruby
If your goal is to show why language X is better than language Y, you're stuck in subjective-land where there are no right answers. No, Ruby is not better than PHP or Python. It might be more suited for a given purpose, and for that you can give specific examples. PHP is a poor choice for writing an SMTP server; Ruby a...
0
0
0
1
2009-04-24T05:02:00.000
11
1
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
Convincing others of Ruby over Python and PHP
784,621
12
2
1,888
0
python,ruby
Hmm, as an active programmer in all three languages I simply can't agree with the sentiment that either is better than the other. Sure, Python and Ruby are more object-oriented, but that's not a requirement to be better, it's only a convenience. You can't beat the community of PHP and the legacy (for good and for bad) ...
0
0
0
1
2009-04-24T05:02:00.000
11
1
false
784,584
0
0
1
9
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP. I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show Ruby's advantages over Python. The first is easy. I'll explain thin...
How to design an email system?
787,170
3
3
3,573
0
python,linux,email
A few thousand emails per hour isn't really that much, as long as your outgoing mail server is willing to accept them in a timely manner. I would send them using a local mta, like postfix, or exim (which would then send them through your outgoing relay if required). That service is then responsible for the mail queues,...
0
0
0
1
2009-04-24T14:45:00.000
4
0.148885
false
786,138
0
0
1
2
I am working for a company that provides customer support to its clients. I am trying to design a system that would send emails automatically to clients when some event occurs. The system would consist of a backend part and a web interface part. The backend will handle the communication with a web interface (which will...
How to design an email system?
787,214
0
3
3,573
0
python,linux,email
You might want to try Twisted Mail for implementing your own backend in pure Python.
0
0
0
1
2009-04-24T14:45:00.000
4
0
false
786,138
0
0
1
2
I am working for a company that provides customer support to its clients. I am trying to design a system that would send emails automatically to clients when some event occurs. The system would consist of a backend part and a web interface part. The backend will handle the communication with a web interface (which will...
Basic MVT issue in Django
793,167
2
6
539
0
python,django,django-templates
Context processors and RequestContext (see Tyler's answer) are the way to go for data that is used on every page load. For data that you may need on various views, but not all (especially data that isn't really related to the primary purpose of the view, but appears in something like a navigation sidebar), it often ma...
0
0
0
0
2009-04-24T14:46:00.000
3
0.132549
false
786,149
0
0
1
1
I have a Django website as follows: site has several views each view has its own template to show its data each template extends a base template base template is the base of the site, has all the JS/CSS and the basic layout So up until now it's all good. So now we have the master head of the site (which exists in the...
Is site-packages appropriate for applications or just libraries?
788,253
0
5
294
0
python
If you can turn part of the application to a library and provide an API, then site-packages is a good place for it. This is actually how many python applications do it. But from user or administrator point of view that isn't actually the problem. The problem is how we can manage the installed stuff. After I have instal...
0
0
0
0
2009-04-24T18:22:00.000
5
0
false
787,015
1
0
1
4
I'm in a bit of a discussion with some other developers on an open source project. I'm new to python but it seems to me that site-packages is meant for libraries and not end user applications. Is that true or is site-packages an appropriate place to install an application meant to be run by an end user?
Is site-packages appropriate for applications or just libraries?
787,128
3
5
294
0
python
The program run by the end user is usually somewhere in their path, with most of the code in the module directory, which is often in site-packages. Many python programs will have a small script located in the path, which imports the module, and calls a "main" method to run the program. This allows the programmer to do ...
0
0
0
0
2009-04-24T18:22:00.000
5
0.119427
false
787,015
1
0
1
4
I'm in a bit of a discussion with some other developers on an open source project. I'm new to python but it seems to me that site-packages is meant for libraries and not end user applications. Is that true or is site-packages an appropriate place to install an application meant to be run by an end user?
Is site-packages appropriate for applications or just libraries?
787,200
4
5
294
0
python
We do it like this. Most stuff we download is in site-packages. They come from pypi or Source Forge or some other external source; they are easy to rebuild; they're highly reused; they don't change much. Must stuff we write is in other locations (usually under /opt, or c:\opt) AND is included in the PYTHONPATH. There'...
0
0
0
0
2009-04-24T18:22:00.000
5
0.158649
false
787,015
1
0
1
4
I'm in a bit of a discussion with some other developers on an open source project. I'm new to python but it seems to me that site-packages is meant for libraries and not end user applications. Is that true or is site-packages an appropriate place to install an application meant to be run by an end user?
Is site-packages appropriate for applications or just libraries?
787,203
0
5
294
0
python
Site-packages is for libraries, definitely. A hybrid approach might work: you can install the libraries required by your application in site-packages and then install the main module elsewhere.
0
0
0
0
2009-04-24T18:22:00.000
5
0
false
787,015
1
0
1
4
I'm in a bit of a discussion with some other developers on an open source project. I'm new to python but it seems to me that site-packages is meant for libraries and not end user applications. Is that true or is site-packages an appropriate place to install an application meant to be run by an end user?
Web development with python and sql
789,282
0
1
527
0
python
Google App Engine will provide hosting for free as well as Django and a db..
0
0
0
0
2009-04-25T02:19:00.000
4
0
false
788,083
0
0
1
1
I need to build a web site with the following features: 1) user forum where we expect light daily traffic 2) database backend for users to create profiles, where they can log in and upload media (pictures) 3) users can uses their profile to buy content from an online inventory 4) create web pages, shopping carts etc fo...
Handling Authorization in web frameworks
789,671
0
0
321
0
python
"Is it possible to work with 'identity' object at entire framework?" "But it is really tough to define "Identity" as an object due to its complex nature. " Until you define identity, yes, it's difficult to work with. Identity has to be positively specified. Leaving it so vague that "It may contain anything, that is s...
0
0
0
0
2009-04-25T18:30:00.000
1
1.2
true
789,468
0
0
1
1
I want to write a simple web framework myself using WSGI, Python. I am in study to understand the authorization system. The system needs to be more modular and abstract enough to add new system into the project as a plug-in. User may use DB or distributed key/value pair, bigtable, etc to store their information. Lets ...
What is the best way to redirect email to a Python script?
789,699
0
2
2,191
0
python,django,email
but I don't really think it is feasible to actually support all these emails account normally through a webmail program I think that your base assumption here is incorrect. You see, most 'webmail' programs are just frontends (or clients) to the backend mail system (postfix etc). You will need to see how your web...
0
0
0
1
2009-04-25T20:35:00.000
4
0
false
789,685
0
0
1
1
I'd like to provide a functionality for users of my website to get assigned an email address upon registration (such as firstname.lastname@mydomain.com) but I don't really think it is feasible to actually support all these emails account normally through a webmail program. I am also not sure if my webhost would be cool...
Using Python set type to implement ACL
791,425
2
1
2,877
1
python,set,acl,pickle
Me, I'd stick with keeping persistent info in the relational DB in a form that's independent from a specific programming language used to access it -- much as I love Python (and that's a lot), some day I may want to access that info from some other language, and if I went for Python-specific formats... boy would I ever...
0
0
0
0
2009-04-26T10:37:00.000
4
0.099668
false
790,613
0
0
1
2
Currently I have tables like: Pages, Groups, GroupPage, Users, UserGroup. With pickled sets I can implement the same thing with only 3 tables: Pages, Groups, Users. set seems a natural choice for implementing ACL, as group and permission related operations can be expressed very naturally with sets. If I store the allow...
Using Python set type to implement ACL
790,662
2
1
2,877
1
python,set,acl,pickle
You need to consider what it is that a DBMS provides you with, and which of those features you'll need to reimplement. The issue of concurrency is a big one. There are a few race conditions to be considered (such as multiple writes taking place in different threads and processes and overwriting the new data), performan...
0
0
0
0
2009-04-26T10:37:00.000
4
0.099668
false
790,613
0
0
1
2
Currently I have tables like: Pages, Groups, GroupPage, Users, UserGroup. With pickled sets I can implement the same thing with only 3 tables: Pages, Groups, Users. set seems a natural choice for implementing ACL, as group and permission related operations can be expressed very naturally with sets. If I store the allow...
python versus java runtime footprint
35,581,985
1
7
5,256
0
java,python,footprint,memory-footprint
I can't compare memory footprint because it really depends on classes what you load/use. But what I can tell you that Python (IronPython 2.7 in particular) has real memory leak problems. Especially with third party well used ones like Financial. When Java application/server runs without issues with rare cases which cou...
0
0
0
1
2009-04-27T20:49:00.000
1
0.197375
false
795,241
0
0
1
1
Can anyone point to serious comparison of Python runtime footprint versus Java? Thanks, Avraham
python method to extract content (excluding navigation) from an HTML page
796,530
1
8
3,581
0
python,html,parsing,semantics,html-content-extraction
What is meaningful and what is not, it depends on the semantic of the page. If the semantics is crappy, your code won't "guess" what is meaningful. I use readability, which you linked in the comment, and I see that on many pages I try to read it does not provide any result, not talking about a decent one. If someone pu...
0
0
1
0
2009-04-28T06:40:00.000
5
0.039979
false
796,490
0
0
1
1
Of course an HTML page can be parsed using any number of python parsers, but I'm surprised that there don't seem to be any public parsing scripts to extract meaningful content (excluding sidebars, navigation, etc.) from a given HTML doc. I'm guessing it's something like collecting DIV and P elements and then checking ...
Django caching - can it be done pre-emptively?
804,829
4
5
1,876
0
python,django,caching
I have no proof, but I've read BeautifulSoup is slow and consumes a lot of memory. You may want to look at using the lxml module instead. lxml is supposed to be much faster and efficient, and can do much more than BeautifulSoup. Of course, the parsing probably isn't your bottleneck here; the external I/O is. First off...
0
0
0
0
2009-04-28T12:56:00.000
4
0.197375
false
797,773
0
0
1
2
I have a Django view, which receives part of its data from an external website, which I parse using urllib2/BeautifulSoup. This operation is rather expensive so I cache it using the low-level cache API, for ~5 minutes. However, each user which accesses the site after the cached data expires will receive a significant d...
Django caching - can it be done pre-emptively?
798,462
4
5
1,876
0
python,django,caching
"I'm still unsure as to how I accomplish this with the python script I will be calling. " The issue is that your "significant delay of a few seconds while I go to the external site to parse the new data" has nothing to do with Django cache at all. You can cache it everywhere, and when you go to reparse the external sit...
0
0
0
0
2009-04-28T12:56:00.000
4
0.197375
false
797,773
0
0
1
2
I have a Django view, which receives part of its data from an external website, which I parse using urllib2/BeautifulSoup. This operation is rather expensive so I cache it using the low-level cache API, for ~5 minutes. However, each user which accesses the site after the cached data expires will receive a significant d...
Looking for a PHP and/or Python RAD
801,196
-5
6
3,848
0
php,python,vcl4php
The good news is that you won't miss it as soon as you familiarize yourself with a way of work when the responsibilities are shared. Think it over: really the programmer is the right person to assemble the user interface? I think not even in case of a desktop application. Programmer should write good code, separated di...
0
0
0
1
2009-04-29T06:17:00.000
14
-1
false
801,090
0
0
1
5
I am looking for RAD like environment for PHP and/or Python free or not does not matter. It should have a visual environment where one can use a point and click interface so that it is possible to select objects with mouse and move them around. I have looked at Delphi4PHP. The RAD part is fantastic, but I don't like th...
Looking for a PHP and/or Python RAD
801,278
2
6
3,848
0
php,python,vcl4php
I just remenbered some more tools that might be useful to you, besides WebDev: PHPMaker WaveMaker For Python I'm gonna try the DialogBlocks later this evening.
0
0
0
1
2009-04-29T06:17:00.000
14
0.028564
false
801,090
0
0
1
5
I am looking for RAD like environment for PHP and/or Python free or not does not matter. It should have a visual environment where one can use a point and click interface so that it is possible to select objects with mouse and move them around. I have looked at Delphi4PHP. The RAD part is fantastic, but I don't like th...
Looking for a PHP and/or Python RAD
1,256,441
0
6
3,848
0
php,python,vcl4php
Let me elaborate on CodeCharge Studio. I think you still can consider this system. Personally, I've been using it to develop very complex high-load data-base driven CRM applications, with 4.x version it even generates AJAX-based code and autocomplete, ajax-form submittion are piece of cake. With CCS you will need some...
0
0
0
1
2009-04-29T06:17:00.000
14
0
false
801,090
0
0
1
5
I am looking for RAD like environment for PHP and/or Python free or not does not matter. It should have a visual environment where one can use a point and click interface so that it is possible to select objects with mouse and move them around. I have looked at Delphi4PHP. The RAD part is fantastic, but I don't like th...
Looking for a PHP and/or Python RAD
4,500,774
1
6
3,848
0
php,python,vcl4php
I don't think Yogi is a PITA. He is discerning and this is very helpful. Since none of these tools quite hit the mark for him when one does it will be the right one and then all of us will benefit from his studied decision.
0
0
0
1
2009-04-29T06:17:00.000
14
0.014285
false
801,090
0
0
1
5
I am looking for RAD like environment for PHP and/or Python free or not does not matter. It should have a visual environment where one can use a point and click interface so that it is possible to select objects with mouse and move them around. I have looked at Delphi4PHP. The RAD part is fantastic, but I don't like th...
Looking for a PHP and/or Python RAD
801,096
1
6
3,848
0
php,python,vcl4php
Delphi4PHP is the only I know of, back in the old days I also used Macromedia (now Adobe) Dreamweaver to generate some code, and if you set up a live site it kinda acts like a RAD IDE. Kinda. For Python, I asked a similar question a couple of hours ago, I'm also interested in knowing such tool.
0
0
0
1
2009-04-29T06:17:00.000
14
0.014285
false
801,090
0
0
1
5
I am looking for RAD like environment for PHP and/or Python free or not does not matter. It should have a visual environment where one can use a point and click interface so that it is possible to select objects with mouse and move them around. I have looked at Delphi4PHP. The RAD part is fantastic, but I don't like th...
Python "Task Server"
1,556,571
1
4
2,958
0
python
You can have a look at celery
0
1
0
0
2009-04-30T02:19:00.000
5
0.039979
false
805,120
0
0
1
2
My question is: which python framework should I use to build my server? Notes: This server talks HTTP with it's clients: GET and POST (via pyAMF) Clients "submit" "tasks" for processing and, then, sometime later, retrieve the associated "task_result" submit and retrieve might be separated by days - different HTTP co...
Python "Task Server"
805,126
0
4
2,958
0
python
It seems any python web framework will suit your needs. I work with a similar system on a daily basis and I can tell you, your solution with threads and SQLite for queue storage is about as simple as you're going to get. Assuming order doesn't matter in your queue, then threads should be acceptable. It's important to ...
0
1
0
0
2009-04-30T02:19:00.000
5
0
false
805,120
0
0
1
2
My question is: which python framework should I use to build my server? Notes: This server talks HTTP with it's clients: GET and POST (via pyAMF) Clients "submit" "tasks" for processing and, then, sometime later, retrieve the associated "task_result" submit and retrieve might be separated by days - different HTTP co...
What is the best way to access stored procedures in Django's ORM
3,675,814
0
34
43,756
0
python,sql,django,stored-procedures,django-models
I guess the improved raw sql queryset support in Django 1.2 can make this easier as you wouldn't have to roll your own make_instance type code.
0
0
0
0
2009-04-30T05:03:00.000
7
0
false
805,393
0
0
1
2
I am designing a fairly complex database, and know that some of my queries will be far outside the scope of Django's ORM. Has anyone integrated SP's with Django's ORM successfully? If so, what RDBMS and how did you do it?
What is the best way to access stored procedures in Django's ORM
806,302
6
34
43,756
0
python,sql,django,stored-procedures,django-models
Don't. Seriously. Move the stored procedure logic into your model where it belongs. Putting some code in Django and some code in the database is a maintenance nightmare. I've spent too many of my 30+ years in IT trying to clean up this kind of mess.
0
0
0
0
2009-04-30T05:03:00.000
7
1
false
805,393
0
0
1
2
I am designing a fairly complex database, and know that some of my queries will be far outside the scope of Django's ORM. Has anyone integrated SP's with Django's ORM successfully? If so, what RDBMS and how did you do it?
Python regex for finding contents of MediaWiki markup links
809,900
1
3
1,132
0
python,regex,mediawiki
RegExp: \w+( \w+)+(?=]]) input [[Alexander of Paris|poet named Alexander]] output poet named Alexander input [[Alexander of Paris]] output Alexander of Paris
0
0
1
0
2009-05-01T01:11:00.000
4
0.049958
false
809,837
0
0
1
1
If I have some xml containing things like the following mediawiki markup: " ...collected in the 12th century, of which [[Alexander the Great]] was the hero, and in which he was represented, somewhat like the British [[King Arthur|Arthur]]" what would be the appropriate arguments to something like: re.findall...
I want to make a temporary answerphone which records MP3s
813,139
5
2
335
0
python,voip
I use twilio, very easy, very fun.
0
0
0
0
2009-05-01T20:25:00.000
4
0.244919
false
813,114
0
0
1
1
An artistic project will encourage users to ring a number and leave a voice-mail on an automated service. These voice-mails will be collected and edited into a half-hour radio show. I want to make a temporary system (with as little as possible programming) which will: Allow me to establish a public telephone number (...
If I want to use a pylons app with Apache, should I use mod_wsgi or proxy to paste?
814,005
8
4
1,341
0
python,apache2,pylons,mod-wsgi
Nginx with mod_wsgi requires the use of a non-blocking asynchronous framework and setup and isn't likely to work out of box with Pylons. I usually go with the proxy route to a stand-alone Pylons process using the PasteScript#cherrypy WSGI server (as its higher performing than the Paste#http one, though it won't recycle...
0
0
0
0
2009-05-02T01:37:00.000
2
1.2
true
813,943
0
0
1
1
Or should I be using a totally different server?
Google App Engine - design considerations about cron tasks
815,113
3
1
1,473
1
python,database,google-app-engine,cron
I think you'll find that snapshotting every user's state every hour isn't something that will scale well no matter what your framework. A more ordinary environment will disguise this by letting you have longer running tasks, but you'll still reach the point where it's not practical to take a snapshot of every user's da...
0
1
0
0
2009-05-02T13:54:00.000
3
0.197375
false
814,896
0
0
1
1
I'm developing software using the Google App Engine. I have some considerations about the optimal design regarding the following issue: I need to create and save snapshots of some entities at regular intervals. In the conventional relational db world, I would create db jobs which would insert new summary records. For ...
Python/Ruby as mobile OS
816,248
14
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
In general it's all of these things. Memory, speed, and probably most importantly programmer familiarity. Apple has a huge investment in Objective C, Java is known by basically everyone, and C# is very popular as well. If you're trying for mass programmer appeal it makes sense to start with something popular, even if i...
1
0
0
1
2009-05-03T03:09:00.000
13
1.2
true
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
Python/Ruby as mobile OS
817,560
0
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
webOS -- the new OS from Palm, which will debut on the Pre -- has you write apps against a webkit runtime in JavaScript. Time will tell how successful it is, but I suspect it will not be the first to go down this path. As mobile devices become more powerful, you'll see dynamic languages become more prevalent.
1
0
0
1
2009-05-03T03:09:00.000
13
0
false
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
Python/Ruby as mobile OS
816,228
0
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
Memory is also a significant factor. It's easy to eat memory in Python, unfortunately.
1
0
0
1
2009-05-03T03:09:00.000
13
0
false
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
Python/Ruby as mobile OS
1,077,315
0
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
There is a linux distribution for OpenMoko Freerunner called SHR. Most of its settings and framework code is written in python and... well, it isn't very fast. It is bearable, but it was planned from the beginning to rewrite it in Vala. On the other side, my few smallish apps work fast enough (with the only drawback ha...
1
0
0
1
2009-05-03T03:09:00.000
13
0
false
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
Python/Ruby as mobile OS
816,225
1
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
I think that performance concerns may be part of, but not all of, the reason. Mobile devices do not have very powerful hardware to work with. I am partly unsure about this, though.
1
0
0
1
2009-05-03T03:09:00.000
13
0.015383
false
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
Python/Ruby as mobile OS
816,233
1
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
One of the most pressing matters is garbage collection. Garbage collection often times introduce unpredictable pauses in embedded machines which sometimes need real time performance. This is why there is a Java Micro Edition which has a different garbage collector which reduces pauses in exchange for a slower program. ...
1
0
0
1
2009-05-03T03:09:00.000
13
0.015383
false
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
Python/Ruby as mobile OS
816,266
0
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
There are many reasons. Among them: business reasons, such as software lock-in strategies, efficiency: dynamic languages are usually perceived to be slower (and in some cases really are slower, or at least provide a limit to the amount of optimsation you can do. On a mobile device, optimising code is necessary much mo...
1
0
0
1
2009-05-03T03:09:00.000
13
0
false
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
Python/Ruby as mobile OS
816,219
1
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
Jailbroken iPhones can have python installed, and I actually use python very frequently on mine.
1
0
0
1
2009-05-03T03:09:00.000
13
0.015383
false
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
Python/Ruby as mobile OS
816,217
0
10
3,120
0
python,ruby,mobile,operating-system,dynamic-languages
I suspect the basic reason is a combination of security and reliability. You don't want someone to be easily able to hack the phone, and you want to have some control over what's being installed.
1
0
0
1
2009-05-03T03:09:00.000
13
0
false
816,212
0
0
1
9
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
save an image with selenium & firefox
827,891
3
9
9,916
0
python,selenium
To do this the way you want (to actually capture the content sent down to the browser) you'd need to modify Selenium RC's proxy code (see ProxyHandler.java) and store the files locally on the disk in parallel to sending the response back to the browser.
0
0
1
0
2009-05-03T09:51:00.000
5
0.119427
false
816,704
0
0
1
2
i'm trying to save an image from a website using selenium server & python client. i know the image's URL, but i can't find the code to save it, either when it's the the document itself, or when it's embedded in the current browser session. the workaround i found so far is to save the page's screenshot (there are 2 sel...
save an image with selenium & firefox
816,777
-1
9
9,916
0
python,selenium
How about going to the image URL and then taking a screenshot of the page? Firefox displays the image in full screen. Hope this helps..
0
0
1
0
2009-05-03T09:51:00.000
5
-0.039979
false
816,704
0
0
1
2
i'm trying to save an image from a website using selenium server & python client. i know the image's URL, but i can't find the code to save it, either when it's the the document itself, or when it's embedded in the current browser session. the workaround i found so far is to save the page's screenshot (there are 2 sel...
Letting users upload Python scripts for execution
818,405
3
12
1,115
0
python,cgi
Yes. Allow them to script their client, not your server.
0
0
0
1
2009-05-04T00:20:00.000
6
0.099668
false
818,402
0
0
1
4
I understand that letting any anonymous user upload any sort of file in general can be dangerous, especially if it's code. However, I have an idea to let users upload custom AI scripts to my website. I would provide the template so that the user could compete with other AI's in an online web game I wrote in Python. I e...
Letting users upload Python scripts for execution
818,558
4
12
1,115
0
python,cgi
Along with other safeguards, you can also incorporate human review of the code. Assuming part of the experience is reviewing other members' solutions, and everyone is a python developer, don't allow new code to be activated until a certain number of members vote for it. Your users aren't going to approve malicious co...
0
0
0
1
2009-05-04T00:20:00.000
6
0.132549
false
818,402
0
0
1
4
I understand that letting any anonymous user upload any sort of file in general can be dangerous, especially if it's code. However, I have an idea to let users upload custom AI scripts to my website. I would provide the template so that the user could compete with other AI's in an online web game I wrote in Python. I e...
Letting users upload Python scripts for execution
819,227
1
12
1,115
0
python,cgi
PyPy is probably a decent bet on the server side as suggested, but I'd look into having your python backend provide well defined APIs and data formats and have the users implement the AI and logic in Javascript so it can run in their browser. So the interaction would look like: For each match/turn/etc, pass data to the...
0
0
0
1
2009-05-04T00:20:00.000
6
0.033321
false
818,402
0
0
1
4
I understand that letting any anonymous user upload any sort of file in general can be dangerous, especially if it's code. However, I have an idea to let users upload custom AI scripts to my website. I would provide the template so that the user could compete with other AI's in an online web game I wrote in Python. I e...
Letting users upload Python scripts for execution
878,455
0
12
1,115
0
python,cgi
Have an extensive API for the users and strip all other calls upon upload (such as import statements). Also, strip everything that has anything to do with file i/o. (You might want to do multiple passes to ensure that you didn't miss anything.)
0
0
0
1
2009-05-04T00:20:00.000
6
1.2
true
818,402
0
0
1
4
I understand that letting any anonymous user upload any sort of file in general can be dangerous, especially if it's code. However, I have an idea to let users upload custom AI scripts to my website. I would provide the template so that the user could compete with other AI's in an online web game I wrote in Python. I e...
Extract domain name from a host name
828,397
1
18
14,503
0
python,dns,hostname
Your algorithm is the right one. Since zone cuts are not reflected in the domain name (you see domain cuts - the dots - but not zone cuts), it is the only correct one. An approximate algorithm is to use a list of zones, like the one mentioned by Alnitak. Remember that these static lists are not authoritative, they lack...
0
0
0
0
2009-05-05T16:17:00.000
3
0.066568
false
825,694
0
0
1
1
Is there a programatic way to find the domain name from a given hostname? given -> www.yahoo.co.jp return -> yahoo.co.jp The approach that works but is very slow is: split on "." and remove 1 group from the left, join and query an SOA record using dnspython when a valid SOA record is returned, consider that a domain I...
how to get the n-th record of a datastore query
827,149
3
1
845
0
python,google-app-engine,google-cloud-datastore,custompaging
There is no efficient way to do this - in any DBMS. In every case, you have to at least read sequentially through the index records until you find the nth one, then look up the corresponding data record. This is more or less what fetch(count, offset) does in GAE, with the additional limitation of 1000 records. A better...
0
1
0
0
2009-05-05T20:14:00.000
2
1.2
true
826,724
0
0
1
1
Suppose that I have the model Foo in GAE and this query: query = Foo.all().order('-key') I want to get the n-th record. What is the most efficient way to achieve that? Will the solution break if the ordering property is not unique, such as the one below: query = Foo.all().order('-color') edit: n > 1000 edit 2: I want ...
Should my python web app use unicode for all strings?
1,440,981
1
6
806
0
python,django,web-applications,unicode,pylons
Using Unicode internally is a good way to avoid problems with non-ASCII characters. Convert at the boundaries of your application (incoming data to unicode, outgoing data to UTF-8 or whatever). Pylons can do the conversion for you in many cases: e.g. controllers can safely return unicode strings; SQLAlchemy models ma...
0
0
0
0
2009-05-05T23:39:00.000
4
0.049958
false
827,415
0
0
1
2
I see some frameworks like Django using unicode all over the place so it seems like it might be a good idea. On the other hand, it seems like a big pain to have all these extra 'u's floating around everywhere. What will be a problem if I don't do this? Are there any issues that will come up if I do do this? I'm using ...
Should my python web app use unicode for all strings?
829,155
3
6
806
0
python,django,web-applications,unicode,pylons
What will be a problem if I don't do this? I'm a westerner living in Japan, so I've seen first-hand what is needed to work with non-ASCII characters. The problem if you don't use Unicode strings is that your code will be a frustration to the parts of the world that use anything other than A-Z. Our company has had a gr...
0
0
0
0
2009-05-05T23:39:00.000
4
0.148885
false
827,415
0
0
1
2
I see some frameworks like Django using unicode all over the place so it seems like it might be a good idea. On the other hand, it seems like a big pain to have all these extra 'u's floating around everywhere. What will be a problem if I don't do this? Are there any issues that will come up if I do do this? I'm using ...
How to measure Django cache performance?
828,826
2
5
3,032
0
python,django,postgresql,caching,memcached
Short answer : If you have enougth ram, memcached will be always faster. You can't really benchhmark memcached vs. database cache, just keep in mind that the big bottleneck with servers is disk access, specially write access. Anyway, disk cache is better if you have many objects to cache and long time expiration. But f...
0
0
0
0
2009-05-06T08:56:00.000
5
0.07983
false
828,702
0
0
1
3
I have a rather small (ca. 4.5k pageviews a day) website running on Django, with PostgreSQL 8.3 as the db. I am using the database as both the cache and the sesssion backend. I've heard a lot of good things about using Memcached for this purpose, and I would definitely like to give it a try. However, I would like to k...
How to measure Django cache performance?
2,105,437
0
5
3,032
0
python,django,postgresql,caching,memcached
Just try it out. Use firebug or a similar tool and run memcache with a bit of RAM allocation (e.g. 64mb) on the test server. Mark your average loading results seen in firebug without memcache, then turn caching on and mark new results. That's done as easy as it said. The results usually shocks people, because the perfo...
0
0
0
0
2009-05-06T08:56:00.000
5
0
false
828,702
0
0
1
3
I have a rather small (ca. 4.5k pageviews a day) website running on Django, with PostgreSQL 8.3 as the db. I am using the database as both the cache and the sesssion backend. I've heard a lot of good things about using Memcached for this purpose, and I would definitely like to give it a try. However, I would like to k...
How to measure Django cache performance?
829,260
5
5
3,032
0
python,django,postgresql,caching,memcached
At my previous work we tried to measure caching impact on site we was developing. On the same machine we load-tested the set of 10 pages that are most commonly used as start pages (object listings), plus some object detail pages taken randomly from the pool of ~200000. The difference was like 150 requests/second to 300...
0
0
0
0
2009-05-06T08:56:00.000
5
1.2
true
828,702
0
0
1
3
I have a rather small (ca. 4.5k pageviews a day) website running on Django, with PostgreSQL 8.3 as the db. I am using the database as both the cache and the sesssion backend. I've heard a lot of good things about using Memcached for this purpose, and I would definitely like to give it a try. However, I would like to k...
design for handling exceptions - google app engine
833,840
0
6
1,603
0
python,google-app-engine,exception-handling,web-applications
Ad. #4: I usually treat query strings as non-essential. If anything is wrong with query string, I'd just present bare resource page (as if no query was present), possibly with some information to user what was wrong with the query string. This leads to the problem similar to your #3: how did the user got into this wron...
0
1
0
0
2009-05-06T16:51:00.000
2
0
false
830,597
0
0
1
1
I'm developing a project on google app engine (webapp framework). I need you people to assess how I handle exceptions. There are 4 types of exceptions I am handling: Programming exceptions Bad user input Incorrect URLs Incorrect query strings Here is how I handle them: I have subclassed the webapp.requesthandler cla...
PDF Tables of Arbitrary (within reason) Width
837,011
1
2
600
0
python,pdf,xhtml,latex
The stand alone program : wkhtmltopdf is exactly what I needed. The PDF rendering of XHTML is the best of seen from a free tool.
0
0
0
0
2009-05-07T02:57:00.000
3
1.2
true
832,693
0
0
1
1
I know PDF generation has been discussed a lot here; however, I've yet to find what I need. I'm trying to generate PDF reports (mainly tables) from python. Yes I've tried ReportLab and Pisa. Both had column content "break out" in circumstances I didn't think were unreasonable and unrealistic to encounter in productio...
authentication method
840,803
1
0
1,626
0
java,python,authentication,encryption,hash
Let me just add a few random thoughts/comments to your proposals. RSA: Since you are mainly interested in authentication, I assume you'd want to use RSA signatures. This would imply that each user needs his own privat key. To me that sounds a little bit like overkill, especially when user and server already share comm...
0
0
0
1
2009-05-07T14:22:00.000
4
0.049958
false
834,932
0
0
1
3
I am writing a server-client application to receive user message and publish it. Thinking about authentication method. Asymmetric encryption, probably RSA. Hash (salt+password+'msg'+'userid'), SHA256 HMAC, SHA256. seems to be more secured than the method 2. Also involve hashing the password and msg data. Symmetric En...
authentication method
836,074
2
0
1,626
0
java,python,authentication,encryption,hash
Can't you just use standard SSL sockets to secure the connection, validate the user with a password, and then send the message to be published? If there won't be many clients, you can even use a self-signed certificate and put it in a KeyStore in the client app, that way you won't need to buy a certificate from Verisig...
0
0
0
1
2009-05-07T14:22:00.000
4
0.099668
false
834,932
0
0
1
3
I am writing a server-client application to receive user message and publish it. Thinking about authentication method. Asymmetric encryption, probably RSA. Hash (salt+password+'msg'+'userid'), SHA256 HMAC, SHA256. seems to be more secured than the method 2. Also involve hashing the password and msg data. Symmetric En...
authentication method
837,532
0
0
1,626
0
java,python,authentication,encryption,hash
RSA protocol is generally used to setup a key exchange for a faster encryption means. That's how SSL works. If the security requirements for your applications are so sensitive that you require PKI, then it should be said (without any intent to be harsh) that if you need to ask about it on SO, then its probably somet...
0
0
0
1
2009-05-07T14:22:00.000
4
0
false
834,932
0
0
1
3
I am writing a server-client application to receive user message and publish it. Thinking about authentication method. Asymmetric encryption, probably RSA. Hash (salt+password+'msg'+'userid'), SHA256 HMAC, SHA256. seems to be more secured than the method 2. Also involve hashing the password and msg data. Symmetric En...
datastore transaction restrictions
838,960
0
3
384
1
python,google-app-engine,transactions,google-cloud-datastore
After a through research, I have found that a distributed transaction layer that provides a solution to the single entity group restriction has been developed in userland with the help of some google people. But so far, it is not released and is only available in java.
0
1
0
0
2009-05-07T20:55:00.000
3
1.2
true
836,992
0
0
1
1
in my google app application, whenever a user purchases a number of contracts, these events are executed (simplified for clarity): user.cash is decreased user.contracts is increased by the number contracts.current_price is updated. market.no_of_transactions is increased by 1. in a rdms, these would be placed within t...
How do I invoke Python code from Ruby?
837,862
-1
5
6,499
0
python,ruby
For python code to run the interpreter needs to be launched as a process. So system() is your best option. For calling the python code you could use RPC or network sockets, got for the simplest thing which could possibly work.
0
1
0
1
2009-05-07T21:59:00.000
5
-0.039979
false
837,256
0
0
1
2
Does a easy to use Ruby to Python bridge exist? Or am I better off using system()?
How do I invoke Python code from Ruby?
837,296
2
5
6,499
0
python,ruby
I don't think there's any way to invoke Python from Ruby without forking a process, via system() or something. The language run times are utterly diferent, they'd need to be in separate processes anyway.
0
1
0
1
2009-05-07T21:59:00.000
5
0.07983
false
837,256
0
0
1
2
Does a easy to use Ruby to Python bridge exist? Or am I better off using system()?
Using Sql Server with Django in production
843,500
4
52
48,333
1
python,sql-server,django,pyodbc
We are using django-mssql in production at our company. We too had an existing system using mssql. For me personally it was the best design decision I have ever made because my productivity increased dramatically now that I can use django . I submitted a patch but when I started using django-mssql and did a week or t...
0
0
0
0
2009-05-09T06:45:00.000
7
0.113791
false
842,831
0
0
1
2
Has anybody got recent experience with deploying a Django application with an SQL Server database back end? Our workplace is heavily invested in SQL Server and will not support Django if there isn't a sufficiently developed back end for it. I'm aware of mssql.django-pyodbc and django-mssql as unofficially supported bac...
Using Sql Server with Django in production
843,476
1
52
48,333
1
python,sql-server,django,pyodbc
Haven't used it in production yet, but my initial experiences with django-mssql have been pretty solid. All you need are the Python Win32 extensions and to get the sqlserver_ado module onto your Python path. From there, you just use sql_server.pyodbc as your DATABASE_ENGINE. So far I haven't noticed anything missing, b...
0
0
0
0
2009-05-09T06:45:00.000
7
0.028564
false
842,831
0
0
1
2
Has anybody got recent experience with deploying a Django application with an SQL Server database back end? Our workplace is heavily invested in SQL Server and will not support Django if there isn't a sufficiently developed back end for it. I'm aware of mssql.django-pyodbc and django-mssql as unofficially supported bac...
Performing a getattr() style lookup in a django template
844,828
2
50
25,291
0
python,django,django-templates
I ended up adding a method to the model in question, and that method can be accessed like an attribute in the template. Still, i think it would be great if a built in tag allowed you to dynamically lookup an attribute, since this is a problem a lot of us constantly have in our templates.
0
0
0
0
2009-05-10T05:15:00.000
6
0.066568
false
844,746
0
0
1
1
Python's getattr() method is useful when you don't know the name of a certain attribute in advance. This functionality would also come in handy in templates, but I've never figured out a way to do it. Is there a built-in tag or non-built-in tag that can perform dynamic attribute lookups?
Default filter in Django admin
920,320
3
105
42,742
0
python,django,django-admin
Note that if instead of pre-selecting a filter value you want to always pre-filter the data before showing it in the admin, you should override the ModelAdmin.queryset() method instead.
0
0
0
0
2009-05-12T07:52:00.000
17
0.035279
false
851,636
0
0
1
2
How can I change the default filter choice from 'ALL'? I have a field named as status which has three values: activate, pending and rejected. When I use list_filter in Django admin, the filter is by default set to 'All' but I want to set it to pending by default.
Default filter in Django admin
1,560,919
2
105
42,742
0
python,django,django-admin
I know that is not the best solution, but i changed the index.html in the admin template, line 25 and 37 like this: 25: <th scope="row"><a href="{{ model.admin_url }}{% ifequal model.name "yourmodelname" %}?yourflag_flag__exact=1{% endifequal %}">{{ model.name }}</a></th> 37: <td><a href="{{ model.admin_url }}{% ifequa...
0
0
0
0
2009-05-12T07:52:00.000
17
0.023525
false
851,636
0
0
1
2
How can I change the default filter choice from 'ALL'? I have a field named as status which has three values: activate, pending and rejected. When I use list_filter in Django admin, the filter is by default set to 'All' but I want to set it to pending by default.
How to establish communication between flex and python code build on Google App Engine
854,403
0
0
1,782
0
python,apache-flex,google-app-engine
Do a HTTP post from Flex to your AppEngine app using the URLRequest class.
0
1
1
0
2009-05-12T19:11:00.000
2
0
false
854,353
0
0
1
1
I want to communicate using flex client with GAE, I am able to communicate using XMl from GAE to FLex but how should I post from flex3 to python code present on App Engine. Can anyone give me a hint about how to send login information from Flex to python Any ideas suggest me some examples.....please provide me some he...
Running django on OSX
856,033
5
1
1,602
0
python,django,macos
Unless you are planning on going to production with OS X you might not want to bother. If you must do it, go straight to mod_wsgi. Don't bother with mod_python or older solutions. I did mod_python on Apache and while it runs great now, it took countless hours to set up. Also, just to clarify something based on what you...
0
1
0
0
2009-05-12T23:29:00.000
4
0.244919
false
855,408
0
0
1
2
I've just completed the very very nice django tutorial and it all went swimmingly. One of the first parts of the tutorial is that it says not to use their example server thingie in production, my first act after the tutorial was thus to try to run my app on apache. I'm running OSX 10.5 and have the standard apache (whi...
Running django on OSX
856,986
2
1
1,602
0
python,django,macos
Yet another option is to consider using a virtual machine for your development. You can install a full version of whatever OS your production server will be running - say, Debian - and run your Apache and DB in the VM. You can connect to the virtual disk in the Finder, so you can still use TextMate (or whatever) on OSX...
0
1
0
0
2009-05-12T23:29:00.000
4
0.099668
false
855,408
0
0
1
2
I've just completed the very very nice django tutorial and it all went swimmingly. One of the first parts of the tutorial is that it says not to use their example server thingie in production, my first act after the tutorial was thus to try to run my app on apache. I'm running OSX 10.5 and have the standard apache (whi...
How to save django FileField to user folder?
2,424,900
5
3
5,337
0
python,django,django-models,upload
If you added a user field to the model, and have that attribute set before you performed an upload, then you could get the user in to your upload_location function via the instance attribute.
0
0
0
0
2009-05-13T14:16:00.000
3
0.321513
false
858,213
0
0
1
1
I've got a model like this def upload_location(instance, filename): return 'validate/%s/builds/%s' % (get_current_user(), filename) class MidletPair(models.Model): jad_file = models.FileField(upload_to = upload_location) jar_file = models.FileField(upload_to = upload_location) upload_to=tempfile.ge...
Getting the template name in django template
859,951
2
8
4,840
0
python,django
Templates are just strings not file names. Probably your best option is to monkey patch render_to_response and/or direct_to_template and copy the filename arg into the context.
0
0
0
0
2009-05-13T17:34:00.000
3
0.132549
false
859,319
0
0
1
1
For debugging purposes, I would like to have a variable in all my templates holding the path of the template being rendered. For example, if a view renders templates/account/logout.html I would like {{ template_name }} to contain the string templates/account/logout.html. I don't want to go and change any views (specia...
Beginning Windows Mobile 6.1 Development With Python
864,988
1
0
1,216
0
python,windows-mobile,mobile-phones
Can't help you much with Python\CE but if you want a great db for mobile devices SQLLite will do the job for you. If you do a quick google you'll find there are libraries for connecting to SQLLite with Python too.
1
0
0
0
2009-05-14T18:17:00.000
1
0.197375
false
864,887
0
0
1
1
I've wanted to get into Python development for awhile and most of my programming experience has been in .NET and no mobile development. I recently thought of a useful app to make for my windows mobile phone and thought this could be a great first Python project. I did a little research online and found PyCe which I ...
Visual Editor for Django Templates?
875,985
1
20
10,614
0
python,django,django-templates
Kind of an oblique answer, but if being able to use tools like Dreamweaver on your templates is important to you, you may find you like Genshi better than Django Templates, and it's easy enough to switch your template engine. Genshi is an XML templating language that is one of the inheritors of the Zope TAL family. Yo...
0
0
0
0
2009-05-16T09:34:00.000
6
0.033321
false
872,065
0
0
1
2
Is there a tool out there for visually building Django templates? Thanks
Visual Editor for Django Templates?
874,222
2
20
10,614
0
python,django,django-templates
There's no WYSIWYG tool like Dreamweaver. But highligting is possible. I am using Kate to edit my templates. For instance when you comment in Django template it inserts {% comment %}.
0
0
0
0
2009-05-16T09:34:00.000
6
0.066568
false
872,065
0
0
1
2
Is there a tool out there for visually building Django templates? Thanks
editing a wav files using python
877,551
1
4
25,153
0
python,audio
You will need to come up with some threshold value of a minimum number of consecutive zeros before you cut them. Otherwise you'll be removing perfectly valid zeros from the middle of normal audio data. You can iterate through the wave file, copying any non-zero values, and buffering up zero values. When you're bufferin...
0
0
0
0
2009-05-17T20:54:00.000
6
0.033321
false
875,476
1
0
1
1
Between each word in the wav file I have full silence (I checked with Hex workshop and silence is represented with 0's). How can I cut the non-silence sound? I'm programming using python. Thanks!
Python learning environment
879,227
2
3
536
0
python
Not sure what you mean. For development First choice: idle -- you already have it. Second choice: Komodo Edit -- very easy to use, but not as directly interactive as idle. For deploying applications, that depends on your application. If you're building desktop applications or web applications, you still use similar to...
0
0
0
0
2009-05-18T18:53:00.000
5
0.07983
false
879,218
1
0
1
2
I'm looking to get up to speed on Python, is it worth working locally via the ActivePython interface, then progressing to a website that supports one of the standard frameworks (Django or Pylons) OR utilize the Google Apps environment? I want to stay as interactive as possible - making feedback/learning easier.
Python learning environment
879,231
2
3
536
0
python
I would just start locally. Django and Pylons add another layer of complexity to the edit/feedback loop. Unless your primary focus is to make python websites, just stick with an editor and the console.
0
0
0
0
2009-05-18T18:53:00.000
5
0.07983
false
879,218
1
0
1
2
I'm looking to get up to speed on Python, is it worth working locally via the ActivePython interface, then progressing to a website that supports one of the standard frameworks (Django or Pylons) OR utilize the Google Apps environment? I want to stay as interactive as possible - making feedback/learning easier.
SQLAlchemy - Database hits on every request?
890,202
3
0
967
1
python,sqlalchemy
For a user login and basic permission tokens in a simple web application I will definitely store that in a cookie-based session. It's true that a few SELECTs per request is not a big deal at all, but then again if you can get some/all of your web requests to execute from cached data with no DB hits at all, that just ...
0
0
0
0
2009-05-19T08:11:00.000
4
0.148885
false
881,517
0
0
1
4
I'm currently working with a web application written in Python (and using SQLAlchemy). In order to handle authentication, the app first checks for a user ID in the session, and providing it exists, pulls that whole user record out of the database and stores it for the rest of that request. Another query is also run to ...
SQLAlchemy - Database hits on every request?
881,535
1
0
967
1
python,sqlalchemy
It's a Database, so often it's fairly common to "hit" the Database to pull the required data. You can reduce single queries if you build up Joins or Stored Procedures.
0
0
0
0
2009-05-19T08:11:00.000
4
0.049958
false
881,517
0
0
1
4
I'm currently working with a web application written in Python (and using SQLAlchemy). In order to handle authentication, the app first checks for a user ID in the session, and providing it exists, pulls that whole user record out of the database and stores it for the rest of that request. Another query is also run to ...
SQLAlchemy - Database hits on every request?
882,021
3
0
967
1
python,sqlalchemy
"hitting the database for something like this on every request isn't efficient." False. And, you've assumed that there's no caching, which is also false. Most ORM layers are perfectly capable of caching rows, saving some DB queries. Most RDBMS's have extensive caching, resulting in remarkably fast responses to common ...
0
0
0
0
2009-05-19T08:11:00.000
4
0.148885
false
881,517
0
0
1
4
I'm currently working with a web application written in Python (and using SQLAlchemy). In order to handle authentication, the app first checks for a user ID in the session, and providing it exists, pulls that whole user record out of the database and stores it for the rest of that request. Another query is also run to ...
SQLAlchemy - Database hits on every request?
882,171
2
0
967
1
python,sqlalchemy
You are basically talking about caching data as a performance optimization. As always, premature optimization is a bad idea. It's hard to know where the bottlenecks are beforehand, even more so if the application domain is new to you. Optimization adds complexity and if you optimize the wrong things, you not only have ...
0
0
0
0
2009-05-19T08:11:00.000
4
0.099668
false
881,517
0
0
1
4
I'm currently working with a web application written in Python (and using SQLAlchemy). In order to handle authentication, the app first checks for a user ID in the session, and providing it exists, pulls that whole user record out of the database and stores it for the rest of that request. Another query is also run to ...
Auto-tab between fields on Django admin site
881,692
1
0
435
0
python,django,django-admin,field
Sure it's possible, but it will need some javascript. You'd want to bind an event to the keypress event on each field, and when it fires test the length of the text entered so far - if it matches, move the focus onto the next field.
0
0
0
0
2009-05-19T08:17:00.000
2
0.099668
false
881,536
0
0
1
1
I have an inline on a model with data with a fixed length, that has to be entered very fast, so I was thinking about a way of "tabbing" through fields automatically when the field is filled... Could that be possible?
Custom ordering in Django
883,645
0
39
29,554
0
python,django,django-models
It depends on where you want to use it. If you want to use it in your own templates, I would suggest to write a template-tag, that will do the ordering for you In it, you could use any sorting algorithm you want to use. In admin I do custom sorting by extending the templates to my needs and loading a template-tag as d...
0
0
0
0
2009-05-19T15:49:00.000
4
0
false
883,575
0
0
1
2
How do you define a specific ordering in Django QuerySets? Specifically, if I have a QuerySet like so: ['a10', 'a1', 'a2']. Regular order (using Whatever.objects.order_by('someField')) will give me ['a1', 'a10', 'a2'], while I am looking for: ['a1', 'a2', 'a10']. What is the proper way to define my own ordering techniq...
Custom ordering in Django
889,445
37
39
29,554
0
python,django,django-models
@Jarret's answer (do the sort in Python) works great for simple cases. As soon as you have a large table and want to, say, pull only the first page of results sorted in a certain way, this approach breaks (you have to pull every single row from the database before you can do the sort). At that point I would look into...
0
0
0
0
2009-05-19T15:49:00.000
4
1
false
883,575
0
0
1
2
How do you define a specific ordering in Django QuerySets? Specifically, if I have a QuerySet like so: ['a10', 'a1', 'a2']. Regular order (using Whatever.objects.order_by('someField')) will give me ['a1', 'a10', 'a2'], while I am looking for: ['a1', 'a2', 'a10']. What is the proper way to define my own ordering techniq...
Does Django scale?
886,309
6
1,204
203,038
0
python,django,web-applications,scalability
Note that if you're expecting 100K users per day, that are active for hours at a time (meaning max of 20K+ concurrent users), you're going to need A LOT of servers. SO has ~15,000 registered users, and most of them are probably not active daily. While the bulk of traffic comes from unregistered users, I'm guessing th...
0
0
0
0
2009-05-20T05:07:00.000
29
1
false
886,221
0
0
1
8
I'm building a web application with Django. The reasons I chose Django were: I wanted to work with free/open-source tools. I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn. I'm building a prototype for an idea and wasn't thinking too muc...
Does Django scale?
33,579,299
6
1,204
203,038
0
python,django,web-applications,scalability
I don't think the issue is really about Django scaling. I really suggest you look into your architecture that's what will help you with your scaling needs.If you get that wrong there is no point on how well Django performs. Performance != Scale. You can have a system that has amazing performance but does not scale and...
0
0
0
0
2009-05-20T05:07:00.000
29
1
false
886,221
0
0
1
8
I'm building a web application with Django. The reasons I chose Django were: I wanted to work with free/open-source tools. I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn. I'm building a prototype for an idea and wasn't thinking too muc...
Does Django scale?
35,997,907
4
1,204
203,038
0
python,django,web-applications,scalability
Even-though there have been a lot of great answers here, I just feel like pointing out, that nobody have put emphasis on.. It depends on the application If you application is light on writes, as in you are reading a lot more data from the DB than you are writing. Then scaling django should be fairly trivial, heck, it ...
0
0
0
0
2009-05-20T05:07:00.000
29
0.027579
false
886,221
0
0
1
8
I'm building a web application with Django. The reasons I chose Django were: I wanted to work with free/open-source tools. I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn. I'm building a prototype for an idea and wasn't thinking too muc...
Does Django scale?
887,363
283
1,204
203,038
0
python,django,web-applications,scalability
We're doing load testing now. We think we can support 240 concurrent requests (a sustained rate of 120 hits per second 24x7) without any significant degradation in the server performance. That would be 432,000 hits per hour. Response times aren't small (our transactions are large) but there's no degradation from our...
0
0
0
0
2009-05-20T05:07:00.000
29
1
false
886,221
0
0
1
8
I'm building a web application with Django. The reasons I chose Django were: I wanted to work with free/open-source tools. I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn. I'm building a prototype for an idea and wasn't thinking too muc...
Does Django scale?
4,272,991
2
1,204
203,038
0
python,django,web-applications,scalability
Spreading the tasks evenly, in short optimizing each and every aspect including DBs, Files, Images, CSS etc. and balancing the load with several other resources is necessary once your site/application starts growing. OR you make some more space for it to grow. Implementation of latest technologies like CDN, Cloud are m...
0
0
0
0
2009-05-20T05:07:00.000
29
0.013792
false
886,221
0
0
1
8
I'm building a web application with Django. The reasons I chose Django were: I wanted to work with free/open-source tools. I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn. I'm building a prototype for an idea and wasn't thinking too muc...
Does Django scale?
887,463
5
1,204
203,038
0
python,django,web-applications,scalability
Another example is rasp.yandex.ru, Russian transport timetable service. Its attendance satisfies your requirements.
0
0
0
0
2009-05-20T05:07:00.000
29
0.034469
false
886,221
0
0
1
8
I'm building a web application with Django. The reasons I chose Django were: I wanted to work with free/open-source tools. I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn. I'm building a prototype for an idea and wasn't thinking too muc...
Does Django scale?
25,727,705
5
1,204
203,038
0
python,django,web-applications,scalability
I develop high traffic sites using Django for the national broadcaster in Ireland. It works well for us. Developing a high performance site is more than about just choosing a framework. A framework will only be one part of a system that is as strong as it's weakest link. Using the latest framework 'X' won't solve your ...
0
0
0
0
2009-05-20T05:07:00.000
29
0.034469
false
886,221
0
0
1
8
I'm building a web application with Django. The reasons I chose Django were: I wanted to work with free/open-source tools. I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn. I'm building a prototype for an idea and wasn't thinking too muc...
Does Django scale?
26,828,032
4
1,204
203,038
0
python,django,web-applications,scalability
The problem is not to know if django can scale or not. The right way is to understand and know which are the network design patterns and tools to put under your django/symfony/rails project to scale well. Some ideas can be : Multiplexing. Inversed proxy. Ex : Nginx, Varnish Memcache Session. Ex : Redis Clusterization...
0
0
0
0
2009-05-20T05:07:00.000
29
0.027579
false
886,221
0
0
1
8
I'm building a web application with Django. The reasons I chose Django were: I wanted to work with free/open-source tools. I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn. I'm building a prototype for an idea and wasn't thinking too muc...