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
Whats the best way to extend Anonymous User in Django?
2,809,562
2
14
5,125
0
python,django,authentication
I'm starting to think a middleware is probably the easiest solution that checks the request.user class and if is AnonymousUser then replaces it with a subclassed AnonymousUser that has the extra properties. That sound reasonable?
0
0
0
0
2010-05-11T07:15:00.000
6
0.066568
false
2,808,723
0
0
1
2
I want to make my User objects all have the same base behaviour and to do so I need to add a couple of methods / properties to Anonymous User. I've already subclassed User to make richer user objects but I was wondering if anyone has done the same for Anonymous User? And if there are any preferred ways of doing it!
Reverse Engineer a .pyo python file
2,814,647
0
3
7,406
0
python,disassembly
This is Brian, the question asker. I have completed what I needed to do by just trial and error and hex editing, hex edit...then convert the source...see what I changed..until I finally narrowed down what I was looking for. The constants (Admin IDs) were in the hex file as converted hex (obviously) but backwards. I sti...
0
1
0
0
2010-05-11T09:20:00.000
5
0
false
2,809,578
0
0
1
3
I have 2 .pyo python files that I can convert to .py source files, but they don't compile perfectly as hinted by decompyle's verify. Therefore looking at the source code, I can tell that config.pyo simply had variables in in an array: ADMIN_USERIDS = [116901, 141, 349244, 39, 1159488] I would like to take the orig...
Reverse Engineer a .pyo python file
2,809,684
0
3
7,406
0
python,disassembly
Convert the .pyo files to .py and then edit the .py and then run python on the .py files. Python will regenerate the .pyo files Don't edit the pyo I don't know the python bytecode but I would doubt that the strings == or 1= would appear in the .pyo file Although a much better way is get the original .py files and use ...
0
1
0
0
2010-05-11T09:20:00.000
5
0
false
2,809,578
0
0
1
3
I have 2 .pyo python files that I can convert to .py source files, but they don't compile perfectly as hinted by decompyle's verify. Therefore looking at the source code, I can tell that config.pyo simply had variables in in an array: ADMIN_USERIDS = [116901, 141, 349244, 39, 1159488] I would like to take the orig...
Reverse Engineer a .pyo python file
3,895,279
0
3
7,406
0
python,disassembly
IDA up to 6.0 doesn't have a .pyc decompilation module.
0
1
0
0
2010-05-11T09:20:00.000
5
0
false
2,809,578
0
0
1
3
I have 2 .pyo python files that I can convert to .py source files, but they don't compile perfectly as hinted by decompyle's verify. Therefore looking at the source code, I can tell that config.pyo simply had variables in in an array: ADMIN_USERIDS = [116901, 141, 349244, 39, 1159488] I would like to take the orig...
PyDev and Django: Autocomplete not detecting Django?
44,662,580
0
4
3,244
0
python,django,eclipse,ide,pydev
Navigate to Window->Preferences->PyDev->Interpreters–>Python Interpreter From Libraries (System PYTHONPATH), make sure ..lib/site-packages is listed. Remove any mention of lib/site-packages/Django
0
0
0
0
2010-05-11T23:15:00.000
2
0
false
2,815,094
0
0
1
2
I'm using PyDev with Django. The autocomplete works nicely in the shell - I start typing, and it suggests completions. However, this doesn't work in the main code editor window. How can I fix this? I'm using: Eclipse build #20100218-1602 PyDev 1.5.6 Eclipse IDE for Java Devs 1.2.2
PyDev and Django: Autocomplete not detecting Django?
2,816,189
8
4
3,244
0
python,django,eclipse,ide,pydev
You might need to set the editor code completion settings. They are under: Window->Preferences->PyDev->Editor->Code Completion You might also need to add the Django install or your Django project to your path. You can set this under: Window->Preferences->PyDev->Interpreter - Python Hope this helps.
0
0
0
0
2010-05-11T23:15:00.000
2
1.2
true
2,815,094
0
0
1
2
I'm using PyDev with Django. The autocomplete works nicely in the shell - I start typing, and it suggests completions. However, this doesn't work in the main code editor window. How can I fix this? I'm using: Eclipse build #20100218-1602 PyDev 1.5.6 Eclipse IDE for Java Devs 1.2.2
Eval IronPython Scripts during ASP.NET Web Request; Static Engine or Not
2,820,043
3
2
310
0
asp.net,asp.net-mvc,ironpython,dynamic-language-runtime
I've just started using IronPython as extensibility point in my ASP.NET MVC aplication. I have one ipy engine (in static property) and for each request I create new scope and execute the script in that scope. Each scope should be independent on other scopes, no locking is needed. If I run into issues, I'll post it her...
0
0
0
0
2010-05-12T13:21:00.000
1
1.2
true
2,819,134
0
0
1
1
I would like to create an ASP.NET MVC web application which has extensible logic that does not require a re-build. I was thinking of creating a filter which had an instance of the IronPython engine. What I would like to know is: how much overhead is there in creating a new engine during each web request, and would it b...
How do you extend the Site model in django?
2,824,112
9
12
4,589
0
python,django,django-models
I just used my own subclass of Site and created a custom admin for it. Basically, when you subclass a model in django it creates FK pointing to parent model and allows to access parent model's fields transparently- the same way you'd access parent class attributes in pyhon. Built in admin won't suffer in any way, but...
0
0
0
0
2010-05-12T18:33:00.000
7
1.2
true
2,821,702
0
0
1
2
What is the best approach to extending the Site model in django? Creating a new model and ForeignKey the Site or there another approach that allows me to subclass the Site model? I prefer subclassing, because relationally I'm more comfortable, but I'm concerned for the impact it will have with the built-in Admin.
How do you extend the Site model in django?
45,414,164
3
12
4,589
0
python,django,django-models
You can have another model like SiteProfile which has a OneToOne relation with Site.
0
0
0
0
2010-05-12T18:33:00.000
7
0.085505
false
2,821,702
0
0
1
2
What is the best approach to extending the Site model in django? Creating a new model and ForeignKey the Site or there another approach that allows me to subclass the Site model? I prefer subclassing, because relationally I'm more comfortable, but I'm concerned for the impact it will have with the built-in Admin.
Python templates for huge HTML/XML
2,897,474
1
4
1,055
0
python,templates
You don't need a streaming templating engine - I do this all the time, and long before you run into anything vaguely heavy server-side, the browser will start to choke. Rendering a 10000 row table will peg the CPU for several seconds in pretty much any browser; scrolling it will be bothersomely choppy in chrome, and t...
0
0
1
0
2010-05-14T09:02:00.000
5
0.039979
false
2,832,915
0
0
1
2
Recently I needed to generate a huge HTML page containing a report with several thousand row table. And, obviously, I did not want to build the whole HTML (or the underlying tree) in memory. As result, I built the page with the old good string interpolation, but I do not like the solution. Thus, I wonder whether there ...
Python templates for huge HTML/XML
2,832,958
2
4
1,055
0
python,templates
It'd be more user-friendly (assuming they have javascript enabled) to build the table via javascript by using e.g. a jQuery plugin which allows automatical loading of contents as soon as you scroll down. Then only few rows are loaded initially and when the user scrolls down more rows are loaded on demand. If that's not...
0
0
1
0
2010-05-14T09:02:00.000
5
0.07983
false
2,832,915
0
0
1
2
Recently I needed to generate a huge HTML page containing a report with several thousand row table. And, obviously, I did not want to build the whole HTML (or the underlying tree) in memory. As result, I built the page with the old good string interpolation, but I do not like the solution. Thus, I wonder whether there ...
Group Chat XMPP with Google App Engine
2,836,255
3
3
1,577
0
java,python,google-app-engine,xmpp
No. App Engine apps can only directly handle HTTP requests - you can't run arbitrary servers on App Engine.
0
1
0
0
2010-05-14T15:44:00.000
1
1.2
true
2,835,472
0
0
1
1
Google App Engine has a great XMPP service built in. One of the few limitations it has is that it doesn't support receiving messages from a group chat. That's the one thing I want to do with it. :( Can I run a 3rd party XMPP/Jabber server on App Engine that supports group chat? If so, which one?
tail -f in a webbrowser
2,837,019
0
8
12,000
0
javascript,jquery,python,django,console
Why don't you output the data to a HTML file? You could run a cron job to run your script which would in turn spurt out a HTML file which could be accesses from the browser.
0
0
0
0
2010-05-14T19:01:00.000
4
0
false
2,836,838
0
0
1
1
I've created a Python script that monitors a logfile for changes (like tail -f) and displays it on a console. I would like to access the output of the Python script in a webbrowser. What would I need to create this? I was thinking about using Django and jQuery. Any tips or examples are greatly appreciated.
What are the most valuable certification available for Programming?
2,840,048
0
4
3,805
0
php,javascript,python,programming-languages,certificate
For linux (implies perl/bash) Comptia+ Red Hat Certified Engineer
0
0
0
1
2010-05-15T09:53:00.000
5
0
false
2,839,663
0
0
1
3
I would like to know what are the certificates available for programming, like Zend for PHP SUN Certification for java What are the others? Javascript? C++? Python? etc... Please give me some suggestion for other available certifications.
What are the most valuable certification available for Programming?
2,839,684
16
4
3,805
0
php,javascript,python,programming-languages,certificate
Most valuable thing for a developer: being able to show you can convert requirements into working and maintainable software. Certifications generally are worth very little, except in a few niches that demand them (or at least ask, until they give up and get someone who puts practice before pieces of paper).
0
0
0
1
2010-05-15T09:53:00.000
5
1
false
2,839,663
0
0
1
3
I would like to know what are the certificates available for programming, like Zend for PHP SUN Certification for java What are the others? Javascript? C++? Python? etc... Please give me some suggestion for other available certifications.
What are the most valuable certification available for Programming?
2,839,748
7
4
3,805
0
php,javascript,python,programming-languages,certificate
Let me be bold and say that your Experience is your best certificate.
0
0
0
1
2010-05-15T09:53:00.000
5
1
false
2,839,663
0
0
1
3
I would like to know what are the certificates available for programming, like Zend for PHP SUN Certification for java What are the others? Javascript? C++? Python? etc... Please give me some suggestion for other available certifications.
Prevent web2py from caching?
2,840,650
5
5
1,547
0
python,caching,web2py
web2py does cache your code, except for Google App Engine (for speed). That is not the problem. If you you edit code in models, views or controllers, you see the effect immediately. The problem may be modules; if you edit code in modules you will not see the effect immediately, unless you import them with local_import(...
0
0
0
1
2010-05-15T13:07:00.000
2
0.462117
false
2,840,201
0
0
1
1
I'm working with web2py and for some reason web2py seems to fail to notice when code has changed in certain cases. I can't really narrow it down, but from time to time changes in the code are not reflected, web2py obviously has the old version cached somewhere. The only thing that helps is quitting web2py and restarti...
Django: What's the correct way to get the requesting IP address?
2,840,883
1
0
748
0
python,django
I use the middleware because this way I don't have to change the app's code. If I want to migrate my app to other hosting servers, I only need to modify the middleware without affecting other parts. Security is not an issue because on WebFaction you can trust what comes in from the front end server.
0
0
1
0
2010-05-15T13:46:00.000
2
1.2
true
2,840,329
0
0
1
1
I'm trying to develop an app using Django 1.1 on Webfaction. I'd like to get the IP address of the incoming request, but when I use request.META['REMOTE_ADDR'] it returns 127.0.0.1. There seems to be a number of different ways of getting the address, such as using HTTP_X_FORWARDED_FOR or plugging in some middleware ca...
Creating a spider using Scrapy, Spider generation error
2,843,118
0
2
2,058
0
python,web-crawler,scrapy
Set PYTHONPATH environment variable to python26/scripts.
0
0
0
0
2010-05-16T04:52:00.000
3
0
false
2,842,629
0
0
1
3
I just downloaded Scrapy (web crawler) on Windows 32 and have just created a new project folder using the "scrapy-ctl.py startproject dmoz" command in dos. I then proceeded to created the first spider using the command: scrapy-ctl.py genspider myspider myspdier-domain.com but it did not work and returns the error: Erro...
Creating a spider using Scrapy, Spider generation error
3,312,950
1
2
2,058
0
python,web-crawler,scrapy
use the scrapy-ctl.py in the project's dir. that script will know about that project's settings. the main scrapy-ctl.py doesn't have a clue about that specific project's settings.
0
0
0
0
2010-05-16T04:52:00.000
3
0.066568
false
2,842,629
0
0
1
3
I just downloaded Scrapy (web crawler) on Windows 32 and have just created a new project folder using the "scrapy-ctl.py startproject dmoz" command in dos. I then proceeded to created the first spider using the command: scrapy-ctl.py genspider myspider myspdier-domain.com but it did not work and returns the error: Erro...
Creating a spider using Scrapy, Spider generation error
2,842,952
2
2
2,058
0
python,web-crawler,scrapy
There is a difference between PATH and PYTHON_PATH. Is your PYTHON_PATH set correctly? This path is where python looks to include packages / modules.
0
0
0
0
2010-05-16T04:52:00.000
3
1.2
true
2,842,629
0
0
1
3
I just downloaded Scrapy (web crawler) on Windows 32 and have just created a new project folder using the "scrapy-ctl.py startproject dmoz" command in dos. I then proceeded to created the first spider using the command: scrapy-ctl.py genspider myspider myspdier-domain.com but it did not work and returns the error: Erro...
Java or Python distributed compute job (on a student budget)?
2,844,449
1
5
334
0
java,python,nlp,hadoop,nltk
no actual answers; i'd have put this as a comment but on this site you're forced to only answer if you're still a noob if it's genuinely as parallel as that, and it's only a couple of computers, could you not split the dataset up manually ahead of time? have you confirmed that there isn't going to be a firewall or simi...
0
0
0
0
2010-05-16T14:28:00.000
4
0.049958
false
2,844,105
0
0
1
3
I have a large dataset (c. 40G) that I want to use for some NLP (largely embarrassingly parallel) over a couple of computers in the lab, to which i do not have root access, and only 1G of user space. I experimented with hadoop, but of course this was dead in the water-- the data is stored on an external usb hard drive,...
Java or Python distributed compute job (on a student budget)?
2,844,538
3
5
334
0
java,python,nlp,hadoop,nltk
Speak with the IT dept at your school (especially if you are in college), if it is for an assignment or research I bet they would be more than happy to give you more disk space.
0
0
0
0
2010-05-16T14:28:00.000
4
0.148885
false
2,844,105
0
0
1
3
I have a large dataset (c. 40G) that I want to use for some NLP (largely embarrassingly parallel) over a couple of computers in the lab, to which i do not have root access, and only 1G of user space. I experimented with hadoop, but of course this was dead in the water-- the data is stored on an external usb hard drive,...
Java or Python distributed compute job (on a student budget)?
2,847,116
0
5
334
0
java,python,nlp,hadoop,nltk
If more resources in your computing department are a no go, you're going to have to consider breaking down your data set into manageable chunks before you do any work on it, ad reduce the results down into a meaningful set. More resources from IT would be the way to go. Good luck ! Ben
0
0
0
0
2010-05-16T14:28:00.000
4
0
false
2,844,105
0
0
1
3
I have a large dataset (c. 40G) that I want to use for some NLP (largely embarrassingly parallel) over a couple of computers in the lab, to which i do not have root access, and only 1G of user space. I experimented with hadoop, but of course this was dead in the water-- the data is stored on an external usb hard drive,...
Where does GoogleAppEngineLauncher keep the local log files?
20,735,387
5
9
7,373
0
python,google-app-engine,logging
Many of these answers are now outdated. :) In today's devappserver, use --logs_path=LOGS_FILE if you want to log to a file (in its native sqlite database format). Or as suggested in a comment, simply pipe the output if that's too complicated. Since there's a log API, it actually now stores log entries in a file in --st...
0
1
0
0
2010-05-16T17:06:00.000
4
0.244919
false
2,844,635
0
0
1
1
GoogleAppEngineLauncher can display the local log file of my app while it is running on my Mac during development. However, I can't change the font size there so I would like to use the tail command to watch the log file myself. It's a shame but I can't find the log files. They are not under /var/log/, ~/Library/Logs o...
Stack recommendations for small/medium-sized web application in Python
2,847,694
2
1
368
0
python,wsgi
You can run an django application in 20 mb memory easily. probably a django application will use less memory than 20mb. I want to advise you to check webpy and cherrypy but I'm big fan of django. if you have 20 mb memory to run application, django will give you everythig it has.
0
0
0
0
2010-05-17T08:31:00.000
6
1.2
true
2,847,593
0
0
1
1
I'm looking for some recommendations for a python web application. We have some memory restrictions and we try to keep it small and lean. We thought about using WSGI (and a python webserver) and build the rest ourself. We already have a template engine we'd like to use, but we are open for some suggestions regarding th...
Suggestions for a pluggable task framework in Django
2,849,724
0
0
160
0
python,django,plugins
I would make an app with a very abstract definition of a Task model. The Task model might contain properties for: the input arguments, the function to run, the time that the task was submitted, the time that the task has been actually running, and the result (which would be something like a singleton Task.NotFinis...
0
0
0
0
2010-05-17T12:48:00.000
1
0
false
2,849,118
0
0
1
1
I am developing a website which is aimed at being a GUI for several image processing algorithms (referred to as 'tasks'). At the moment, only one of these algorithms is finished, but there are more to come (which will have a similar, but not quite the same, workflow) Basically, the algorithm works as follows (not that ...
Producing a static HTML site from XML content
2,850,582
1
3
1,365
0
python,html,xml,ajax,xslt
I would go with the PHP option. The reason being is that when the XML changes your site content "should" automatically change without you having to touch your PHP code. Creating a Python script to generate lots of static pages just seems like a bad idea to me and with javascript you will have your cross-browser headac...
0
0
1
0
2010-05-17T15:47:00.000
4
0.049958
false
2,850,534
0
0
1
3
I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I've considered are listed here: I'm not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into...
Producing a static HTML site from XML content
2,850,603
2
3
1,365
0
python,html,xml,ajax,xslt
I would go with the XSLT option, controlled via parameters to generate different pages from the same XML source if needed. It's really the tool made for XML transformations.
0
0
1
0
2010-05-17T15:47:00.000
4
0.099668
false
2,850,534
0
0
1
3
I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I've considered are listed here: I'm not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into...
Producing a static HTML site from XML content
2,850,635
0
3
1,365
0
python,html,xml,ajax,xslt
Go with what you are most comfortable with. If it's straightforward you could use (for example) php to generate a page and then use a command line script (in python or php) to create cached files for you.
0
0
1
0
2010-05-17T15:47:00.000
4
0
false
2,850,534
0
0
1
3
I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I've considered are listed here: I'm not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into...
Using virtualenv to install different versions of same package
2,851,741
2
1
381
0
python,django,virtualenv
If you have easy_install, or better yet pip installed, should be as easy as: easy_install/pip install virtualenv mkdir django1.2 virtualenv django1.2 This will put the python binary in a bin folder inside the django1.2 folder. Just use that python binary, and you've got a nice little self-contained environment. You c...
0
0
0
0
2010-05-17T18:21:00.000
2
1.2
true
2,851,632
1
0
1
1
Since I have Django 1.1x on my Debian setup - how can I use virtualenv or similar and not have it mess up my system's default django version which in turn would break all my sites? Detailed instructions or a great tutorial link would very much be appreciated - please don't offer vague advice since I'm still a noob. Cur...
Simple python mvc framework
2,852,087
3
2
4,528
0
python,frameworks
Checkout web2py. Seems to be about the simplest python based webserver I can think of. Django might do, it's hefty, but it comes with it's own development server.
0
0
0
0
2010-05-17T19:20:00.000
4
0.148885
false
2,852,056
0
0
1
2
Is there any lightweight mvc webframework which is not necessary to install to the server? I need something simple, that i could just copy to the shared hosting. And it must handle urls other that localhost/test.py, something like this localhost/Blog/test
Simple python mvc framework
2,853,387
2
2
4,528
0
python,frameworks
web2py includes everything (ssl-enabled web server, sqlite sql based transaction safe database, web based Integrated Development Enviroment, web based database interface) in one package. The web2py binaries for windows and mac also include Python itself. web2py does not require configuration or installation and can run...
0
0
0
0
2010-05-17T19:20:00.000
4
0.099668
false
2,852,056
0
0
1
2
Is there any lightweight mvc webframework which is not necessary to install to the server? I need something simple, that i could just copy to the shared hosting. And it must handle urls other that localhost/test.py, something like this localhost/Blog/test
deployment public keys
2,857,218
1
0
212
0
python,fabric
This is what ssh-copy-id is for. It deploys your public key onto a machine for you. Key management isn't something I'd suggest putting into code/VCS. Each user needs to setup their keys so that the local ssh client knows to use them. We use Fabric as well, but it only uses the key that the ssh config is already telling...
0
0
0
1
2010-05-18T08:34:00.000
1
0.197375
false
2,855,650
0
0
1
1
How do you guys deploy your code on your servers? I am using Fabric and Python and I would like a more automated way of pulling code from the repository through the use of public keys, but without any ops or manual intervention to set up the public keys. Are you storing them in the code as text or in a database and gen...
Using Django with mod_wsgi
2,856,435
1
1
189
0
python,django,mod-wsgi
In embedded mode, the Django app is part of the httpd worker. In daemon mode, the Django app is a separate process and the httpd worker communicates with it over a socket. In either case, the WSGI interface is the same.
0
0
0
0
2010-05-18T10:40:00.000
1
1.2
true
2,856,403
0
0
1
1
When you use Django with mod_wsgi, what exactly happens when a user makes a request to the server from a browser? Does apache load up your Django app when it starts and have it running in a separate process? Does it create a new Python process for every HTTP request?
SSL and WSGI apps - Python
2,857,301
2
5
7,474
0
python,ssl,wsgi,gevent
I would let the http server deal with the ssl transport.
0
0
0
1
2010-05-18T12:40:00.000
3
0.132549
false
2,857,273
0
0
1
1
I have a WSGI app that I would like to place behind SSL. My WSGI server is gevent. What would a good way to serve the app through SSL in this case be?
Django Inlines user permissions + view only - permissions issues
3,090,090
2
9
1,938
0
python,django,permissions,inlines
If I want a read-only version of what's in the admin, I just write some normal Django views and keep them out of the admin. I don't think the kind of thing you're talking about (allowing changes to an object but not its inlines) is really supported by the admin. Don't get me wrong: the admin is very flexible and usefu...
0
0
0
0
2010-05-18T14:14:00.000
1
1.2
true
2,858,040
0
0
1
1
I'm not sure if this is a bug or I'm just missing something (although I have already parsed the documentation about inlines), but: Let's say I have a model A. Model A is an inline of model B. User U has full access to model B, but only change permissions to model A (so, no add, nor delete). However, when editing model ...
Integrating Jython Cpython
2,861,467
0
3
1,047
0
python,qt,pyqt,process,jython
If the criteria is not reinventing the wheel, there is the SimpleXMLRPCServer and xmlrpclib modules available in the standard library. They should work in Jython too.
1
0
0
0
2010-05-18T19:58:00.000
2
0
false
2,860,650
0
0
1
1
I am about to begin a project where I will likely use PyQt or Pyside. I will need to interface with a buggy 3rd party piece of server software that provides C++ and Java APIs. The Java APIs are a lot easier to use because you get Exceptions where with the C++ libraries you get segfaults. Also, the Python bindings to ...
sqlalchemy natural sorting
2,863,830
1
1
1,746
1
python,sqlalchemy
Sorting is done by the database. If you database doesn't support natural sorting your are out of luck and have to sort your rows manually after retrieving them via sqlalchemy.
0
0
0
0
2010-05-19T07:59:00.000
1
0.197375
false
2,863,748
0
0
1
1
Currently, i am querying with this code: meta.Session.query(Label).order_by(Label.name).all() and it returns me objects sorted by Label.name in this manner ['1','7','1a','5c']. Is there a way i can have the objects returned in the order with their Label.name sorted like this ['1','1a','5c','7'] Thanks!
Importing Sqlite data into Google App Engine
2,873,946
0
5
2,231
1
python,google-app-engine,sqlite
I have not had any trouble importing pysqlite2, reading data, then transforming it and writing it to AppEngine using the remote_api. What error are you seeing?
0
1
0
0
2010-05-20T00:47:00.000
4
0
false
2,870,379
0
0
1
1
I have a relatively extensive sqlite database that I'd like to import into my Google App Engine python app. I've created my models using the appengine API which are close, but not quite identical to the existing schema. I've written an import script to load the data from sqlite and create/save new appengine objects, bu...
How should I go about learning Python?
2,888,075
1
11
2,771
0
python,django
If it is your basics in OOPS that you wish to strengthen, Java is a good option(provided you know c++ or any other non-web-based language which supports OOPS). However, if you are looking towards web-development, Python should be your best option. Yes, Python is a good option Yes, Django is a very good web application ...
0
0
0
0
2010-05-20T17:36:00.000
10
0.019997
false
2,876,337
1
0
1
1
I am currently learning PHP and want to learn about OOP. I know Python is a well-organized and is all OOP, so would learning Python be a wise choose to learn OOP? The thing is I am more towards web development then just general programming, and I know Python is just a general purpose language, but there is Django. ...
Can Django be used for web services?
2,877,686
3
2
2,678
0
python,django,web-services,pylons
Yes, we use it directly. We have view functions that respond to some URI's with serialized JSON or XML objects instead of pretty HTML pages.
0
0
0
0
2010-05-20T19:27:00.000
3
0.197375
false
2,877,101
0
0
1
2
My friend said, "Pylons is so much better for web services." My other friend said, "You can modify Django in a way to do exactly whatever you like." In Django, what is necessary to be modified (urls.py? models classes? settings?) in order to do "web services" with APIs and REST and versioning, etc etc.?
Can Django be used for web services?
30,111,944
2
2
2,678
0
python,django,web-services,pylons
Absolutely. Django is in fact made to be used on server side. But first you need to understand that it is a framework. A framework is a set of tools which get the common activities done in web development (e.g Login or Sign up module).
0
0
0
0
2010-05-20T19:27:00.000
3
0.132549
false
2,877,101
0
0
1
2
My friend said, "Pylons is so much better for web services." My other friend said, "You can modify Django in a way to do exactly whatever you like." In Django, what is necessary to be modified (urls.py? models classes? settings?) in order to do "web services" with APIs and REST and versioning, etc etc.?
Referring to objects inside a list without using references or indices
2,877,637
4
2
190
0
python
Instead of using a list, why not use a dictionary and use small integers as the keys? Adding and removing items from the dictionary will not change the indices into the dictionary. You will want to keep one value in the dictionary that lets you know what the next assigned index will be.
0
0
0
0
2010-05-20T20:38:00.000
2
1.2
true
2,877,617
1
0
1
2
I'm using python for my shopping cart class which has a list of items. When a customer wants to edit an item, I need to pass the JavaScript front-end some way to refer to the item so that it can call AJAX methods to manipulate it. Basically, I need a simple way to point to a particular item that isn't its index, and is...
Referring to objects inside a list without using references or indices
2,877,644
2
2
190
0
python
A UUID seems perfect for this. Why don't you want to do that? Do the items have any sort of product_id? Can the shopping cart have more than one of the same product_id, or does it store a quantity? What I'm getting at is: If product_id's in the cart are unique, you can just use that.
0
0
0
0
2010-05-20T20:38:00.000
2
0.197375
false
2,877,617
1
0
1
2
I'm using python for my shopping cart class which has a list of items. When a customer wants to edit an item, I need to pass the JavaScript front-end some way to refer to the item so that it can call AJAX methods to manipulate it. Basically, I need a simple way to point to a particular item that isn't its index, and is...
Python Django vs ASP.NET MVC
2,879,295
3
7
9,471
0
asp.net,python,asp.net-mvc,django
ASP.NET MVC is pretty cool if you already know C# and/or ASP... but if you're starting from scratch, Django is (IMO) a better bet. You probably have more hosting options for Django, for one thing.
0
0
0
0
2010-05-21T02:36:00.000
2
0.291313
false
2,879,251
0
0
1
1
I am fairly new at web development scene, and I was wondering if you can help me break up the pros and cons of using python django vs asp.net mvc besides the maturity level of its framework. I have intermediate experience with Java. As of right now, I am leaning towards Python, but I just wanted to make sure, I am maki...
bundles in java?
2,881,839
1
3
110
0
java,php,python,django,symfony1
I suppose the closest thing in Javaland is the venerable Web Application Archive (war file).
0
0
0
0
2010-05-21T12:02:00.000
3
0.066568
false
2,881,825
0
0
1
1
in symfony 2.0 and django there are bundles that contain everything for a feature (html, css, js, img, php/python). so if you want to delete one feature, you basically just delete that bundle and unregister it from "main". are there java frameworks for this too? or is it different in java cause java is a compiling lang...
Identifying if a data is RSS or HTML on python
2,883,114
0
1
81
0
python,html,rss
Filetypes should generally be determined out-of-band. eg. if you are fetching the file from a web server, the place to look would be the Content-Type header of the HTTP response. If you're fetching a local file, the filesystem would have a way of determining filetype—on Windows that'd be looking at the file extension. ...
0
0
1
0
2010-05-21T13:44:00.000
2
1.2
true
2,882,549
0
0
1
2
Is there a function or method I could call in Python That would tell me if the data is RSS or HTML?
Identifying if a data is RSS or HTML on python
2,882,574
2
1
81
0
python,html,rss
You could always analyze it yourself to search for an xml tag (for RSS) or html tag (for HTML).
0
0
1
0
2010-05-21T13:44:00.000
2
0.197375
false
2,882,549
0
0
1
2
Is there a function or method I could call in Python That would tell me if the data is RSS or HTML?
Google App Engine, Task Queues
2,889,352
3
3
1,032
0
python,google-app-engine,httpwebrequest,scheduled-tasks
A task is removed from the queue when it executes if and only if it returns an HTTP 200 response. For any other response, it will be retried until it successfully executes. As David's answer indicates, they can also be manually removed.
0
1
0
0
2010-05-21T18:29:00.000
3
0.197375
false
2,884,579
0
0
1
1
How can I remove a task from a task queue? Is Google App Engine Task Queue removes the task from the queue after it is executed?
Python 2.6 + PIL + Google App Engine issue
2,885,231
-1
3
1,343
0
python,image,google-app-engine
How did you install PIL? If I remember correctly, I had to install it via MacPorts to get the App Engine SDK to recognize that it was installed. You should probably install Python 2.5 and use that, while you're at it, since that is the Python version that App Engine uses and developing against 2.6 locally could potent...
0
1
0
0
2010-05-21T19:38:00.000
5
-0.039979
false
2,885,057
1
0
1
4
I am using OS X 1.6 snow leopard and I successfully got PIL installed. I am able to open terminal and type import Image without any errors. However, When using app engine I get Image error still saying that PIL is not installed. I am wondering if any of you have an thoughts as to how I can resolve this issue. -Matthew
Python 2.6 + PIL + Google App Engine issue
2,889,386
0
3
1,343
0
python,image,google-app-engine
You cannot use PIL with Appengine; it uses C extensions and won't run in the sandbox environment. You do need to have PIL installed on your local machine to use the images API in dev_appserver, because the SDK version of the images API itself uses PIL, but this doesn't mean you can use all of PIL through the images AP...
0
1
0
0
2010-05-21T19:38:00.000
5
0
false
2,885,057
1
0
1
4
I am using OS X 1.6 snow leopard and I successfully got PIL installed. I am able to open terminal and type import Image without any errors. However, When using app engine I get Image error still saying that PIL is not installed. I am wondering if any of you have an thoughts as to how I can resolve this issue. -Matthew
Python 2.6 + PIL + Google App Engine issue
4,180,349
1
3
1,343
0
python,image,google-app-engine
I had this same problem and found in GoogleAppEngineLauncher | Preferences that I needed to set the Python Path to /usr/local/bin/python2.5 After I did that it started working.
0
1
0
0
2010-05-21T19:38:00.000
5
0.039979
false
2,885,057
1
0
1
4
I am using OS X 1.6 snow leopard and I successfully got PIL installed. I am able to open terminal and type import Image without any errors. However, When using app engine I get Image error still saying that PIL is not installed. I am wondering if any of you have an thoughts as to how I can resolve this issue. -Matthew
Python 2.6 + PIL + Google App Engine issue
28,392,607
0
3
1,343
0
python,image,google-app-engine
What David Scott said is actually correct. I had the errors blow running and couldn't for the heck of me couldn't resolve the issue no matter what patches I tried. What worked for me apparently, was simply changing the Python directory found on C:\python27_x64 and target the pythonw.exe file using the Google App Engine...
0
1
0
0
2010-05-21T19:38:00.000
5
0
false
2,885,057
1
0
1
4
I am using OS X 1.6 snow leopard and I successfully got PIL installed. I am able to open terminal and type import Image without any errors. However, When using app engine I get Image error still saying that PIL is not installed. I am wondering if any of you have an thoughts as to how I can resolve this issue. -Matthew
Which logging library to use for cross-language (Java, C++, Python) system
2,926,570
1
11
2,806
0
java,c++,python,logging
I'd use Apache log4cxx or Apache log4j. It's Efficient. It has Logger hierarchies to modularize your logs. It's proven tecnology for a while now. Currently, appenders exist for the console , files , GUI components, remote socket servers, NT Event Loggers , and remote UNIX Syslog daemons. It is also possible to log asy...
0
1
0
1
2010-05-21T21:49:00.000
3
0.066568
false
2,885,822
0
0
1
1
I have a system where a central Java controller launches analysis processes, which may be written in C++, Java, or Python (mostly they are C++). All these processes currently run on the same server. What are you suggestions to Create a central log to which all processes can write to What if in the future I push some p...
What exactly is a web application framework?
2,886,479
0
3
474
0
python,django,cgi,web-frameworks
A web application framework is independent of the actual HTTP server in use. The server passes an application written using it the requests, and it cranks some gears and spits out a response, which is sent back to the HTTP server. Django has 3 popular connectors to the HTTP server: WSGI, FastCGI, and mod_python. These ...
0
0
0
0
2010-05-22T00:47:00.000
4
0
false
2,886,466
0
0
1
3
I'm getting into python for cgi and came across Django. I'm not quite sure I understand it very much. Is it something I have to install inside apache or is it just something I can use with my cgi? Wanted to know because I'd love to learn it but my server I'm using doesn't give me a lot of privileges. thanks
What exactly is a web application framework?
2,888,049
0
3
474
0
python,django,cgi,web-frameworks
Basically the functions of any framework are:- make sure that you do not have to do the repetitive tasks. make it easy for you to re-use and modularize they provide a layer of abstraction(which in most cases, makes you more productive) So, Django is a web application framework; naturally it satisfies all three condit...
0
0
0
0
2010-05-22T00:47:00.000
4
0
false
2,886,466
0
0
1
3
I'm getting into python for cgi and came across Django. I'm not quite sure I understand it very much. Is it something I have to install inside apache or is it just something I can use with my cgi? Wanted to know because I'd love to learn it but my server I'm using doesn't give me a lot of privileges. thanks
What exactly is a web application framework?
2,886,475
0
3
474
0
python,django,cgi,web-frameworks
A web application framework like Django replaces CGI by spawning its own processes and handling requests from a web server. They also provide tools for simplifying html by creating templates, partial templates, helpers etc. If you don't have full control over your server, your host will need to install it for you.
0
0
0
0
2010-05-22T00:47:00.000
4
0
false
2,886,466
0
0
1
3
I'm getting into python for cgi and came across Django. I'm not quite sure I understand it very much. Is it something I have to install inside apache or is it just something I can use with my cgi? Wanted to know because I'd love to learn it but my server I'm using doesn't give me a lot of privileges. thanks
Django Barcode for store sales
2,887,309
9
5
2,820
0
django,vb6,python
If your definition of barcode functionality is the ability to read and write barcodes, you should keep in mind two things. Barcodes are actually read by barcode readers, and from the computers' point of view they are just input devices, just like keyboards. When the reader reads a barcode, it just "types" it in, chara...
0
0
0
0
2010-05-22T05:20:00.000
1
1.2
true
2,887,045
0
0
1
1
I am in process of converting Visual Basic app into Python Django. Currently, it has barcode functionality to process sales at a store. Can this be achieved with python django.
Huffman coding two characters as one
2,888,480
6
3
1,395
0
java,python,huffman-code
Huffman code doesn't care about characters, it cares about symbols. Generally, it is used to encode the alphabet / other single characters, but can very easily be generalized to encode strings of characters. Basically, you would just take an existing implementation and allow symbols to be strings rather than characte...
0
0
0
1
2010-05-22T14:36:00.000
3
1
false
2,888,468
0
0
1
2
I need huffman code(best in python or in java), which could encode text not by one character (a = 10, b = 11), but by two (ab = 11, ag = 10). Is it possible and if yes, where could i find it, maybe it's somewhere in the internet and i just can'd find it?
Huffman coding two characters as one
2,888,494
0
3
1,395
0
java,python,huffman-code
There is probably some code somewhere. But this sounds like a parsing and tokenising question. One of the first questions I would be answering is how many unique pairs are you dealing with. Huffman encoding works best with small numbers of tokens. For example, the 101 characters on your keyboard. But if your two charac...
0
0
0
1
2010-05-22T14:36:00.000
3
0
false
2,888,468
0
0
1
2
I need huffman code(best in python or in java), which could encode text not by one character (a = 10, b = 11), but by two (ab = 11, ag = 10). Is it possible and if yes, where could i find it, maybe it's somewhere in the internet and i just can'd find it?
Why program with php frameworks if it can be done better with ruby on rails, python or java?
2,891,024
3
1
240
0
java,php,python,ruby-on-rails,django
If you only know PHP and you don't feel like learning Ruby/Python/Java. Seriously, if it can be done better with another tool, it should be done with another tool. Of course, this assumes the other tools are actually better. That part is arguable. Some people are so stuck up on their "my way is the best way" that they ...
0
0
0
1
2010-05-23T07:56:00.000
2
1.2
true
2,891,017
0
0
1
1
We have discussion in my job place about question (We use 1 of the php frameworks): Why program with php frameworks big web application if it can be done better with ruby on rails, python or java? Please say our opinion thanks
manage.py runserver throws an ImportError with my appname, MacPorts issue on OSX?
2,901,051
0
1
2,460
0
python,django,macos
Okay, so this is very bizarre and I don't know what happened... but here's what fixed: I open terminal and bash isn't recognizing any commands (python, vi, etc) I restart machine, still not recognizing any commands I look at my $PATH and /usr/bin is missing I add /usr/bin to $PATH I open vi and modify my profi...
0
0
0
0
2010-05-24T01:41:00.000
2
0
false
2,894,344
0
0
1
1
I've been developing a Django app for weeks locally on OSX 10.6.3. Recently, I rebooted my machine and went to start my development environment up. Here's the error: cm:myApp cm$ python manage.py runserver Traceback (most recent call last): File "manage.py", line 11, in execute_manager(settings) File "/Libr...
send activate-email with django-registration
17,230,981
3
8
11,049
0
python,django,django-registration
EMAIL_PORT = 465 was working some year ago. Now you need to use port 587 with gmail. Reason: Django does not support SMTP with SSL from the beginning. Only STARTTLS command is supported AFTER plain-text connection is set up. Gmail, however, no longer supports this option on port 465.
0
0
0
0
2010-05-24T04:53:00.000
4
0.148885
false
2,894,802
0
0
1
2
I am curious if there's a way to send activated email with username, password by using django-registration. First I thought about modifying registration form but I need some example.
send activate-email with django-registration
31,984,785
2
8
11,049
0
python,django,django-registration
Hope this will help someone. After troubleshooting for half an hour, I realised that I had to explicitly state this as well while using django-registration - EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
0
0
0
0
2010-05-24T04:53:00.000
4
0.099668
false
2,894,802
0
0
1
2
I am curious if there's a way to send activated email with username, password by using django-registration. First I thought about modifying registration form but I need some example.
How to restrict the size of file being uploaded apache + django
2,894,962
0
1
4,866
0
python,django,apache
apache has a server setting for max file size..(also dont forget max post size). I do not believe apache can show an error page on its own, you can probably use python for that. unfortunetly I know nothing obout python (yet) so I can't really help you beyond that. I know php can do that easily so I'm sure there is a ...
0
0
0
0
2010-05-24T05:26:00.000
4
0
false
2,894,914
0
0
1
1
How to restrict the size of file being uploaded. I am using django 1.1 with apache. Can I use apache for this and show some html error page if say size is bigger then 100MB. Thanks.
Google App Engine appcfg.py data_upload Authentication fail
2,940,702
2
3
1,823
0
python,google-app-engine
If your administrator is an Apps for Domains account (eg, @yourdomain.com), and your app uses Google Accounts authentication, you won't be able to authenticate as an admin on your app. You need to add a Google Accounts (eg, @google.com) account as an administrator, and use that to upload.
0
1
0
0
2010-05-24T07:22:00.000
2
0.197375
false
2,895,397
0
0
1
1
I am using appcfg.py to upload data to datastore from a csv file. But every time I try, I am getting error: [info ] Authentication failed even if i am using Admin id and password. In my app.yaml file I am having: handlers: - url: /remote_api script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py log...
Overriding Django Admin's main page? - Django
3,166,408
4
3
8,486
0
python,django,admin,overriding
You can use template hierarchy like: index.html ... {% block content %} ... {% block mycontent %}My custom text{% endblock %} ... {% endblock %} app_index.html ... {% block mycontent %}{% endblock %} ..
0
0
0
0
2010-05-24T11:11:00.000
3
1.2
true
2,896,490
0
0
1
1
I'm trying to add features to Django 1.2 admin's main page. I've been playing with index.html, but features added to this page affect all app pages. Any ideas on what template I'm supposed to use? Thanks loads!!
Better error reporting mako
2,946,762
0
2
198
0
python,mako
I don't think you're likely to find such a thing. Like all the other fast python template engines, Mako achieves its speed by compiling your template into python code and then executing it. An exception will divert execution out of your template's code, so by the time one is raised, that template will have no way of ...
0
0
0
1
2010-05-25T15:12:00.000
2
1.2
true
2,905,948
0
0
1
2
Is there a way to add tempate string which contains error to mako`s error trace?
Better error reporting mako
9,271,873
0
2
198
0
python,mako
I was looking for another error I have and found this. I though it would be nice if you still ever need this, you can achieve it by setting mako.strict_undefined = True. I am using mako-0.6.2 so it may not been possible in the version back in 2010.
0
0
0
1
2010-05-25T15:12:00.000
2
0
false
2,905,948
0
0
1
2
Is there a way to add tempate string which contains error to mako`s error trace?
way to fix number of concurrent sessions allowed at app level. django
2,907,043
0
2
201
0
python,django,session
You're not asking about sessions, you're asking about requests. What you want is known as throttling. However, it would be quite difficult to do it inside the app, because Apache manages multiple processes and threads, so you'd need some external process to keep track of these in order to enable the throttling. Basical...
0
0
0
0
2010-05-25T17:12:00.000
3
0
false
2,906,790
0
0
1
1
How can I fix number of concurrent sessions allowed at app level? Basically I want a limit to how many concurrent requests to this url to keep the server from getting congested. I guess some middleware hack? Thanks.
Good real-world uses of metaclasses (e.g. in Python)
2,907,750
0
13
2,053
0
python,metaprogramming
SQLalchemy also uses them for declarative database models. Sorry my answer isn't very different from your example, but if you're looking for example code, I found declarative to be pretty readable.
0
0
0
0
2010-05-25T18:43:00.000
5
0
false
2,907,498
0
0
1
1
I'm learning about metaclasses in Python. I think it is a very powerful technique, and I'm looking for good uses for them. I'd like some feedback of good useful real-world examples of using metaclasses. I'm not looking for example code on how to write a metaclass (there are plenty examples of useless metaclasses out th...
Non-global middleware in Django
33,104,799
2
48
20,267
0
python,django,middleware,django-middleware
You can use process_view method, that is called before calling the view func. In process_view you can check — if this view requires this middleware interception.
0
0
0
0
2010-05-26T21:30:00.000
9
0.044415
false
2,916,966
0
0
1
2
In Django there is a settings file that defines the middleware to be run on each request. This middleware setting is global. Is there a way to specify a set of middleware on a per-view basis? I want to have specific urls use a set of middleware different from the global set.
Non-global middleware in Django
18,391,612
1
48
20,267
0
python,django,middleware,django-middleware
The best thing I've been able to find is using if request.path_info.startswith('...') to skip over the middleware by just returning the request. Now, you could create middleware just for the sake of skipping and then inherit that. Maybe you could do something even simpler and save that list in your settings.py and then...
0
0
0
0
2010-05-26T21:30:00.000
9
0.022219
false
2,916,966
0
0
1
2
In Django there is a settings file that defines the middleware to be run on each request. This middleware setting is global. Is there a way to specify a set of middleware on a per-view basis? I want to have specific urls use a set of middleware different from the global set.
Django URL resolving infrastructure stops working
2,955,645
2
2
367
0
python,django,fastcgi,django-urls
Django has a odd behaviour when matching urls in a environment that isn't under debug mode. For example, with DEBUG=False, Django will ignore urls such as: url(r'^', include('someapp.urls')), specifically in the case above, you could let the string empty: url(r'', include('someapp.urls')), In other words, c...
0
0
0
0
2010-05-27T00:03:00.000
2
0.197375
false
2,917,687
0
0
1
2
We recently launched a new Django-powered website, and we are experiencing the oddest bug: The site is running under Apache with mod_fastcgi. Everything works fine for a while, and then the URL tag and reverse() functionality stops working. Instead of returning the expected URL, they return "". We haven't noticed anyt...
Django URL resolving infrastructure stops working
2,957,239
7
2
367
0
python,django,fastcgi,django-urls
This has happened to me before. Normally it's due to a 'broken' urls.py file. There are two things that make this kind of bug really hard to fix: It could be the urls.py file in any of the apps that breaks the reverse() function, so knowing that reverse() breaks for app X doesn't mean the error is in that particular a...
0
0
0
0
2010-05-27T00:03:00.000
2
1.2
true
2,917,687
0
0
1
2
We recently launched a new Django-powered website, and we are experiencing the oddest bug: The site is running under Apache with mod_fastcgi. Everything works fine for a while, and then the URL tag and reverse() functionality stops working. Instead of returning the expected URL, they return "". We haven't noticed anyt...
Get Path of Uploaded File using Python
2,918,021
5
0
1,903
0
python,upload
No, that information isn't sent by the user, so it's not available on your end
0
0
0
1
2010-05-27T01:53:00.000
2
0.462117
false
2,918,010
0
0
1
1
Is it possible to get the full path of the file on the user's computer being uploaded to my site? Using os.path.abspath(fileitem.filename) simply gets me the address of where my script is executing from on my shared hosting server. FYI: fileitem = form['file'] and form = cgi.FieldStorage()
Images not loading in QWebview in PyQt4 in py2exe
2,925,711
2
1
1,402
0
python,pyqt4,py2exe,qwebview
Only png support is native, jpg (and others) is supplied via plugins. Don't recall the exact paths (and I don't know your platform) but search for the PyQt plugins folder and: Copy the plugins folder to: $yourprogram/PyQt4/plugins (along with qt.conf) Edit qt.conf, and change prefix to $yourprogram/PyQt4 You might al...
1
0
0
0
2010-05-27T20:46:00.000
1
0.379949
false
2,924,781
0
0
1
1
I have an application that displays some HTML in a QWebview, which references images on the local file system. This works fine directly running the python. When compiling via py2exe, the images no longer load. Google doesn't seem to know the answer, any ideas?
Get "2:35pm" instead of "02:35PM" from Python date/time?
2,925,269
1
29
13,086
0
python,datetime,time,formatting
I know it's pretty cheap, but you could just discard the first character if it's a zero :)
0
0
0
0
2010-05-27T21:48:00.000
8
0.024995
false
2,925,230
1
0
1
1
I'm still a bit slow with Python, so I haven't got this figured out beyond what's obviously in the docs, etc. I've worked with Django a bit, where they've added some datetime formatting options via template tags, but in regular python code how can I get the 12-hour hour without a leading zero? Is there a straightforw...
Python access webcam and audio input
2,926,268
0
2
2,165
0
python,streaming,webcam
Server-side web scripts have no access to the client other than through requests. You need to use JavaScript, Java, or Flash to access devices that the browser (and consequently user) allows them to.
0
0
0
1
2010-05-28T01:56:00.000
3
0
false
2,926,220
0
0
1
2
Can a python script on my server access the webcam and audio input of a user as easily and as well as a Flash plugin can?
Python access webcam and audio input
2,926,270
2
2
2,165
0
python,streaming,webcam
No: the "plugin" you mention runs in the user's browser, your server-side script (Python or otherwise) runs on the server, a completely different proposition. This relates to your other recent question about a server-side script accessing information on your desktop: your client machine tends to be very protected agai...
0
0
0
1
2010-05-28T01:56:00.000
3
0.132549
false
2,926,220
0
0
1
2
Can a python script on my server access the webcam and audio input of a user as easily and as well as a Flash plugin can?
Send files between python+django and C#
2,965,960
0
1
347
0
c#,python,sockets
The easier way on my use case was send files using HTTP because with python i have additionaly running django.
0
0
1
0
2010-05-28T15:17:00.000
2
1.2
true
2,930,211
0
0
1
1
i would like to know, what is the best way to send files between python and C# and vice versa. I have my own protocol which work on socket level, and i can send string and numbers in both ways. Loops works too. With this i can send pretty much anything, like package of users id, if it is simple data. But soon i will st...
Methods of sending web-generated config files to servers and restarting services
3,130,135
0
0
226
0
python,linux,administration,func
It really depends what you're intending to do, as the question is a little vague. The other answers cover the tools available; choosing one over the other comes down to purpose. Are you intending to manage servers, and services on those servers? If so, try Puppet, CFEngine, or some other tool for managing server conf...
0
0
1
0
2010-05-28T19:46:00.000
4
0
false
2,932,007
0
0
1
1
We're writing a web-based tool to configure our services provided by multiple servers. This includes interfaces configuration, dhcp configs etc. etc. Having configs in database and views that generate proper output, how to send it/make it available for servers? I'm thinking about sending it through scp and invoking rel...
SQL Alchemy MVC and cross controller joins
2,934,084
2
1
430
1
python,model-view-controller,sqlalchemy,dns,controllers
Controllers are meant to encapsulate features for your convienience. Not to bind your hands. If you want to join, simply join. Use the controller that you think is logically fittest to make the query.
0
0
0
0
2010-05-29T04:25:00.000
1
1.2
true
2,933,796
0
0
1
1
When using SQL Alchemy for abstracting your data access layer and using controllers as the way to access objects from that abstraction layer, how should joins be handled? So for example, say you have an Orders controller class that manages Order objects such that it provides getOrder, saveOrder, etc methods and likewis...
Task Queue stopped working
2,935,659
1
1
391
0
python,google-app-engine,task-queue
The development server won't run tasks automatically, you have to set them off yourself. It's a design feature, so you can see what happens when you run them, instead of them running at any point. Essentially, there's nothing wrong with your application, it's a feature of development server.
0
1
0
0
2010-05-29T15:35:00.000
2
1.2
true
2,935,631
0
0
1
1
I was playing with Goole App Engine Task Queue API to learn how to use it. But I couldn't make it trigger locally. My application is working like a charm when I upload to Google servers. But it doesn't trigger locally. All I see from the admin is the list of the tasks. But when their ETA comes, they just pass it. It's ...
python web script send job to printer
2,936,475
0
0
1,545
0
python,web-applications,printing
If your Python webapp is running inside a browser on the client machine, I don't see any other way than manually for the user. Some workarounds you might want to investigate: if you web app is installed on the client machine, you will be able to connect directly to the printer, as you have access to the underlying OS ...
0
0
1
0
2010-05-29T19:48:00.000
2
0
false
2,936,384
0
0
1
1
Is it possible for my python web app to provide an option the for user to automatically send jobs to the locally connected printer? Or will the user always have to use the browser to manually print out everything.
How to Not Force Login After Users Close Their Browser on gae
2,941,171
2
0
174
0
python,google-app-engine,session,login
Under Application Settings in the App Engine dashboard, you can choose either 1 day, 1 week, or 2 week cookie expiration, assuming you're using the Users API. I don't believe the cookie should ever be set to expire when the browser is closed, unless the user's browser setting is causing this behavior. I can certainl...
0
0
0
0
2010-05-31T01:51:00.000
2
1.2
true
2,941,021
0
0
1
1
...Like Django's session or cookies Does anyone have a simple way of allowing this?
Can the Django urls.py system be turned into Pylon's Routes?
2,945,937
0
2
202
0
python,django,routes,pylons
Could you be more specific? If you want to adapt a django urlconf to routes at runtime it would be really tricky if not impossible and would require having a django settings.py present and an env variable pointing to it. Otherwise translating a django urlconf to routes manually is doable. Routes is as flexible as dja...
0
0
0
0
2010-05-31T19:32:00.000
1
1.2
true
2,945,615
0
0
1
1
Can the Django urls.py system be turned into Pylon's Routes?
How to backup an AppEngine site?
15,256,477
2
14
2,873
0
python,google-app-engine,backup
There is now a backup option available in the dashboard. See "datastore admin".
0
1
0
0
2010-05-31T22:06:00.000
4
0.099668
false
2,946,183
0
0
1
1
So, you build a great shiny cloudy 2.0 website on top of AppEngine, with thousands upon thousands of images saved into the datastore and gigs of data at the blobstore. How do you backup them?
Aptana Studio is opening but not ever closing a python.exe process
2,952,983
2
2
509
0
python,django,aptana
You should try adding --noreload to the runserver argument
0
1
0
1
2010-06-01T20:08:00.000
1
1.2
true
2,952,957
0
0
1
1
I am developing a small testing website using Django 1.2 in Aptana Studio build 2.0.4.1268158907. I have a Django project that I test by running the command "runserver 8001" on my project. This command runs the project on a small server that comes with Django. However the problem arises that every time I run this com...
Django or Drupal, which one should I use that suits best my needs?
2,956,035
6
5
1,475
0
php,python,django,drupal
I've built several sites on Drupal and Django, my conclusion is: if you need to create something similar to the standard drupal (or Ubercart) feature-set, you don't have much time for development, and you don't expect hight load pressure on a site - you should pick Drupal. But if you do need to create something more or...
0
0
0
0
2010-06-01T23:25:00.000
7
1.2
true
2,954,036
0
0
1
5
I want to learn and use Drupal or Django for the following: dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security I like MVC, ORM and object-oriented prg. Which is better to jump into ? Which one is more mature, powerful, understandable, object-ori...
Django or Drupal, which one should I use that suits best my needs?
2,954,057
2
5
1,475
0
php,python,django,drupal
Jump into what you like or what attracts you most after getting a little overview of the capabilities and constraints. I never worked with drupal, but I can recommend django.
0
0
0
0
2010-06-01T23:25:00.000
7
0.057081
false
2,954,036
0
0
1
5
I want to learn and use Drupal or Django for the following: dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security I like MVC, ORM and object-oriented prg. Which is better to jump into ? Which one is more mature, powerful, understandable, object-ori...
Django or Drupal, which one should I use that suits best my needs?
2,954,198
2
5
1,475
0
php,python,django,drupal
Consider your deployment. Pretty much every host will support Drupal. If you go with Django, you will need to select a host that supports fast_cgi or wsgi
0
0
0
0
2010-06-01T23:25:00.000
7
0.057081
false
2,954,036
0
0
1
5
I want to learn and use Drupal or Django for the following: dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security I like MVC, ORM and object-oriented prg. Which is better to jump into ? Which one is more mature, powerful, understandable, object-ori...
Django or Drupal, which one should I use that suits best my needs?
2,955,877
3
5
1,475
0
php,python,django,drupal
Drupal and Django doesn't make for a good comparison, as they are quite different. If all you need is a simple website with a CMS and Paypal, I would go for Drupal. Drupal's strength compared Django is it's many modules (modular system), which most of the time can get you where you want. Drupal is also extremely flexib...
0
0
0
0
2010-06-01T23:25:00.000
7
0.085505
false
2,954,036
0
0
1
5
I want to learn and use Drupal or Django for the following: dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security I like MVC, ORM and object-oriented prg. Which is better to jump into ? Which one is more mature, powerful, understandable, object-ori...
Django or Drupal, which one should I use that suits best my needs?
2,956,336
0
5
1,475
0
php,python,django,drupal
I've been developing with Django for more than 2 years and have built a couple of Drupal sites in the meantime (per client's specific request to use Drupal). My conclusions are the following: Even for a smaller site I would have done it quicker building it from scratch with django (or maybe even PHP) for a simple reaso...
0
0
0
0
2010-06-01T23:25:00.000
7
0
false
2,954,036
0
0
1
5
I want to learn and use Drupal or Django for the following: dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security I like MVC, ORM and object-oriented prg. Which is better to jump into ? Which one is more mature, powerful, understandable, object-ori...
Are many Dojo Toolkit users also using Python?
2,959,051
1
0
516
0
python,dojo
My Python team has been using Dojo on the client-side for a few years now, and we settled on CherryPy as our server-side about a year ago, and are pretty pleased with it. It's fairly minimal as web servers go, and enables us to customize the server behavior as needed. Initially we looked at Django and Turbogears as wel...
0
0
0
0
2010-06-02T10:45:00.000
1
1.2
true
2,956,904
1
0
1
1
I've coming to be more interested in Dojo Toolkit which I find great, but are many Dojo users also using Python also? And why is it like that? I heard of Cherry Py (and why not Django?).
Best practice: How to persist simple data without a database in django?
2,959,612
5
0
1,910
0
python,django,persistence
Why not still keep it in a database? Your remote REST store is all well and funky, but if you've got local data, there's nothing (unless there's spec saying so) to stop you storing some stuff in a local db. Doesn't have to be anything v glamorous - could be sqlite, or you could have some fun with redis, etc.
0
0
0
0
2010-06-02T16:13:00.000
3
0.321513
false
2,959,503
0
0
1
1
I'm building a website that doesn't require a database because a REST API "is the database". (Except you don't want to be putting site-specific things in there, since the API is used by mostly mobile clients) However there's a few things that normally would be put in a database, for example the "jobs" page. You have ma...
Example when request.POST contain query string in django
2,961,413
39
14
21,210
0
python,django,post
If your request is post: request.method == 'POST' but the requested url contains a query string. e.g: /your-url?param1=value-one you can still take POST parameters through: request.POST.get("my-field", None) and query string parameters through: request.GET.get("param1") althrough, you pick up all parameters at on...
0
0
0
0
2010-06-02T20:22:00.000
1
1.2
true
2,961,317
0
0
1
1
Please post example code when request.POST contain query string in django, because i think my django version is bugged. EDIT: You simple can't, query string is always in GET, and this was my problem.
How to transition from PHP to Python Django?
2,961,525
1
4
3,852
0
php,python,django
No. You can only do a LOT better. Awesome, popular. Supported by best hosters like Mediatemple. No. You can just change 'mysql' to 'postgresql' or 'sqlite' in your settings.py. NO! Python would never give you the right to mix up everything in one file and make the shittest shit in the world. Templates, static server. ...
0
0
0
0
2010-06-02T20:36:00.000
4
0.049958
false
2,961,402
0
0
1
2
Here's my background: Decent experience with PHP/MySql. Beginner's experience with OOP Why I want to learn Python Django? I gave in, based on many searches on SO and reading over some of the answers, Python is a great, clean, and structured language to learn. And with the framework Django, it's easier to write codes ...
How to transition from PHP to Python Django?
2,961,490
6
4
3,852
0
php,python,django
Can i do everything in Django as in PHP? Always Is Django a "big" hit in web development as PHP? Only time will tell. With PHP, PHP and Mysql are VERY closely related, is there a close relation between Django and Mysql? Django supports several RDBMS interfaces. MySQL is popular, so is SQLite and Postgres. In PHP...
0
0
0
0
2010-06-02T20:36:00.000
4
1.2
true
2,961,402
0
0
1
2
Here's my background: Decent experience with PHP/MySql. Beginner's experience with OOP Why I want to learn Python Django? I gave in, based on many searches on SO and reading over some of the answers, Python is a great, clean, and structured language to learn. And with the framework Django, it's easier to write codes ...