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
About pyjamas maturity vs GWT maturity (with short dead lines) for a web application
3,473,114
7
6
1,811
0
java,python,gwt,pyjamas
In fact, from my beginner point of view, it seems like the python world is more suitable for a quickly-developed and fun web application. And, on the other hand, the java world is useful for performance-oriented, scalable solutions and for 'serious' projects with big money involved... Naah. For exampl...
0
0
0
0
2010-08-12T22:23:00.000
2
1.2
true
3,472,493
0
0
1
2
I love both, python and Java and I have this first 'serious' web application project that I would like to carry out. I find it hard to choose between pyjamas + django and GWT + Hibernate. In fact, from my beginner point of view, it seems like the python world is more suitable for a quickly-developed and fun web applic...
Good learner book for a 12 year old?
3,472,642
8
10
2,051
0
java,python
Head First Java is a great book for any new Java programmer. It has lots of pictures, fun quips and puzzles to solve. Definitely worth the buy.
0
0
0
0
2010-08-12T22:50:00.000
7
1
false
3,472,634
1
0
1
3
My 12 year old brother has recently expressed an interest in learning to program. I of course think this is a great idea, why not start him early? I'm wondering what you guys think with regards a book? I was thinking I should start him off on Java but I'm unsure what book would be best? Any suggestions with regards a b...
Good learner book for a 12 year old?
3,472,998
2
10
2,051
0
java,python
If your brother plays any PC games, you might check to see if any of them are moddable. Many games these days come with scripted campaign editors or have python scripts underlying them that you can modify. They are a great way to get involved with the basic concepts behind programming, as your brother can get pretty ...
0
0
0
0
2010-08-12T22:50:00.000
7
0.057081
false
3,472,634
1
0
1
3
My 12 year old brother has recently expressed an interest in learning to program. I of course think this is a great idea, why not start him early? I'm wondering what you guys think with regards a book? I was thinking I should start him off on Java but I'm unsure what book would be best? Any suggestions with regards a b...
Good learner book for a 12 year old?
3,472,658
0
10
2,051
0
java,python
I too can recommend the Head First series. You could try "Head First Programming". It uses some python though.
0
0
0
0
2010-08-12T22:50:00.000
7
0
false
3,472,634
1
0
1
3
My 12 year old brother has recently expressed an interest in learning to program. I of course think this is a great idea, why not start him early? I'm wondering what you guys think with regards a book? I was thinking I should start him off on Java but I'm unsure what book would be best? Any suggestions with regards a b...
Difference between save() and put()?
3,476,378
5
0
205
0
python,google-app-engine
save() is a (deprecated) alias for put(). They work exactly equivalently - in fact, they're the same function!
0
0
0
0
2010-08-13T10:55:00.000
1
1.2
true
3,476,152
0
0
1
1
What is the difference between Mymodel.save() and Mymodel.put() in appengine with python? I know that save is used in django but does is work with appengine models too?
Twisted vs Google App Engine in serving mobile clients
3,480,585
6
1
617
0
python,google-app-engine,twisted
Certainly. App Engine will scale your application up as the load increases automatically and will be spread over many machines. The web api they have is pretty nice too. You don't have to worry about deferreds either because it scales by bringing more instances up instead of making things asynchronous. BTW: I have web ...
0
1
0
0
2010-08-13T20:41:00.000
1
1.2
true
3,480,524
0
0
1
1
So far I have been using Twisted to simultaneously serve a lot of mobile clients (Android, iPhone) with their HTTP requests exchanging JSON messages. For my next project I'd like to try out Google App Engine, but I'm wondering if it is capable of doing the same or if I should rather go with a custom built solution agai...
Google App Engine - Naked Domain Path Redirect in Python
3,483,631
0
4
830
0
python,google-app-engine,redirect
You need to use a third-party site to do the redirection to www.*; many registrars offer this service. Godaddy's service (which is even free with domain registration) forwards foo.com/bar to www.foo.com/bar; I can't speak to the capabilities of the others but it seems to me that any one that doesn't behave this way is...
0
1
1
0
2010-08-14T05:27:00.000
2
0
false
3,482,152
0
0
1
1
I'm working on a site, colorurl.com, and I need users to be able to type in colorurl.com/00ff00 (or some variation of that), and see the correct page. However, with the naked domain issue, users who type in colorurl.com/somepath will instead be redirected to www.colorurl.com/. Is there a way to detect this in python, a...
Process field before database insert / update
3,485,462
3
3
2,000
0
python,django,django-admin
Stripping the junk and such should be done with a custom formfield. Downloading the images... there are multiple ways to fix that problem. If you choose to store the image location and original location in the database, than you should do it with a pre-save signal. If you choose to store the images locally directly, t...
0
0
0
0
2010-08-14T22:28:00.000
3
1.2
true
3,485,369
0
0
1
1
I have a Django model with a text field. I'm using a rich text editor (nicEdit) on the admin site to allow the client to easily enter markup into the field. I'd like to process the contents of the field and perform a few actions before anything is inserted into the database. For example, I want to strip junk generated ...
App Engine - Output Response Time
3,490,013
3
4
165
0
python,performance,google-app-engine
Call start = time.time() as the very first operation in your handling scripts, and, when you're just about done with everything, as the very last thing you output use (a properly formatted version of) time.time() - start. If you're using templates for your output (e.g., the Django templates that come with app engine --...
0
1
0
0
2010-08-16T01:02:00.000
1
1.2
true
3,489,968
0
0
1
1
Say I wanted to print the response time on my pages like Google do. How would I go about doing this?
Does python have a ruby installer like gem that lets you install modules from the command line even if they are not on your machine?
3,490,551
4
3
1,036
0
python,rubygems
no it does not have a ruby installer that I know of. It does have easy_install and pip though. Your google-fu is lacking.
0
0
0
1
2010-08-16T04:09:00.000
2
0.379949
false
3,490,543
1
0
1
1
With Ruby you can do gem install from the command line to install a module...even if it is not on your machine. Can you do that with python. Does someone know of a module? Seth
Can I use Turbogears to develop mobile sites?
3,562,868
0
1
254
0
python,mobile-website,turbogears
The simplest version of a "mobile site" is simply CSS. Display a simplified version of the site to USERAGENTS that are identified as mobile.
0
0
0
0
2010-08-16T12:51:00.000
4
0
false
3,493,244
0
0
1
1
Is it possible to develop mobile versions of webpages using Turbogears? Can someone please show me an example and how it is done?
How to best organize the rules component of a Django system?
3,504,714
1
4
177
0
python,django,architecture,code-organization
I would create subdirectory named rules in the app with game logic and there create module named after each game, that you would like serve. Then create a common interface for those modules, that will be utilized by your games and import proper rules module by name (if your game is called adom, then simply __import__('...
0
0
0
0
2010-08-17T15:54:00.000
2
1.2
true
3,504,405
0
0
1
2
I'm designing (and ultimately writing) a system in Django that consists of two major components: A Game Manager: this is essentially a data-entry piece. Trusted (non-public) users will enter information on a gaming system, such as options that a player may have. The interface for this is solely the Django admin cons...
How to best organize the rules component of a Django system?
3,504,959
1
4
177
0
python,django,architecture,code-organization
the "rules" that are associated with each game. for each game put into the first app, there are a sets of prerequisites, limitations, and other business logic specific to that game. That's part of the game app, then. There's also similarly-structured logic that will be common to all games. That's part of the game ap...
0
0
0
0
2010-08-17T15:54:00.000
2
0.099668
false
3,504,405
0
0
1
2
I'm designing (and ultimately writing) a system in Django that consists of two major components: A Game Manager: this is essentially a data-entry piece. Trusted (non-public) users will enter information on a gaming system, such as options that a player may have. The interface for this is solely the Django admin cons...
What languages would be a good replacement for Java?
3,506,325
6
3
3,718
0
java,python,qt,programming-languages,replace
Might be worth loking at the other JVM languages - Clojure and Scala are the two I personally think are most promising. Yes you are on the JVM, but you're pretty independent from Java the langauage and don't have to use any Sun/Oracle implementations if you don't want to. Having said that - I think that you are worryin...
0
0
0
1
2010-08-17T19:35:00.000
10
1
false
3,506,252
0
0
1
3
I may be posting a premature question, and maybe I'm just freaking out for no reason, but the way Oracle is handling Java is not very promising. I am a nerd who fell in love with Java from the first sight, and use it all the time in my personal/freelance projects but now I am thinking of a replacement. I am fluent in C...
What languages would be a good replacement for Java?
3,509,044
0
3
3,718
0
java,python,qt,programming-languages,replace
C# is the only thing that will meet your needs and not feel hopelessly archaic, or frustrate with limited library. For open source/non-windows, use mono. It's a good, mature implementation of most of what's important in the CLR. Some things (WPF, WCF, etc) are "missing" from mono, but these aren't so much part of the ...
0
0
0
1
2010-08-17T19:35:00.000
10
0
false
3,506,252
0
0
1
3
I may be posting a premature question, and maybe I'm just freaking out for no reason, but the way Oracle is handling Java is not very promising. I am a nerd who fell in love with Java from the first sight, and use it all the time in my personal/freelance projects but now I am thinking of a replacement. I am fluent in C...
What languages would be a good replacement for Java?
3,506,402
1
3
3,718
0
java,python,qt,programming-languages,replace
I too would like another Java-like technology to come along. Lately I've been doing Flex/Actionscript. While I really enjoy it, Actionscript technology seriously lacks the elegance that Java has. Adobe can write some good cross platform APIs, but they just don't have the head capital to build elegant languages and c...
0
0
0
1
2010-08-17T19:35:00.000
10
0.019997
false
3,506,252
0
0
1
3
I may be posting a premature question, and maybe I'm just freaking out for no reason, but the way Oracle is handling Java is not very promising. I am a nerd who fell in love with Java from the first sight, and use it all the time in my personal/freelance projects but now I am thinking of a replacement. I am fluent in C...
Can deleting a django Model with a ManyToManyField create orphaned database rows?
3,509,354
2
0
334
0
python,django,django-models,many-to-many
If I have two classes A and B with a many to many relationship and I want to delete an instance of A, do I need to remove all of its related Bs first or will Django sort that out for me? Short answer: Django will sort that out for you. Does it make any difference if the ManyToMany field is declared on class A or B? ...
0
0
0
0
2010-08-18T05:44:00.000
1
1.2
true
3,509,275
0
0
1
1
If I have two classes A and B with a many to many relationship and I want to delete an instance of A, do I need to remove all of its related Bs first or will Django sort that out for me? I obviously don't want to leave orphaned rows in the join table. Does it make any difference if the ManyToMany field is declared on c...
django grappelli, filebrowser and Tiny MCE insert image dialog
7,351,831
1
1
2,709
0
python,django,tinymce,django-filebrowser,django-grappelli
I managed to get the admin site to look like the django simple admin interface by not setting my admin media prefix to '/media/grappelli/'. Just left it as '/static/admin/' and it didn't break anything seemingly, I've not been able to get the 'choose' to work either way though.
0
0
0
0
2010-08-18T08:51:00.000
3
0.066568
false
3,510,374
0
0
1
1
So, I found django admin interface called 'grappelli'. Looked at the screenshots and decided that I like it. Went to sources page and checked out trunk. Set it up and noticed that it looks nothing like screenshots. No dashboard, no side panel, different colors of the elements and model item lists are very narrow. From ...
How to get read-only objects from database?
3,513,490
0
0
244
1
python,sqlalchemy
You must load the parent object again.
0
0
0
0
2010-08-18T14:57:00.000
1
0
false
3,513,433
0
0
1
1
I'd like to query the database and get read-only objects with session object. I need to save the objects in my server and use them through the user session. If I use a object outside of the function that calls the database, I get this error: "DetachedInstanceError: Parent instance is not bound to a Session; lazy load o...
Embedded WSGI backend for Python desktop app using webkit
4,376,995
0
8
921
0
python,local,wsgi
Earlier today I saw exactly what you're asking for -- a way to call WSGI through an API without actually connecting over the network. However, it shouldn't be that hard. On a side note, you might want to look at PySide, of particular interest to you may be the ability to bind python elements to DOM events, so if you'r...
0
0
0
0
2010-08-19T12:05:00.000
3
0
false
3,521,548
0
0
1
1
Disclaimer: I'm not very familiar with any of the things mentioned in the question title. Would it be possible to use a browser control (like Webkit) as a frontend for a WSGI app (using a framework like Flask) without starting a local WSGI server? Basically the requests and responses are managed by a middle layer betwe...
Trouble setting up sqlite3 with django! :/
3,524,305
1
5
3,575
1
python,database,django,sqlite
if you don't provide full path, it will use the current directory of settings.py, and if you wish to specify static path you can specify it like: c:/projects/project1/my_proj.db or in case you want to make it dynamic then you can use os.path module so os.path.dirname(file) will give you the path of settings.py and acco...
0
0
0
0
2010-08-19T17:02:00.000
2
0.099668
false
3,524,236
0
0
1
1
I'm in the settings.py module, and I'm supposed to add the directory to the sqlite database. How do I know where the database is and what the full directory is? I'm using Windows 7.
Why do some Django ORM queries end abruptly with the message "Killed"?
3,529,637
6
7
1,944
1
python,django,postgresql
Only one thing I could think of that will kill automatically a process on Linux - the OOM killer. What's in the system logs?
0
1
0
0
2010-08-19T22:19:00.000
2
1.2
true
3,526,748
0
0
1
1
Sometimes, when fetching data from the database either through the python shell or through a python script, the python process dies, and one single word is printed to the terminal: Killed That's literally all it says. It only happens with certain scripts, but it always happens for those scripts. It consistently happens...
Store python classes as pickles in GAE?
5,152,644
0
2
366
0
python,google-app-engine,pickle
The key advantages of using Django are its ORM and template system. The ORM is not very useful with datastore because of its non-relational nature and the template system is available as part of the app engine to be used with webapp. I have had good success with using webapp and django templates for our project.
0
1
0
0
2010-08-20T15:34:00.000
2
0
false
3,532,417
0
0
1
2
I am porting a Python investing application to Google App Engine. Every market that you can trade in is a plugin: for example the stocks trading and FOREX trading are all plugins. The application stores the portfolio (which is a Portfolio class instance containing the active investments (class instances) and history) a...
Store python classes as pickles in GAE?
3,532,598
1
2
366
0
python,google-app-engine,pickle
The best solution would be to use the Datastore data models, but you'll have to rewrite parts of your app. Using Pickle for data persistance, especially involving much data, is not a good pratice.
0
1
0
0
2010-08-20T15:34:00.000
2
0.099668
false
3,532,417
0
0
1
2
I am porting a Python investing application to Google App Engine. Every market that you can trade in is a plugin: for example the stocks trading and FOREX trading are all plugins. The application stores the portfolio (which is a Portfolio class instance containing the active investments (class instances) and history) a...
Python Regular Expression Match All 5 Digit Numbers but None Larger
3,532,984
1
29
93,863
0
python,regex
You probably want to match a non-digit before and after your string of 5 digits, like [^0-9]([0-9]{5})[^0-9]. Then you can capture the inner group (the actual string you want).
0
0
0
0
2010-08-20T16:40:00.000
7
0.028564
false
3,532,947
1
0
1
3
I'm attempting to string match 5-digit coupon codes spread throughout a HTML web page. For example, 53232, 21032, 40021 etc... I can handle the simpler case of any string of 5 digits with [0-9]{5}, though this also matches 6, 7, 8... n digit numbers. Can someone please suggest how I would modify this regular expressio...
Python Regular Expression Match All 5 Digit Numbers but None Larger
3,532,981
3
29
93,863
0
python,regex
A very simple way would be to match all groups of digits, like with r'\d+', and then skip every match that isn't five characters long when you process the results.
0
0
0
0
2010-08-20T16:40:00.000
7
0.085505
false
3,532,947
1
0
1
3
I'm attempting to string match 5-digit coupon codes spread throughout a HTML web page. For example, 53232, 21032, 40021 etc... I can handle the simpler case of any string of 5 digits with [0-9]{5}, though this also matches 6, 7, 8... n digit numbers. Can someone please suggest how I would modify this regular expressio...
Python Regular Expression Match All 5 Digit Numbers but None Larger
3,532,978
16
29
93,863
0
python,regex
full string: ^[0-9]{5}$ within a string: [^0-9][0-9]{5}[^0-9]
0
0
0
0
2010-08-20T16:40:00.000
7
1
false
3,532,947
1
0
1
3
I'm attempting to string match 5-digit coupon codes spread throughout a HTML web page. For example, 53232, 21032, 40021 etc... I can handle the simpler case of any string of 5 digits with [0-9]{5}, though this also matches 6, 7, 8... n digit numbers. Can someone please suggest how I would modify this regular expressio...
Pylons - catching errors before redirect to document/error for logging
3,537,529
1
0
316
0
python,logging,pylons
For custom error handling i think you should look at ErrorHandler and StatusCodeRedirect (from pylons.middleware) and maybe make your own class based on them?
0
0
0
0
2010-08-20T23:30:00.000
2
0.099668
false
3,535,535
0
0
1
1
I want to log 404 and 500 errors in a pylons app before they redirect to my custom error message (/error/document). My problem is that since Pylons does the redirect, I am unable to determine the page on which the error occurred inside the error controller. So without building a parser for the paster.log I don't know ...
Using Cython with Django. Does it make sense?
3,539,136
25
38
16,714
0
python,django,cython
Well, yes, but most things a web app does won't really benefit from this sort of change unless you have firm proof that it will. Profile twice, optimize once.
0
0
0
0
2010-08-21T21:44:00.000
6
1
false
3,539,120
0
0
1
3
Is it possible to optimize speed of a mission critical application developed in Django with Cython? Recently I have read on the internet, that Cython can turn a Python code to C like speed. Is this possible with Django?
Using Cython with Django. Does it make sense?
52,422,538
1
38
16,714
0
python,django,cython
It depends if you have heavy processes on the backend side. In my case it could improve one of the processes and speed it up ~5 times. I had a function that rework large XML files that is inputed by the user and save the output into database. telling Cython that in some places the input or output is string did the 5x s...
0
0
0
0
2010-08-21T21:44:00.000
6
0.033321
false
3,539,120
0
0
1
3
Is it possible to optimize speed of a mission critical application developed in Django with Cython? Recently I have read on the internet, that Cython can turn a Python code to C like speed. Is this possible with Django?
Using Cython with Django. Does it make sense?
3,539,374
35
38
16,714
0
python,django,cython
Is it possible to optimize speed of a mission critical application developed in Django with Cython It's doubtful. Most of a web application response time is the non-HTML elements that must be downloaded separately. The usual rule of thumb is 8 static files per HTML page. (.CSS, .JS, images, etc.) Since none of t...
0
0
0
0
2010-08-21T21:44:00.000
6
1.2
true
3,539,120
0
0
1
3
Is it possible to optimize speed of a mission critical application developed in Django with Cython? Recently I have read on the internet, that Cython can turn a Python code to C like speed. Is this possible with Django?
Is it possible to run linux on hand-held tablets?
3,541,193
0
3
395
0
python,android,django
Do you want it to run on a tablet or a hand-held device? Are netbooks okay? There are plenty netbooks that run Ubuntu, on which you should be able to run python. I also remember that the sharp zaurus handheld devices were able to run Zope for example (be it very, very slowly) In general, smaller, embedded systems (i.e....
0
1
0
0
2010-08-22T08:53:00.000
2
0
false
3,540,805
0
0
1
1
I want to run a django app on a hand-held device. It'll need to run Python (obviously) and will write its data to an SQLite database. Are there any tablets available that will let me do this? Specifically, if I bought an Android tablet, would I have to/be able to install linux instead, or would I be able to run it und...
Django and FeinCMS: A way to use the Media Library in other normal models?
3,777,528
1
6
717
0
python,django,content-management-system,django-admin,feincms
Sure -- there's nothing stopping you from adding a ForeignKey or a ManyToManyField to the MediaFile model to one of your own models. Note that you'll have a hard time limiting the media files to only images. Maybe limit_choices_to will help though.
0
0
0
0
2010-08-22T18:22:00.000
1
0.197375
false
3,542,723
0
0
1
1
I'm using Django and FeinCMS on a project. I'm currently using FeinCMS for all the pages on the site. But I also have another separate model that handles very simple stock for the site too. This stock model has the usual fields (name, description, etc) but I also want it to have photos. Because FeinCMS has a media libr...
What encoding do normal python strings use?
3,548,031
32
18
18,945
0
python,encoding
In Python 2: Normal strings (Python 2.x str) don't have an encoding: they are raw data. In Python 3: These are called "bytes" which is an accurate description, as they are simply sequences of bytes, which can be text encoded in any encoding (several are common!) or non-textual data altogether. For representing text, y...
0
0
0
0
2010-08-23T12:33:00.000
6
1
false
3,547,534
1
0
1
4
i know that django uses unicode strings all over the framework instead of normal python strings. what encoding are normal python strings use ? and why don't they use unicode?
What encoding do normal python strings use?
3,547,580
1
18
18,945
0
python,encoding
Python 2.x strings are 8-bit, nothing more. The encoding may vary (though ASCII is assumed). I guess the reasons are historical. Few languages, especially languages that date back to the last century, use unicode right away. In Python 3, all strings are unicode.
0
0
0
0
2010-08-23T12:33:00.000
6
0.033321
false
3,547,534
1
0
1
4
i know that django uses unicode strings all over the framework instead of normal python strings. what encoding are normal python strings use ? and why don't they use unicode?
What encoding do normal python strings use?
3,552,681
4
18
18,945
0
python,encoding
what encoding are normal python strings use? In Python 3.x str is Unicode. This may be either UTF-16 or UTF-32 depending on whether your Python interpreter was built with "narrow" or "wide" Unicode characters. The Windows version of CPython uses UTF-16. On Unix-like systems, UTF-32 tends to be preferred. In Python...
0
0
0
0
2010-08-23T12:33:00.000
6
0.132549
false
3,547,534
1
0
1
4
i know that django uses unicode strings all over the framework instead of normal python strings. what encoding are normal python strings use ? and why don't they use unicode?
What encoding do normal python strings use?
3,547,565
-2
18
18,945
0
python,encoding
Before Python 3.0, string encoding was ascii by default, but could be changed. Unicode string literals were u"...". This was silly.
0
0
0
0
2010-08-23T12:33:00.000
6
-0.066568
false
3,547,534
1
0
1
4
i know that django uses unicode strings all over the framework instead of normal python strings. what encoding are normal python strings use ? and why don't they use unicode?
Django ForeignKey which does not require referential integrity?
3,829,427
3
12
7,485
0
python,django,django-models,foreign-keys
This is probably as simple as declaring a ForeignKey and creating the column without actually declaring it as a FOREIGN KEY. That way, you'll get o.obj_id, o.obj will work if the object exists, and--I think--raise an exception if you try to load an object that doesn't actually exist (probably DoesNotExist). However, I...
0
0
0
0
2010-08-24T16:54:00.000
6
0.099668
false
3,558,907
0
0
1
2
I'd like to set up a ForeignKey field in a django model which points to another table some of the time. But I want it to be okay to insert an id into this field which refers to an entry in the other table which might not be there. So if the row exists in the other table, I'd like to get all the benefits of the Foreig...
Django ForeignKey which does not require referential integrity?
62,528,120
-2
12
7,485
0
python,django,django-models,foreign-keys
tablename= columnname.ForeignKey('table', null=True, blank=True, db_constraint=False) use this in your program
0
0
0
0
2010-08-24T16:54:00.000
6
-0.066568
false
3,558,907
0
0
1
2
I'd like to set up a ForeignKey field in a django model which points to another table some of the time. But I want it to be okay to insert an id into this field which refers to an entry in the other table which might not be there. So if the row exists in the other table, I'd like to get all the benefits of the Foreig...
Is there no mysql connector for python 2.7 on windows
58,359,370
1
1
2,224
1
mysql,python-2.7
For Python 2.7 on specific programs: sudo chown -R $USER /Library/Python/2.7 brew install mysql@5.7 brew install mysql-connector-c brew link --overwrite mysql@5.7 echo 'export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"' >> ~/.bash_profile sed -i -e 's/libs="$libs -l "/libs="$libs -lmysqlclient -lssl -lcrypto"/g' /usr/l...
0
0
0
0
2010-08-25T02:15:00.000
3
0.066568
false
3,562,406
0
0
1
1
While I see a bunch of links/binaries for mysql connector for python 2.6, I don't see one for 2.7 To use django, should I just revert to 2.6 or is there a way out ? I'm using windows 7 64bit django - 1.1 Mysql 5.1.50 Any pointers would be great.
How to check if DataStore Indexes are being served on AppEngine?
3,562,948
2
1
244
0
python,google-app-engine
Attempt to perform a query that requires that index. If it raises a NeedIndexError, it's not uploaded or not yet serving.
0
1
0
0
2010-08-25T02:32:00.000
2
1.2
true
3,562,466
0
0
1
1
How can I check if datastore Indexes as defined in index.yaml are serving in the python code? I am using Python 1.3.6 AppEngine SDK.
URL encoding/decoding with Python
3,563,366
2
48
83,104
0
python,url-encoding
You are out of your luck with stdlib, urllib.quote doesn't work with unicode. If you are using django you can use django.utils.http.urlquote which works properly with unicode
0
0
1
0
2010-08-25T05:42:00.000
3
0.132549
false
3,563,126
0
0
1
1
I am trying to encode and store, and decode arguments in Python and getting lost somewhere along the way. Here are my steps: 1) I use google toolkit's gtm_stringByEscapingForURLArgument to convert an NSString properly for passing into HTTP arguments. 2) On my server (python), I store these string arguments as somethin...
Crash in development server clears datastore?
3,570,139
0
0
61
0
python,google-app-engine
The GAE development data store is only functionally equivalent to the production data store. It's really just a file (or set of files) on your local disk simulating BigTable. So if you abort it in the middle of doing something important, it could end up in an inconsistent state. If you're concerned about this, you ca...
0
1
0
0
2010-08-25T20:53:00.000
2
0
false
3,570,111
0
0
1
1
I'm testing my app with the development server. When I manually interrupt a request, it sometimes clears the datastore. This clears even models that are not modified by my request, like users, etc. Any idea why is this? Thanks
Selenium with Python, how do I get the page output after running a script?
3,573,288
2
3
4,318
0
python,selenium,browser-automation
There's a Selenium.getHtmlSource() method in Java, most likely it is also available in Python. It returns the source of the current page as string, so you can do whatever you want with it
0
0
1
0
2010-08-26T00:22:00.000
3
1.2
true
3,571,233
0
0
1
1
I'm not sure how to find this information, I have found a few tutorials so far about using Python with selenium but none have so much as touched on this.. I am able to run some basic test scripts through python that automate selenium but it just shows the browser window for a few seconds and then closes it.. I need to ...
I can`t decide what to select: ASP.NET MVC 2 (C#) or Django (Python)?
3,578,887
1
0
362
0
c#,python,django,asp.net-mvc-2
I would create a small app to try each for a day or two and then choose. I can't speak for Django, but here are some Asp.Net MVC benefits Tight integration with other Microsoft technologies Uses jquery out of the box Choice of several server-side languages Very flexible (choice of unit test framework, view engine, ...
0
0
0
0
2010-08-26T19:33:00.000
4
0.049958
false
3,578,822
0
0
1
4
I`m learning programming languages. And I decide that I need to lear a new web framework. I have 2 candidates: Django or ASP.NET MVC 2. Can you say me the difference between them and what is so interesting?
I can`t decide what to select: ASP.NET MVC 2 (C#) or Django (Python)?
3,578,857
4
0
362
0
c#,python,django,asp.net-mvc-2
Try both, then decide.
0
0
0
0
2010-08-26T19:33:00.000
4
1.2
true
3,578,822
0
0
1
4
I`m learning programming languages. And I decide that I need to lear a new web framework. I have 2 candidates: Django or ASP.NET MVC 2. Can you say me the difference between them and what is so interesting?
I can`t decide what to select: ASP.NET MVC 2 (C#) or Django (Python)?
3,579,129
1
0
362
0
c#,python,django,asp.net-mvc-2
What reasons lead you to choose those two frameworks? What reasons lead you to choose those two languages? If you don't like the answers, then keep looking. Otherwise... Do you want to be on a non-Microsoft web stack? Go Django. Do you want to interface with lots of other Microsoft web stack technologies? Go MVC. ...
0
0
0
0
2010-08-26T19:33:00.000
4
0.049958
false
3,578,822
0
0
1
4
I`m learning programming languages. And I decide that I need to lear a new web framework. I have 2 candidates: Django or ASP.NET MVC 2. Can you say me the difference between them and what is so interesting?
I can`t decide what to select: ASP.NET MVC 2 (C#) or Django (Python)?
3,578,889
2
0
362
0
c#,python,django,asp.net-mvc-2
Well, I'm using both and found both to be state of the art, easy to learn, fast and easy to install. Maybe don't look at it from a technical standpoint but from the context. ASP.NET needs a Windows Server, ASP.NET and an IIS installed. You have the license for that? Django on the other hand is open source runs on chea...
0
0
0
0
2010-08-26T19:33:00.000
4
0.099668
false
3,578,822
0
0
1
4
I`m learning programming languages. And I decide that I need to lear a new web framework. I have 2 candidates: Django or ASP.NET MVC 2. Can you say me the difference between them and what is so interesting?
How do you create a video file upload form with Django?
3,583,993
0
1
3,028
0
python,django,forms,video,file-upload
Additionaly have a look at jquery uploadify. It's pretty useful for large file uploads because it display the progress of the download.
0
0
0
0
2010-08-27T01:45:00.000
3
0
false
3,580,778
0
0
1
1
I want a user to be able to upload a video from their computer or record it right from their webcam, then fill out other information with a form. I'm writing this app with Django.
Programmatically managing a 'balance' of time (sick/vacation)
3,585,722
2
3
1,331
0
python,django,database-design,date,time
If you think your solution is complicated, it's not. Modeling sick/vacation days as accounts that are linked to employees is a very good idea and can be dead easy. In the simplest case, you can have a "transactions" table, and a "account" table, such that re-running all the transactions from the beginning of the year ...
0
0
0
0
2010-08-27T14:57:00.000
4
1.2
true
3,585,428
0
0
1
3
I'm using Python/Django, but this is more about the "data model" and how I interact with the information - I really just want to know if I'm crazy here. I'm working on a small app at my company (~55 employees) that will keep track of available Vacation/Sick time. Part of the purpose is to integrate "self-service" into...
Programmatically managing a 'balance' of time (sick/vacation)
3,585,669
0
3
1,331
0
python,django,database-design,date,time
I also agree it's a good start. I don't see any fields for approval / disapproval. If this app is meant to be used also by HR, then their decisions need to be expressed in your model as well. If HR is being taken out of the picture (which I doubt, but maybe) then there's no need to do this; the app can keep track of r...
0
0
0
0
2010-08-27T14:57:00.000
4
0
false
3,585,428
0
0
1
3
I'm using Python/Django, but this is more about the "data model" and how I interact with the information - I really just want to know if I'm crazy here. I'm working on a small app at my company (~55 employees) that will keep track of available Vacation/Sick time. Part of the purpose is to integrate "self-service" into...
Programmatically managing a 'balance' of time (sick/vacation)
3,585,570
0
3
1,331
0
python,django,database-design,date,time
This looks like a good start. A couple of points: The credits would be autogenerated by the system at the begining of the year, and debits would be created by employees. Should there be a field to indicate who/what created the transaction? Do you have a mechanism for indicating what kind of time off is requested? I d...
0
0
0
0
2010-08-27T14:57:00.000
4
0
false
3,585,428
0
0
1
3
I'm using Python/Django, but this is more about the "data model" and how I interact with the information - I really just want to know if I'm crazy here. I'm working on a small app at my company (~55 employees) that will keep track of available Vacation/Sick time. Part of the purpose is to integrate "self-service" into...
Where is my local App Engine datastore?
42,148,664
0
11
11,200
0
python,google-app-engine,google-cloud-datastore
I'll restate a solution to getting permanent datastore as it worked for me (circa Feb 2017), running GoogleAppEngineLauncher on OS X v10.10. Create the folder path for permanent datastore In GAEL, click on the project in question e.g. PROJECTNAME Click Edit-Application Settings in Extra Flags field: --datastore_path...
0
1
0
0
2010-08-27T23:49:00.000
10
0
false
3,588,817
0
0
1
5
How can I find where my local development datastore is located? I am using the Python SDK and Linux.
Where is my local App Engine datastore?
4,180,525
6
11
11,200
0
python,google-app-engine,google-cloud-datastore
To find the file location for the local AppEngine datastore on MacOSX/Python, you can run the following command: dev_appserver.py -help Mine was at something like: /var/folders/uP/uP1GHkGKGqO7QPq+eGMmb++++TI/-Tmp-/dev_appserver.datastore
0
1
0
0
2010-08-27T23:49:00.000
10
1
false
3,588,817
0
0
1
5
How can I find where my local development datastore is located? I am using the Python SDK and Linux.
Where is my local App Engine datastore?
57,534,409
0
11
11,200
0
python,google-app-engine,google-cloud-datastore
The default location of the datastore for the platform you're running the app engine on is provided in the README that comes with the platform (at least, in the one for Linux). The README is in google_appengine_x.x.xx/google_appengine/README. This is what is says in the Linux'es one: --datastore_path=DS_FILE Path t...
0
1
0
0
2010-08-27T23:49:00.000
10
0
false
3,588,817
0
0
1
5
How can I find where my local development datastore is located? I am using the Python SDK and Linux.
Where is my local App Engine datastore?
8,814,627
2
11
11,200
0
python,google-app-engine,google-cloud-datastore
Since it's top question on Google search and I spent quite amount of time searching for an answer I'll say that on Windows/Java mix DB file called local_db.bin.
0
1
0
0
2010-08-27T23:49:00.000
10
0.039979
false
3,588,817
0
0
1
5
How can I find where my local development datastore is located? I am using the Python SDK and Linux.
Where is my local App Engine datastore?
23,270,307
4
11
11,200
0
python,google-app-engine,google-cloud-datastore
I use OS X Mavericks (10.9), Python 2.7.5, and Google App Engine SDK 1.9.3 (Python). None of the above worked for me, however, referencing @alsmola's answer, I executed sudo find / | grep datastore.db and found the file in /private/var/folders/vw/7w1zhkls4gb1wd8r160c36300000gn/T/appengine.YYYY.XXXXX/datastore.db (YYYY ...
0
1
0
0
2010-08-27T23:49:00.000
10
0.07983
false
3,588,817
0
0
1
5
How can I find where my local development datastore is located? I am using the Python SDK and Linux.
Bind arbitrary Python objects to CherryPy sessions
3,591,183
1
0
751
0
python,multithreading,session,cherrypy,asynchronous
You can create your own session type, derived from CherryPy's base session. Use its clean_up method to do your cleanup. Look at cherrypy/lib/sessions.py for details and sample session implementations.
0
0
0
0
2010-08-28T14:10:00.000
1
1.2
true
3,591,020
1
0
1
1
I'm using CherryPy to make a web-based frontend for SymPy that uses an asynchronous process library on the server side to allow for processing multiple requests at once without waiting for each one to complete. So as to allow for the frontend to function as expected, I am using one process for the entirety of each ses...
Does MongoDB have a Ruby Shell or Python Shell in addition to the Javascript shell?
3,597,947
1
1
472
0
python,ruby,mongodb,nosql
Your idea is fundamentally correct. I mean, as long as the language can handle command-line interpretation and support a MongoDB driver, then you could theoretically build a new MongoDB shell. However, I regularly read through the MongoDB mailing lists and I think that you're kind of on your own for this idea right now...
0
0
0
0
2010-08-29T18:07:00.000
2
0.099668
false
3,595,948
1
0
1
1
Or, does using Ruby's irb and then require 'mongo' and adding some Connect statement essentially act like a Ruby shell... it would be great if a Ruby shell can be possible which as convenient as the Javascript Shell.
PHP style inline tags for Python?
3,597,157
4
3
1,597
0
python,web-applications
There are a few php style python options out there. Mod_python used to ship with one, and spyce had an alternate implementation, but that modality is out of favor with pythonistas. Instead, use a templating language. Genshi and jinja2 are both popular, but there are lots to choose from. Since you are new to web program...
0
0
0
1
2010-08-30T00:19:00.000
4
0.197375
false
3,597,143
0
0
1
1
I'm just starting out learning python (for webapp usage) but I'm confused as to the best way for using it with html files and dynamic data. I know php has the <?php ?> tags which are great - does python have something like this or equivalent, if not how should I be doing it?
google-app-engine-django loading fixtures
3,605,268
1
1
312
0
python,django,google-app-engine,fixtures,django-fixtures
Turns out the issue was caused because I wasn't declaring my model correctly in models.py When using google-app-engine-django, each model should be a subclass of: appengine_django.db.BaseModel after fixing this, it works. I also needed to put a valid pk: value in my fixture.
0
1
0
0
2010-08-30T01:32:00.000
1
1.2
true
3,597,332
0
0
1
1
I'm having troubles loading fixtures on GAE with google-app-engine-django. I receive an error that says "DeserializationError: Invalid model identifier: 'fcl.User'" ./manage.py loaddata users I'm trying to load a fixture that has the following data: - model: fcl.User fields: firstname: test lastname: t...
django-admin.py launches IDE
3,597,670
3
0
193
0
python,django,django-admin
It sounds like you associated .py files with Komodo Edit instead of with python.exe. The simplest workaround is to type "python django-admin.py ..." to execute the admin. You can look in your Explorer options to change the association. There's a right-click menu option I think called "Open With..." that will let y...
0
0
0
0
2010-08-30T03:21:00.000
1
1.2
true
3,597,665
0
0
1
1
I just went to create a new django project and I typed django-admin.py startproject my_project into the command prompt and it opened the django-admin.py file in my ide (komodo edit). This happens every time I run this command in any form, even if I just try django-admin.py. Any ideas what's going on and how I fix it? ...
Automatic editor of XML (based on XSD scheme)
3,599,767
1
4
4,417
0
java,python,xml,xsd
Funny, I'm concerning myself with something similar. I'm building an editor (not really WYSIWYG, but it abstracts the DOM away) for the XMLs Civilization 4 (strategy game) usesu to store about everything. I thought about it for quite a while and built two prototypes (in Python), one of which looks promising so I will e...
0
0
1
0
2010-08-30T10:33:00.000
3
0.066568
false
3,599,569
0
0
1
1
Is there any approach to generate editor of an XML file basing on an XSD scheme? (It should be a Java or Python web based editor).
Google App Engine self.redirect() POST method
40,599,400
0
4
5,118
0
python,google-app-engine
You can pass parameters. Here is an example: Let's say you have a main page and you want to POST to '/success'. Usually, you may use this way: self.redirect('/sucess') But if you want to pass some parameters from the main page to /success page, like username for example, you can modify the code to this: self.redirect('...
0
1
0
0
2010-08-30T12:01:00.000
3
0
false
3,600,101
0
0
1
1
In GAE (Python), using the webApp Framework, calling self.redirect('some_url') redirects the user to that URL via the GET method. Is it possible to do a (redirect) via the POST method with some parameters as well? If possible, how? Thanks!
Can python's mechanize use localhost sites?
3,603,922
0
0
257
0
python,mechanize
Yes. It can use any URL available so long as it is reachable. Just make sure it's properly formatted!
0
1
0
1
2010-08-30T20:12:00.000
2
1.2
true
3,603,883
0
0
1
1
Can Mechanize access sites being locally hosted by Apache?
if you don't use scaffolding, is ruby on rails still good for rapid development?
3,604,329
4
5
396
0
python,ruby-on-rails,django
I have never seen Rails scaffold-generated view code used in a production app. The chances that it's going to create the look that you want is nearly zero. I use the generators for models and controllers all the time, as they are very useful. To your question of frameworks: If you know Python better, use Django. If you...
0
0
0
0
2010-08-30T21:02:00.000
3
1.2
true
3,604,205
0
0
1
2
If you take out the scaffolding feature where it creates the model/controller, and CRUD pages for you, is ruby on rails still any faster to market than say, django? It seems very similiar to be if you take away that step...(even though I believe django has similar auto-gen capabilities) I am reading the starting guide ...
if you don't use scaffolding, is ruby on rails still good for rapid development?
3,604,384
1
5
396
0
python,ruby-on-rails,django
Scaffolding is just a demo and learning feature. It's not intended for use in real site development. It's certainly not Rails' primary strength.
0
0
0
0
2010-08-30T21:02:00.000
3
0.066568
false
3,604,205
0
0
1
2
If you take out the scaffolding feature where it creates the model/controller, and CRUD pages for you, is ruby on rails still any faster to market than say, django? It seems very similiar to be if you take away that step...(even though I believe django has similar auto-gen capabilities) I am reading the starting guide ...
Does django with mongodb make migrations a thing of the past?
3,605,615
1
18
5,660
1
python,django,mongodb
What does the migration process look like with a non-relational db? Depends on if you need to update all the existing data or not. In many cases, you may not need to touch the old data, such as when adding a new optional field. If that field also has a default value, you may also not need to update the old documents,...
0
0
0
0
2010-08-30T22:01:00.000
3
0.066568
false
3,604,565
0
0
1
2
Since mongo doesn't have a schema, does that mean that we won't have to do migrations when we change the models? What does the migration process look like with a non-relational db?
Does django with mongodb make migrations a thing of the past?
3,604,687
2
18
5,660
1
python,django,mongodb
There is no silver bullet. Adding or removing fields is easier with non-relational db (just don't use unneeded fields or use new fields), renaming a field is easier with traditional db (you'll usually have to change a lot of data in case of field rename in schemaless db), data migration is on par - depending on task.
0
0
0
0
2010-08-30T22:01:00.000
3
0.132549
false
3,604,565
0
0
1
2
Since mongo doesn't have a schema, does that mean that we won't have to do migrations when we change the models? What does the migration process look like with a non-relational db?
Is there any python web app framework that provides database abstraction layer for SQL and NoSQL?
3,649,176
0
2
1,721
1
python,sql,database,google-app-engine,nosql
Thank you for all the answers. To summarize the answers, currently only web2py and Django supports this kind of abstraction. It is not about a SQL-NoSQL holy grail, using abstraction can make the apps more flexible. Lets assume that you started a project using NoSQL, and then later on you need to switch over to SQL. I...
0
0
0
0
2010-08-31T05:18:00.000
5
1.2
true
3,606,215
0
0
1
3
Is it even possible to create an abstraction layer that can accommodate relational and non-relational databases? The purpose of this layer is to minimize repetition and allows a web application to use any kind of database by just changing/modifying the code in one place (ie, the abstraction layer). The part that sits o...
Is there any python web app framework that provides database abstraction layer for SQL and NoSQL?
3,609,648
1
2
1,721
1
python,sql,database,google-app-engine,nosql
Regarding App Engine, all existing attempts limit you in some way (web2py doesn't support transactions or namespaces and probably many other stuff, for example). If you plan to work with GAE, use what GAE provides and forget looking for a SQL-NoSQL holy grail. Existing solutions are inevitably limited and affect perfor...
0
0
0
0
2010-08-31T05:18:00.000
5
0.039979
false
3,606,215
0
0
1
3
Is it even possible to create an abstraction layer that can accommodate relational and non-relational databases? The purpose of this layer is to minimize repetition and allows a web application to use any kind of database by just changing/modifying the code in one place (ie, the abstraction layer). The part that sits o...
Is there any python web app framework that provides database abstraction layer for SQL and NoSQL?
3,606,610
1
2
1,721
1
python,sql,database,google-app-engine,nosql
Yo may also check web2py, they support relational databases and GAE on the core.
0
0
0
0
2010-08-31T05:18:00.000
5
0.039979
false
3,606,215
0
0
1
3
Is it even possible to create an abstraction layer that can accommodate relational and non-relational databases? The purpose of this layer is to minimize repetition and allows a web application to use any kind of database by just changing/modifying the code in one place (ie, the abstraction layer). The part that sits o...
List query with, facebook friends in list?
3,611,807
1
2
442
0
python,google-app-engine
I would suggest the following: Make 'marked' entities child entities of the users who have marked them. Use a key name for the 'marked' entity that is based on the URL of the page marked To find friends who have marked a page, retrieve a list of friends, then generate the list of entity keys from the list of friends (...
0
1
0
0
2010-08-31T06:59:00.000
2
0.099668
false
3,606,669
0
0
1
1
In a python based facebook application on GAE, i want to check which friends of current user have "marked" a web page or not. For this i have to run as many DB queries as the number of friends (say 100) I fear this may run into "timeout" because of large no of queries. Google DOCs suggest that "list" queries run in par...
How to edit a StringListProperty value in Google App Engine?
3,608,338
2
0
220
0
python,google-app-engine
You need to edit it programmatically. Not all property types can be edited in the data viewer.
0
1
0
0
2010-08-31T08:12:00.000
1
1.2
true
3,607,201
0
0
1
1
I would like to edit the value of a StringListProperty variable on App Engine. Is it possible? I don't see any sign of editable field for a StringListProperty variable right inside the DataViewer panel.
Django pre_save signal: check if instance is created not updated, does kwargs['created'] (still) exist?
32,918,934
3
31
21,951
0
python,django,keyword-argument
Using instance._state.adding is the most logical approach, as you will be able to tell the model state exists or is new, regardless whether the primary key as been assigned or not.
0
0
0
0
2010-08-31T09:09:00.000
5
0.119427
false
3,607,573
0
0
1
2
I am using Django's pre_save signal to implement auto_now_add. There is a lot of discussion on the internet on why you should or shouldn't implement it yourself. I do not appreciate comments on this. Neither on whether I should be rewriting the save function (I have a lot of models that use auto_now_add so using signal...
Django pre_save signal: check if instance is created not updated, does kwargs['created'] (still) exist?
12,132,343
57
31
21,951
0
python,django,keyword-argument
Primary key attribute usually assigned by the database when the instance saved first time. So you can use something like if instance.pk is None
0
0
0
0
2010-08-31T09:09:00.000
5
1
false
3,607,573
0
0
1
2
I am using Django's pre_save signal to implement auto_now_add. There is a lot of discussion on the internet on why you should or shouldn't implement it yourself. I do not appreciate comments on this. Neither on whether I should be rewriting the save function (I have a lot of models that use auto_now_add so using signal...
pydev doesn't find python library after installation
14,501,729
3
28
12,392
0
python,eclipse,pydev
I've found that closing the project and reopening (after rescanning the interpreter) works for me.
0
1
0
0
2010-08-31T14:59:00.000
4
0.148885
false
3,610,272
1
0
1
4
I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install and it got installed in my site-packages directory C:\Python26\Lib\site-packages. I can successfully import it in the python shell with import treebeard. However PyDev complains that it cannot resolve it when I try to import it....
pydev doesn't find python library after installation
3,610,311
37
28
12,392
0
python,eclipse,pydev
Pydev doesn't automatically rescan the site-packages folder. You need to go to Preferences-> Interpreter -> Python and click apply to make it scan again.
0
1
0
0
2010-08-31T14:59:00.000
4
1.2
true
3,610,272
1
0
1
4
I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install and it got installed in my site-packages directory C:\Python26\Lib\site-packages. I can successfully import it in the python shell with import treebeard. However PyDev complains that it cannot resolve it when I try to import it....
pydev doesn't find python library after installation
43,832,437
0
28
12,392
0
python,eclipse,pydev
Well, I followed this sequence to make it work: 1) I installed the desired library by using pip install 2) I went in Eclipse to: Window --> Preferences --> Pydev --> Interpreters --> Python Interpreter, and clicked "Quick Auto-Config". It made the trick.
0
1
0
0
2010-08-31T14:59:00.000
4
0
false
3,610,272
1
0
1
4
I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install and it got installed in my site-packages directory C:\Python26\Lib\site-packages. I can successfully import it in the python shell with import treebeard. However PyDev complains that it cannot resolve it when I try to import it....
pydev doesn't find python library after installation
6,144,832
14
28
12,392
0
python,eclipse,pydev
I also faced the same error when i had installed a new package.i'm using eclipse Helios. Even after applying and re scanning the folder it was NOT detecting the new packages. So finally i clicked on the "Click here to configure a interpreter not listed" listed and deleted the already selected interpreter and used the a...
0
1
0
0
2010-08-31T14:59:00.000
4
1
false
3,610,272
1
0
1
4
I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install and it got installed in my site-packages directory C:\Python26\Lib\site-packages. I can successfully import it in the python shell with import treebeard. However PyDev complains that it cannot resolve it when I try to import it....
Is it possible to memcache a json result in App Engine?
3,610,930
7
2
717
0
python,json,google-app-engine
JSON is just text, so yes, you can store it in memcache.
0
1
0
0
2010-08-31T15:59:00.000
1
1.2
true
3,610,854
0
0
1
1
I think my question is already clear enough, but to make it even more clear i will illustrate it with my example. I'm currently returning many json every request, which I would like to cache in some way. I thought memcache would be great, but I only see that they use memcache for caching queries.
how do I return all memcached values in Google App Engine?
3,611,908
0
4
3,350
0
python,google-app-engine,memcached,python-memcached
as in comments above, I guess I could stick all data in a single memcache entry with a known key. Still for non-static data there are scenarios where it would be useful.
0
1
0
0
2010-08-31T17:59:00.000
3
0
false
3,611,830
0
0
1
2
I want to use all the data in my python app engine memcache. I do not know the keys in advance. How do I go about getting all data?
how do I return all memcached values in Google App Engine?
4,524,611
1
4
3,350
0
python,google-app-engine,memcached,python-memcached
I am using a 'well known key' called "config" where I store a list of all other keys and use that to enumerate the rest of the items.
0
1
0
0
2010-08-31T17:59:00.000
3
0.066568
false
3,611,830
0
0
1
2
I want to use all the data in my python app engine memcache. I do not know the keys in advance. How do I go about getting all data?
IronPython - What kind of database is useable
3,616,111
0
0
495
1
database,ironpython
good That is highly subjective without far more detailed requirements. You should be able to use any database with .NET support, whether out of the box (notably SQL Server Express and Compact) or installed separately (SQL Server-other editions, DB2, MySQL, Oracle, ...). Ten select commands per second should be easily...
0
0
0
0
2010-09-01T08:04:00.000
2
0
false
3,616,078
0
0
1
1
i'm using IronPython 2.6 for .Net4 to build an GUI logging application. This application received data via serialport and stores these data in an sqlite3 database while showing the last 100 received items in an listview. The listview gathers it's data via an SQL SELECT from the database every 100ms. It only querys data...
Is it possible to get a list of all versions of an app?
3,625,552
4
1
91
0
python,google-app-engine,version-control
No, there's no way to get a list of app versions from inside an app.
0
1
0
0
2010-09-01T21:07:00.000
1
1.2
true
3,622,165
0
0
1
1
the title speaks for itself. I play with GAE and some of my apps have versions like (1,2,3,4 and dev). So, is there a way to get all of them, so I could use it in my app to generate links to different versions ?
CSS Templating system for Django / Python?
3,623,235
8
6
995
0
python,css,django,dynamic,django-templates
The Django templating system can be used for any text you like. It's used for HTML most of the time, but it could also be used to create CSS. The CSS reference in your HTML can be to a dynamic URL instead of to a static file, and the view function can create whatever context you like, then a .css template file can cr...
0
0
0
0
2010-09-02T00:36:00.000
1
1.2
true
3,623,070
0
0
1
1
I'm wondering if there is anything like Django's HTML templating system, for for CSS.. my searches on this aren't turning up anything of use. I am aware of things like SASS and CleverCSS but, as far as I can tell, these still don't solve my issue as I want to dynamically generate a CSS file based on certain conditions,...
Is there a way to save a captcha image and view it later in python?
3,623,274
2
0
1,432
0
python,web-applications,firebug,tkinter,urllib2
Of course the captcha's served by a page which will serve a new one each time (if it was repeated, then once it was solved for one fake userid, a spammer could automatically make a million!). I think you need some "screenshot" functionality to capture the image you want -- there is no cross-platform way to invoke such...
0
0
1
0
2010-09-02T00:38:00.000
1
0.379949
false
3,623,077
0
0
1
1
I am scripting in python for some web automation. I know i can not automate captchas but here is what i want to do: I want to automate everything i can up to the captcha. When i open the page (usuing urllib2) and parse it to find that it contains a captcha, i want to open the captcha using Tkinter. Now i know that i wi...
Python - How do I save a file delivered from html?
3,628,497
2
1
383
0
python,html,download,urllib
If you're getting back a thank you page, the URL to the file is likely to be in there somewhere. Look for <meta http-equiv="refresh"> or JavaScript redirects. Ctrl+F'ing the page for the file name might also help. Some sites may have extra protection in, so if you can't figure it out, post a link to the site, just in c...
0
0
1
0
2010-09-02T15:07:00.000
1
1.2
true
3,628,454
0
0
1
1
I have a form which when submitted by a user redirects to a thank you page and the file chosen for download begins to download. How can I save this file using python? I can use python's urllib.urlopen to open the url to post to but the html returned is the thank you page, which I suspected it would be. Is there a solut...
Why is mod_python running entire django stack from beginning with each request?
3,632,574
0
1
68
0
django,mod-python
It loads Django once per httpd process. Since multiple processes start (each child being a process), multiple instances of Django are started.
0
0
0
0
2010-09-03T01:47:00.000
2
0
false
3,632,537
0
0
1
2
My understanding is that mod_python loads the python process into apache, avoiding the overhead of doing that on each call. My expectation was that this would mean that my django stack would also only be loaded once. What I am observing, however, is that every request is running the entire django stack from the beginn...
Why is mod_python running entire django stack from beginning with each request?
3,632,878
2
1
68
0
django,mod-python
Apache on UNIX systems is a multiprocess system as pointed out by someone else. Also make sure the MaxRequestsPerChild hasn't been set to be 1 in Apache configuration for some reason. Ideally that directive should be set to 0, meaning keep processes around and not recycle them based on number of requests.
0
0
0
0
2010-09-03T01:47:00.000
2
1.2
true
3,632,537
0
0
1
2
My understanding is that mod_python loads the python process into apache, avoiding the overhead of doing that on each call. My expectation was that this would mean that my django stack would also only be loaded once. What I am observing, however, is that every request is running the entire django stack from the beginn...
Strategies for Encryption with Django + Postgres?
3,636,320
1
22
14,180
0
python,django,postgresql,encryption
What are you protecting against? If attacker would get access to your DB/filesystem, he would find how you decrypt data & keys. Hiding your encription key is not an easy task (and rarely implemented in "usual" applications). I would spend more time on protecting the server and fixing all general security issues.
0
0
0
0
2010-09-03T13:38:00.000
4
1.2
true
3,636,286
0
0
1
1
I'm going to be storing a few sensitive pieces of information (SSN, Bank Accounts, etc) so they'll obviously need to be encrypted. What strategies do you recommend? Should I do all the encryption/decryption in the web app itself? Should I use something like pgcrypto and have the conversions done on the DB side? Some...
What is the best way of running shell commands from a web based interface?
3,637,544
1
8
4,016
0
python,ruby-on-rails,ruby,django,shell
I'm not sure if it's what you want, but there are some web based ssh clients out there. If you care about security and really just want dynamic feedback, you could look into comet or just have a frame with its own http session that doesn't end until it's done printing.
0
1
0
1
2010-09-03T15:59:00.000
7
0.028564
false
3,637,503
0
0
1
1
Imagine a web application that allows a logged in user to run a shell command on the web server at the press of a button. This is relatively simple in most languages via some standard library os tools. But if that command is long running you don't want your UI to hang. Again this is relatively easy to deal with using s...
Error Handling CRM 4 Webservice
3,639,310
1
0
211
0
python,web-services,dynamics-crm,dynamics-crm-4
Catch SoapException and take a look at Detail property. You'll find everything about the error in there.
0
0
0
0
2010-09-03T16:11:00.000
1
1.2
true
3,637,579
0
0
1
1
What is the best way to trap errors/exceptions with the CRM 4 Web service. Is there a way to get more detailed error messages from the web service? There is a custom application that creates orders and when the get a error message from the web service it is not very details or useful. Is there a better way to get mo...
How to parse a web use javascript to load .html by Python?
3,637,740
0
0
862
0
javascript,python
How does the search page work? If it loads anything using Ajax, you could do some basic reverse engineering and find the URLs involved using Firebug's Net panel or Wireshark and then use urllib2 to load those. If it's more complicated than that, you could simulate the actions JS performs manually without loading and in...
0
0
1
0
2010-09-03T16:26:00.000
2
0
false
3,637,681
0
0
1
1
I'm using Python to parse an auction site. If I use browser to open this site, it will go to a loading page, then jump to the search result page automatically. If I use urllib2 to open the webpage, the read() method only return the loading page. Is there any python package could wait until all contents are loaded then ...
How to efficiently filter a string against a long list of words in Python/Django?
3,644,860
1
9
4,500
0
python,django,string,nlp
If some false positives/negatives are ok, search for bloom filter on wikipedia. If not look at CDB, (yum install tinycdb, in Fedora -- no python API atm).
0
0
0
0
2010-09-04T06:25:00.000
6
0.033321
false
3,641,152
1
0
1
2
Stackoverflow implemented its "Related Questions" feature by taking the title of the current question being asked and removing from it the 10,000 most common English words according to Google. The remaining words are then submitted as a fulltext search to find related questions. I want to do something similar in my Dja...
How to efficiently filter a string against a long list of words in Python/Django?
3,641,324
2
9
4,500
0
python,django,string,nlp
I think a much simpler solution and still reasonably fast is to use sqlite and regular expressions. Put the long list of words in an sqlite table and build a b-tree index. This gives you log(n) time exists queries. Split the smaller string with a regular expression and loop over the words running an exists query for ...
0
0
0
0
2010-09-04T06:25:00.000
6
0.066568
false
3,641,152
1
0
1
2
Stackoverflow implemented its "Related Questions" feature by taking the title of the current question being asked and removing from it the 10,000 most common English words according to Google. The remaining words are then submitted as a fulltext search to find related questions. I want to do something similar in my Dja...
django user model and custom primary key field
3,641,584
7
9
16,452
0
python,django
this doesn't seem to be possible without changing the User model source code. Correct. Unless you are willing to change (or replace) User there isn't a way. One (tenuous, hackish) way to do this would be to attach an UserProfile for each User instance. Each User should have exactly one UserProfile. You can then add yo...
0
0
0
0
2010-09-04T08:35:00.000
3
1.2
true
3,641,483
0
0
1
1
Django by default makes a primary key field on each model named "id", with a type of AutoField. On my models, I'm overriding this to use a custom UUIDField as the primary key by using the "primary_key" attribute. I would also like the User model in django.contrib.auth to have a UUIDField as the primary key, but this do...
Django, Turbo Gears, Web2Py, which is better for what?
4,338,367
6
20
15,591
0
python,django,frameworks,web2py,turbogears
I have to say as not particularly skilled developer, the speed at which I have been able to create using web2py has blown my mind. In large part due to the amazing community and the core value Massimo has of making the framework accessible. When I started I had written 0 lines of code in Python Never heard of web2py I'...
0
0
0
0
2010-09-05T12:11:00.000
7
1
false
3,646,002
0
0
1
3
I got a project in mind that makes it worth to finally take the plunge into programming. After reading a lot of stuff, here and elsewhere, I'm set on making Python the one I learn for now, over C# or java. What convinced me the most was actually Paul Graham's excursions on programming languages and Lisp, though Arc is...
Django, Turbo Gears, Web2Py, which is better for what?
15,945,257
2
20
15,591
0
python,django,frameworks,web2py,turbogears
I've used both web2py and RoR extensively, and while RoR has gotten a lot of popularity and support in the past few years, web2py is simpler, cleaner, less "magical", and yet also offers more (useful) out-of-the-box functionality. I'd say that web2py has more potential than RoR, but it is a relatively new framework and...
0
0
0
0
2010-09-05T12:11:00.000
7
0.057081
false
3,646,002
0
0
1
3
I got a project in mind that makes it worth to finally take the plunge into programming. After reading a lot of stuff, here and elsewhere, I'm set on making Python the one I learn for now, over C# or java. What convinced me the most was actually Paul Graham's excursions on programming languages and Lisp, though Arc is...
Django, Turbo Gears, Web2Py, which is better for what?
3,757,753
2
20
15,591
0
python,django,frameworks,web2py,turbogears
Django: Heard it has the best administrative interface. But uses it's own ORM, i.e. doesn't use SQL-Alchemy. Web2py: Didn't research this. Turbogears2: Uses SQL-Alchemy by default, uses Catwalk for admin interface, but documentation isn't as great. I chose Turbogears2 because it uses popular components, so I didn't h...
0
0
0
0
2010-09-05T12:11:00.000
7
0.057081
false
3,646,002
0
0
1
3
I got a project in mind that makes it worth to finally take the plunge into programming. After reading a lot of stuff, here and elsewhere, I'm set on making Python the one I learn for now, over C# or java. What convinced me the most was actually Paul Graham's excursions on programming languages and Lisp, though Arc is...