Q_Id
int64
337
49.3M
CreationDate
stringlengths
23
23
Users Score
int64
-42
1.15k
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
Tags
stringlengths
6
105
A_Id
int64
518
72.5M
AnswerCount
int64
1
64
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
6
11.6k
Available Count
int64
1
31
Q_Score
int64
0
6.79k
Data Science and Machine Learning
int64
0
1
Question
stringlengths
15
29k
Title
stringlengths
11
150
Score
float64
-1
1.2
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
8
6.81M
3,223,557
2010-07-11T15:28:00.000
13
1
0
0
php,python,jsp
3,223,581
7
true
1
0
Before learning either of these, spend some real time and learn HTML and CSS in depth. Also learn Javascript and JQuery (or your favorite client side library). The O'Reilly books on the topic are pretty much all good IMO. I say that because I think that you'll find that for most modern web sites, a lot of richness is...
6
5
0
Friends, I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here. PHP, Python or JSP, consid...
Which web technology to learn for an experienced C++ developer?
1.2
0
0
1,073
3,223,557
2010-07-11T15:28:00.000
0
1
0
0
php,python,jsp
3,223,646
7
false
1
0
There are many options. Since you already know (and is learning about) Java, one option is to use GWT for both server and client. This can help you in that you do not need to learn another language (JS/HTML/Python/PHP etc). If your portal is going to be big, using Java can help you organise the application better - us...
6
5
0
Friends, I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here. PHP, Python or JSP, consid...
Which web technology to learn for an experienced C++ developer?
0
0
0
1,073
3,223,557
2010-07-11T15:28:00.000
0
1
0
0
php,python,jsp
3,224,044
7
false
1
0
It really isn't that similar to C++, but I would recommend PHP. You really can't expect a server-side scripting language to be similar to a compiled language like C++. Personally, I find PHP to be an ugly, messy looking language, but once you get into it, it's very rewarding. Other languages have too many drawbacks. AS...
6
5
0
Friends, I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here. PHP, Python or JSP, consid...
Which web technology to learn for an experienced C++ developer?
0
0
0
1,073
3,225,397
2010-07-12T01:45:00.000
1
0
0
0
python,google-app-engine
3,225,411
4
false
1
0
Keep a counter object for your application stored in the database, and update it whenever you create and delete objects.
2
5
0
What is the best way to determine how many models of a certain kind are in my app's datastore? The documentation says that MyKind.all().count() is only marginally better than retrieving all of the data, and has a limit of 1000. This is not helpful, because I am expecting to have 6000+ instances of MyKind stored. Is the...
GAE: Best way to determine how many of a Kind is stored?
0.049958
0
0
121
3,225,397
2010-07-12T01:45:00.000
3
0
0
0
python,google-app-engine
3,225,480
4
false
1
0
If you do keys-only it should be pretty fast, since this only has to read the index and doesn't actually fetch any entities. Use a cursor and loop until count() returns less than 1000.
2
5
0
What is the best way to determine how many models of a certain kind are in my app's datastore? The documentation says that MyKind.all().count() is only marginally better than retrieving all of the data, and has a limit of 1000. This is not helpful, because I am expecting to have 6000+ instances of MyKind stored. Is the...
GAE: Best way to determine how many of a Kind is stored?
0.148885
0
0
121
3,225,712
2010-07-12T03:37:00.000
0
0
1
0
python,list,tuples
3,225,718
3
false
0
0
If you mean what the maximum size of a tuple or list is, I assume that it is very large. Most likely you would run out of memory before hitting some limit. Someone else can add to this if they have specific knowledge of the indexing, possible 2.1 or 4.2 billion items in 32-bit and 8 or 16 sextillion in 64-bit.
1
3
0
How many items can contain tuple or list in python? What will be if it is 10 000?
How many can a tuple or list contain in Python?
0
0
0
8,999
3,226,529
2010-07-12T07:22:00.000
0
0
0
0
python,django,django-authentication,django-contrib
3,229,364
2
false
1
0
My recommendation is to not re-solve a problem that django-registration solves quite nicely. It has a pluggable backend system that lets you customize it as much or as little as needed.
1
0
0
I'm rolling my own custom registration module in Django based on django.contrib.auth. My registration module will have some extra functionality and help me reduce my dependency on other django modules that I'm currently using like django-registration and django-emailchange. I've run into a what-the-best-way-to-do-it pr...
Should I place custom registration code in Views, Models or Managers?
0
0
0
152
3,227,789
2010-07-12T10:49:00.000
4
0
0
1
python,programming-languages,prototype
3,227,900
5
false
0
0
I started twelve years ago to replace my Perl scripts -- and the new ones were shorter and way more readable. So, readability and the gentle learning curve was the main reason to use it. After version 2, the language has got more and more flexible, and with it my programming needs and I got used to do metaprogramming w...
3
5
0
Coming from an enterprise systems background (think Java and Windows) - I'm surprised at the popularity of python as a prototyping language and am trying to put my finger on the precise reason for this. Examples include being listed as one of the four languages Google uses. Possible reasons include: enables rapid syst...
What is the dominant reason for Python's popularity as a systems and application programming language?
0.158649
0
0
3,307
3,227,789
2010-07-12T10:49:00.000
6
0
0
1
python,programming-languages,prototype
3,227,836
5
false
0
0
enables rapid systems application prototyping using of c++ libraries using swig wrappers ... What? Most people doing Python programming aren't doing C++ programming, they're doing Python programming. And they're doing it fast, because they don't need to worry about things like memory management, or templates, or... t...
3
5
0
Coming from an enterprise systems background (think Java and Windows) - I'm surprised at the popularity of python as a prototyping language and am trying to put my finger on the precise reason for this. Examples include being listed as one of the four languages Google uses. Possible reasons include: enables rapid syst...
What is the dominant reason for Python's popularity as a systems and application programming language?
1
0
0
3,307
3,227,789
2010-07-12T10:49:00.000
19
0
0
1
python,programming-languages,prototype
3,227,809
5
true
0
0
Highly expressive language. People often say, "Python works the way my brain does". Dynamic typing means you spend zero time appeasing the compiler. A large standard library means you often have the tools you need at your fingertips. An even larger stable of third-party packages (PIL, Numpy, NLTK, Django) mean that la...
3
5
0
Coming from an enterprise systems background (think Java and Windows) - I'm surprised at the popularity of python as a prototyping language and am trying to put my finger on the precise reason for this. Examples include being listed as one of the four languages Google uses. Possible reasons include: enables rapid syst...
What is the dominant reason for Python's popularity as a systems and application programming language?
1.2
0
0
3,307
3,227,843
2010-07-12T10:57:00.000
2
0
0
0
python,image-processing
3,227,905
5
false
0
0
First do thresholding, then segmentation. Then you can more easily detect edges.
2
25
1
We have a web-cam in our office kitchenette focused at our coffee maker. The coffee pot is clearly visible. Both the location of the coffee pot and the camera are static. Is it possible to calculate the height of coffee in the pot using image recognition? I've seen image recognition used for quite complex stuff like fa...
Determine height of Coffee in the pot using Python imaging
0.07983
0
0
1,297
3,227,843
2010-07-12T10:57:00.000
0
0
0
0
python,image-processing
3,231,205
5
false
0
0
make pictures of the pot with different levels of coffe in it. downsample the image to maybe 4*10 pixels. make the same in a loop for each new live picture. calculate the difference of each pixels value compared to the reference images. take the reference image with the least difference sum and you get the state of you...
2
25
1
We have a web-cam in our office kitchenette focused at our coffee maker. The coffee pot is clearly visible. Both the location of the coffee pot and the camera are static. Is it possible to calculate the height of coffee in the pot using image recognition? I've seen image recognition used for quite complex stuff like fa...
Determine height of Coffee in the pot using Python imaging
0
0
0
1,297
3,228,212
2010-07-12T11:48:00.000
0
0
0
0
python,django,django-cms
57,008,799
4
false
1
0
It's located inside the djangocms_admin_style module, the path is djangocms_admin_style/static/djanogcms_admin_style/img/django-cms-logo.png. It's better to clone it, customize it and then simply add it to your project under the INSTALLED_APPS=[].
3
4
0
Is there a way to change the Django CMS logo, for my own company logo?
Django CMS logo change
0
0
0
3,098
3,228,212
2010-07-12T11:48:00.000
2
0
0
0
python,django,django-cms
3,230,427
4
true
1
0
Replace /media/cms/images/cms_toolbar.png Or edit the #cms_toolbar definition in the media/cms/css/toolbar.css stylesheet.
3
4
0
Is there a way to change the Django CMS logo, for my own company logo?
Django CMS logo change
1.2
0
0
3,098
3,228,212
2010-07-12T11:48:00.000
1
0
0
0
python,django,django-cms
3,228,229
4
false
1
0
Which logo do you mean? I think logo is just an image inside the template, right? Check out the template in cms/templates/cms/new.html
3
4
0
Is there a way to change the Django CMS logo, for my own company logo?
Django CMS logo change
0.049958
0
0
3,098
3,229,102
2010-07-12T13:44:00.000
1
0
1
0
python,compiler-construction,parsing,stack-trace,abstract-syntax-tree
3,498,493
3
false
0
0
From what I have figured out in the meantime, this is not possible. At least not block-wise. It is possible to recompile the code per function but not per code-block because Python generates the code objects per function. So the only way is to write an own Python compiler.
1
3
0
Sorry for the kind of general question. More details about what I want: I want the user to be able to write some Python code and execute it. Once there is an exception which is not handled, I want the debugger to pause the execution, show information about the current state/environment/stack/exception and make it possi...
how to write a Python debugger/editor
0.066568
0
0
2,309
3,231,910
2010-07-12T20:17:00.000
4
1
0
0
python,ftplib
3,232,065
3
false
0
0
Ftplib can get the size of a file before downloading. As the documentation says: FTP.size(filename) Request the size of the file named filename on the server. On success, the size of the file is returned as an integer, otherwise None is returned. Note that the SIZE command is not standardized, but is upp...
1
12
0
I'm using ftplib to transfer files. Everything is working great. Now I'm trying to get the size of the target file before downloading. First, I tried just getting size with ftp.size(filename). Server complained that I can't do that in ascii mode. Then I tried setting binary mode using ftp.sendcmd("binary") and ftp....
Python ftplib can't get size of file before download?
0.26052
0
0
12,384
3,232,613
2010-07-12T21:57:00.000
16
0
0
1
python,subprocess,signals,intercept,sigint
3,731,948
3
false
0
0
Signal handlers are inherited when you start a subprocess, so if you use the signal module to ignore SIGINT (signal.signal(signal.SIGINT, signal.SIG_IGN)), then your child process automatically will also. There are two important caveats, though: You have to set the ignore handler before you spawn the child process Cus...
1
16
0
My python script intercepts the SIGINT signal with the signal process module to prevent premature exit, but this signal is passed to a subprocess that I open with Popen. is there some way to prevent passing this signal to the subprocess so that it also is not exited prematurely when the user presses ctrl-c?
How to stop SIGINT being passed to subprocess in python?
1
0
0
5,099
3,232,833
2010-07-12T22:38:00.000
2
0
0
1
python,google-app-engine
3,232,948
2
false
1
0
This would be difficult to use as-is on app engine because many copies of your application could be running at once. Each copy would need access to the "last identifier" and be able to update it atomically. This would likely require too much overhead, unless you only need to generate new IDs in this fashion rather in...
1
2
0
Using an alphabet like "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ" I'd like to generate 2 to 4 letter codes to identify unique datastore entries. I have a python function capable of doing this when passed an list indicating the letter positions of the last code [7,17,11] -> "7GA". the next code can be made by incrementing t...
App Engine Unique Non Numeric Code
0.197375
0
0
215
3,233,246
2010-07-13T00:09:00.000
0
0
0
0
python,apache,xampp,plone,zope
3,247,954
2
true
1
0
sorry for wrong site but I just figured out that it was not a problem at all. I installed XAMPP (a snap) and downloaded and ran the plone install script. Both sites XAMPP on port 80 and zope/plone on 8080 are working without problems. Just to let everyone know. I don't know why I got nervous about this :)
1
0
0
Is there a good step by step online guide to install xampp (apache server,mysql server) together with zope-plone on the same linux machine and make it play nicely or do I have to go through their confusing documentations? Or how can I install this configuration in the best way? I can install and use both seperately but...
Guide to install xampp with zope-plone on the same linux machine?
1.2
1
0
486
3,233,584
2010-07-13T01:31:00.000
0
0
1
0
python,ide,todo
47,774,966
2
false
0
0
I know this is a very old post, but I thought I'd share the following. Any line starting "#TODO: " will add text to the to-do list/tab (the keyword is case insensitive). You can add one or more exclamation marks - these act as a priority ordering mechanism, the number appearing in the "!" column. Further, the entry (or...
1
0
0
How do I add a todo list item in Stani's Python Editor? I think it's something you type in together with the code and it automatically shows up the the todo list panel. However, I do not know the syntax.
Add a todo list item in SPE (Stani's Python Editor)
0
0
0
465
3,234,402
2010-07-13T05:24:00.000
1
0
0
0
python,django
3,235,021
5
false
1
0
Starting from Django it's good way to learn Python in fact. Django allows you to do nice things in a short time, which might be good motivation to dive into that language.
2
2
0
Now, I'm learning python but I'm PHP web developer. I don't interest about terminal and windows programming. I only want to do web development. So, Can I learn Django ?
Can we learn Django for a python beginner?
0.039979
0
0
5,268
3,234,402
2010-07-13T05:24:00.000
9
0
0
0
python,django
3,234,410
5
true
1
0
Yes, you can. I started learning Django with very little Python knowledge too. As long as you have another language behind your belt, preferably a web based one (as you do), I don't think you're biting off too much at once. Python's a pretty easy language to pick up too. Just have to get used to the significant white s...
2
2
0
Now, I'm learning python but I'm PHP web developer. I don't interest about terminal and windows programming. I only want to do web development. So, Can I learn Django ?
Can we learn Django for a python beginner?
1.2
0
0
5,268
3,235,133
2010-07-13T07:51:00.000
5
0
1
0
python,date-format
3,235,166
2
true
0
0
struct_time is the old way of representing times, modeled after the C standard library. datetime came later, is more pythonic, is more featureful, and has more predictable behavior in edge cases than the struct_time functions. I would use datetime except in the rare cases where a measured performance difference is si...
1
5
0
Is one preferred over the other? If so, in all cases or just a few? I am intending to use some form of date class for keeping long lists of date and time data, e.g. '2009-01-01 10:12:00'.
What are the differences between struct_time and datetime?
1.2
0
0
1,328
3,235,684
2010-07-13T09:14:00.000
0
0
1
0
python,import,importerror
3,235,798
3
false
0
0
Apart from breaking the circular dependency you can try moving the locations of your import calls. Don't forget that imports in Python are just regular statements, so you can import inside functions for example. The trouble is that import (as a side-effect) will actually run the module being imported (the first time y...
3
1
0
I have a series of python modules written which are held in the same directory and I am having trouble with an ImportError. The three modules I am using are draw_menu.py, errors.py and file_operations.py. In errors.py I requires a list of error codes, I am using a custom method defined in file_operations.py to open a f...
Why am I encountering an ImportError when I try to 're-import' a module?
0
0
0
253
3,235,684
2010-07-13T09:14:00.000
2
0
1
0
python,import,importerror
3,235,767
3
true
0
0
Circular imports can cause issues in Python (as you might expect). It's probably worth checking if: A) errors.py and file_operation.py should be single module (if they both rely so heavily on each other, do they need to be separate?) B) you can delay the import in one or the other module. An import statement in a funct...
3
1
0
I have a series of python modules written which are held in the same directory and I am having trouble with an ImportError. The three modules I am using are draw_menu.py, errors.py and file_operations.py. In errors.py I requires a list of error codes, I am using a custom method defined in file_operations.py to open a f...
Why am I encountering an ImportError when I try to 're-import' a module?
1.2
0
0
253
3,235,684
2010-07-13T09:14:00.000
1
0
1
0
python,import,importerror
3,235,771
3
false
0
0
The problem is not the imports themselves, but the dependencies. file_operations cannot be processed until it has imported errors, but errors cannot be processed until it has imported file_operations. Python recognises this as an impossible situation, and raises an error. The best solution to this is to refactor your f...
3
1
0
I have a series of python modules written which are held in the same directory and I am having trouble with an ImportError. The three modules I am using are draw_menu.py, errors.py and file_operations.py. In errors.py I requires a list of error codes, I am using a custom method defined in file_operations.py to open a f...
Why am I encountering an ImportError when I try to 're-import' a module?
0.066568
0
0
253
3,236,983
2010-07-13T12:10:00.000
0
0
1
1
python
3,236,999
5
false
0
0
Maybe "Open with..." + 'Remember my choice' in context menu of explorer?
2
2
0
My program has been written on python 3.1 (it was the biggest mistake I've ever made). Now I want to use a few modules that were written on 2.6. I know that it's possible to specify the interpreter in Unix #!/usr/bin/python2.6. But what if I use Windows? Does any way to specify the interpreter exist in Windows? Edit: I...
How to specify python interpreter on Windows
0
0
0
2,736
3,236,983
2010-07-13T12:10:00.000
0
0
1
1
python
3,237,236
5
false
0
0
If you go into Control Panel -> System -> Advanced -> Environment Variables, and then add Python 2.6 to the PATH variable (it's probably located at C:\Python26 or C:\Program Files\Python26) -- and make sure Python 3.1 isn't in it -- then if you type python at the command prompt, you'll get 2.6 instead. As for Explorer,...
2
2
0
My program has been written on python 3.1 (it was the biggest mistake I've ever made). Now I want to use a few modules that were written on 2.6. I know that it's possible to specify the interpreter in Unix #!/usr/bin/python2.6. But what if I use Windows? Does any way to specify the interpreter exist in Windows? Edit: I...
How to specify python interpreter on Windows
0
0
0
2,736
3,237,252
2010-07-13T12:43:00.000
1
1
0
0
php,python,gimp
11,170,196
3
false
0
0
One important thing regarding running gimp python plugin in batch mode. Option -i means no interface. But in gimp documentation there is another option with same explanation --no-interface. User could though that they have same effect. But when you try to run batch script on remote linux machine, with option -i you wil...
2
3
0
is there any way to connect GIMP with python or PHP and use its libraries? It seems that all i can find on the web is pygimp which is not supported anymore. ps. i do my development on mac and i use linux as a production server
Connect GIMP with PHP or Python
0.066568
0
0
3,456
3,237,252
2010-07-13T12:43:00.000
1
1
0
0
php,python,gimp
3,237,353
3
false
0
0
Probably not directly, but I'll bet you can access some functions via 'exec()' on the command line. What are you trying to do? Can the GD or ImageMagic tools help?
2
3
0
is there any way to connect GIMP with python or PHP and use its libraries? It seems that all i can find on the web is pygimp which is not supported anymore. ps. i do my development on mac and i use linux as a production server
Connect GIMP with PHP or Python
0.066568
0
0
3,456
3,237,558
2010-07-13T13:23:00.000
4
0
0
1
python,windows,linux,twisted
3,238,241
5
false
0
0
Another option is paramiko. It's a Python library that implements SSH. I've used it to remotely execute commands and transfer files to windows boxes running an SSH server. The problem is it doesn't properly capture stdout on windows due to the peculiarities of the windows command shell. You may have the same problem wi...
2
4
0
I'm re-writing a legacy Windows application using Python and running on Linux. Initially, the new application needs to call the legacy application so that we have consistent results between customers still using the legacy application and customers using the new application. So I have a Linux box, sitting right next ...
python execute remote program
0.158649
0
0
2,814
3,237,558
2010-07-13T13:23:00.000
1
0
0
1
python,windows,linux,twisted
3,255,382
5
false
0
0
RPC is the right answer IMO. I think: using SimpleXMLRPCServer for the windows machine using xmlrpclib for the linux machine from the standard library would give you the most freedom. You implement what you need and you don't have to worry about windows APIs, overblown technologies as DCOM, etc., you are in python la...
2
4
0
I'm re-writing a legacy Windows application using Python and running on Linux. Initially, the new application needs to call the legacy application so that we have consistent results between customers still using the legacy application and customers using the new application. So I have a Linux box, sitting right next ...
python execute remote program
0.039979
0
0
2,814
3,240,990
2010-07-13T20:01:00.000
2
0
0
1
python,google-app-engine,authentication
3,241,208
2
false
1
0
If you have handlers which are only accessible to admins, then app.yaml certainly seems like the easiest way to secure the pages those handlers expose. However, if you have some handlers which serve both admin and non-admin views (e.g., your main.py), then you'll have to use something more fine-grained than app.yaml (e...
1
4
0
I am writing a small app that uses the GAE. I have parts of my app that are for administrative use only. I have two options using login: admin option in the app.yaml or google.appengine.api.users.is_current_user_admin() in python code. The basic authentication is sufficient for my case. Which solution is better? The ad...
Authentication in Google App Engine: app.yaml vs. python code
0.197375
0
0
1,616
3,242,114
2010-07-13T22:39:00.000
2
0
1
0
python
3,242,136
3
false
0
0
Use Python's urllib module to fetch the content, and its re module to look for the word (make sure you use search instead of match; it's a common noob slip-up).
1
0
0
am looking for method and function watch i can search in web page ! ok I'll explain it : i tell my python file .. go to www.example.com and search for that world "Hello guest" and if my python file found that world "Hello guest" my python file print "the world found!" and if he don't found he print "the world not found...
python and search?
0.132549
0
0
194
3,242,382
2010-07-13T23:37:00.000
1
0
0
0
python,numpy,scipy,interpolation
3,242,538
6
false
0
0
There's a bunch of options here, which one is best will depend on your data... However I don't know of an out-of-the-box solution for you You say your input data is from tripolar data. There are three main cases for how this data could be structured. Sampled from a 3d grid in tripolar space, projected back to 2d LAT, ...
1
27
1
So, I have three numpy arrays which store latitude, longitude, and some property value on a grid -- that is, I have LAT(y,x), LON(y,x), and, say temperature T(y,x), for some limits of x and y. The grid isn't necessarily regular -- in fact, it's tripolar. I then want to interpolate these property (temperature) values o...
Interpolation over an irregular grid
0.033321
0
0
28,537
3,242,448
2010-07-13T23:59:00.000
0
0
0
0
c#,javascript,python,sql,database
3,249,163
2
false
0
0
Some suggestions: 1) ASP.NET Gridview ---use the free Visual Studio to create an asp.net page ...can do VB, C#, etc. ---drag/drop a gridview control on your page, then connect it to your data and display fields, all via wizard (you did say quick and dirty, correct?). No coding required if you can live with...
1
0
0
I never thought I'd ever say this but I'd like to have something like the report generator in Microsoft Access. Very simple, just list data from a SQL query. I don't really care what language is used as long as I can get it done fast. C#,C++,Python,Javascript... I want to know the quickest (development sense) way to d...
Quick and dirty reports based on a SQL query
0
1
0
325
3,243,073
2010-07-14T02:49:00.000
1
0
0
0
python,django,mysql
23,076,238
10
false
1
0
Try this if you are using linux:- sudo apt-get install python-mysqldb windows:- pip install python-mysqldb or easy_install python-mysqldb Hope this should work
1
19
0
Installed Django from source (python setup.py install and such), installed MySQLdb from source (python setup.py build, python setup.py install). Using Python 2.4 which came installed on the OS (CentOS 5.5). Getting the following error message after launching the server: Error loading MySQLdb module: No module named MyS...
Django unable to find MySQLdb python module
0.019997
1
0
38,547
3,243,529
2010-07-14T05:13:00.000
1
1
1
0
python,programming-languages,scripting
5,289,422
13
false
0
0
I can't say that I agree with wiping Ruby off the map... Ruby fixed every problem that perl had as far as syntax goes... I loved Python first but let ruby get a little more mature and it will get in the the fray more and more... Why do I support Ruby strongly? just step away from python for a few months and then give R...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
0.015383
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
3
1
1
0
python,programming-languages,scripting
3,243,558
13
false
0
0
I'll give an honest answer from my perspective. No. Having started scripting using batch, bash, and Perl, discovering Python was discovering precisely what I'd want from a scripting language (and more, but that's off topic). It integrates with familiar Unix interfaces, is modular, doesn't force any particular paradigm,...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
0.046121
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
1
1
1
0
python,programming-languages,scripting
3,243,568
13
false
0
0
If you are already familiar with Python, you are unlikely to find something compelling in the same niche, although Ruby does have a very strong and vocal following that seems to like it very much. Perhaps you should consider a scripting language that fills a different role, such as BASH shell script for quick, simple s...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
0.015383
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
3
1
1
0
python,programming-languages,scripting
3,243,929
13
false
0
0
To answer your first question: Do people learn one language and then ignore or dislike others? Well, if you know one language well, you will need to see great advantages to move to another. I started out using perl and eventually thought that there must be easier way to do some things. I picked up python and stopped us...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
0.046121
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
4
1
1
0
python,programming-languages,scripting
3,244,435
13
false
0
0
The only relatively unbiased answer you can really look for is probably statistical, and you would still have to account for the natural tendency of people to follow the path of least resistance once one is found or carved. How many people learnt Python to a decent level, found the language resonates with the way they ...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
0.061461
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
3
1
1
0
python,programming-languages,scripting
5,289,622
13
false
0
0
I would learn a statically typed language with very powerful type expression capabilities and awesome concurrency. One of the following would be a good choice (in order of my preference): Scala F# Haskell Ocaml Erlang Typed languages like the above make you think different. Also these languages have REPLs so they can...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
0.046121
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
1
1
1
0
python,programming-languages,scripting
3,243,557
13
false
0
0
Ruby/Groovy/Perl if you'd like to stick to traditional scripting practices. Otherwise I'd heartily recommend you Clojure and Scala - two of the more innovative programing languages of the past few years.
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
0.015383
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
6
1
1
0
python,programming-languages,scripting
3,243,565
13
false
0
0
Ruby - what it enables and does with blocks is really interesting, and quite foreign to python based programming Erlang - the functional language has a lot of interesting examples and it will definitely make your head work differently afterwards (in a good way) Javascript - yes, I'm serious. ALthough there's a fair num...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
1
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
6
1
1
0
python,programming-languages,scripting
3,243,541
13
false
0
0
I would recommend learning Haskell and a dialect of Lisp such as Scheme or Common Lisp, if you master either of those you'll gain insight into how things are accomplished with the functional paradigm and it'll help out your Python as well. Here are some languages categorized by paradigms I'd learn: Imperative/Procedura...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
1
0
0
3,435
3,243,529
2010-07-14T05:13:00.000
3
1
1
0
python,programming-languages,scripting
3,540,040
13
false
0
0
Learn a Lisp. Whether it's "scripting" or not, Eric Raymond had the right of it when he wrote: "Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use L...
10
9
0
Someone told me once, that programmers tend to learn one scripting language properly and ignore or dislike other scripting languages. Do you have similar experiences? I'm using Python as my choice for scripting for few years, however, I'm sure that there are many existing and emerging languages that could impress the...
Learn a scripting language besides Python
0.046121
0
0
3,435
3,244,335
2010-07-14T08:05:00.000
0
0
0
0
python,parsing
3,244,345
4
false
1
0
Well, if you're not duty-bound to python, you could always use a TagSoup parser. It's a Java library, but it gives very good results. You could also just use Tidy to clean your input before trying to parse it.
1
3
0
I have been using BeautifulSoup but as I understand it that library is no longer being maintained. So what should I use ? I have heard about Xpath but what else is there ?
No more BeautifulSoup
0
0
1
653
3,244,570
2010-07-14T08:45:00.000
6
0
0
0
python,django,coding-style,constants
3,244,614
4
false
1
0
There's already a project-wide settings.py file. This is the perfect place to put your own custom setttings.
2
5
0
It is sometimes beneficial to share certain constants between various code files in a django application. Examples: - Name or location of dump file used in various modules\commands etc - Debug mode on\off for the entire app - Site specific configuration What would be the elegant\pythonic way of doing this?
Django - How to share configuration constants within an app?
1
0
0
1,651
3,244,570
2010-07-14T08:45:00.000
0
0
0
0
python,django,coding-style,constants
3,245,074
4
false
1
0
Django apps are meant to be (more or less) pluggable. Therefore, you are not supposed to hack into the code of an app in order to parametrize what you want (it would be quite a mess if you had to do this ! Imagine you want to upgrade an app you downloaded on internet... you would have to re-hack into the code of the ne...
2
5
0
It is sometimes beneficial to share certain constants between various code files in a django application. Examples: - Name or location of dump file used in various modules\commands etc - Debug mode on\off for the entire app - Site specific configuration What would be the elegant\pythonic way of doing this?
Django - How to share configuration constants within an app?
0
0
0
1,651
3,246,262
2010-07-14T12:52:00.000
0
0
1
0
python,string,mapping,letters
3,246,297
10
false
0
0
Why not just make a list of each letter in the alphabet and then use the index values as the return value
1
6
0
I want to assign a value to each letter in the alphabet, so that a -> 1, b -> 2, c -> 3, ... z -> 26. Something like a function which returns the value of the letter, for example: value('a') = 1 value('b') = 2 etc... How would I go about doing this in python?
python: How do I assign values to letters?
0
0
0
56,654
3,246,506
2010-07-14T13:22:00.000
0
1
0
0
python
3,246,550
1
false
1
0
I don't understand exactly what you mean or why you want to test Java in Python but Jython may be helpful.
1
0
0
is there any frame-work or tool to test java-applets in python
java-applet gui testing with python
0
0
0
312
3,247,202
2010-07-14T14:35:00.000
1
0
1
0
python,file
3,247,393
5
false
0
0
I'm not sure this is even possible. Even at the VFS or filesystem level, there is no guarantee that a directory entry count is even maintained. For instance many filesystems simply record the combined byte size of the directory entry structures contained in a given directory. Estimation may be made if directory entries...
1
12
0
I have a directory with a large number of files (~1mil). I need to choose a random file from this directory. Since there are so many files, os.listdir naturally takes an eternity to finish. Is there a way I can circumvent this problem? Maybe somehow get to know the number of files in the directory (without listing it) ...
Choosing a random file from a directory (with a large number of files) in Python
0.039979
0
0
1,774
3,247,516
2010-07-14T15:06:00.000
1
0
0
0
python,xml,configuration,xsd,upgrade
3,247,629
1
true
1
0
For all configuration settings that remain the same between configurations, have your installation script copy those over from the old config file if it exists. For the rest, just have some defaults that the user can change if necessary, as usual for a config file. Unless I've misunderstood the question, it sounds like...
1
0
0
My application has a xml based configuration. It has also a xsd file. Before my application starts, xmllint will check the configuration against the xsd file. With the growth of my application, the configuration structure has changed a bit. Now I have to face this problem: When I provide a new version of my applicatio...
Approach to upgrade application configuration
1.2
0
1
102
3,247,971
2010-07-14T15:48:00.000
1
0
0
0
python,google-app-engine
3,281,505
1
false
1
0
This isn't possible in the standard db framework, as there's not enough information present to find your models. The only information the framework has to work with is the kind name, which doesn't include the fully qualified package - so it has no way to figure out what package your model definition might be in. If you...
1
1
0
I have a models in different files (blog/models.py, forum/models.py, article/models.py). In each of this files I have defined model classes with application prefix (BlobPost, BlogTag, ForumPost, ForumThread, Article, ArticleCategory). Also I have appliation - comment, for adding comment attached to any model object. Fo...
How to preload model for ReferenceProperty?
0.197375
0
0
213
3,247,973
2010-07-14T15:48:00.000
0
0
1
0
python,overflow,range
3,248,032
2
false
0
0
The size of your lists is only limited by your memory. Note that, depending on your version of Python, range(1, 9999999999999999) needs only a few bytes of RAM since it always only creates a single element of the virtual list it returns. If you want to instantiate the list, use list(range(1,n)) (this will copy the virt...
1
5
0
I'm quite new to python, so I'm doing my usual of going through Project Euler to work out the logical kinks in my head. Basically, I need the largest list size possible, ie range(1,n), without overflowing. Any ideas?
Python: Range() maximum size; dynamic or static?
0
0
0
16,736
3,249,977
2010-07-14T20:01:00.000
1
0
0
0
php,python,django,orm,doctrine
8,543,708
4
false
1
0
Ive used Doctrine over a 2 year project that ended 1.5 years ago, since then i've been doing mostly Django. I prefer Djangos ORM over Doctrine any day, more features, more consistency, faster and shinier.
3
3
0
I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don't have experience with Django. Can anyone who has good knowledge of both Doctrine and ORM in Django give me a comparison of features of these two ORM implementations?
ORM in Django vs. PHP Doctrine
0.049958
1
0
5,103
3,249,977
2010-07-14T20:01:00.000
5
0
0
0
php,python,django,orm,doctrine
12,267,439
4
false
1
0
I am a rare person who had to switch from Django 1.4 to Symfony 2.1 so I had to use Doctrine 2 instead of current Django ORM. Maybe Doctrine can do many things but let me tell you that it is a nightmare for me to use it coming from Django. I'm bored with the verbosity of php/Symfony/Doctrine ... Also I never needed som...
3
3
0
I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don't have experience with Django. Can anyone who has good knowledge of both Doctrine and ORM in Django give me a comparison of features of these two ORM implementations?
ORM in Django vs. PHP Doctrine
0.244919
1
0
5,103
3,249,977
2010-07-14T20:01:00.000
-1
0
0
0
php,python,django,orm,doctrine
3,250,203
4
false
1
0
Django isn't just an orm. It is a web framework like symfony. The form framework in symfony is modeled on django for example. It's orm part is more like doctrine 2 I think, but I haven't played with either much.
3
3
0
I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don't have experience with Django. Can anyone who has good knowledge of both Doctrine and ORM in Django give me a comparison of features of these two ORM implementations?
ORM in Django vs. PHP Doctrine
-0.049958
1
0
5,103
3,252,568
2010-07-15T04:56:00.000
6
1
1
0
python,ruby,performance,programming-languages
3,252,589
6
false
0
0
Because Ruby 1.8 was not really designed with performance in mind, while Python was more optimized. In particular, Ruby 1.8 did real interpretation rather than compiling for a virtual machine like most languages these days. Ruby 1.9 (with the YARV VM) is about as fast as Python 3 (maybe a little bit slower, but much cl...
3
13
0
They seem to share a lot of the same characteristics but as far as I can tell, Python 2.5 is faster than 1.8.7 by a lot. Is there a deeper underlying reason behind this?
Why is Python faster than Ruby?
1
0
0
9,141
3,252,568
2010-07-15T04:56:00.000
0
1
1
0
python,ruby,performance,programming-languages
3,253,302
6
false
0
0
More people have been working on Python development for more years, so more optimization has been done. The languages are similarly flexible and expressive, so their performance should converge as all the good optimization ideas get used in both. As noted above, Ruby 1.9 substantially narrows the performance gap with P...
3
13
0
They seem to share a lot of the same characteristics but as far as I can tell, Python 2.5 is faster than 1.8.7 by a lot. Is there a deeper underlying reason behind this?
Why is Python faster than Ruby?
0
0
0
9,141
3,252,568
2010-07-15T04:56:00.000
0
1
1
0
python,ruby,performance,programming-languages
67,204,842
6
false
0
0
It depends on the implementation. Crystal is basically C compiled Ruby that can even call C libraries. Then you also have Elixir on the Beam side and let's not forget the Java and C# counterparts. But yes, Ruby, the defacto standard, is indeed slower than Python and is also aimed at web development.
3
13
0
They seem to share a lot of the same characteristics but as far as I can tell, Python 2.5 is faster than 1.8.7 by a lot. Is there a deeper underlying reason behind this?
Why is Python faster than Ruby?
0
0
0
9,141
3,252,671
2010-07-15T05:20:00.000
1
0
0
0
python,wxpython,alignment,spinner
3,261,410
1
true
0
1
Actually, there is a control you can use. It's called FloatSpin, which is in the agw sub-library. If you don't already have it, download the wxPython demo and check it out! Mike
1
0
0
A primary reason to use wx.SpinCtrl is to restrict the user to input integers, therefore I think that the text inside it would look better if right-aligned. Is there a way to do this in wxPython?
wxPython: Right-align the numbers in a wx.SpinCtrl
1.2
0
0
435
3,252,725
2010-07-15T05:34:00.000
0
0
1
0
python
3,252,763
4
false
0
0
The code you listed above is a list of tuples - which pretty much matches what you're asking for. From the example above, list[0][0] returns the state from the first tuple, list[0][1] the action, and list[0][2] the cost. You can extract the values with something like (state, action, cost)= list[i] too.
1
2
0
I need to put 3 items in the list. state..eg(1,2) action...eg..west cost....5 list=[(state,action,cost), (state,action,cost).........] how can i make it in a form of list. For a particular state , action and cost is there. Moreover, if i need only state from the list, i should be able to extract it from the list.same...
List formation in python
0
0
0
390
3,253,430
2010-07-15T07:40:00.000
8
0
1
0
python,python-3.x
3,253,444
5
false
0
0
Because 3.x isn't backwards compatible with 2.x and a lot of apps and libraries are written for the 2.x series. 3.x was their attempt at cleaning up all the crud that never should have been in Python in the first place.... and they had to make some breaking changes. Probably best to stick with 2.x for now, til 3.x gain...
3
7
0
Since there is a python 3.x, why don't we use it? Why do we still use 2.x?What's the difference?
python 2.x or 3.x
1
0
0
3,076
3,253,430
2010-07-15T07:40:00.000
2
0
1
0
python,python-3.x
3,253,452
5
false
0
0
Because lots of libraries are not yet ported to 3.x I guess... And because lots of application still run on 2.x
3
7
0
Since there is a python 3.x, why don't we use it? Why do we still use 2.x?What's the difference?
python 2.x or 3.x
0.07983
0
0
3,076
3,253,430
2010-07-15T07:40:00.000
14
0
1
0
python,python-3.x
3,253,511
5
true
0
0
Python 2.6 and 2.7 have been written to ease the transition to Python 3. It will take some more time to port the more complex packages (i.e. those with many dependencies, or libraries written in C). So if you are starting new projects, and all the libraries you need are there, it makes sense to start with 3.1. One of t...
3
7
0
Since there is a python 3.x, why don't we use it? Why do we still use 2.x?What's the difference?
python 2.x or 3.x
1.2
0
0
3,076
3,255,330
2010-07-15T12:02:00.000
0
0
0
0
java,php,python,mysql,delphi
3,255,344
3
false
0
0
Why not use the XMPP protocol (aka Jabbber) ?
2
4
0
We need to be able to inform a Delphi application in case there are changes to some of our tables in MySQL. Delphi clients are in the Internet behind a firewall, and they have to be authenticated before connecting to the notification server we need to implement. The server can be programmed using for example Java, PHP ...
How to create a notification server which informs Delphi application when database changes?
0
1
0
1,596
3,255,330
2010-07-15T12:02:00.000
1
0
0
0
java,php,python,mysql,delphi
3,255,395
3
false
0
0
There is apache camel and spring intergration, both provides some ways to send messages across.
2
4
0
We need to be able to inform a Delphi application in case there are changes to some of our tables in MySQL. Delphi clients are in the Internet behind a firewall, and they have to be authenticated before connecting to the notification server we need to implement. The server can be programmed using for example Java, PHP ...
How to create a notification server which informs Delphi application when database changes?
0.066568
1
0
1,596
3,255,925
2010-07-15T13:28:00.000
0
1
1
0
python,paradigms
3,255,961
5
false
0
0
Haskell or Ocaml, or maybe a Lisp dialect such as Common Lisp or Scheme.
2
2
0
Ok so I know the basics of programming languages, I've studied python and liked it a lot. I'm studying now the intermediate parts of python and I'm catching the concepts already. I'm working with a project and at the same time solving computer problems that practices algorithm use. I've learned that python has limitati...
What other Language synergizes well with Python? Need Advice
0
0
0
874
3,255,925
2010-07-15T13:28:00.000
1
1
1
0
python,paradigms
3,255,977
5
false
0
0
What is wrong with IronPython or Jython? You can learn how to write libraries in Java or .Net to alleviate some of Python's speed problems. Learning to write your own Python libraries will certainly help you better understand and overcome the limitations you mentioned.
2
2
0
Ok so I know the basics of programming languages, I've studied python and liked it a lot. I'm studying now the intermediate parts of python and I'm catching the concepts already. I'm working with a project and at the same time solving computer problems that practices algorithm use. I've learned that python has limitati...
What other Language synergizes well with Python? Need Advice
0.039979
0
0
874
3,256,731
2010-07-15T14:48:00.000
2
0
0
0
python,django
3,256,766
1
true
1
0
You would do this by setting up different WSGI for each domain using a setting SITE_ID corresponding to the site id from the django.contrib.site app.
1
0
0
I have one ip for two domain name, e.g. "www.example.com" and "example.info", and I want each of them to be handled as a different domain (e.g. www.example.com/photos and example.info/photos will be ahndled each by its corresponding function). Is there an elegant way to do this in django?
How do I redirect different domain names requests to the same ip in django
1.2
0
0
133
3,257,869
2010-07-15T16:45:00.000
27
0
1
1
python,windows,file,file-io
3,262,082
4
false
0
0
Well this is for historical (or as i like to say it, hysterical) reasons. The file open modes are inherited from C stdio library and hence we follow it. For Windows, there is no difference between text and binary files, just like in any of the Unix clones. No, i mean it! - there are (were) file systems/OSes in which t...
4
23
0
I know that I should open a binary file using "rb" instead of "r" because Windows behaves differently for binary and non-binary files. But I don't understand what exactly happens if I open a file the wrong way and why this distinction is even necessary. Other operating systems seem to do fine by treating both kinds of...
Difference between binary and text I/O in python on Windows
1
0
0
7,560
3,257,869
2010-07-15T16:45:00.000
-2
0
1
1
python,windows,file,file-io
3,257,905
4
false
0
0
For reading files there should be no difference. When writing to text-files Windows will automatically mess up your line-breaks (it will add \r's before the \n's). That's why you should use "wb".
4
23
0
I know that I should open a binary file using "rb" instead of "r" because Windows behaves differently for binary and non-binary files. But I don't understand what exactly happens if I open a file the wrong way and why this distinction is even necessary. Other operating systems seem to do fine by treating both kinds of...
Difference between binary and text I/O in python on Windows
-0.099668
0
0
7,560
3,257,869
2010-07-15T16:45:00.000
25
0
1
1
python,windows,file,file-io
3,257,886
4
true
0
0
This mode is about conversion of line endings. When reading in text mode, the platform's native line endings (\r\n on Windows) are converted to Python's Unix-style \n line endings. When writing in text mode, the reverse happens. In binary mode, no such conversion is done. Other platforms usually do fine without the con...
4
23
0
I know that I should open a binary file using "rb" instead of "r" because Windows behaves differently for binary and non-binary files. But I don't understand what exactly happens if I open a file the wrong way and why this distinction is even necessary. Other operating systems seem to do fine by treating both kinds of...
Difference between binary and text I/O in python on Windows
1.2
0
0
7,560
3,257,869
2010-07-15T16:45:00.000
1
0
1
1
python,windows,file,file-io
3,257,903
4
false
0
0
In Windows, text mode will convert the newline \n to a carriage return followed by a newline \r\n. If you read text in binary mode, there are no problems. If you read binary data in text mode, it will likely be corrupted.
4
23
0
I know that I should open a binary file using "rb" instead of "r" because Windows behaves differently for binary and non-binary files. But I don't understand what exactly happens if I open a file the wrong way and why this distinction is even necessary. Other operating systems seem to do fine by treating both kinds of...
Difference between binary and text I/O in python on Windows
0.049958
0
0
7,560
3,259,322
2010-07-15T19:41:00.000
9
1
1
0
python,lambda
3,259,428
16
false
0
0
Yes, you're right — it is a structural choice. It probably does not make your programs more correct by just using lambda expressions. Nor does it make them more reliable, and this has nothing to do with speed. It is only about flexibility and the power of expression. Like list comprehension. You can do most of that def...
5
86
0
I can find lots of stuff showing me what a lambda function is, and how the syntax works and what not. But other than the "coolness factor" (I can make a function in middle a call to another function, neat!) I haven't seen something that's overwelmingly compelling to say why I really need/want to use them. It seems to ...
Why use lambda functions?
1
0
0
54,149
3,259,322
2010-07-15T19:41:00.000
14
1
1
0
python,lambda
3,259,370
16
false
0
0
For me it's a matter of the expressiveness of the code. When writing code that people will have to support, that code should tell a story in as concise and easy to understand manner as possible. Sometimes the lambda expression is more complicated, other times it more directly tells what that line or block of code is ...
5
86
0
I can find lots of stuff showing me what a lambda function is, and how the syntax works and what not. But other than the "coolness factor" (I can make a function in middle a call to another function, neat!) I haven't seen something that's overwelmingly compelling to say why I really need/want to use them. It seems to ...
Why use lambda functions?
1
0
0
54,149
3,259,322
2010-07-15T19:41:00.000
6
1
1
0
python,lambda
3,734,989
16
false
0
0
Lambda, while useful in certain situations, has a large potential for abuse. lambda's almost always make code more difficult to read. And while it might feel satisfying to fit all your code onto a single line, it will suck for the next person who has to read your code. Direct from PEP8 "One of Guido's key insights is...
5
86
0
I can find lots of stuff showing me what a lambda function is, and how the syntax works and what not. But other than the "coolness factor" (I can make a function in middle a call to another function, neat!) I haven't seen something that's overwelmingly compelling to say why I really need/want to use them. It seems to ...
Why use lambda functions?
1
0
0
54,149
3,259,322
2010-07-15T19:41:00.000
3
1
1
0
python,lambda
48,674,765
16
false
0
0
Lambdas are anonymous functions (function with no name) that can be assigned to a variable or that can be passed as an argument to another function. The usefulness of lambda will be realized when you need a small piece of function that will be run one in a while or just once. Instead of writing the function in global s...
5
86
0
I can find lots of stuff showing me what a lambda function is, and how the syntax works and what not. But other than the "coolness factor" (I can make a function in middle a call to another function, neat!) I haven't seen something that's overwelmingly compelling to say why I really need/want to use them. It seems to ...
Why use lambda functions?
0.037482
0
0
54,149
3,259,322
2010-07-15T19:41:00.000
-1
1
1
0
python,lambda
3,259,570
16
false
0
0
Lambdas allow you to create functions on the fly. Most of the examples I've seen don't do much more than create a function with parameters passed at the time of creation rather than execution. Or they simplify the code by not requiring a formal declaration of the function ahead of use. A more interesting use would be t...
5
86
0
I can find lots of stuff showing me what a lambda function is, and how the syntax works and what not. But other than the "coolness factor" (I can make a function in middle a call to another function, neat!) I haven't seen something that's overwelmingly compelling to say why I really need/want to use them. It seems to ...
Why use lambda functions?
-0.012499
0
0
54,149
3,261,030
2010-07-16T00:13:00.000
0
0
0
0
python,interface,mapping
3,261,668
2
true
1
0
From a strictly philosophical point of view, I don't think that there is a line you can cross with this. If some tool provides the needed functionality, but its API is different, adapt away. The only time you shouldn't do this is if the adapted to API simply is not expressive enough to manipulate the adapted componen...
1
2
0
I find that I have recently been implementing Mapping interfaces on classes which on the surface fit the model (they are essentially just key-value stores with no more meta-data), but underneath they are sometimes quite complex. Here are a couple examples of increasing severity: An object which wraps another mapping c...
Are there reasons to use get/put methods instead of item access?
1.2
0
0
108
3,261,198
2010-07-16T00:56:00.000
1
0
0
0
c#,python,ironpython
3,261,217
2
false
0
0
The easiest way would be to pass the HTML page into an XML/HTML parser, and then call getElementsByTagName("A") on the root node. Once you get that, iterate through the list and pull out the href parameter.
1
0
0
Some web pages, having their urls, have "Download" Text, which are hyperlinks. How can I get the hyperlinks form the urls/pages by python or ironpython. And can I download the files with these hyperlinks by python or ironpython? How can I do that? Are there any C# tools? I am not native english speaker, so sorry for my...
How can I download files form web pages?
0.099668
0
1
210
3,262,473
2010-07-16T06:38:00.000
0
0
0
0
javascript,python,html
3,262,533
8
false
1
0
You would need to keep track of each XMLHttpRequest and monitor whether it completes or the asynchronous callback is executed.
2
17
0
How do i check if the page has pending AJAX or HTTP GET/POST requests? I use javascript and/or python for this checking. what i wanted to do is execute a script if a page has finished all requests. onload doesn't work for me, if you used firebugs net panel, you would know. onload fires when the page is loaded but ther...
Check Pending AJAX requests or HTTP GET/POST request
0
0
1
25,834
3,262,473
2010-07-16T06:38:00.000
4
0
0
0
javascript,python,html
3,263,704
8
false
1
0
I see you mention you are using Prototype.js. You can track active requests with Prototype by checking the Ajax.activeRequestCount value. You could check this using setTimeout or setInterval to make sure that any requests triggered on page load have completed (if that's what you're looking to do)
2
17
0
How do i check if the page has pending AJAX or HTTP GET/POST requests? I use javascript and/or python for this checking. what i wanted to do is execute a script if a page has finished all requests. onload doesn't work for me, if you used firebugs net panel, you would know. onload fires when the page is loaded but ther...
Check Pending AJAX requests or HTTP GET/POST request
0.099668
0
1
25,834
3,263,672
2010-07-16T09:53:00.000
2
0
1
0
python,printing,stdout
52,988,120
15
false
0
0
In Python 3 there is valid reason to use print over sys.stdout.write, but this reason can also be turned into a reason to use sys.stdout.write instead. This reason is that, now print is a function in Python 3, you can override this. So you can use print everywhere in a simple script and decide those print statements ne...
2
475
0
Are there situations in which sys.stdout.write() is preferable to print? (Examples: better performance; code that makes more sense)
The difference between sys.stdout.write and print?
0.02666
0
0
713,487
3,263,672
2010-07-16T09:53:00.000
45
0
1
0
python,printing,stdout
3,264,118
15
false
0
0
My question is whether or not there are situations in which sys.stdout.write() is preferable to print After finishing developing a script the other day, I uploaded it to a unix server. All my debug messages used print statements, and these do not appear on a server log. This is a case where you may need sys.std...
2
475
0
Are there situations in which sys.stdout.write() is preferable to print? (Examples: better performance; code that makes more sense)
The difference between sys.stdout.write and print?
1
0
0
713,487
3,263,769
2010-07-16T10:06:00.000
0
0
1
0
python,installation,windows-installer
3,264,133
2
false
0
0
Based on one of your comments, it looks like you don't actually need to install it, you just need it on the computer so your program can run. In that case you can take a page from Dropbox's book and include the interpreter, DLL, and standard library in one of your directories, and just use it from there.
1
4
0
I want to install the new Python 2.7 on my Windows XP 32bit PC. having CDO (thats OCD with initials sorted in alphabetical order) I want to install it multiple times on the same computer (to different TARGETDIRs). how do i do that ? double clicking on the installer, or running msiexec multiple times did not work for me...
Multiple Python Installations of the same python version on a single computer
0
0
0
479
3,263,847
2010-07-16T10:21:00.000
3
0
0
1
java,python,google-app-engine
3,266,220
6
true
1
0
Most people here are missing the fact that the question is really about App Engine, not java or python in general. The Java and Python SDKs and App Engine runtimes have pretty much the same abilities at this point. One caveat with the current java runtime is that if you use a lot of external libraries, your loading hi...
6
2
0
Basically I am coding websites in PHP from last year. But now I want to use something else and GAE looks a good option. So I want to know if GAE is good for making a little website to share favorite youtube videos ? I have done single website in Python+Django few months back, it looks good to me. But JAVA is the langua...
GAE is any good ? if yes then JAVA or Python?
1.2
0
0
652
3,263,847
2010-07-16T10:21:00.000
2
0
0
1
java,python,google-app-engine
3,265,021
6
false
1
0
You'll be able to accomplish the exact same results using either Python or Java. Java is much more verbose than Python, which can make it have a bit of a steeper learning curve. The fact that you have some experience in Django (which GAE's webapp is largely based on and which you can even use directly if you want) wi...
6
2
0
Basically I am coding websites in PHP from last year. But now I want to use something else and GAE looks a good option. So I want to know if GAE is good for making a little website to share favorite youtube videos ? I have done single website in Python+Django few months back, it looks good to me. But JAVA is the langua...
GAE is any good ? if yes then JAVA or Python?
0.066568
0
0
652
3,263,847
2010-07-16T10:21:00.000
1
0
0
1
java,python,google-app-engine
3,264,425
6
false
1
0
You need an IRL mentor.
6
2
0
Basically I am coding websites in PHP from last year. But now I want to use something else and GAE looks a good option. So I want to know if GAE is good for making a little website to share favorite youtube videos ? I have done single website in Python+Django few months back, it looks good to me. But JAVA is the langua...
GAE is any good ? if yes then JAVA or Python?
0.033321
0
0
652
3,263,847
2010-07-16T10:21:00.000
1
0
0
1
java,python,google-app-engine
3,263,926
6
false
1
0
I would personally go with a Java based solution. If this is just a little website for yourself, then it would be a good idea to learn a new technology, in this case Java. Little projects like this are ideal for learning new technologies and seeing if they are suitable for you as a developer and other projects you may ...
6
2
0
Basically I am coding websites in PHP from last year. But now I want to use something else and GAE looks a good option. So I want to know if GAE is good for making a little website to share favorite youtube videos ? I have done single website in Python+Django few months back, it looks good to me. But JAVA is the langua...
GAE is any good ? if yes then JAVA or Python?
0.033321
0
0
652
3,263,847
2010-07-16T10:21:00.000
2
0
0
1
java,python,google-app-engine
3,263,908
6
false
1
0
If you want to learn Java, then use Java! If you feel that Java is too verbose compared to Python, you could try Scala, which runs on the JVM like Java. Scala is more concise and well designed.
6
2
0
Basically I am coding websites in PHP from last year. But now I want to use something else and GAE looks a good option. So I want to know if GAE is good for making a little website to share favorite youtube videos ? I have done single website in Python+Django few months back, it looks good to me. But JAVA is the langua...
GAE is any good ? if yes then JAVA or Python?
0.066568
0
0
652
3,263,847
2010-07-16T10:21:00.000
3
0
0
1
java,python,google-app-engine
3,264,075
6
false
1
0
Java and Python are both excellent languages. It is a matter of taste and believe which you choose. If you prefer a lightweight solution, use Python. If you have enterprise needs, whatever that means, use Java. If you ask for my personal believe, my subjective stand-of-point is: Use Python wherever possible and sti...
6
2
0
Basically I am coding websites in PHP from last year. But now I want to use something else and GAE looks a good option. So I want to know if GAE is good for making a little website to share favorite youtube videos ? I have done single website in Python+Django few months back, it looks good to me. But JAVA is the langua...
GAE is any good ? if yes then JAVA or Python?
0.099668
0
0
652
3,264,024
2010-07-16T10:44:00.000
1
0
1
0
python,ubuntu,pygame,python-idle
9,820,042
4
false
0
1
If you don't like to download an unpack then install manually, you can use apt to install setuptools . After that you can use easy_install(or easy_install-2.7?) to install many python packages, including pygame, of course.
3
3
0
I am running in ubuntu and I can code in python, without problem. I have tried to install pygame and to do make it so, I did: sudo apt-get instal python-pygame When I go into the python IDLE and write: import pygame I get: Traceback (most recent call last): File "", line 1, in ImportError: No module named pygame ...
pygame not found
0.049958
0
0
9,872
3,264,024
2010-07-16T10:44:00.000
1
0
1
0
python,ubuntu,pygame,python-idle
14,076,665
4
false
0
1
I just had this same problem! I read this and while it works to do the sys.path.append thing, I decided to try and get it to work with out. What I did was went to the Ubuntu Software center uninstalled the python IDLE i had installed and then installed the IDLE. This seems confusing the way I said it so to clarify you ...
3
3
0
I am running in ubuntu and I can code in python, without problem. I have tried to install pygame and to do make it so, I did: sudo apt-get instal python-pygame When I go into the python IDLE and write: import pygame I get: Traceback (most recent call last): File "", line 1, in ImportError: No module named pygame ...
pygame not found
0.049958
0
0
9,872
3,264,024
2010-07-16T10:44:00.000
0
0
1
0
python,ubuntu,pygame,python-idle
17,222,436
4
false
0
1
check that you are installing pygame for the right version of python. I think the pygame for python 2.7 won't work on python 3.3. I had the same problem but even after installing the right version it didn't work. So after a little googling I found that I was installing pygame meant for 32-bit but my os is 64-bit. so tr...
3
3
0
I am running in ubuntu and I can code in python, without problem. I have tried to install pygame and to do make it so, I did: sudo apt-get instal python-pygame When I go into the python IDLE and write: import pygame I get: Traceback (most recent call last): File "", line 1, in ImportError: No module named pygame ...
pygame not found
0
0
0
9,872
3,264,029
2010-07-16T10:45:00.000
3
0
1
0
.net,ironpython,dynamic-language-runtime
3,269,071
1
true
1
0
You need to subclass the PlatformAdaptationLayer class and implement the "file system" calls. IronPython will then go to the PAL to do I/O for the files. This also involves implementing a ScriptHost which returns the type for the PAL. A good example of this is the Silverlight host which redirects file I/O to a XAP f...
1
3
0
I'm writing a C# client application which is intended to have strong support for customisation via scripting, and I have chosen IronPython as my target scripting language. I would like to keep the user's code in the application's database with the rest of its state, but I need the user to be able to split their scripts...
How can I set up dynamic imports when hosting IronPython?
1.2
0
0
180
3,264,828
2010-07-16T12:31:00.000
4
0
1
0
python,python-3.x,floating-point,string-formatting
3,264,847
7
false
0
0
No, because that would require modifying float.__str__(), but you aren't allowed to monkeypatch C types. Use string interpolation or formatting instead.
1
17
0
I've some lists and more complex structures containing floats. When printing them, I see the floats with a lot of decimal digits, but when printing, I don't need all of them. So I would like to define a custom format (e.g. 2 or 3 decimals) when floats are printed. I need to use floats and not Decimal. Also, I'm not all...
Change default float print format
0.113791
0
0
29,211