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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sharing a database between Twisted and Django | 5,051,832 | 2 | 9 | 2,454 | 1 | python,database,django,twisted | I would just avoid the Django ORM, it's not all that and it would be a pain to access outside of a Django context (witness the work that was required to make Django support multiple databases). Twisted database access always requires threads (even with twisted.adbapi), and threads give you access to any ORM you choose.... | 0 | 0 | 0 | 0 | 2011-02-19T14:42:00.000 | 2 | 0.197375 | false | 5,051,408 | 0 | 0 | 1 | 2 | I am developing a multiplayer gaming server that uses Django for the webserver (HTML frontend, user authentication, games available, leaderboard, etc.) and Twisted to handle connections between the players and the games and to interface with the games themselves. The gameserver, the webserver, and the database may run... |
Sharing a database between Twisted and Django | 5,051,760 | 10 | 9 | 2,454 | 1 | python,database,django,twisted | First of all I'd identify why you need both Django and Twisted. Assuming you are comfortable with Twisted using twisted.web and auth will easily be sufficient and you'll be able to reuse your database layer for both the frontend and backend apps.
Alternatively you could look at it the other way, what is Twisted doing ... | 0 | 0 | 0 | 0 | 2011-02-19T14:42:00.000 | 2 | 1.2 | true | 5,051,408 | 0 | 0 | 1 | 2 | I am developing a multiplayer gaming server that uses Django for the webserver (HTML frontend, user authentication, games available, leaderboard, etc.) and Twisted to handle connections between the players and the games and to interface with the games themselves. The gameserver, the webserver, and the database may run... |
Is it possible to 'import * from DIRECTORY', then somehow (anyhow) iterate over the loaded modules? | 5,054,203 | 4 | 0 | 210 | 0 | python,google-app-engine,import | You can read from the filesystem in GAE just fine; you just can't write to the filesystem.
from models import * will only import modules listed in __all__ in models/__init__.py; there's no automatic way to import all modules in a package if they're not declared to be part of the package. You just need to read the direc... | 0 | 1 | 0 | 0 | 2011-02-19T23:24:00.000 | 3 | 1.2 | true | 5,054,191 | 0 | 0 | 1 | 1 | Let me explain the use case...
In a simple python web application framework designed for Google App Engine, I'd like to have my models loaded automatically from a 'models' directory, so all that's needed to add a model to the application is place a file user.py (for example), which contains a class called 'User', in th... |
how to create a survey that has 5 multiple choices | 17,245,724 | 1 | 0 | 2,507 | 0 | python,google-app-engine | If you are presenting the survey question in a browser, I would definitely go with one model (in one datastore as noted by Peter) having questions and answers properties. Serialize the questions and answers into two TextProperties (be sure to escape them first). From this point, everything can be done inside Javascript... | 0 | 0 | 0 | 0 | 2011-02-20T16:30:00.000 | 2 | 0.099668 | false | 5,058,333 | 0 | 0 | 1 | 1 | Hey I am trying to create a survey that asks the users to create his own question and list 5 multiple choices. My first sense is that I create two datastores and one to store the user quesiton and one to to store 5 choices mapping to the question just created. but i dont know how exactly I should do with the 5 multipl... |
MySQL AB, MySQL Server 5.5 Folder in HKEY_LOCAL_MACHINE not present | 5,412,380 | 2 | 5 | 854 | 1 | python,mysql,django | I found that the key was actually generated under HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE. Thanks. | 0 | 0 | 0 | 0 | 2011-02-20T20:43:00.000 | 1 | 1.2 | true | 5,059,883 | 0 | 0 | 1 | 1 | I am trying to MySQL for Python (MySQLdb package) in Windows so that I can use it in the Django web frame.
I have just installed MySQL Community Server 5.5.9 and I have managed to run it and test it using the testing procedures suggested in the MySQL 5.5 Reference Manual. However, I discovered that I still don't have t... |
web: client-side python? | 5,060,400 | 0 | 1 | 717 | 0 | python,client-side | Short of writing your own browser plugin — no. | 0 | 0 | 1 | 0 | 2011-02-20T22:02:00.000 | 5 | 0 | false | 5,060,382 | 0 | 0 | 1 | 3 | Is there any way to get Python to run on a web browser, other than silverlight?
I'm pretty sure not, but it never hurts to ask (usually). |
web: client-side python? | 5,060,425 | 2 | 1 | 717 | 0 | python,client-side | Haven't tried it myself but Pyjamas (http://pyjs.org/) claims to contain a Python-to-Javascript compiler. Not exactly what you're asking for but might be worth a look. | 0 | 0 | 1 | 0 | 2011-02-20T22:02:00.000 | 5 | 0.07983 | false | 5,060,382 | 0 | 0 | 1 | 3 | Is there any way to get Python to run on a web browser, other than silverlight?
I'm pretty sure not, but it never hurts to ask (usually). |
web: client-side python? | 9,805,718 | 1 | 1 | 717 | 0 | python,client-side | skulpt is an interesting new project | 0 | 0 | 1 | 0 | 2011-02-20T22:02:00.000 | 5 | 0.039979 | false | 5,060,382 | 0 | 0 | 1 | 3 | Is there any way to get Python to run on a web browser, other than silverlight?
I'm pretty sure not, but it never hurts to ask (usually). |
Correct way of implementing database-wide functionality | 5,064,564 | 1 | 3 | 110 | 1 | python,database,django,django-models,coding-style | I recommend extending Django's Model-Template-View approach with a controller. I usually have a controller.py within my apps which is the only interface to the data sources. So in your above case I'd have something like get_all_parties_and_people_for_user(user).
This is especially useful when your "data taken from seve... | 0 | 0 | 0 | 0 | 2011-02-21T08:17:00.000 | 2 | 1.2 | true | 5,063,658 | 0 | 0 | 1 | 2 | I'm creating a small website with Django, and I need to calculate statistics with data taken from several tables in the database.
For example (nothing to do with my actual models), for a given user, let's say I want all birthday parties he has attended, and people he spoke with in said parties. For this, I would need a... |
Correct way of implementing database-wide functionality | 5,065,280 | 0 | 3 | 110 | 1 | python,database,django,django-models,coding-style | User.get_attended_birthday_parties() or Event.get_attended_parties(user) work fine: it's an interface that makes sense when you use it. Creating an additional "all-purpose" object will not make your code cleaner or easier to maintain. | 0 | 0 | 0 | 0 | 2011-02-21T08:17:00.000 | 2 | 0 | false | 5,063,658 | 0 | 0 | 1 | 2 | I'm creating a small website with Django, and I need to calculate statistics with data taken from several tables in the database.
For example (nothing to do with my actual models), for a given user, let's say I want all birthday parties he has attended, and people he spoke with in said parties. For this, I would need a... |
Extending PloneFormGen | 5,065,975 | 2 | 3 | 983 | 0 | python,forms,plone,ploneformgen | All PFG types, adapters etc. are all based on Archetypes. Related example code can be found in PloneFormGen/content. The saveDataAdapter.py or fields.py files provide reasonable example code... | 0 | 0 | 0 | 0 | 2011-02-21T12:26:00.000 | 3 | 0.132549 | false | 5,065,892 | 0 | 0 | 1 | 1 | Are there any example add-ons where to look at when one would like to
1) Create custom action adapters for PloneFormGen
2) Add new field types to PloneFormGen |
Update app engine entity | 5,720,652 | 2 | 4 | 6,215 | 0 | python,google-app-engine | I use GQL to query a find the Entity and if exists update de atribute.
result = db.GqlQuery('select name from Person where name = "tadeu"')
if result:
for r in result:
r.attribute = "value"
r.put() | 0 | 1 | 0 | 0 | 2011-02-21T13:12:00.000 | 4 | 0.099668 | false | 5,066,357 | 0 | 0 | 1 | 1 | How to update existing record in app engine. |
Pylons - how to use an old project in a new environment? | 5,067,114 | 1 | 2 | 68 | 0 | python,project,upgrade,pylons | might be obvious but did you run "python setup.py develop" on the application package so that the dependencies could be installed? | 0 | 1 | 0 | 1 | 2011-02-21T13:28:00.000 | 1 | 0.197375 | false | 5,066,530 | 0 | 0 | 1 | 1 | I have an old project, it written under Python 2.5/2.6, Windows.
We had Python 2.6/Win7/x64 now, and I tried to start it.
I got the old project that running nondebug mode in a server, and
copied into local folder.
When I tried to yesterday start it, I got this error:
15:44:58,038 DEBUG [pylons.configuration] Loade... |
Ajax v. including data in the HTML | 5,069,558 | 0 | 3 | 196 | 0 | javascript,python,ajax,django,performance | Always include them directly if you have the choice, it will give a considerable benefit to page load speed. | 0 | 0 | 0 | 0 | 2011-02-21T18:02:00.000 | 2 | 0 | false | 5,069,495 | 0 | 0 | 1 | 2 | I'm using JavaScript with jQuery, talking to a Django back end. There are some UI needs that require Ajax, because we can't know what data to send until the user gives some input. However, there is other data that is known at template time. What are the pros and cons of including that data in the template directly, ins... |
Ajax v. including data in the HTML | 5,069,704 | 3 | 3 | 196 | 0 | javascript,python,ajax,django,performance | The obvious answer in MOST applications is to include them directly, although I would always recommend treating every usage per its own needs. Remember that 'page load speed' is as much perception as it is a measurable stat, especially when dealing with ajax functionality.
Example
You have loads and loads of data to d... | 0 | 0 | 0 | 0 | 2011-02-21T18:02:00.000 | 2 | 1.2 | true | 5,069,495 | 0 | 0 | 1 | 2 | I'm using JavaScript with jQuery, talking to a Django back end. There are some UI needs that require Ajax, because we can't know what data to send until the user gives some input. However, there is other data that is known at template time. What are the pros and cons of including that data in the template directly, ins... |
Is there an easy way in Plone to get email notifications when new users join the portal? | 5,070,368 | 1 | 2 | 1,115 | 0 | python,notifications,plone | You can easily customize the registered.pt template add a simple call to a PythonScript sending out an email through the MailHost api.
Doing a proper customization of plone.app.users.browser.register.py is much more complex. | 0 | 0 | 0 | 1 | 2011-02-21T19:03:00.000 | 4 | 0.049958 | false | 5,070,055 | 0 | 0 | 1 | 3 | I want to get email notifications to the portal email address whenever a new user joins the portal.
My guess is that I should code a new product to do that.
Does such product already exist (for Plone 4)?
I checked content rules, but AFAICT it could work only if I made the users contentish themselves with something like... |
Is there an easy way in Plone to get email notifications when new users join the portal? | 5,146,475 | 1 | 2 | 1,115 | 0 | python,notifications,plone | You can also just have login_next traverse to a Controller Python Script (you'll fine other similar ones in the /plone_login area of the core Plone product that end with the extension '.cpy') that you write that sends the email (perhaps notifyMangersUponLogin ) rather than it's default of traversing to login_success.
T... | 0 | 0 | 0 | 1 | 2011-02-21T19:03:00.000 | 4 | 0.049958 | false | 5,070,055 | 0 | 0 | 1 | 3 | I want to get email notifications to the portal email address whenever a new user joins the portal.
My guess is that I should code a new product to do that.
Does such product already exist (for Plone 4)?
I checked content rules, but AFAICT it could work only if I made the users contentish themselves with something like... |
Is there an easy way in Plone to get email notifications when new users join the portal? | 5,318,895 | 0 | 2 | 1,115 | 0 | python,notifications,plone | If you want to do it the right way, follow Martijn's directions above. If you want another dirty solution, do the following:
make a copy of register.cpy
insert the following code:
context.MailHost.send('Content-Type: text/plain\n\n' + 'User has registered: ' + str(username),
mfrom='me@gmail.com',
... | 0 | 0 | 0 | 1 | 2011-02-21T19:03:00.000 | 4 | 0 | false | 5,070,055 | 0 | 0 | 1 | 3 | I want to get email notifications to the portal email address whenever a new user joins the portal.
My guess is that I should code a new product to do that.
Does such product already exist (for Plone 4)?
I checked content rules, but AFAICT it could work only if I made the users contentish themselves with something like... |
Django caching for web applications | 5,072,157 | 0 | 4 | 1,151 | 0 | python,django,caching | Not quite what you are after, but johnny-cache will cache querysets, automatically invalidating on writes.
It may do enough of what you are after: and it is no work to use after setting up. | 0 | 0 | 0 | 0 | 2011-02-21T21:16:00.000 | 2 | 0 | false | 5,071,365 | 0 | 0 | 1 | 1 | My question is about best practices for caching database updates in Django.
I'm writing a ticketing system. I have a Ticket model and an Update model. Each time a user adds an update to a ticket, an Update is created and linked as foreign key to the Ticket.
I have a TicketDetail view, that shows the Ticket descriptio... |
Python mysqldb on Mac OSX 10.6 not working | 5,072,940 | 2 | 2 | 1,535 | 1 | python,mysql,django,macos | I eventually managed to solve the problem by Installing python 2.7 with Mac Ports and installing mysqldb using Mac Ports - was pretty simple after that. | 0 | 1 | 0 | 0 | 2011-02-21T22:35:00.000 | 2 | 1.2 | true | 5,072,066 | 0 | 0 | 1 | 2 | I am using Python 2.7 and trying to get a Django project running on a MySQL backend.
I have downloaded mysqldb and followed the guide here:http://cd34.com/blog/programming/python/mysql-python-and-snow-leopard/
Yet when I go to run the django project the following traceback occurs:
Traceback (most recent call last):
... |
Python mysqldb on Mac OSX 10.6 not working | 5,305,496 | 0 | 2 | 1,535 | 1 | python,mysql,django,macos | you needed to add the MySQL client libraries to the LD_LIBRARY_PATH. | 0 | 1 | 0 | 0 | 2011-02-21T22:35:00.000 | 2 | 0 | false | 5,072,066 | 0 | 0 | 1 | 2 | I am using Python 2.7 and trying to get a Django project running on a MySQL backend.
I have downloaded mysqldb and followed the guide here:http://cd34.com/blog/programming/python/mysql-python-and-snow-leopard/
Yet when I go to run the django project the following traceback occurs:
Traceback (most recent call last):
... |
Django-registration & Django-Socialauth | 5,085,483 | 1 | 0 | 529 | 0 | python,django,django-authentication,django-apps | There shouldn`t be any problems there. Django-Socialauth adda new auth backends, and it should works fine with permissions and decorators. And Django resistration just register a user on site, so unless you remove standard auth backend, it will work fine too. | 0 | 0 | 0 | 0 | 2011-02-22T05:52:00.000 | 1 | 1.2 | true | 5,074,537 | 0 | 0 | 1 | 1 | Have anyone used these 2 django apps together? I want to know how well these 2 gel together along with Django's User Authentication system.
When I mean Django's User Authentication System, I mean I should be able to use decorators like @login_required or grant permission to specific views (or functions in views.py) bas... |
How to write `app.yaml` file for Google App Engine app? | 5,077,700 | 1 | 1 | 1,439 | 0 | python,google-app-engine,yaml | you should put your static files into some directory, for example staticdata
then your app.yaml would look like:
application: temp
version: 1
runtime: python
api_version: 1
handlers:
- url: /staticdata
static_dir: staticdata
- url: /.*
script: temp.py | 0 | 1 | 0 | 0 | 2011-02-22T11:12:00.000 | 1 | 1.2 | true | 5,077,336 | 0 | 0 | 1 | 1 | I registered a Google App Engine app and I have some files below:
/index.html
/tabs.css
/tab.js
/temp.py
How should I write the app.yaml file? |
Automatic deletion or expiration of GAE datastore entities | 5,079,939 | 5 | 3 | 2,483 | 1 | python,google-app-engine,google-cloud-datastore | Assuming you have a DateProperty on the entities indicating when the election ended, you can have a cron job search for any older than 3 months every night and delete them. | 0 | 1 | 0 | 0 | 2011-02-22T15:09:00.000 | 3 | 1.2 | true | 5,079,885 | 0 | 0 | 1 | 1 | I'm building my first app with GAE to allow users to run elections, and I create an Election entity for each election.
To avoid storing too much data, I'd like to automatically delete an Election entity after a certain period of time -- say three months after the end of the election. Is it possible to do this automa... |
django signal on GAE | 5,083,039 | 0 | 1 | 124 | 0 | python,django,google-app-engine,django-nonrel | Does Django signals work on google app engine ?
Yes, as long as you save those models use the Model.save() | 0 | 1 | 0 | 0 | 2011-02-22T16:23:00.000 | 2 | 0 | false | 5,080,844 | 0 | 0 | 1 | 2 | Does Django signals work on google app engine ? I am using django-nonrel.
Thanks |
django signal on GAE | 5,080,893 | 0 | 1 | 124 | 0 | python,django,google-app-engine,django-nonrel | Works fine. Signals do not use the db. | 0 | 1 | 0 | 0 | 2011-02-22T16:23:00.000 | 2 | 1.2 | true | 5,080,844 | 0 | 0 | 1 | 2 | Does Django signals work on google app engine ? I am using django-nonrel.
Thanks |
How can i setup default paths, variables, etc when i launch the IronPython Console? | 5,084,686 | 2 | 1 | 163 | 0 | ironpython | For paths, you can set the IRONPYTHONPATH environment variable; it's a semi-colon separated list of paths that are added sys.path on startup.
For imports, I like -i option: create a .py file that has your common imports, and run it with ipy -i myscript.py (I would recommend creating a batch file for that).
You could al... | 0 | 0 | 0 | 0 | 2011-02-22T20:51:00.000 | 1 | 0.379949 | false | 5,083,824 | 1 | 0 | 1 | 1 | Everytime i start up the IronPython console to do some playing, the first thing i find myself doing is sys.path.append('myscripts')
How can i have the console load default stuff such as appending paths, importing .NET stuff -- that way i dont have to type it in everytime i launch the console.
thank you. |
Exporting a development django application to production | 48,786,643 | 0 | 1 | 2,805 | 0 | python,django,production-environment | Steps to get your Django App from development to Production
open your project folder then find settings.py find the following line,
SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
Change the debug to false.
Change your db credentials with the actual production server db credentials
in y... | 0 | 0 | 0 | 0 | 2011-02-22T23:02:00.000 | 3 | 0 | false | 5,085,099 | 0 | 0 | 1 | 1 | I've been developing a django web-application for three months now, and I'd like to set it to production. I'm currently using South as database schema manager and I haven't got any clue on how to export my application databases schemas and content, and my project code to another directory; in order to set my production... |
Editor for use with GoogleAppEngineLauncher on Mac | 5,086,257 | 4 | 2 | 226 | 0 | python,google-app-engine,editor,directory,yaml | Why not use your favorite editor? Textmate or gvim or emacs anything should do here. All them support Python and YAML syntax. | 0 | 1 | 0 | 0 | 2011-02-23T02:03:00.000 | 3 | 1.2 | true | 5,086,239 | 0 | 0 | 1 | 2 | What editors are best for use with the "Edit" button in GoogleAppEngineLauncher for Mac? A good editor would preferably be able to edit Python and YAML and be able to open directories. |
Editor for use with GoogleAppEngineLauncher on Mac | 5,087,788 | 0 | 2 | 226 | 0 | python,google-app-engine,editor,directory,yaml | Have you tried TextWrangler or jEdit? You can get the links to them on Apple site or you can google for them. They are pretty good editors. | 0 | 1 | 0 | 0 | 2011-02-23T02:03:00.000 | 3 | 0 | false | 5,086,239 | 0 | 0 | 1 | 2 | What editors are best for use with the "Edit" button in GoogleAppEngineLauncher for Mac? A good editor would preferably be able to edit Python and YAML and be able to open directories. |
Why selenium can not open some asp page? | 5,086,635 | 0 | 0 | 218 | 0 | asp.net,python,selenium-rc | Ok, I upgrade my selenium-server to 2.0b2, now it's ok. | 0 | 0 | 1 | 0 | 2011-02-23T02:54:00.000 | 1 | 1.2 | true | 5,086,524 | 0 | 0 | 1 | 1 | I use selenium-rc to test an asp.net website, test script is written in Python and the browser is Firefox 3.6. But When selenium open the first page of the website, A download dialog appear, not the web page, seems the page is proccessed as application/octet-stream, this cause my test script can not run successfully.
S... |
Programmatically create Google Apps Domain | 5,271,776 | 1 | 1 | 671 | 0 | java,python,google-app-engine | There is an API only available to Google Apps Resellers, if you are one of them you should get access to it. | 0 | 1 | 0 | 0 | 2011-02-23T18:13:00.000 | 2 | 1.2 | true | 5,095,117 | 0 | 0 | 1 | 1 | I am currently working on a project that involves the google apps provisioning api.
Without getting too detailed about the purpose or inner workings of the project, I would like to ask a very simple question:
Is there a way to programmatically create a google apps for business domain (especially as a reseller)?
After t... |
Killing individual Apache processes in mod_python | 5,098,486 | 0 | 1 | 318 | 0 | python,apache,mod-python | I'd say that even it is possible, it would be a tremendous hack (and instable) - you should set-up a process external to apache in this case, that would supervise running processes and kill an individual apache when it goes beyond memory/time predefined limits.
Such a script can be kept running continuously with a main... | 0 | 1 | 0 | 1 | 2011-02-23T19:33:00.000 | 1 | 0 | false | 5,096,057 | 0 | 0 | 1 | 1 | We are having a problem with individual apache processes utilizing large amounts of memory, depending on the request, and never releasing it back to the main system. Since these requests can happen at any time, over time the web server is pushed into swap, rendering it unresponsive even to SSH. Worse, after the reque... |
What are the advantages/disadvantages of using Jython/IronPython/Pyjamas? | 5,099,381 | 0 | 6 | 3,513 | 0 | python,ironpython,jython,pyjamas | But how does it scale?
As well as anything else. Scalability is about architecture, not language.
Anyone use these frameworks in industry?
Yes. | 0 | 0 | 0 | 1 | 2011-02-23T22:44:00.000 | 2 | 0 | false | 5,098,183 | 1 | 0 | 1 | 2 | EDIT
Okay, rookie here so please bear with me. What I'm trying to ask is the following:
Is it plausible for a Python-syntax fan to use one of these options while other team members "plain vanilla" version? Is it a matter of personal preference, or would it require converting other people to using these technologies ... |
What are the advantages/disadvantages of using Jython/IronPython/Pyjamas? | 5,209,736 | 5 | 6 | 3,513 | 0 | python,ironpython,jython,pyjamas | You are talking about two different things.
First, Jython and IronPython are Python implementations that you can embed in a Java or C# application to provide scripting capability. This reduces the amount of code that you have to write overall. Or you can look at them as a way to glue together and leverage an existing c... | 0 | 0 | 0 | 1 | 2011-02-23T22:44:00.000 | 2 | 1.2 | true | 5,098,183 | 1 | 0 | 1 | 2 | EDIT
Okay, rookie here so please bear with me. What I'm trying to ask is the following:
Is it plausible for a Python-syntax fan to use one of these options while other team members "plain vanilla" version? Is it a matter of personal preference, or would it require converting other people to using these technologies ... |
Google App Engine: how to tell sort location for a user value? | 5,099,184 | 1 | 2 | 95 | 0 | python,google-app-engine,sorting | You could get the count of number of entities that have total_value less than or equal to the current users total_value.
You could use the count() method to do so (on a Query object). | 0 | 0 | 0 | 0 | 2011-02-24T00:23:00.000 | 3 | 0.066568 | false | 5,099,012 | 0 | 0 | 1 | 1 | In my Main model I have a total_value and I sort with this value. When a user enters a value I wish to tell the user the order of his total_value. How do I do this?
In other words, if total_values in database are 5,8,10,25 and a user enters a total_value of 15 how do I tell him that he will be in the 4th place?
Thanks... |
Can python modules be used from Java programs using Jython without modification? | 5,100,178 | 3 | 0 | 261 | 0 | java,python,jython,cpython | Python modules can depend on certain Python versions (e.g. Python 3 vs Python 2 and even may require a minimum Python version (e.g. 2.6) in case of using dedicated language features introduced in some Python version)
Python modules may depend on C extensions which won't work with Jython
Python modules may use CPython f... | 0 | 0 | 0 | 0 | 2011-02-24T02:48:00.000 | 1 | 0.53705 | false | 5,099,816 | 1 | 0 | 1 | 1 | Can Python code be used from Java using Jython, without modifying the Python code in a way which will prevent it from working correctly in CPython?
If yes, what steps would have to be taken (in the Java code)?
If not, what are the reasons that this cannot be done (so far)? |
Splitting a HTML document using BeautifulSoup | 5,484,677 | -1 | 4 | 1,744 | 0 | python,html,beautifulsoup | Since no solution with a parser has been proposed to you, may I suggest that you should manage by yourself with regular expressions ?
The second point of Danish is of the same nature, as the name grep comes from 'global - regular expression - print'. But it is complicated by the fact the prettify functionality must be ... | 0 | 0 | 0 | 0 | 2011-02-24T03:50:00.000 | 2 | -0.099668 | false | 5,100,159 | 0 | 0 | 1 | 1 | We deal with long aggregated HTML documents (for conversion to PDF).
In some situations the aggregated HTML document must be split by chapter (dedicated HTML pages starting with a H1 tag) or by subchapters (dedicated HTML pages starting with each H1 or H2 tag). We are using BeautifulSoup for manipulating the aggregated... |
webservices in python | 5,104,394 | 0 | 0 | 931 | 0 | python,web-services,frameworks | For REST, I am very satisfied with Flask. | 0 | 1 | 0 | 1 | 2011-02-24T11:48:00.000 | 2 | 0 | false | 5,104,215 | 0 | 0 | 1 | 1 | i want to create a webservice (SOAP & REST) in python which cab be called from iphone,
now i have install python 2.7.1 on Ubuntu 10.04.2 LTS using Putty. so now i am searching for a nice and easy framework that helps me in creating webservices and web programming.
I have searched a lot but confused with the combinatio... |
async http request on Google App Engine Python | 5,111,470 | 2 | 4 | 1,253 | 0 | python,http,google-app-engine,asynchronous,request | Use the taskqueue. If you're just pushing data, there's no sense in waiting for the response. | 0 | 1 | 1 | 0 | 2011-02-24T16:43:00.000 | 4 | 0.099668 | false | 5,107,675 | 0 | 0 | 1 | 2 | Does anybody know how to make http request from Google App Engine without waiting a response?
It should be like a push data with http without latency for response. |
async http request on Google App Engine Python | 5,111,384 | 0 | 4 | 1,253 | 0 | python,http,google-app-engine,asynchronous,request | I've done this before by setting doing a URLFetch and setting a very low value for the deadline parameter. I put 0.1 as my value, so 100ms. You need to wrap the URLFetch in a try/catch also since the request will timeout. | 0 | 1 | 1 | 0 | 2011-02-24T16:43:00.000 | 4 | 0 | false | 5,107,675 | 0 | 0 | 1 | 2 | Does anybody know how to make http request from Google App Engine without waiting a response?
It should be like a push data with http without latency for response. |
Improving Performance of Django ForeignKey Fields in Admin | 48,409,460 | 0 | 18 | 7,301 | 0 | python,django,django-admin | Another option is to add readonly_fields instead of raw_id_fields | 0 | 0 | 0 | 0 | 2011-02-24T17:18:00.000 | 4 | 0 | false | 5,108,080 | 0 | 0 | 1 | 1 | By default, Django's admin renders ForeignKey fields in admin as a select field, listing every record in the foreign table as an option. In one admin-accessible model, I'm referencing the User model as a ForeignKey, and since I have thousands of users Django is populating the select with thousands of options. This is c... |
Does poster.encode module supported in python appengine? | 5,119,334 | 2 | 0 | 937 | 0 | python,google-app-engine | You'd need to deploy the module with your code by including it in your application's directory when deploying, but it does appear to be a pure python module and looking through the source I see no reason why it wouldn't work just fine in App Engine.
The only modules that won't work are those that use C extensions or ma... | 0 | 1 | 0 | 0 | 2011-02-25T15:46:00.000 | 2 | 0.197375 | false | 5,119,269 | 0 | 0 | 1 | 1 | Does poster.encode module supported in python appengine ??
if No , whats is the possible alternatives ? |
Which port should I set my service to listen to? | 5,122,409 | 1 | 0 | 422 | 0 | python,rest,service,standards,port | If you mean problem-free for yourself, a separate port like 8080 would be appropriate.
If you mean problem-free for your users, ports 80 (http) and 443 (https) are the only choices that make sense because they're the least likely to be blocked by firewalls. Of course, that means your application and web service would ... | 0 | 0 | 0 | 0 | 2011-02-25T20:06:00.000 | 4 | 0.049958 | false | 5,122,070 | 0 | 0 | 1 | 4 | I want to create a website which will serve more like a web-application. There will be two parts: the front-end (probably in PHP, Apache) and the back-end services (in Python, using Twisted)
The front-end will usually provide some JavaScript which would send Ajax requests to the Python services and receive data back.
... |
Which port should I set my service to listen to? | 5,122,137 | 1 | 0 | 422 | 0 | python,rest,service,standards,port | If you're intending for this to be distributed, you'd have to use a port above 1024, otherwise people using it on a Unix-type system would have to run it as root, which opens very large can of worms as far as security is concernted. | 0 | 0 | 0 | 0 | 2011-02-25T20:06:00.000 | 4 | 0.049958 | false | 5,122,070 | 0 | 0 | 1 | 4 | I want to create a website which will serve more like a web-application. There will be two parts: the front-end (probably in PHP, Apache) and the back-end services (in Python, using Twisted)
The front-end will usually provide some JavaScript which would send Ajax requests to the Python services and receive data back.
... |
Which port should I set my service to listen to? | 5,122,114 | 3 | 0 | 422 | 0 | python,rest,service,standards,port | The normal choice is http-alt(8080). | 0 | 0 | 0 | 0 | 2011-02-25T20:06:00.000 | 4 | 1.2 | true | 5,122,070 | 0 | 0 | 1 | 4 | I want to create a website which will serve more like a web-application. There will be two parts: the front-end (probably in PHP, Apache) and the back-end services (in Python, using Twisted)
The front-end will usually provide some JavaScript which would send Ajax requests to the Python services and receive data back.
... |
Which port should I set my service to listen to? | 5,122,117 | 1 | 0 | 422 | 0 | python,rest,service,standards,port | You can be blocked all and everywhere. Any uncommon port is likely to be blocked by serious firewall configurations. Either get a dedicated IP address and listen to port 80. Best to talk to your IT network guys. | 0 | 0 | 0 | 0 | 2011-02-25T20:06:00.000 | 4 | 0.049958 | false | 5,122,070 | 0 | 0 | 1 | 4 | I want to create a website which will serve more like a web-application. There will be two parts: the front-end (probably in PHP, Apache) and the back-end services (in Python, using Twisted)
The front-end will usually provide some JavaScript which would send Ajax requests to the Python services and receive data back.
... |
Need Advice on ide choice for Django Development | 5,123,178 | 2 | 4 | 959 | 0 | python,django,ide | This is going to quickly dissolve into a which editor is better discussion. The reality is that with django's "testserver" your choice of editor / ide become less important. The IDE does not have to be tightly bound to the running code with django. We use eclipse w/ pydev here at work almost exclusively. A few develop... | 0 | 0 | 0 | 0 | 2011-02-25T21:42:00.000 | 4 | 0.099668 | false | 5,123,030 | 0 | 0 | 1 | 2 | I've been programming with PHP for about 6 years, and wanna start developing on django.
Now I have some questions for you django pros. I've been using PHPDesigner for about a year, because I could never be relieved and code well with eclipse/aptana/similar. I just feel weird with them.
I also have used Komodo Edit and ... |
Need Advice on ide choice for Django Development | 5,123,296 | 3 | 4 | 959 | 0 | python,django,ide | There are lots of good choices. What you should mostly look for is a good IDE for Python, although support for Django templates has some benefits too.
Personally I use Eclipse plus PyDev, with a vim plugin. This way I can keep my favorite editor, and get the benefits of simple code refactoring, instant code navigat... | 0 | 0 | 0 | 0 | 2011-02-25T21:42:00.000 | 4 | 0.148885 | false | 5,123,030 | 0 | 0 | 1 | 2 | I've been programming with PHP for about 6 years, and wanna start developing on django.
Now I have some questions for you django pros. I've been using PHPDesigner for about a year, because I could never be relieved and code well with eclipse/aptana/similar. I just feel weird with them.
I also have used Komodo Edit and ... |
How to use django-debug-toolbar on AJAX calls? | 5,126,825 | 4 | 64 | 15,546 | 0 | python,django,django-debug-toolbar | Ddt plugs itself into a response, which means that there is no standard way of browsing its panels for AJAX request. Also, AJAX response can be in JSON format, which makes it impossible for ddt to plug into it.
Personally I'd find a way of logging ddt output to a text file, or maybe it supports client-server architectu... | 0 | 0 | 0 | 0 | 2011-02-26T04:04:00.000 | 4 | 0.197375 | false | 5,124,975 | 0 | 0 | 1 | 1 | I'm curious if there's a reasonable way to use the (amazing) django-debug-toolbar with AJAX queries.
For example, I use a jQuery $.get with a bunch of parameters to hit a Django URL and load it inline. If I have an error with that, it isn't registered on the toolbar. I also can't use it by copying the AJAX URL because... |
receive delivery list of send mail in django | 5,126,778 | 4 | 1 | 415 | 0 | python,django,email,smtp,email-confirmation | List of delivered emails is outside of the scope of Django, which is a web framework and not a replacement for services like Mailchimp. | 0 | 0 | 0 | 1 | 2011-02-26T06:58:00.000 | 1 | 1.2 | true | 5,125,544 | 0 | 0 | 1 | 1 | I want use send_mass_mail() in django and then want receive list of delivery mail
list with email address and problem for failed or delivered ok status
how i can make this modules ? |
What kind of things can be done with Java but not Python? | 5,126,443 | 0 | 13 | 13,215 | 0 | java,python,programming-languages | CPython has a lot of libraries with bindings to native libraries--not so Java. | 0 | 0 | 0 | 1 | 2011-02-26T10:26:00.000 | 5 | 0 | false | 5,126,346 | 0 | 0 | 1 | 1 | I would to pick up a new programming language - Java, having been using Python for some time. But it seems most things that can be done with Java can be done with Python. So I would like to know
What kind of things can be done with Java but not Python?
mobile programming (Android).
POSIX Threads Programming.
Convers... |
LMS in Python/Django/Ruby/Rails/PHP | 5,135,982 | 2 | 10 | 15,406 | 0 | php,python,ruby-on-rails,django | Moodle seems the only more or less usable open source LMS out there, although it's far from well written IMO. There are good payed LMS like Canvas. I don't think what you are looking for exists at this moment! | 0 | 0 | 0 | 0 | 2011-02-27T19:20:00.000 | 5 | 0.07983 | false | 5,135,325 | 0 | 0 | 1 | 2 | I am looking for an alternative to Moodle.
I searched and found pinax-lms-demo, which was Django-based;
and Astra which was Rails-based, but both were empty repo...
I need a LMS which has the following functions:
create class
Assign faculty
Upload materials
Take quiz
forum
scorm
chat
I spent more th... |
LMS in Python/Django/Ruby/Rails/PHP | 5,136,052 | 2 | 10 | 15,406 | 0 | php,python,ruby-on-rails,django | This is a real problem as open-source LMS are all in PHP, with the exception of Sakai which is in Java.
As I've written a LMS which tries to be compatible with SCORM I can say that it's not a small work to create a SCORM implementation.
The only project in Python I know is Cloud Course, created by Google on GAE (http:... | 0 | 0 | 0 | 0 | 2011-02-27T19:20:00.000 | 5 | 0.07983 | false | 5,135,325 | 0 | 0 | 1 | 2 | I am looking for an alternative to Moodle.
I searched and found pinax-lms-demo, which was Django-based;
and Astra which was Rails-based, but both were empty repo...
I need a LMS which has the following functions:
create class
Assign faculty
Upload materials
Take quiz
forum
scorm
chat
I spent more th... |
How to override an app in Django properly? | 5,233,036 | 5 | 5 | 2,057 | 0 | python,django,satchmo | What I have done which works is to copy the application that I have changed. In this case satchmo\apps\product.
I copied the app into my project folder
Amended my setting.py INSTALLED_APPS from 'product', to 'myproject.product',
This now carries the changes I've made to this app for this project only and leaves the or... | 0 | 0 | 0 | 0 | 2011-02-27T19:45:00.000 | 3 | 1.2 | true | 5,135,453 | 0 | 0 | 1 | 3 | I'm running Satchmo. There are many apps and I've changed some of the source in the Product app.
So my question is how can I override this properly because the change is site specific. Do I have to copy over the whole Satchmo framework and put it into my project or can I just copy one of the apps out and place it in s... |
How to override an app in Django properly? | 5,135,687 | 2 | 5 | 2,057 | 0 | python,django,satchmo | Normally, I'd say the best thing is to fork Satchmo and keep a copy with your changes.
If you are willing to play with the python path, make sure that your app's directory appears before the other (default) directory. From my tests, if you have two apps/modules with identical names, the first one found is used. | 0 | 0 | 0 | 0 | 2011-02-27T19:45:00.000 | 3 | 0.132549 | false | 5,135,453 | 0 | 0 | 1 | 3 | I'm running Satchmo. There are many apps and I've changed some of the source in the Product app.
So my question is how can I override this properly because the change is site specific. Do I have to copy over the whole Satchmo framework and put it into my project or can I just copy one of the apps out and place it in s... |
How to override an app in Django properly? | 5,137,813 | 4 | 5 | 2,057 | 0 | python,django,satchmo | When you add a 'Django App' to INSTALLED_APPS in your settings.py file, you're telling Django that there exists an importable python module with that name on your "python path". You can view your python path by viewing the contents of the list stored at sys.path.
Whenever Python (and in this case Django) attempts to im... | 0 | 0 | 0 | 0 | 2011-02-27T19:45:00.000 | 3 | 0.26052 | false | 5,135,453 | 0 | 0 | 1 | 3 | I'm running Satchmo. There are many apps and I've changed some of the source in the Product app.
So my question is how can I override this properly because the change is site specific. Do I have to copy over the whole Satchmo framework and put it into my project or can I just copy one of the apps out and place it in s... |
Comparing user's facebook/twitter friends to site's users in Python/Django | 5,137,217 | 1 | 2 | 323 | 0 | python,django,twitter | You should store the twitter user's ID because the username can change at any time, but the id will always be the same. You should be comparing the id's, not the usernames in the intersection_set that Ofri recommends. | 0 | 0 | 0 | 1 | 2011-02-28T00:32:00.000 | 2 | 0.099668 | false | 5,137,126 | 0 | 0 | 1 | 1 | I'm wondering if someone could help guide the approach to this fairly common problem:
I'm building a simple site which a user connects their twitter account to sign up. I'd like to create an interface which shows them which of their twitter friends are already using the site.
So I can get a list the user's twitter frie... |
Counting records from datastore | 5,139,865 | 4 | 0 | 122 | 0 | python,google-app-engine | Store the count in another entity (named Statistics for example), and modify your application so that the stored count is updated each time a new entity is inserted or deleted. | 0 | 1 | 0 | 0 | 2011-02-28T08:44:00.000 | 1 | 1.2 | true | 5,139,767 | 0 | 0 | 1 | 1 | I am using python with Django to develop application on google app engine.
Now my entity in data store contain millions or billions of record and I want to count those records in real time.
By using count() it takes more time then what I can afford
I want to count those record with in 2 or 3 second..
So can any one tel... |
Querying on multiple tables using google apps engine (Python) | 5,143,851 | 0 | 1 | 873 | 1 | python,google-app-engine,model | If your are looking for join - there is no joins in GAE. BTW, there is pretty easy to make 2 simple queries (Softwares and UserSoftware), and calculate all additional data manually | 0 | 1 | 0 | 0 | 2011-02-28T12:48:00.000 | 3 | 0 | false | 5,142,192 | 0 | 0 | 1 | 1 | I have three tables, 1-Users, 2-Softwares, 3-UserSoftwares.
if suppose, Users table having 6 user records(say U1,U2,...,U6) and Softwares table having 4 different softwares(say S1,S2,S3,S4) and UserSoftwares stores the references if a user requested for given software only.
For example: UserSoftwares(5 records) have on... |
Good Web hosts that support Ruby and Python? | 5,149,250 | 0 | 2 | 1,466 | 0 | python,ruby,django,apache,ruby-on-rails-3 | I use rackspace, it's 10$ /month for the basic setup, they just give you a clean install of whatever OS you want so it will support any packages/configurations you choose to install. | 0 | 0 | 0 | 1 | 2011-03-01T00:12:00.000 | 5 | 0 | false | 5,149,127 | 0 | 0 | 1 | 2 | I love Python and Ruby equally and I simply cannot standardize on one. I love Heroku, but it can get a speck pricey and is totally specific to Rails.
Is there a decently inexpensive host, or many, that adequately supports both Ruby and Python frameworks as well as offering common LAMPish support?
Yeah... I wanna know i... |
Good Web hosts that support Ruby and Python? | 5,149,489 | 0 | 2 | 1,466 | 0 | python,ruby,django,apache,ruby-on-rails-3 | I'm in accordance with elithrar. I switched to webfaction and I'm very happy with the change. They've a very good support (I got answers in less than half hour for my problems/questions) and when my question is got by one of the IT guys, the same guy cares about all the subsequent communications until problem, doubts a... | 0 | 0 | 0 | 1 | 2011-03-01T00:12:00.000 | 5 | 0 | false | 5,149,127 | 0 | 0 | 1 | 2 | I love Python and Ruby equally and I simply cannot standardize on one. I love Heroku, but it can get a speck pricey and is totally specific to Rails.
Is there a decently inexpensive host, or many, that adequately supports both Ruby and Python frameworks as well as offering common LAMPish support?
Yeah... I wanna know i... |
Django on python2.5 | 5,154,551 | 0 | 0 | 238 | 0 | python,django,ubuntu-10.10 | Install python2.5 with synaptic, then you will be able to use easy_install2.5 to install django. If you don't have the python2.5 in your package list you can put django on your python2.5 system path and be with it
to view the system path do:
python2.5
import sys
sys.path | 0 | 1 | 0 | 0 | 2011-03-01T12:25:00.000 | 1 | 1.2 | true | 5,154,479 | 0 | 0 | 1 | 1 | AppEngine needs Python2.5.
Ubuntu 2010.10 comes with Python 2.6.6 and I didn't want to interfere with it, so I downloaded and compiled Python 2.5 in my home directory.
Then I downloaded Django-1.2.5.tar.gz, and ran "sudo python setup.py install".
Problem: "import django" says "ImportError: No module named django"
I gu... |
GWT or Python or Ruby for Web Development | 5,156,600 | 1 | 1 | 3,022 | 0 | python,ruby,gwt | GWT is really a frontend development technology. It includes components that make it play nice with the backend, but it is primarily a UI framework. | 0 | 0 | 0 | 1 | 2011-03-01T15:24:00.000 | 6 | 0.033321 | false | 5,156,496 | 0 | 0 | 1 | 3 | I want to embark on learning a totally new language for web back-end development and I've narrowed down my choice between these three:
GWT
Ruby
Python
Do you know or recommend of any sites that walks you through building a simple site using these technologies that could be easily deployed and tested?
By the way, I a... |
GWT or Python or Ruby for Web Development | 5,156,700 | 0 | 1 | 3,022 | 0 | python,ruby,gwt | @Finbarr...but it contains a full fledged Java Servlet Backend.
And this is probably why I'd suggest you to use RoR or Django or something too cook up a simple website.
GWT Applications are usually made of Server components written in Java and Client Side code (mostly JavaScript) that has been generated from Java. Us... | 0 | 0 | 0 | 1 | 2011-03-01T15:24:00.000 | 6 | 0 | false | 5,156,496 | 0 | 0 | 1 | 3 | I want to embark on learning a totally new language for web back-end development and I've narrowed down my choice between these three:
GWT
Ruby
Python
Do you know or recommend of any sites that walks you through building a simple site using these technologies that could be easily deployed and tested?
By the way, I a... |
GWT or Python or Ruby for Web Development | 5,164,844 | 0 | 1 | 3,022 | 0 | python,ruby,gwt | I would personally go with Python/Django (you can get nice overview of the technology on djangobook.com) but Ruby/Rails is probably equally good.
And about GWT ... hmm we are about to start GWT project at work and I am really scared. Code looks terrible bloated , generated HTML is huge , performance can be a problem an... | 0 | 0 | 0 | 1 | 2011-03-01T15:24:00.000 | 6 | 0 | false | 5,156,496 | 0 | 0 | 1 | 3 | I want to embark on learning a totally new language for web back-end development and I've narrowed down my choice between these three:
GWT
Ruby
Python
Do you know or recommend of any sites that walks you through building a simple site using these technologies that could be easily deployed and tested?
By the way, I a... |
python cache library | 5,158,057 | 1 | 4 | 1,693 | 0 | python,caching,memcached | Beaker as said is the way to go. It supports multiple backends including Memcached. | 0 | 0 | 0 | 0 | 2011-03-01T16:59:00.000 | 2 | 0.099668 | false | 5,157,696 | 0 | 0 | 1 | 1 | Before reinventing the wheel, I was wondering if there was a non-Django cache library that was similar to the one provided with Django. Basically, it would allow different backends (ideally, file and memcached to start) to be used just like Django's cache, and then behave identically regardless of backend used.
I've se... |
many to many problem django | 5,164,550 | 0 | 1 | 352 | 0 | python,django | Post.objects.all(catagory__title="My catagory title")? | 0 | 0 | 0 | 0 | 2011-03-02T06:50:00.000 | 3 | 0 | false | 5,164,307 | 0 | 0 | 1 | 1 | how in django find list of post related with special many to many field?
for example
catagory have title
post have many to many relation to catagory
how find all post from category title |
Best way to save availability of user over days of week in python/django | 5,168,529 | 0 | 5 | 1,639 | 0 | python,django | I'd go for separate boolean columns.
It'll be a lot easier for you to then query, say, for users that are available on mondays; or to count the number of users that available through every weekday, or whatever. | 0 | 0 | 0 | 0 | 2011-03-02T13:36:00.000 | 6 | 0 | false | 5,168,207 | 0 | 0 | 1 | 2 | I want to store users preferences for day(s) of week he might be available. e.g. A user can be available on saturday, sunday but not on other days.
Currently I am using array of 7 checkboxes(values=1,2,...7) so that user can select individual days of his availability.
Now the first question is how can i store this in d... |
Best way to save availability of user over days of week in python/django | 5,168,522 | 1 | 5 | 1,639 | 0 | python,django | One other option is the more-or-less obvious one: define a table of the days of the week, and have a ManyToManyField map one to the other. The admin would just work, you can do searches based on dates, and it works on SQLite unlike some of the functions in django-bitfield. Searches can be fast, since they're within the... | 0 | 0 | 0 | 0 | 2011-03-02T13:36:00.000 | 6 | 0.033321 | false | 5,168,207 | 0 | 0 | 1 | 2 | I want to store users preferences for day(s) of week he might be available. e.g. A user can be available on saturday, sunday but not on other days.
Currently I am using array of 7 checkboxes(values=1,2,...7) so that user can select individual days of his availability.
Now the first question is how can i store this in d... |
Can Python be embedded in HTML like PHP and JSP? | 5,168,637 | 1 | 24 | 41,257 | 0 | python,html | Use Cheetah or another templating engine. | 0 | 0 | 0 | 1 | 2011-03-02T14:10:00.000 | 5 | 0.039979 | false | 5,168,588 | 0 | 0 | 1 | 3 | Is there a way of writing Python embedded in HTML like I do with PHP or JSP? |
Can Python be embedded in HTML like PHP and JSP? | 5,168,640 | 7 | 24 | 41,257 | 0 | python,html | There is... But you're highly suggested to use a templating engine, or some other means of separating the presentation from the business layer.
There are some available that use python as the templating language, but it's nasty because python is sensitive to whitespace, so special syntax hacks have to be added. | 0 | 0 | 0 | 1 | 2011-03-02T14:10:00.000 | 5 | 1 | false | 5,168,588 | 0 | 0 | 1 | 3 | Is there a way of writing Python embedded in HTML like I do with PHP or JSP? |
Can Python be embedded in HTML like PHP and JSP? | 5,168,647 | 2 | 24 | 41,257 | 0 | python,html | Several templating engines support this in one way or another: Mako, Jinja, and Genshi are all popular choices.
Different engines support different features of Python and may be better suited to your needs. Your best bet is to try them out and see what works. | 0 | 0 | 0 | 1 | 2011-03-02T14:10:00.000 | 5 | 0.07983 | false | 5,168,588 | 0 | 0 | 1 | 3 | Is there a way of writing Python embedded in HTML like I do with PHP or JSP? |
After saving memcache data, is it immediately available on GAE? | 5,170,495 | 3 | 1 | 699 | 0 | python,google-app-engine,caching,memcached | The distributed memcache architecture has a pool of memcache instances that serves all the Google App Engine applications; the stored data is not replicated between memcache servers.
After successfully saving data on memcache, your data will be there* for any subsequent requests because it is stored in one specific me... | 0 | 1 | 0 | 0 | 2011-03-02T14:37:00.000 | 3 | 1.2 | true | 5,169,001 | 0 | 0 | 1 | 1 | On Google App Engine (python), I need to save data with memcache and quickly read it on another page.
But before I start coding to have memcache saved, then on the next page I open up that data with the known key, I'm starting to wonder if the data will always be there on the next page? How long does it take to cache ... |
How can I authenticate my mobile application and underlying server using Facebook? | 5,259,777 | -1 | 0 | 771 | 0 | iphone,python,django,google-app-engine | You can try using the OAuth framework | 0 | 0 | 0 | 0 | 2011-03-02T18:44:00.000 | 1 | -0.197375 | false | 5,171,905 | 0 | 0 | 1 | 1 | The behaviour I want is simple:
User starts up the application.
User is prompted for their Facebook username and password.
On successful login, user is now authenticated for the application and the web server. There is now a user in the server associated with the Facebook ID. All further HTTP requests will have a cook... |
WIth PyCharm, why is the PYTHONPATH when running a Django project different from when running the manage.py syncdb task? | 5,173,224 | 0 | 1 | 1,737 | 0 | python,django,pythonpath,pycharm,syncdb | Did you select the right python install for your project in Settings > Python Interpreter? | 0 | 0 | 0 | 0 | 2011-03-02T19:15:00.000 | 2 | 0 | false | 5,172,214 | 0 | 0 | 1 | 1 | Shouldn't it be the same by default? If not, is there some way to fix this so that the same PYTHONPATH is used? |
Django templates syntax highlighting in Eclipse | 6,933,282 | 13 | 27 | 15,866 | 0 | python,django,ide,syntax-highlighting,pydev | For clarity
Django Templates Editor is only available with Aptana 3.0 and later. Pydev in eclipse alone does not support it. Aptana is available as an eclipse plugin or stand alone.
As mentioned by mcoconnor Window -> Preferences -> General -> Editor -> File Associations will give you a list of extensions.
Choose ... | 0 | 0 | 0 | 0 | 2011-03-02T20:28:00.000 | 5 | 1 | false | 5,173,024 | 0 | 0 | 1 | 2 | I use Eclipse and pydev for django development. This has worked more or less ok, including debugging. Syntax highlighting doesn't seem to work everywhere though. I couldn't get any highlighting for the templates thought. Is there a way to get the highlighting and code suggestions for the templates? |
Django templates syntax highlighting in Eclipse | 5,173,496 | -1 | 27 | 15,866 | 0 | python,django,ide,syntax-highlighting,pydev | If you install the Eclipse Web Tools Platform (WTP), it bundles a nice HTML editor, which does 95% of the syntax highlighting you'd want in a Django template. It also includes editors for other common web types, like JS and CSS, which are often nice when working with Django projects. This will also give you code comp... | 0 | 0 | 0 | 0 | 2011-03-02T20:28:00.000 | 5 | -0.039979 | false | 5,173,024 | 0 | 0 | 1 | 2 | I use Eclipse and pydev for django development. This has worked more or less ok, including debugging. Syntax highlighting doesn't seem to work everywhere though. I couldn't get any highlighting for the templates thought. Is there a way to get the highlighting and code suggestions for the templates? |
Python or PyPy for small group and large project? | 5,180,344 | 3 | 0 | 852 | 0 | python,django,couchdb,pylons,pypy | HTML 5, CSS 3 - PyPy 1.4/CPython 3 + Pylons/Tornado/Django - CouchDB/MongoDB/Riak + Erlang?
Simplify.
Python 2.7, Django 1.2, SQLite and MongoDB get started building stuff right away.
Add later. Upgrade to Python 3 later. | 0 | 0 | 0 | 0 | 2011-03-03T11:26:00.000 | 4 | 0.148885 | false | 5,180,099 | 0 | 0 | 1 | 4 | Early stage of planning a large project - difficult decision of choosing frameworks :)
In mind:
"select way - run fast".
Select technologies with growth opportunity, prototype as fast as possible.
"look at horizon - build a ship".
Understand the scope, invest in difficult decision but reach the goal.
"take the best ... |
Python or PyPy for small group and large project? | 5,204,074 | 0 | 0 | 852 | 0 | python,django,couchdb,pylons,pypy | It's good prqctice to mix technologies in scope of a project. Depending on purpose for example erlang may be more suitable than python. | 0 | 0 | 0 | 0 | 2011-03-03T11:26:00.000 | 4 | 0 | false | 5,180,099 | 0 | 0 | 1 | 4 | Early stage of planning a large project - difficult decision of choosing frameworks :)
In mind:
"select way - run fast".
Select technologies with growth opportunity, prototype as fast as possible.
"look at horizon - build a ship".
Understand the scope, invest in difficult decision but reach the goal.
"take the best ... |
Python or PyPy for small group and large project? | 5,180,163 | 5 | 0 | 852 | 0 | python,django,couchdb,pylons,pypy | Go with CPython. All known bindings to external libraries or whatever are supposed to work with CPython. I doubt that you will have success with PyPy here. Just from the prospective of risk management in large projects: stay mainstream. | 0 | 0 | 0 | 0 | 2011-03-03T11:26:00.000 | 4 | 0.244919 | false | 5,180,099 | 0 | 0 | 1 | 4 | Early stage of planning a large project - difficult decision of choosing frameworks :)
In mind:
"select way - run fast".
Select technologies with growth opportunity, prototype as fast as possible.
"look at horizon - build a ship".
Understand the scope, invest in difficult decision but reach the goal.
"take the best ... |
Python or PyPy for small group and large project? | 5,180,288 | 5 | 0 | 852 | 0 | python,django,couchdb,pylons,pypy | Python (assuming you mean the CPython implementation) and PyPy are not frameworks, but implementations of the Python language. Note that they implement the same language. I'd start with CPython because it's industrial-strength today, and the multitude of Python libraries, frameworks and extensions all target it.
PyPy ... | 0 | 0 | 0 | 0 | 2011-03-03T11:26:00.000 | 4 | 0.244919 | false | 5,180,099 | 0 | 0 | 1 | 4 | Early stage of planning a large project - difficult decision of choosing frameworks :)
In mind:
"select way - run fast".
Select technologies with growth opportunity, prototype as fast as possible.
"look at horizon - build a ship".
Understand the scope, invest in difficult decision but reach the goal.
"take the best ... |
How can I let android emulator talk to the localhost? | 5,185,046 | 16 | 6 | 3,711 | 0 | python,android,android-emulator,webview | Use address 10.0.2.2 instead of localhost. | 0 | 0 | 1 | 0 | 2011-03-03T18:39:00.000 | 4 | 1.2 | true | 5,185,016 | 0 | 0 | 1 | 4 | I'm running an android app on the emulator. This app tries to load a html file using the webview api.
I also have a simple http server running on the same computer under the directory where I want to serve the request using the following python command:
python -m SimpleHTTPServer 800
However, I couldn't access this lin... |
How can I let android emulator talk to the localhost? | 5,185,075 | 0 | 6 | 3,711 | 0 | python,android,android-emulator,webview | Actually localhost refers to the emulators directory itself.
Use your system ip to access the link | 0 | 0 | 1 | 0 | 2011-03-03T18:39:00.000 | 4 | 0 | false | 5,185,016 | 0 | 0 | 1 | 4 | I'm running an android app on the emulator. This app tries to load a html file using the webview api.
I also have a simple http server running on the same computer under the directory where I want to serve the request using the following python command:
python -m SimpleHTTPServer 800
However, I couldn't access this lin... |
How can I let android emulator talk to the localhost? | 5,185,051 | 0 | 6 | 3,711 | 0 | python,android,android-emulator,webview | localhost is a short-cut to tell the "whatever" to talk to itself. So, you are telling the emulator to look for a web server running in the emulator.
Instead of trying to connect to localhost, look up the IP for your computer and use that instead. | 0 | 0 | 1 | 0 | 2011-03-03T18:39:00.000 | 4 | 0 | false | 5,185,016 | 0 | 0 | 1 | 4 | I'm running an android app on the emulator. This app tries to load a html file using the webview api.
I also have a simple http server running on the same computer under the directory where I want to serve the request using the following python command:
python -m SimpleHTTPServer 800
However, I couldn't access this lin... |
How can I let android emulator talk to the localhost? | 5,186,087 | -2 | 6 | 3,711 | 0 | python,android,android-emulator,webview | Best solution is not to use emulator at all. Its slow and full of bugs. Get your employer to buy a device or two. | 0 | 0 | 1 | 0 | 2011-03-03T18:39:00.000 | 4 | -0.099668 | false | 5,185,016 | 0 | 0 | 1 | 4 | I'm running an android app on the emulator. This app tries to load a html file using the webview api.
I also have a simple http server running on the same computer under the directory where I want to serve the request using the following python command:
python -m SimpleHTTPServer 800
However, I couldn't access this lin... |
What is the reverse equivalent of cascade? | 5,185,748 | 1 | 6 | 1,807 | 0 | python,django | I've had a similar problem and I've ended up adding a counter into the Album equivalent. If the count is 0 and the operation is delete(), then the album object is delete()d.
Other solution os to overload the delete() method in the song model, or use post-delete to delete the album. | 0 | 0 | 0 | 0 | 2011-03-03T19:34:00.000 | 4 | 0.049958 | false | 5,185,563 | 0 | 0 | 1 | 1 | I am writing a small music database. Learning SQL lies quite a long time in my past and I always wanted to give Django a try. But there is one thing I couldn't wrap my head around.
Right now, my models only consist of two Classes, Album and Song.
Song has a foreign key pointing to the album it belongs to. Now if I woul... |
Cannot find appcfg.py or dev_appserver.py? | 5,187,728 | 1 | 11 | 17,655 | 0 | python,google-app-engine,macos,bash | Try: ./appcfg.py
Current dir is usually not part of path. | 0 | 1 | 0 | 0 | 2011-03-03T22:48:00.000 | 7 | 0.028564 | false | 5,187,602 | 0 | 0 | 1 | 2 | My computer says...
"-bash: appcfg.py: command not found"
What is wrong?
I can run my application using google-app-engine-launcher and I have python pre-installed.
I am trying to upload my app using "appcfg.py update myapp"
I am new to Mac development. |
Cannot find appcfg.py or dev_appserver.py? | 5,188,313 | 17 | 11 | 17,655 | 0 | python,google-app-engine,macos,bash | In App Engine launcher there is a menu option called "Make Symlinks..." that adds symlinks for the various App Engine utility commands, like appcfg.py. | 0 | 1 | 0 | 0 | 2011-03-03T22:48:00.000 | 7 | 1.2 | true | 5,187,602 | 0 | 0 | 1 | 2 | My computer says...
"-bash: appcfg.py: command not found"
What is wrong?
I can run my application using google-app-engine-launcher and I have python pre-installed.
I am trying to upload my app using "appcfg.py update myapp"
I am new to Mac development. |
Multiple pluralisable variables in internationalized django template | 5,244,999 | 4 | 3 | 846 | 0 | python,django,internationalization,translation,gettext | After doing some more research and reading, specifically about gettext, I don't think this is possible. gettext documentation only allows one variable to control the pluralization. There are probably problems with having 2 variable pluralization, since in arabic, you'd have to have 36 different strings to translate.
In... | 0 | 0 | 0 | 0 | 2011-03-04T15:53:00.000 | 1 | 1.2 | true | 5,196,084 | 0 | 0 | 1 | 1 | I am internationalizing (i18n) our django project, i.e. adding {% blocktrans %} to our templates. I know about using count and {% plural %} to have different strings for varaibles. However I have a string that has two variables that each need to be pluralized, i.e. 4 possible options.
For example, my string is "You hav... |
GAE redirection with a delay | 5,203,395 | 1 | 1 | 2,116 | 0 | python,google-app-engine,redirect | import time at the top of your module and do a time.sleep(0.5) before you do a self.redirect call. The sleep argument can take a floating point value of number of seconds to delay. Just make sure that you don't exceed 30 seconds of delay as GAE expects that every request be handled within that otherwise it will be int... | 0 | 1 | 0 | 0 | 2011-03-05T11:02:00.000 | 2 | 0.099668 | false | 5,203,378 | 0 | 0 | 1 | 2 | Is that possible to redirect to another url with a delay in GAE? I know I can use JavaScript for this purpose, but may be there is a way to do delayed redirection without it?
Now I use self.redirect("/") from GAE tutorial.
Thanks. |
GAE redirection with a delay | 5,203,418 | 8 | 1 | 2,116 | 0 | python,google-app-engine,redirect | You can use the <meta http-equiv="refresh" content="x;url=http://yoururl/"> tag where x is the number of seconds to wait before redirect.
This tag would go in <head> part of the generated page. | 0 | 1 | 0 | 0 | 2011-03-05T11:02:00.000 | 2 | 1.2 | true | 5,203,378 | 0 | 0 | 1 | 2 | Is that possible to redirect to another url with a delay in GAE? I know I can use JavaScript for this purpose, but may be there is a way to do delayed redirection without it?
Now I use self.redirect("/") from GAE tutorial.
Thanks. |
Python Web/UI Options | 5,205,268 | 0 | 0 | 3,564 | 0 | python,user-interface | Tkinter is probably going to be the solution you can use quickest. Its API is simple and straight-forward, and you probably already have it installed. | 0 | 0 | 0 | 0 | 2011-03-05T16:24:00.000 | 4 | 0 | false | 5,205,062 | 0 | 0 | 1 | 1 | We are in the process of standing up a UI on top of a python system. This is all throw away code, so we want something quick, yet presentable.
We will have a couple of "interfaces" but they will be of two types. One will be control, it will basically be sitting on top of a python thread, and accepting requests from... |
CUPP (pentest) on google app engine | 5,210,681 | 2 | 0 | 272 | 0 | python,google-app-engine | I see a few problems right off:
You'll need to create a web interface to the script
GAE does not allow long running tasks and this looks like it could take a while. You'd need to recode it to break the work up into chunks.
Outbound FTP (for fetching word lists) is not supported on GAE
Local file write access is not s... | 0 | 1 | 0 | 0 | 2011-03-05T21:18:00.000 | 1 | 0.379949 | false | 5,206,838 | 0 | 0 | 1 | 1 | Do you see any limitations for cupp (http://www.securityfocus.com/tools/7320) running on GAE? |
Performance between Django and raw Python | 5,209,121 | 3 | 5 | 1,142 | 0 | python,django | Premature optimisation is the root of all evil.
Django makes things extremely convenient if you're doing web development. That plus a great community with hundreds of plugins for common tasks is a real boon if you're doing serious work.
Even if your "raw" implementation is faster, I don't think it will be fast enough... | 0 | 0 | 0 | 0 | 2011-03-06T02:06:00.000 | 4 | 0.148885 | false | 5,208,158 | 0 | 0 | 1 | 4 | I was wondering what the performance difference is between using plain python files to make web pages and using Django. I was just wondering if there was a significant difference between the two. Thanks |
Performance between Django and raw Python | 5,208,366 | 11 | 5 | 1,142 | 0 | python,django | Django IS plain Python. So the execution time of each like statement or expression will be the same. What needs to be understood, is that many many components are put together to offer several advantages when developing for the web:
Removal of common tasks into libraries (auth, data access, templating, routing)
Correc... | 0 | 0 | 0 | 0 | 2011-03-06T02:06:00.000 | 4 | 1.2 | true | 5,208,158 | 0 | 0 | 1 | 4 | I was wondering what the performance difference is between using plain python files to make web pages and using Django. I was just wondering if there was a significant difference between the two. Thanks |
Performance between Django and raw Python | 5,208,183 | 5 | 5 | 1,142 | 0 | python,django | Depends on how your "plain Python" makes web pages. If it uses a templating engine, for instance, the performance of that engine is going make a huge difference. If it uses a database, what kind of data access layer you use (in the context of the requirements for that layer) is going to make a difference.
The question,... | 0 | 0 | 0 | 0 | 2011-03-06T02:06:00.000 | 4 | 0.244919 | false | 5,208,158 | 0 | 0 | 1 | 4 | I was wondering what the performance difference is between using plain python files to make web pages and using Django. I was just wondering if there was a significant difference between the two. Thanks |
Performance between Django and raw Python | 5,208,968 | 2 | 5 | 1,142 | 0 | python,django | Django is also plain Python.
See the performance mostly relies on how efficient your code is.
Most of the performance issues of software arise from the inefficient code, rather than choice of tools and language. So the implementation matters. AFAIK Django does this excellently and it's performance is above the mark. | 0 | 0 | 0 | 0 | 2011-03-06T02:06:00.000 | 4 | 0.099668 | false | 5,208,158 | 0 | 0 | 1 | 4 | I was wondering what the performance difference is between using plain python files to make web pages and using Django. I was just wondering if there was a significant difference between the two. Thanks |
What's the best way to handle source-like data files in a web application? | 5,210,383 | 1 | 4 | 127 | 1 | python | Okay, here's an idea:
Ship all the data as is done now.
Have the installation script install it in the appropriate databases.
Let users modify this database and give them a button "restore to original" that simply reinstalls from the text file.
Alternatively, this route may be easier, esp. when upgrading an installat... | 0 | 0 | 0 | 0 | 2011-03-06T11:56:00.000 | 2 | 0.099668 | false | 5,210,318 | 0 | 0 | 1 | 1 | I have about 30 MB of textual data that is core to the algorithms I use in my web application.
On the one hand, the data is part of the algorithm and changes to the data can cause an entire algorithm to fail. This is why I keep the data in text files in my source control, and all changes are auto-tested (pre-commit). I... |
Python frameworks for developing facebook apps | 23,464,883 | 0 | 6 | 2,182 | 0 | python,facebook | If you do not want to start on Django now. Try learning Flask(which is comparatively a lot easier to begin than Django) and then start building app with Flask. | 0 | 0 | 0 | 1 | 2011-03-06T13:13:00.000 | 3 | 0 | false | 5,210,692 | 0 | 0 | 1 | 1 | I'd like to ask you about your experiences in developing facebook applications in Python. Which of the popular web frameworks for this language you think best suits this purpose? I know "best" is a very subjective word, so I'm specifically interested in the following:
Most reusable libraries. For example one might wan... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.