Q_Id int64 2.93k 49.7M | CreationDate stringlengths 23 23 | Users Score int64 -10 437 | Other int64 0 1 | Python Basics and Environment int64 0 1 | System Administration and DevOps int64 0 1 | DISCREPANCY int64 0 1 | Tags stringlengths 6 90 | ERRORS int64 0 1 | A_Id int64 2.98k 72.5M | API_CHANGE int64 0 1 | AnswerCount int64 1 42 | REVIEW int64 0 1 | is_accepted bool 2
classes | Web Development int64 0 1 | GUI and Desktop Applications int64 0 1 | Answer stringlengths 15 5.1k | Available Count int64 1 17 | Q_Score int64 0 3.67k | Data Science and Machine Learning int64 0 1 | DOCUMENTATION int64 0 1 | Question stringlengths 25 6.53k | Title stringlengths 11 148 | CONCEPTUAL int64 0 1 | Score float64 -1 1.2 | API_USAGE int64 1 1 | Database and SQL int64 0 1 | Networking and APIs int64 0 1 | ViewCount int64 15 3.72M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,403,168 | 2010-08-04T06:40:00.000 | 0 | 0 | 0 | 0 | 0 | python,escaping,html-entities | 0 | 3,405,525 | 0 | 4 | 0 | false | 1 | 0 | You shouldn't use an XML parser to parse data that isn't XML. Find an HTML parser instead, you'll be happier in the long run. The standard library has a few (HTMLParser and htmllib), and BeautifulSoup is a well-loved third-party package. | 1 | 1 | 0 | 0 | I'm scraping a html page, then using xml.dom.minidom.parseString() to create a dom object.
however, the html page has a '&'. I can use cgi.escape to convert this into & but it also converts all my html <> tags into <> which makes parseString() unhappy.
how do i go about this? i would rather not just hack it... | need to selectively escape html entities (&) | 0 | 0 | 1 | 0 | 1 | 576 |
3,409,226 | 2010-08-04T19:41:00.000 | 2 | 1 | 0 | 1 | 0 | python,eclipse,intellisense,pydev | 0 | 3,409,335 | 0 | 3 | 0 | false | 0 | 0 | I'm using eclipse 3.6 and pydev with python 2.6 and it's the best one I've tested up to now. I didn't try 3.5 so not sure if it's the same as yours but I think it autocompletes well compared to others I tried but I didn't try any of the paid ones. | 3 | 0 | 0 | 0 | Does anyone know how to get an intellisense like functionality (better than default) in eclipse for python development? I am using Eclipse 3.5 with aptana and pydev and the interpreter is python 2.5.2 | How do you get Intellisense for Python in Eclipse/Aptana/Pydev? | 0 | 0.132549 | 1 | 0 | 0 | 3,548 |
3,409,226 | 2010-08-04T19:41:00.000 | 3 | 1 | 0 | 1 | 0 | python,eclipse,intellisense,pydev | 0 | 3,409,439 | 0 | 3 | 0 | false | 0 | 0 | You are probably never going to get something as good as intellisense for python. Due to the dynamic nature of python, it is often impossible to be able to know the type of some variables.
And if you don't know their types, you can't do auto-complete on things like class members.
Personally, I think the auto-complete ... | 3 | 0 | 0 | 0 | Does anyone know how to get an intellisense like functionality (better than default) in eclipse for python development? I am using Eclipse 3.5 with aptana and pydev and the interpreter is python 2.5.2 | How do you get Intellisense for Python in Eclipse/Aptana/Pydev? | 0 | 0.197375 | 1 | 0 | 0 | 3,548 |
3,409,226 | 2010-08-04T19:41:00.000 | 0 | 1 | 0 | 1 | 0 | python,eclipse,intellisense,pydev | 0 | 9,141,159 | 0 | 3 | 0 | false | 0 | 0 | In Aptana I added the reference to the .egg file to the system PYTHONPATH in Preferences menu. I am not sure if this works for every library out there.
Preferences --> PyDev --> Interpreter Python --> Libraries tab on the right. | 3 | 0 | 0 | 0 | Does anyone know how to get an intellisense like functionality (better than default) in eclipse for python development? I am using Eclipse 3.5 with aptana and pydev and the interpreter is python 2.5.2 | How do you get Intellisense for Python in Eclipse/Aptana/Pydev? | 0 | 0 | 1 | 0 | 0 | 3,548 |
3,411,131 | 2010-08-05T01:30:00.000 | 1 | 0 | 0 | 0 | 0 | python,django,path,django-manage.py,devserver | 1 | 3,411,300 | 0 | 2 | 0 | true | 1 | 0 | manage.py imports settings.py from the current directory and pass settings as parameter to execute_manager. You probably defined project root in settings.py. | 1 | 0 | 0 | 0 | I recently moved a django app from c:\Users\user\django-projects\foo\foobar to c:\Python25\Lib\site-packages\foo\foobar (which is on the python path). I started a new app in the django-projects directory, and added foo.foobar to the INSTALLED_APPS setting. When I try to run the dev server (manage.py runserver) for my n... | Where does django dev server (manage.py runserver) get its path from? | 0 | 1.2 | 1 | 0 | 0 | 2,351 |
3,423,510 | 2010-08-06T11:58:00.000 | 0 | 1 | 0 | 0 | 0 | python,comparison,md5 | 0 | 3,423,577 | 0 | 3 | 0 | false | 0 | 0 | You can log in using ssh and make a md5 hash for the file remotely and a md5 hash for the current local file. If the md5s are matching the files are identicaly, else they are different. | 2 | 2 | 0 | 0 | I have the following problem: I have a local .zip file and a .zip file located on a server. I need to check if the .zip file on the server is different from the local one; if they are not I need to pull the new one from the server. My question is how do I compare them without downloading the file from the server and co... | Comparing local file with remote file | 1 | 0 | 1 | 0 | 0 | 4,055 |
3,423,510 | 2010-08-06T11:58:00.000 | 0 | 1 | 0 | 0 | 0 | python,comparison,md5 | 0 | 3,423,559 | 0 | 3 | 0 | false | 0 | 0 | I would like to know how you intend to compare them locally, if it were the case. You can apply the same logic to compare them remotely. | 2 | 2 | 0 | 0 | I have the following problem: I have a local .zip file and a .zip file located on a server. I need to check if the .zip file on the server is different from the local one; if they are not I need to pull the new one from the server. My question is how do I compare them without downloading the file from the server and co... | Comparing local file with remote file | 1 | 0 | 1 | 0 | 0 | 4,055 |
3,427,795 | 2010-08-06T21:05:00.000 | 3 | 0 | 1 | 0 | 0 | .net,python,language-agnostic,naming-conventions | 0 | 3,427,822 | 0 | 12 | 0 | false | 0 | 0 | I'd recommend purchasing a copy of "Clean Code" by Robert C. Martin. It is full of great suggstions ranging from naming conventions to how to write easy-to-understand functions and much more. Definitely worth a read. I know it influenced my coding style since reading it. | 7 | 4 | 0 | 1 | as you can probably tell from my previous posts i have horrific naming conventions. do you know of any tutorials dealing with how to name stuff? | are there tutorials on how to name variables? | 0 | 0.049958 | 1 | 0 | 0 | 509 |
3,427,795 | 2010-08-06T21:05:00.000 | 2 | 0 | 1 | 0 | 0 | .net,python,language-agnostic,naming-conventions | 0 | 3,427,834 | 0 | 12 | 0 | false | 0 | 0 | Have you read Code Complete? He does a full treatise on this in the book. Definitely the best naming strategy I've seen in print... And it's easy to find like 1000 programmers at the drop of a hat who name this one of the top 5 resources for programmers and program design.
Just my $.05 | 7 | 4 | 0 | 1 | as you can probably tell from my previous posts i have horrific naming conventions. do you know of any tutorials dealing with how to name stuff? | are there tutorials on how to name variables? | 0 | 0.033321 | 1 | 0 | 0 | 509 |
3,427,795 | 2010-08-06T21:05:00.000 | 3 | 0 | 1 | 0 | 0 | .net,python,language-agnostic,naming-conventions | 0 | 3,427,856 | 0 | 12 | 0 | false | 0 | 0 | There are many different views on the specifics of naming conventions, but the overall gist could be summed up as:
Each variable name should be relevant
to whatever data is stored in the
variable.
Your naming scheme should be consistent.
So a major no-no would be
single letter variables (some people
use i and j ... | 7 | 4 | 0 | 1 | as you can probably tell from my previous posts i have horrific naming conventions. do you know of any tutorials dealing with how to name stuff? | are there tutorials on how to name variables? | 0 | 0.049958 | 1 | 0 | 0 | 509 |
3,427,795 | 2010-08-06T21:05:00.000 | 1 | 0 | 1 | 0 | 0 | .net,python,language-agnostic,naming-conventions | 0 | 3,428,775 | 0 | 12 | 0 | false | 0 | 0 | It's not clear if your question relates to Python naming conventions.
If so, for starters I would try to follow just these simple rules:
ClassName - upper case for class names
variable_name - lower case and underscore for variables (I try to keep them at two words maximum) | 7 | 4 | 0 | 1 | as you can probably tell from my previous posts i have horrific naming conventions. do you know of any tutorials dealing with how to name stuff? | are there tutorials on how to name variables? | 0 | 0.016665 | 1 | 0 | 0 | 509 |
3,427,795 | 2010-08-06T21:05:00.000 | 5 | 0 | 1 | 0 | 0 | .net,python,language-agnostic,naming-conventions | 0 | 3,428,433 | 0 | 12 | 0 | false | 0 | 0 | A bad convention followed fully is better than a combination of different good "conventions" (which aren't conventions at all any more, if they aren't kept to).
However, a convention that is making something less clear than if it had been ignored, should be ignored.
Those are the only two I would state as any sort of ... | 7 | 4 | 0 | 1 | as you can probably tell from my previous posts i have horrific naming conventions. do you know of any tutorials dealing with how to name stuff? | are there tutorials on how to name variables? | 0 | 0.083141 | 1 | 0 | 0 | 509 |
3,427,795 | 2010-08-06T21:05:00.000 | 4 | 0 | 1 | 0 | 0 | .net,python,language-agnostic,naming-conventions | 0 | 3,428,164 | 0 | 12 | 0 | true | 0 | 0 | All the answers here are quite valid. Most important: be consistent.
That said, here are my rules (C#):
camelCase identifiers -- I personally
find this much easier to read than
underscores
Public properties start
with a capital letter
Something I
should never touch starts with an
underscore -- example, the backing
fi... | 7 | 4 | 0 | 1 | as you can probably tell from my previous posts i have horrific naming conventions. do you know of any tutorials dealing with how to name stuff? | are there tutorials on how to name variables? | 0 | 1.2 | 1 | 0 | 0 | 509 |
3,427,795 | 2010-08-06T21:05:00.000 | 1 | 0 | 1 | 0 | 0 | .net,python,language-agnostic,naming-conventions | 0 | 3,428,577 | 0 | 12 | 0 | false | 0 | 0 | Can I make a shameless plug for the "Names" chapter in my book, "A Sane Approach to Database Design" ? I'm specifically talking about names for things in databases, but most of the same considerations apply to variables in programs. | 7 | 4 | 0 | 1 | as you can probably tell from my previous posts i have horrific naming conventions. do you know of any tutorials dealing with how to name stuff? | are there tutorials on how to name variables? | 0 | 0.016665 | 1 | 0 | 0 | 509 |
3,429,887 | 2010-08-07T09:23:00.000 | 3 | 1 | 0 | 0 | 0 | python,android,eclipse,workspace,eclipse-pdt | 0 | 3,430,003 | 0 | 2 | 0 | true | 1 | 0 | The plug-ins are stored in the Eclipse installation, not in the workspace folder. So one solution would be to different Eclipse installations for every task, in this case only the required plug-ins would load (and the others not available), on the other hand, you have to maintain at least three parallel Eclipse install... | 1 | 4 | 0 | 0 | I use Eclipse for programming in PHP (PDT), Python and sometimes Android. Each of this programming languages requires to run many things after Eclipse start.
Of course I do not use all of them at one moment, I have different workspace for each of those. Is there any way, or recommendation, how to make Eclipse to run on... | How to organize Eclipse - Workspace VS Programming languages | 1 | 1.2 | 1 | 0 | 0 | 741 |
3,433,559 | 2010-08-08T08:09:00.000 | 2 | 0 | 1 | 0 | 0 | python,time | 0 | 67,426,999 | 0 | 4 | 0 | false | 0 | 0 | If the non-block feature is not needed, just use time.sleep(5) which will work anywhere and save your life. | 2 | 57 | 0 | 0 | I want to know how to call a function after a certain time. I have tried time.sleep() but this halts the whole script. I want the script to carry on, but after ???secs call a function and run the other script at the same time | Python Time Delays | 0 | 0.099668 | 1 | 0 | 0 | 55,176 |
3,433,559 | 2010-08-08T08:09:00.000 | 5 | 0 | 1 | 0 | 0 | python,time | 0 | 3,434,738 | 0 | 4 | 0 | false | 0 | 0 | If you want a function to be called after a while and not to stop your script you are inherently dealing with threaded code. If you want to set a function to be called and not to worry about it, you have to either explicitly use multi-threading - like em Mark Byers's answr, or use a coding framework that has a main loo... | 2 | 57 | 0 | 0 | I want to know how to call a function after a certain time. I have tried time.sleep() but this halts the whole script. I want the script to carry on, but after ???secs call a function and run the other script at the same time | Python Time Delays | 0 | 0.244919 | 1 | 0 | 0 | 55,176 |
3,445,867 | 2010-08-10T03:43:00.000 | 2 | 0 | 0 | 0 | 0 | python,binding,tkinter | 0 | 3,445,919 | 0 | 1 | 0 | false | 0 | 1 | Tkinter, on its own, cannot grab keystrokes that (from the OS's/WM's viewpoint) were directed to other, unrelated windows -- you'll need to instruct your window manager, desktop manager, or "operating system", to direct certain keystrokes differently than it usually does. So, what platform do you need to support for t... | 1 | 1 | 0 | 0 | I made a GUI with Tkinter, now how do I make it so when a key command will execute a command even if the Tkinter window is not in focus? Basically I want it so everything is bound to that key command.
Example:
Say I was browsing the internet and the focus was on my browser, I then type Ctrl + U. An event would then r... | Key commands in Tkinter | 0 | 0.379949 | 1 | 0 | 0 | 515 |
3,450,525 | 2010-08-10T15:19:00.000 | 0 | 0 | 0 | 0 | 0 | python,event-handling,wxpython | 0 | 3,451,727 | 0 | 3 | 0 | false | 0 | 1 | In your init or OnInit method, do some kind of check to see if the program should run the startup process on startup (i.e. check a config file or some such). If yes, call the "scan" method using wx.CallAfter or wx.CallLater or call it after you Show() the frame. | 2 | 0 | 0 | 0 | OK, I'm trying to explain what I want to achieve in another way. Here's an example:
Say if it's an anti virus program, and user can choose between two ways to run the program, choice one, automatically start to scan disks for virus when the program starts up, choice two, hit the start button to make the program scan di... | Is there a wxpython event like program_start? | 0 | 0 | 1 | 0 | 0 | 372 |
3,450,525 | 2010-08-10T15:19:00.000 | 1 | 0 | 0 | 0 | 0 | python,event-handling,wxpython | 0 | 3,450,557 | 0 | 3 | 0 | false | 0 | 1 | Why don't you run it just in module code? This way it will be run only once, because code in module is run only once per program instance. | 2 | 0 | 0 | 0 | OK, I'm trying to explain what I want to achieve in another way. Here's an example:
Say if it's an anti virus program, and user can choose between two ways to run the program, choice one, automatically start to scan disks for virus when the program starts up, choice two, hit the start button to make the program scan di... | Is there a wxpython event like program_start? | 0 | 0.066568 | 1 | 0 | 0 | 372 |
3,452,729 | 2010-08-10T19:35:00.000 | 6 | 1 | 1 | 0 | 0 | python,ruby,perl,comparison | 0 | 3,454,618 | 0 | 3 | 0 | false | 0 | 0 | I'm learning Python (and it's my first programming language so don't be too intense with your reasons) and I wanted to know how it stacks up to other scripting languages, like Perl and Ruby. What is Python better in comparison to other scripting languages, and what is it worse for?
IMO.
I have tried Python 2.x for so... | 1 | 1 | 0 | 0 | I'm learning Python (and it's my first programming language so don't be too intense with your reasons) and I wanted to know how it stacks up to other scripting languages, like Perl and Ruby. What is Python better in comparison to other scripting languages, and what is it worse for? | How does Python stack up to other scripting languages? | 0 | 1 | 1 | 0 | 0 | 1,331 |
3,462,951 | 2010-08-11T21:21:00.000 | 0 | 0 | 0 | 0 | 0 | python,django | 0 | 3,463,019 | 0 | 2 | 0 | false | 1 | 0 | Not all sequences of bytes are valid for ex. UTF-8, maybe you should check this? | 1 | 0 | 0 | 0 | The file is uploaded through a Django form. The contents of the file need to be saved into a models.TextField(), for editors to review it before publication.
I am already checking UploadedFile.content_type. I have considered using a regular input field, but as the text is going to be quite long, it would be unwieldy fo... | In Python, how do I check that a file is a text file? | 0 | 0 | 1 | 0 | 0 | 114 |
3,465,295 | 2010-08-12T06:41:00.000 | 4 | 1 | 0 | 1 | 1 | python,command,packaging,distutils | 0 | 3,466,094 | 0 | 2 | 0 | true | 0 | 0 | I wouldn't have any check at all. Document that your library requires this command, and if the user tries to use whatever part of your library needs it, an exception will be raised by whatever runs the command. It should still be possible to import your library and use it, even if only a subset of functionality is offe... | 1 | 3 | 0 | 0 | I'm looking for the most elegant way to notify users of my library that they need a specific unix command to ensure that it will works...
When is the bet time for my lib to raise an error:
Installation ?
When my app call the command ?
At the import of my lib ?
both?
And also how should you detect that the command is ... | How to depends of a system command with python/distutils? | 0 | 1.2 | 1 | 0 | 0 | 629 |
3,469,551 | 2010-08-12T15:52:00.000 | 1 | 0 | 1 | 0 | 0 | python,django,virtualenv,pip | 1 | 3,470,317 | 0 | 1 | 0 | true | 1 | 0 | it seems that the pip process quit prematurely due to a package in requirements that could not be found. this left things in limbo, stuck in the temp-like "build" folder before having a chance to complete the process which gets them into the proper "site-packages" location. | 1 | 4 | 0 | 0 | i am setting up a virtualenv for django deployment. i want an isolated env without access to the global site-packages. i used the option --no-site-packages, then installed a local pip instance for that env.
after using pip and a requirements.txt file i noticed that most packages were installed in a "build" folder tha... | virtualenv, sys.path and site-packages | 1 | 1.2 | 1 | 0 | 0 | 1,443 |
3,479,728 | 2010-08-13T18:35:00.000 | 3 | 0 | 0 | 1 | 0 | python,security,bash,scripting,embedding | 0 | 3,479,760 | 0 | 7 | 0 | false | 0 | 0 | It always better and better style to use Python functions to do this kind of stuff. With Python it's not that hard to write a script in an OS-independent way instead of using bash. | 3 | 8 | 0 | 0 | I was wondering whether or not it is considered a good style to call bash commands within a Python script using os.system(). I was also wondering whether or not it is safe to do so as well.
I know how to implement some of the functionality I need in Bash and in Python, but it is much simpler and more intuitive to imple... | Is it good style to call bash commands within a Python script using os.system("bash code")? | 0 | 0.085505 | 1 | 0 | 0 | 3,091 |
3,479,728 | 2010-08-13T18:35:00.000 | 1 | 0 | 0 | 1 | 0 | python,security,bash,scripting,embedding | 0 | 3,479,763 | 0 | 7 | 0 | false | 0 | 0 | It's not idea, since it makes your script a lot less portable. A native python script can run on any unix or windows machine that has the proper python libraries installed. When you add shell commands into the mix, you break that, and suddenly are locked down to a much narrower subset.
Sometimes you don't have a choi... | 3 | 8 | 0 | 0 | I was wondering whether or not it is considered a good style to call bash commands within a Python script using os.system(). I was also wondering whether or not it is safe to do so as well.
I know how to implement some of the functionality I need in Bash and in Python, but it is much simpler and more intuitive to imple... | Is it good style to call bash commands within a Python script using os.system("bash code")? | 0 | 0.028564 | 1 | 0 | 0 | 3,091 |
3,479,728 | 2010-08-13T18:35:00.000 | 1 | 0 | 0 | 1 | 0 | python,security,bash,scripting,embedding | 0 | 3,479,838 | 0 | 7 | 0 | false | 0 | 0 | The quoting issues alone suggest that a pure Python solution is preferable. | 3 | 8 | 0 | 0 | I was wondering whether or not it is considered a good style to call bash commands within a Python script using os.system(). I was also wondering whether or not it is safe to do so as well.
I know how to implement some of the functionality I need in Bash and in Python, but it is much simpler and more intuitive to imple... | Is it good style to call bash commands within a Python script using os.system("bash code")? | 0 | 0.028564 | 1 | 0 | 0 | 3,091 |
3,483,675 | 2010-08-14T14:11:00.000 | 0 | 0 | 0 | 0 | 0 | python,event-handling,wxpython | 0 | 41,389,878 | 0 | 2 | 0 | false | 0 | 1 | In the __init__( ) for your main frame put this:
wx.CallAfter( func_name ) | 2 | 0 | 0 | 0 | I'm working on a GUI program in which I already bind a start button with one event, and when I click the start button, the event runs as I like. My question is, if I want my program to start the event immediately after the GUI program starts, which means the start button is immediately being "clicked" once the program ... | How to make a event run immediately after a GUI program starts in wxpython? | 0 | 0 | 1 | 0 | 0 | 205 |
3,483,675 | 2010-08-14T14:11:00.000 | 1 | 0 | 0 | 0 | 0 | python,event-handling,wxpython | 0 | 3,483,688 | 0 | 2 | 0 | true | 0 | 1 | In the main frame constructor set a one-shot timer with interval 0 that fires the event. | 2 | 0 | 0 | 0 | I'm working on a GUI program in which I already bind a start button with one event, and when I click the start button, the event runs as I like. My question is, if I want my program to start the event immediately after the GUI program starts, which means the start button is immediately being "clicked" once the program ... | How to make a event run immediately after a GUI program starts in wxpython? | 0 | 1.2 | 1 | 0 | 0 | 205 |
3,486,384 | 2010-08-15T05:54:00.000 | 3 | 0 | 1 | 0 | 0 | python | 0 | 46,546,045 | 0 | 8 | 0 | false | 0 | 0 | Most of previous examples will raise an exception in case your string is not long enough.
Another approach is to use
'yourstring'.ljust(100)[:100].strip().
This will give you first 100 chars.
You might get a shorter string in case your string last chars are spaces. | 1 | 121 | 0 | 0 | Can seem to find a substring function in python.
Say I want to output the first 100 characters in a string, how can I do this?
I want to do it safely also, meaning if the string is 50 characters it shouldn't fail. | Output first 100 characters in a string | 0 | 0.07486 | 1 | 0 | 0 | 174,305 |
3,487,507 | 2010-08-15T13:16:00.000 | 0 | 1 | 1 | 0 | 0 | python,unit-testing,readability | 1 | 3,488,720 | 0 | 3 | 0 | false | 0 | 0 | It feels like there maybe some room for breaking your method into smaller pieces. Ones focused on dealing with parsing input and formatting output, could be separate from the actual clustering logic. This way tests around your clustering methods would be fewer and dealing with easily understood and testable data stru... | 2 | 4 | 0 | 0 | I have a function that performs a hierarchical clustering on a list of input vectors. The return value is the root element of an object hierarchy, where each object represents a cluster. I want to test the following things:
Does each cluster contain the correct elements (and maybe other properties as well)?
Does each ... | Writing unittests for a function that returns a hierarchy of objects | 1 | 0 | 1 | 0 | 0 | 72 |
3,487,507 | 2010-08-15T13:16:00.000 | 2 | 1 | 1 | 0 | 0 | python,unit-testing,readability | 1 | 3,487,617 | 0 | 3 | 0 | true | 0 | 0 | If there are isomorphic results, you should probably have a predicate that can test for logical equivalence. This would likely be good for your code unit as well as helping to implement the unit test.
This is the core of Manoj Govindan's answer without the string intermediates and since you aren't interested in string ... | 2 | 4 | 0 | 0 | I have a function that performs a hierarchical clustering on a list of input vectors. The return value is the root element of an object hierarchy, where each object represents a cluster. I want to test the following things:
Does each cluster contain the correct elements (and maybe other properties as well)?
Does each ... | Writing unittests for a function that returns a hierarchy of objects | 1 | 1.2 | 1 | 0 | 0 | 72 |
3,489,183 | 2010-08-15T20:47:00.000 | 0 | 0 | 1 | 0 | 0 | python,timezone | 0 | 71,177,623 | 0 | 8 | 0 | false | 0 | 0 | Working with the latest version of tzlocal which is 4.1 as of today, tzlocal.get_localzone().key produces the following error: AttributeError: '_PytzShimTimezone' object has no attribute 'key'. But tzlocal.get_localzone().zone works lovely. | 1 | 24 | 0 | 0 | In a Python project I'm working on, I'd like to be able to get a "human-readable" timezone name of the form America/New_York, corresponding to the system local timezone, to display to the user. Every piece of code I've seen that accesses timezone information only returns either a numeric offset (-0400) or a letter code... | How can I get a human-readable timezone name in Python? | 0 | 0 | 1 | 0 | 0 | 22,635 |
3,489,520 | 2010-08-15T22:25:00.000 | 0 | 0 | 0 | 0 | 0 | python,gtk | 0 | 3,489,566 | 0 | 3 | 0 | false | 0 | 1 | Given the widget w, what does w.get_name() return? If None, that means the widget has no name property. Maybe you want gtk.glade.get_widget_name(w) instead? (I'm not sure if the name property of the widget and the name for it in the Glade XML from which it was created are the same thing...). | 1 | 10 | 0 | 0 | How do I get a widget's "name"?
When I define a GUI using Glade, I can "name" the widgets of the window but how do I recover that property when I have a widget object instance?
I've tried get_property(), get_name() and $widget.name to no avail.
Update: I am using GtkBuilder file format (i.e. XML format).
Resolution: a ... | Python GTK+ widget name | 0 | 0 | 1 | 0 | 0 | 4,906 |
3,493,244 | 2010-08-16T12:51:00.000 | 0 | 0 | 0 | 0 | 0 | python,mobile-website,turbogears | 0 | 3,562,868 | 0 | 4 | 0 | false | 1 | 0 | The simplest version of a "mobile site" is simply CSS. Display a simplified version of the site to USERAGENTS that are identified as mobile. | 1 | 1 | 0 | 0 | Is it possible to develop mobile versions of webpages using Turbogears? Can someone please show me an example and how it is done? | Can I use Turbogears to develop mobile sites? | 1 | 0 | 1 | 0 | 0 | 254 |
3,498,587 | 2010-08-17T01:00:00.000 | 2 | 0 | 1 | 1 | 0 | python,file | 0 | 3,498,742 | 0 | 2 | 0 | true | 0 | 0 | You can specify the path to the file in either a complete way (e.g. 'c:/wher/ever/the.txt'), also known as "absolute" because it's taken exactly as you specify it, or a partial one (e.g., just "the.txt", or "ever/the.txt", or "../ever/the.txt", and so on), also known as "relative" because it's taken relatively to the c... | 1 | 2 | 0 | 0 | I'm trying to open a file with Python, but I'm unsure how to find the correct filename to use. | How do you find the filename that you pass to open()? | 0 | 1.2 | 1 | 0 | 0 | 965 |
3,498,904 | 2010-08-17T02:28:00.000 | 0 | 0 | 1 | 0 | 0 | python,windows,validation | 0 | 3,498,920 | 0 | 2 | 0 | false | 0 | 0 | I would really urge you not to do this. As you said, whatever you do will be broken, and you may actually cause more copies of your software to be pirated by including this barrier. Asking your users nicely not to steal may do better...
That said, implementing this in a way that discourages the most casual piracy is ... | 2 | 0 | 0 | 0 | I have been working on a huge project for work for a while now, and it is almost done. However, in an effort to prevent the program was being pirated (I already know there is pretty much no method that can't be cracked ), the software needs to be able to validate. I'm not exactly sure how to do this. Could some sort of... | Software Validation Server in Python? | 0 | 0 | 1 | 0 | 0 | 228 |
3,498,904 | 2010-08-17T02:28:00.000 | 2 | 0 | 1 | 0 | 0 | python,windows,validation | 0 | 3,498,935 | 0 | 2 | 0 | true | 0 | 0 | The software, when starting, should launch an https (so it can't just be sniffed easily;-) request to your server, identifying itself (however it is that you choose to identify, e.g. a serial number or whatever), and the server's response will tell it what to do (run normally, or terminate, or ask the user to register ... | 2 | 0 | 0 | 0 | I have been working on a huge project for work for a while now, and it is almost done. However, in an effort to prevent the program was being pirated (I already know there is pretty much no method that can't be cracked ), the software needs to be able to validate. I'm not exactly sure how to do this. Could some sort of... | Software Validation Server in Python? | 0 | 1.2 | 1 | 0 | 0 | 228 |
3,501,215 | 2010-08-17T09:51:00.000 | 0 | 0 | 0 | 0 | 0 | python,opengl,svg,cairo,rsvg | 0 | 37,703,846 | 0 | 3 | 1 | false | 0 | 1 | I had to do the same (changing element color for instance), and had to modify rsvg library because all those nice features exist but they are hidden. You have to make a new interface to link to the nice features. | 1 | 3 | 0 | 0 | I render a huge SVG file with a lot of elements with Cairo, OpenGL and rsvg. I draw svg on cairo surface via rsvg and create an OpenGL texture to draw it. Everything is fine. And now I have to interact with elements from SVG. For example, I want to guess an element by coordinates. And I want to change the background of... | SVG interaction in python with cairo, opengl and rsvg | 1 | 0 | 1 | 0 | 0 | 3,978 |
3,504,522 | 2010-08-17T16:05:00.000 | 2 | 0 | 0 | 0 | 0 | python,image,pyqt,selection,pixel | 0 | 3,543,483 | 0 | 3 | 0 | false | 0 | 1 | First you have to draw the image. You can do this my making a QLabel widget and call setPixmap. You need to convert your QImage to QPixmap before doing this (you can use QPixmap.fromImage(img)).
You can get mouse clicks by subclassing the QImage and intercepting mousePressEvent. Look up the pixel value with QImage.pixe... | 1 | 9 | 0 | 0 | I would like to know how i can select a pixel with a mouse click in an image (QImge) and get pixel position and value.
Thanks | Pyqt get pixel position and value when mouse click on the image | 0 | 0.132549 | 1 | 0 | 0 | 19,296 |
3,507,451 | 2010-08-17T22:22:00.000 | 0 | 0 | 1 | 0 | 0 | python,multithreading,r | 0 | 3,507,504 | 0 | 6 | 0 | false | 0 | 0 | If I remember correctly (but I might be wrong here) one of the main purposes of Ada95 was parallel processing. Funny language, that was.
Jokes aside I'm not quite sure how good performance wise it would be (but seeing you are using Python now then it shouldn't be that bad) but I'd suggest Java since the basics of multi... | 2 | 6 | 0 | 0 | Right now, I use a combination of Python and R for all of my data processing needs. However, some of my datasets are incredibly large and would benefit strongly from multithreaded processing.
For example, if there are two steps that each have to performed on a set of several millions of data points, I would like to be... | Recommended language for multithreaded data work | 0 | 0 | 1 | 0 | 0 | 657 |
3,507,451 | 2010-08-17T22:22:00.000 | 1 | 0 | 1 | 0 | 0 | python,multithreading,r | 0 | 3,507,522 | 0 | 6 | 0 | false | 0 | 0 | On the Python side, your best bet is probably to separate the two steps in two different processes. There are a couple of modules that help you to achieve that. You would couple the two processes through pipes. In order to pass arbitrary data through the pipe, you need to serialize and deserialize it. The pickle module... | 2 | 6 | 0 | 0 | Right now, I use a combination of Python and R for all of my data processing needs. However, some of my datasets are incredibly large and would benefit strongly from multithreaded processing.
For example, if there are two steps that each have to performed on a set of several millions of data points, I would like to be... | Recommended language for multithreaded data work | 0 | 0.033321 | 1 | 0 | 0 | 657 |
3,507,732 | 2010-08-17T23:20:00.000 | 3 | 1 | 0 | 0 | 0 | python,arduino | 0 | 3,507,854 | 0 | 3 | 0 | false | 0 | 0 | Encode them into binary strings with Python's struct module. I don't know if arduino wants them little-endian or big-endian, but, if its docs aren't clear about this, a little experiment should easily settle the question;-). | 1 | 1 | 0 | 0 | I need to send integers greater than 255? Does anyone know how to do this? | Sending integer values to Arduino from PySerial | 0 | 0.197375 | 1 | 0 | 0 | 14,924 |
3,516,560 | 2010-08-18T20:49:00.000 | 1 | 0 | 1 | 0 | 0 | python,c | 0 | 6,150,403 | 0 | 7 | 0 | false | 0 | 0 | As someone who has worked with Java for over 12 years, I found that picking up a problem and solving it in a new language is the best way to learn. I don't believe in reading - it wastes a huge amount of time, and you can easily end up reading for too long.
My advice is to find a problem and set off to solve it with Py... | 3 | 18 | 0 | 1 | I've got a good grasp on C, my first programming language. I know a reasonable number of tricks and techniques and have written quite a few programs, mostly for scientific stuff. Now I'd like to branch out and understand OOP, and Python seems like a good direction to go.
I've seen several questions on how to learn Pyth... | Coming from C, how should I learn Python? | 0 | 0.028564 | 1 | 0 | 0 | 22,778 |
3,516,560 | 2010-08-18T20:49:00.000 | 1 | 0 | 1 | 0 | 0 | python,c | 0 | 3,517,315 | 0 | 7 | 0 | false | 0 | 0 | Diveintopython, official docs, "Learning python" by Mark Lutz(4th edition) is one of the best books. | 3 | 18 | 0 | 1 | I've got a good grasp on C, my first programming language. I know a reasonable number of tricks and techniques and have written quite a few programs, mostly for scientific stuff. Now I'd like to branch out and understand OOP, and Python seems like a good direction to go.
I've seen several questions on how to learn Pyth... | Coming from C, how should I learn Python? | 0 | 0.028564 | 1 | 0 | 0 | 22,778 |
3,516,560 | 2010-08-18T20:49:00.000 | 32 | 0 | 1 | 0 | 0 | python,c | 0 | 3,516,905 | 0 | 7 | 0 | true | 0 | 0 | I knew C before I knew Python. No offence intended, but I don't think that your C knowledge is that big a deal. Unless you read very, very slowly, just set out to learn Python. It won't take that long to skim through the material you're familiar with, and it's not as if a Python tutorial aimed at C programmers will mak... | 3 | 18 | 0 | 1 | I've got a good grasp on C, my first programming language. I know a reasonable number of tricks and techniques and have written quite a few programs, mostly for scientific stuff. Now I'd like to branch out and understand OOP, and Python seems like a good direction to go.
I've seen several questions on how to learn Pyth... | Coming from C, how should I learn Python? | 0 | 1.2 | 1 | 0 | 0 | 22,778 |
3,517,841 | 2010-08-19T00:33:00.000 | 1 | 0 | 0 | 0 | 0 | python,qt,networking,pyqt,thin | 0 | 3,517,886 | 0 | 2 | 0 | true | 0 | 1 | Your desire to send "app logic" from the server to the client without sending "code" is inherently self-contradictory, though you may not realize that yet -- even if the "logic" you're sending is in some simplified ad-hoc "language" (which you don't even think of as a language;-), to all intents and purposes your Pytho... | 1 | 0 | 0 | 0 | Here is what I would like to do, and I want to know how some people with experience in this field do this:
With three POST requests I get from the http server:
widgets and layout
and then app logic (minimal)
data
Or maybe it's better to combine the first two or all three. I'm thinking of using pyqt. I think I can loa... | how to implement thin client app with pyqt | 0 | 1.2 | 1 | 0 | 1 | 1,647 |
3,540,288 | 2010-08-22T05:23:00.000 | 1 | 0 | 1 | 0 | 0 | python | 0 | 3,540,307 | 0 | 11 | 0 | false | 0 | 0 | Seek to a random position, read a line and discard it, then read another line. The distribution of lines won't be normal, but that doesn't always matter. | 1 | 51 | 0 | 0 | Is there a built-in method to do it? If not how can I do this without costing too much overhead? | How do I read a random line from one file? | 0 | 0.01818 | 1 | 0 | 0 | 98,440 |
3,552,928 | 2010-08-24T01:22:00.000 | 3 | 1 | 0 | 0 | 0 | python,timeout,mechanize | 0 | 3,553,063 | 0 | 3 | 0 | false | 0 | 0 | If you're using Python 2.6 or better, and a correspondingly updated version of mechanize, mechanize.urlopen should accept a timeout=... optional argument which seems to be what you're looking for. | 1 | 15 | 0 | 0 | How do i set a timeout value for python's mechanize? | how do i set a timeout value for python's mechanize? | 0 | 0.197375 | 1 | 0 | 0 | 9,833 |
3,556,027 | 2010-08-24T11:41:00.000 | 0 | 1 | 0 | 1 | 0 | python,user-interface,bash | 0 | 3,556,046 | 0 | 4 | 0 | false | 0 | 0 | basically, all bash does is start other programs (and do symbolic math on the command line). So no, you're going to have to involve some other program. | 1 | 3 | 0 | 0 | I have some bash scripts, some simple ones to copy, search, write lines to files and so on.
I am an Ubuntu. and I've searched in google, but it seems that everybody is doing that on python.
I could do these on python, but since I am not a python programmer, I just know the basics.
I have no idea of how calling a sh scr... | Is there a way of having a GUI for bash scripts? | 0 | 0 | 1 | 0 | 0 | 2,093 |
3,557,949 | 2010-08-24T15:11:00.000 | 0 | 0 | 1 | 1 | 0 | python,python-install | 0 | 3,558,004 | 0 | 2 | 0 | false | 0 | 0 | There has to be a way, but what some people do is provide batch files that set up the environment before invoking Python. That's what BZR does, anyway. If you can write that batch file somewhere that's already normally in the path, so much the better.
If you're just worried about invoking Python, the normal Python inst... | 1 | 1 | 0 | 0 | I'm creating one-click python installer (integrated with my application). Is there any way to force Python MSI installer to add python's path to SYSTEM PATH variable?
I'm using MSI installer because it is very easy to specify (using command line) how it should interact with the user. | add Python path to PATH system variable automatically under Windows | 0 | 0 | 1 | 0 | 0 | 1,668 |
3,559,457 | 2010-08-24T17:55:00.000 | 1 | 1 | 1 | 0 | 0 | python,multithreading,tornado,gil | 0 | 3,562,109 | 0 | 1 | 0 | false | 0 | 0 | The first thing I would check for would be to ensure that you're properly exiting threads. It's very hard to figure out what's going on with just your description to go from, but you use the word "monotonically," which implies that CPU use is tied to time rather than to load.
You may very well be running into threading... | 1 | 8 | 0 | 0 | I'm just starting to work on a tornado application that is having some CPU issues. The CPU time will monotonically grow as time goes by, maxing out the CPU at 100%. The system is currently designed to not block the main thread. If it needs to do something that blocks and asynchronous drivers aren't available, it wil... | How do I determine the appropriate check interval? | 0 | 0.197375 | 1 | 0 | 0 | 765 |
3,568,371 | 2010-08-25T16:54:00.000 | 3 | 1 | 0 | 0 | 0 | python | 0 | 3,568,664 | 0 | 4 | 0 | false | 0 | 0 | You have a few options:
As Radomir mentioned, Cython might be a good choice: it's essentially a restricted Python with type declarations, automatically translated into C then compiled for execution.
If you want to use pure C, you can write a Python extension module using the Python C API. This is a good way to go if y... | 1 | 0 | 0 | 0 | i have prepared a project in python language ie a TEXT TO SPEECH synthesizer. Which took a total on 1500 lines of code.
But there few parts of code due to which it is taking so much time to run the code, i want to replace that parts of code in C/c++ lang so that it runs faster.
So i want to know how can i run these par... | how to replicate parts of code in python into C to execution faster? | 0 | 0.148885 | 1 | 0 | 0 | 106 |
3,571,233 | 2010-08-26T00:22:00.000 | 2 | 0 | 0 | 0 | 0 | python,selenium,browser-automation | 0 | 3,573,288 | 0 | 3 | 0 | true | 1 | 0 | There's a Selenium.getHtmlSource() method in Java, most likely it is also available in Python. It returns the source of the current page as string, so you can do whatever you want with it | 1 | 3 | 0 | 1 | I'm not sure how to find this information, I have found a few tutorials so far about using Python with selenium but none have so much as touched on this.. I am able to run some basic test scripts through python that automate selenium but it just shows the browser window for a few seconds and then closes it.. I need to ... | Selenium with Python, how do I get the page output after running a script? | 0 | 1.2 | 1 | 0 | 1 | 4,318 |
3,577,652 | 2010-08-26T17:18:00.000 | 2 | 0 | 0 | 0 | 0 | python,xml | 0 | 3,577,694 | 0 | 2 | 0 | false | 0 | 0 | BeautifulSoup is your best bet in this case. I suggest profiling before ruling out BeautifulSoup altogether. | 1 | 4 | 0 | 0 | A sever I can't influence sends very broken XML.
Specifically, a Unicode WHITE STAR would get encoded as UTF-8 (E2 98 86) and then translated using a Latin-1 to HTML entity table. What I get is â 98 86 (9 bytes) in a file that's declared as utf-8 with no DTD.
I couldn't configure W3C tidy in a way that doesn't ga... | How to parse broken XML in Python? | 0 | 0.197375 | 1 | 0 | 1 | 1,950 |
3,586,071 | 2010-08-27T16:05:00.000 | 4 | 0 | 0 | 0 | 0 | python,user-interface,pygtk,gettext,glade | 0 | 3,588,790 | 0 | 1 | 0 | true | 0 | 1 | You should be able to create a *.pot file from a *.glade file using intltool-extract --type=gettext/glade foo.glade, and intltool supposedly knows what is translatable.
Also, I suggest you look into GtkBuilder if you didn't do that already (you can save GtkBuilder interface files from recent Glade 3 versions, and you w... | 1 | 7 | 0 | 0 | I have made an application using Glade and Python and I would like to make several localizations.
I know how to localize strings that are in the Python code, I just encapsule all the strings that are supposed to be localized with _() and than specify the translation of the string in a .po file.
But how do I tell a stri... | Localization of GUI built with Glade and Python (Gtk) | 0 | 1.2 | 1 | 0 | 0 | 1,203 |
3,594,631 | 2010-08-29T12:04:00.000 | 0 | 0 | 1 | 0 | 0 | python,network-programming | 0 | 3,594,735 | 0 | 2 | 0 | true | 0 | 0 | To receive messages (e.g. the UDP package suggested by the other poster or an http request), the clients would have to run a basic server on the client machine. You could use the Python xmlrpc module for example. However, a local firewall may block the inward communication.
The easiest solution, if the number of clien... | 2 | 1 | 0 | 0 | I am new to network programming but old to Python. I have a simple blotter program that is to be used on multiple client computers. The blotter works two ways, it can show and update the information in the database. To avoid any blotters showing old data, how can I make all blotters re-fetch information from the databa... | Keeping multiple clients showing up-to-date information in Python? | 1 | 1.2 | 1 | 0 | 0 | 177 |
3,594,631 | 2010-08-29T12:04:00.000 | 0 | 0 | 1 | 0 | 0 | python,network-programming | 0 | 3,594,712 | 0 | 2 | 0 | false | 0 | 0 | You could use triggers. When an information is updated send a signal (is up to you choose how, maybe just an udp packet) to all blotters that will update their information consequentially. Postgresql could be scripted using python. | 2 | 1 | 0 | 0 | I am new to network programming but old to Python. I have a simple blotter program that is to be used on multiple client computers. The blotter works two ways, it can show and update the information in the database. To avoid any blotters showing old data, how can I make all blotters re-fetch information from the databa... | Keeping multiple clients showing up-to-date information in Python? | 1 | 0 | 1 | 0 | 0 | 177 |
3,604,357 | 2010-08-30T21:28:00.000 | 0 | 0 | 1 | 0 | 0 | python,user-interface,gtk | 0 | 3,604,511 | 0 | 3 | 0 | false | 0 | 1 | You mean a widget to filter a large collection into multiple subsets / views?
I would guess you have to implement this yourself - a list of options on the left and filtered results on the right, I don't know of any existing (gtk) widgets. | 1 | 1 | 0 | 0 | I'm trying to write a simple GTD-style todo list app with python and gtk to learn python. I want a container that can select an individual list from a lot of choices. It would be something like the list of notebooks area in tomboy. Not a combobox.
As you can probably tell I'm a beginner and the terminology is probab... | Python PyGTK. What's this component? | 0 | 0 | 1 | 0 | 0 | 256 |
3,606,743 | 2010-08-31T07:07:00.000 | 0 | 0 | 1 | 1 | 0 | python,google-app-engine,ssl | 0 | 3,606,827 | 0 | 3 | 0 | false | 0 | 0 | Why don't you provide the complete path to python executable. That should work.
C:\"Python2.5.2"\python.exe setup.py install | 1 | 1 | 0 | 0 | I'm running GAE SDK on a Windows Vista laptop. It keeps reminding me to install the SSL module. I've been having great difficulty on how to do that.
I've downloaded the SSL module.
I've done 'python setup.py install' in cmd, but it just says "python is not recognized as an internal..."
I've added C:\Python2.5.2 to my P... | Installing Python SSL module on Windows Vista | 0 | 0 | 1 | 0 | 0 | 530 |
3,607,020 | 2010-08-31T07:46:00.000 | 3 | 0 | 1 | 0 | 0 | python,vba | 0 | 3,627,197 | 0 | 4 | 0 | false | 0 | 0 | It is matter of taste. If you use modules your 'program' will be more procedural oriented. If you choose classes it will be more or less object oriented. I'm working with Excel for couple of months and personally I choose classes whenever I can because it is more comfortable to me. If you stop thinking about objects an... | 4 | 5 | 0 | 0 | My first "serious" language was Java, so I have comprehended object-oriented programming in sense that elemental brick of program is a class.
Now I write on VBA and Python. There are module languages and I am feeling persistent discomfort: I don't know how should I decompose program in a modules/classes.
I understand t... | Module vs object-oriented programming in vba | 0 | 0.148885 | 1 | 0 | 0 | 4,745 |
3,607,020 | 2010-08-31T07:46:00.000 | 3 | 0 | 1 | 0 | 0 | python,vba | 0 | 3,607,773 | 0 | 4 | 0 | true | 0 | 0 | I don't do VBA but in python, modules are fundamental. As you say, the can be viewed as namespaces but they are also objects in their own right. They are not classes however, so you cannot inherit from them (at least not directly).
I find that it's a good rule to keep a module concerned with one domain area. The rule t... | 4 | 5 | 0 | 0 | My first "serious" language was Java, so I have comprehended object-oriented programming in sense that elemental brick of program is a class.
Now I write on VBA and Python. There are module languages and I am feeling persistent discomfort: I don't know how should I decompose program in a modules/classes.
I understand t... | Module vs object-oriented programming in vba | 0 | 1.2 | 1 | 0 | 0 | 4,745 |
3,607,020 | 2010-08-31T07:46:00.000 | 1 | 0 | 1 | 0 | 0 | python,vba | 0 | 3,607,379 | 0 | 4 | 0 | false | 0 | 0 | VBA also allows the use of classes. Unfortunately, those classes don't support all the features of a full-fleged object oriented language. Especially inheritance is not supported.
But you can work with interfaces, at least up to a certain degree.
I only used modules like "one module = one singleton". My modules contain... | 4 | 5 | 0 | 0 | My first "serious" language was Java, so I have comprehended object-oriented programming in sense that elemental brick of program is a class.
Now I write on VBA and Python. There are module languages and I am feeling persistent discomfort: I don't know how should I decompose program in a modules/classes.
I understand t... | Module vs object-oriented programming in vba | 0 | 0.049958 | 1 | 0 | 0 | 4,745 |
3,607,020 | 2010-08-31T07:46:00.000 | 1 | 0 | 1 | 0 | 0 | python,vba | 0 | 3,607,193 | 0 | 4 | 0 | false | 0 | 0 | Idioms of languages are different and thats the reason a problem solved in different languages take different approaches.
"C" is all about procedural decomposition.
Main idiom in Java is about "class or Object" decomposition. Functions are not absent, but they become a part of exhibited behavior of these classes.
"P... | 4 | 5 | 0 | 0 | My first "serious" language was Java, so I have comprehended object-oriented programming in sense that elemental brick of program is a class.
Now I write on VBA and Python. There are module languages and I am feeling persistent discomfort: I don't know how should I decompose program in a modules/classes.
I understand t... | Module vs object-oriented programming in vba | 0 | 0.049958 | 1 | 0 | 0 | 4,745 |
3,611,830 | 2010-08-31T17:59:00.000 | 0 | 0 | 0 | 1 | 0 | python,google-app-engine,memcached,python-memcached | 0 | 3,611,908 | 0 | 3 | 0 | false | 1 | 0 | as in comments above, I guess I could stick all data in a single memcache entry with a known key.
Still for non-static data there are scenarios where it would be useful. | 2 | 4 | 0 | 0 | I want to use all the data in my python app engine memcache. I do not know the keys in advance.
How do I go about getting all data? | how do I return all memcached values in Google App Engine? | 0 | 0 | 1 | 0 | 0 | 3,350 |
3,611,830 | 2010-08-31T17:59:00.000 | 1 | 0 | 0 | 1 | 0 | python,google-app-engine,memcached,python-memcached | 0 | 4,524,611 | 0 | 3 | 0 | false | 1 | 0 | I am using a 'well known key' called "config" where I store a list of all other keys and use that to enumerate the rest of the items. | 2 | 4 | 0 | 0 | I want to use all the data in my python app engine memcache. I do not know the keys in advance.
How do I go about getting all data? | how do I return all memcached values in Google App Engine? | 0 | 0.066568 | 1 | 0 | 0 | 3,350 |
3,612,410 | 2010-08-31T19:18:00.000 | 2 | 0 | 0 | 0 | 0 | python,python-3.x,gpu | 1 | 10,986,086 | 0 | 2 | 0 | false | 0 | 1 | Clyther is a Python package for High-Performance Computing (HPC) using, for example, video cards with multiple Graphics Packaging Units (GPUs) or (less frequently) multi-core processors. Clyther is for parallel processing of algorithms or data sets that would normally take a lot of time to process serially. Meaning, ... | 2 | 2 | 0 | 0 | I don't get what Clyther is or how to use it.
My stuff:
ATI OpenCl SDK (just dl'd)
clyther beta (just dl'd)
windows 7 pro 64 bit
active python 3.1.2
Xfxs Ati radeon 5850 video card
I downloaded the ATI OpenCl SDK and the clyther beta from sourceforge. Then I tooke the sample 'reduce' function from the sourc... | Clyther-how to get started? | 0 | 0.197375 | 1 | 0 | 0 | 507 |
3,612,410 | 2010-08-31T19:18:00.000 | 1 | 0 | 0 | 0 | 0 | python,python-3.x,gpu | 1 | 3,612,526 | 0 | 2 | 0 | false | 0 | 1 | When you name the file .py (the file extension associated with python.exe) and double-click it, how is windows supposed to know it's supposed to run the file with CLyther?
Is naming the file .py wrong? I guess clyther is its own lqnguage and not really python?
Documentation compares it with Cython - so I suppose it's... | 2 | 2 | 0 | 0 | I don't get what Clyther is or how to use it.
My stuff:
ATI OpenCl SDK (just dl'd)
clyther beta (just dl'd)
windows 7 pro 64 bit
active python 3.1.2
Xfxs Ati radeon 5850 video card
I downloaded the ATI OpenCl SDK and the clyther beta from sourceforge. Then I tooke the sample 'reduce' function from the sourc... | Clyther-how to get started? | 0 | 0.099668 | 1 | 0 | 0 | 507 |
3,614,609 | 2010-09-01T02:17:00.000 | 0 | 0 | 1 | 0 | 0 | python,macos,tkinter | 0 | 3,614,650 | 0 | 2 | 0 | false | 0 | 1 | If I'm not greatly mistaken, it should pass the name of the file as the first argument to the script - sys.argv[1]. | 1 | 0 | 0 | 0 | I have a python script bundled into a application (I'm on a mac) and have the application set to be able to open .zip files. But when I say "open foo.zip with bar.py" how do I access the file that I have passed to it?
Additional info:
Using tkinter.
What's a good way to debug this, as there is no terminal to pass info... | Python: open a file *with* script? | 0 | 0 | 1 | 0 | 0 | 310 |
3,619,990 | 2010-09-01T16:04:00.000 | 2 | 0 | 1 | 0 | 0 | python,c,installation | 0 | 3,620,269 | 0 | 2 | 0 | true | 0 | 0 | You can avoid having some one to install it independently but you can not avoid installation completely. If his computing platform differs from yours, he will have to build the extension.
What can be done is that you setup a package distribution using distutils. This way the package could be installed or built. You can... | 2 | 4 | 0 | 0 | I wrote a Python extension in C, and my python program uses that extension. In order for it to work, I would have to install the extension on the user's system before my program can run. Is there a way to bypass that installation step and somehow just have the extension in my python package? The only compiled part obvi... | Is there a way to package a python extension written in C into a binary so I don't have to python-install it? | 0 | 1.2 | 1 | 0 | 0 | 112 |
3,619,990 | 2010-09-01T16:04:00.000 | 1 | 0 | 1 | 0 | 0 | python,c,installation | 0 | 3,621,206 | 0 | 2 | 0 | false | 0 | 0 | just put the .d compiled python dll in the same directory as your python script. then you'll be able to import it. | 2 | 4 | 0 | 0 | I wrote a Python extension in C, and my python program uses that extension. In order for it to work, I would have to install the extension on the user's system before my program can run. Is there a way to bypass that installation step and somehow just have the extension in my python package? The only compiled part obvi... | Is there a way to package a python extension written in C into a binary so I don't have to python-install it? | 0 | 0.099668 | 1 | 0 | 0 | 112 |
3,630,774 | 2010-09-02T20:05:00.000 | 78 | 0 | 0 | 0 | 0 | python,logging | 0 | 3,630,800 | 0 | 5 | 0 | true | 0 | 0 | logger.handlers contains a list with all handlers of a logger. | 1 | 70 | 0 | 0 | How can I remove / inspect / modify handlers configured for my loggers using the fileConfig() function?
For removing there is Logger.removeHandler(hdlr) method, but how do I get the handler in first place if it was configured from file? | logging remove / inspect / modify handlers configured by fileConfig() | 0 | 1.2 | 1 | 0 | 1 | 46,204 |
3,632,046 | 2010-09-02T23:33:00.000 | 1 | 0 | 1 | 0 | 0 | python,import,zip | 0 | 3,632,086 | 0 | 1 | 0 | true | 0 | 0 | Just insert the whole path to the zipfile, c:/what/ever/itis.zip, in your sys.path, and import themodule (assuming it's at the top "level" of the zipfile's simulated directory-tree structure). | 1 | 0 | 0 | 0 | There is a module I'd love to download, but it is only available in a zip file, how do I get such a file to work properly in python, so That I can import what I want?
This is in Windows 7 BTW. | Getting modules from a zip file? | 0 | 1.2 | 1 | 0 | 0 | 112 |
3,640,092 | 2010-09-03T22:51:00.000 | 1 | 0 | 0 | 1 | 0 | python,ctypes | 0 | 3,640,616 | 0 | 2 | 0 | false | 0 | 0 | Be aware that the operating system is going to be doing readahead for read() anyway. You're going to be blocking either in read() or write()--one or the other will bottleneck the operation--but even though you're blocking in one, that doesn't mean the other isn't taking place for you behind the scenes. That's the job... | 1 | 12 | 0 | 0 | I am wondering if it is possible for the ctypes package to interface with mmap.
Currently, my module allocates a buffer (with create_string_buffer) and then passes that using byref to my libraries mylib.read function. This, as the name suggests, reads data into the buffer. I then call file.write(buf.raw) to write the d... | Python, ctypes and mmap | 1 | 0.099668 | 1 | 0 | 0 | 3,930 |
3,641,538 | 2010-09-04T08:54:00.000 | 2 | 0 | 0 | 1 | 0 | python,google-app-engine | 0 | 3,643,164 | 0 | 3 | 0 | false | 0 | 0 | Just place the package's folder in the root directory of your GAE application, easy! | 1 | 2 | 0 | 0 | I understand that if you want to include external packages you have to include them in your project. So I was wondering how do you do this?
Do people use one general script that auto imports them from a location. Maybe some kind of config file that lists all the external packages? Do you always zip the packages and us... | Google App Engine: Including external packages | 0 | 0.132549 | 1 | 0 | 0 | 506 |
3,643,500 | 2010-09-04T18:35:00.000 | -3 | 0 | 1 | 1 | 0 | python,operating-system | 0 | 8,959,919 | 0 | 11 | 0 | false | 0 | 0 | Buddy, here is the answer you have been looking for:
Writting an Operating System is not different than writting any other application, actually it is far easier than writing any other code for the reason an Operating System is an ALL-PURPOSE software or what is meant as a platform... and you know it!.
All of the previ... | 7 | 15 | 0 | 0 | I have been asked to choose a project for my Operating System course at my university. I was bubbled with the idea of making an Operating System from scratch in Python.
I have a few limitations:
I have only 3 months.
I want to do it in Python.
I can put in say 20-30 hours every week into it.
I want to know, how ... | Operating System from scratch | 1 | -0.054491 | 1 | 0 | 0 | 13,899 |
3,643,500 | 2010-09-04T18:35:00.000 | 16 | 0 | 1 | 1 | 0 | python,operating-system | 0 | 3,643,520 | 0 | 11 | 0 | false | 0 | 0 | Scale this down a lot. I would recommend looking at one very small piece of an operating system that you would want to do, perhaps parallel processing. There is no feasible way you will be able to write an entire operating system in under 500 hours, let only 5000 hours. The real question is is this for an undergradua... | 7 | 15 | 0 | 0 | I have been asked to choose a project for my Operating System course at my university. I was bubbled with the idea of making an Operating System from scratch in Python.
I have a few limitations:
I have only 3 months.
I want to do it in Python.
I can put in say 20-30 hours every week into it.
I want to know, how ... | Operating System from scratch | 1 | 1 | 1 | 0 | 0 | 13,899 |
3,643,500 | 2010-09-04T18:35:00.000 | 9 | 0 | 1 | 1 | 0 | python,operating-system | 0 | 3,643,598 | 0 | 11 | 0 | false | 0 | 0 | Does your professor require a "low-level" component in the project? For example, anything that deals with the hardware or the instruction architecture. If so, your professor will not allow you to do the project in Python. The project must be written in C and assembly. And you will invariably be working on modifying the... | 7 | 15 | 0 | 0 | I have been asked to choose a project for my Operating System course at my university. I was bubbled with the idea of making an Operating System from scratch in Python.
I have a few limitations:
I have only 3 months.
I want to do it in Python.
I can put in say 20-30 hours every week into it.
I want to know, how ... | Operating System from scratch | 1 | 1 | 1 | 0 | 0 | 13,899 |
3,643,500 | 2010-09-04T18:35:00.000 | 1 | 0 | 1 | 1 | 0 | python,operating-system | 0 | 3,644,442 | 0 | 11 | 0 | false | 0 | 0 | You could probably code a small embedded-system OS in the timeframe you indicate, using concepts that are over a decade old. Many newer operating systems require many more complicated scheduling and memory-management heuristics than would be typical in a small embedded OS; designing an entire modern OS would not be a ... | 7 | 15 | 0 | 0 | I have been asked to choose a project for my Operating System course at my university. I was bubbled with the idea of making an Operating System from scratch in Python.
I have a few limitations:
I have only 3 months.
I want to do it in Python.
I can put in say 20-30 hours every week into it.
I want to know, how ... | Operating System from scratch | 1 | 0.01818 | 1 | 0 | 0 | 13,899 |
3,643,500 | 2010-09-04T18:35:00.000 | 0 | 0 | 1 | 1 | 0 | python,operating-system | 0 | 3,643,741 | 0 | 11 | 0 | false | 0 | 0 | Developing an operating system in Python is possible. However, you might want to choose C or Assembly because there's an huge code base developed in those languages. | 7 | 15 | 0 | 0 | I have been asked to choose a project for my Operating System course at my university. I was bubbled with the idea of making an Operating System from scratch in Python.
I have a few limitations:
I have only 3 months.
I want to do it in Python.
I can put in say 20-30 hours every week into it.
I want to know, how ... | Operating System from scratch | 1 | 0 | 1 | 0 | 0 | 13,899 |
3,643,500 | 2010-09-04T18:35:00.000 | 2 | 0 | 1 | 1 | 0 | python,operating-system | 0 | 3,643,534 | 0 | 11 | 0 | false | 0 | 0 | I don't get how you think you can write an operating system in Python. You need native code to at least load an interpreter during bootup, not to mention hardware communication, drivers etc., all of which would be nearly impossible to do given current Python interpreters when running on a bare machine. I'm also ponderi... | 7 | 15 | 0 | 0 | I have been asked to choose a project for my Operating System course at my university. I was bubbled with the idea of making an Operating System from scratch in Python.
I have a few limitations:
I have only 3 months.
I want to do it in Python.
I can put in say 20-30 hours every week into it.
I want to know, how ... | Operating System from scratch | 1 | 0.036348 | 1 | 0 | 0 | 13,899 |
3,643,500 | 2010-09-04T18:35:00.000 | 1 | 0 | 1 | 1 | 0 | python,operating-system | 0 | 3,644,477 | 0 | 11 | 0 | false | 0 | 0 | In our university we have operating systems course where we too are supposed to develop something on linux. Not entire OS. We did our own scheduling policy and file system for linux. But this will be done in C since linux is in C. | 7 | 15 | 0 | 0 | I have been asked to choose a project for my Operating System course at my university. I was bubbled with the idea of making an Operating System from scratch in Python.
I have a few limitations:
I have only 3 months.
I want to do it in Python.
I can put in say 20-30 hours every week into it.
I want to know, how ... | Operating System from scratch | 1 | 0.01818 | 1 | 0 | 0 | 13,899 |
3,646,002 | 2010-09-05T12:11:00.000 | 6 | 0 | 0 | 0 | 0 | python,django,frameworks,web2py,turbogears | 0 | 4,338,367 | 0 | 7 | 0 | false | 1 | 0 | I have to say as not particularly skilled developer, the speed at which I have been able to create using web2py has blown my mind. In large part due to the amazing community and the core value Massimo has of making the framework accessible.
When I started I had written 0 lines of code in Python
Never heard of web2py
I'... | 3 | 20 | 0 | 0 | I got a project in mind that makes it worth to finally take the plunge into programming.
After reading a lot of stuff, here and elsewhere, I'm set on making Python the one I learn for now, over C# or java. What convinced me the most was actually Paul Graham's excursions on programming languages and Lisp, though Arc is... | Django, Turbo Gears, Web2Py, which is better for what? | 0 | 1 | 1 | 0 | 0 | 15,591 |
3,646,002 | 2010-09-05T12:11:00.000 | 2 | 0 | 0 | 0 | 0 | python,django,frameworks,web2py,turbogears | 0 | 15,945,257 | 0 | 7 | 0 | false | 1 | 0 | I've used both web2py and RoR extensively, and while RoR has gotten a lot of popularity and support in the past few years, web2py is simpler, cleaner, less "magical", and yet also offers more (useful) out-of-the-box functionality. I'd say that web2py has more potential than RoR, but it is a relatively new framework and... | 3 | 20 | 0 | 0 | I got a project in mind that makes it worth to finally take the plunge into programming.
After reading a lot of stuff, here and elsewhere, I'm set on making Python the one I learn for now, over C# or java. What convinced me the most was actually Paul Graham's excursions on programming languages and Lisp, though Arc is... | Django, Turbo Gears, Web2Py, which is better for what? | 0 | 0.057081 | 1 | 0 | 0 | 15,591 |
3,646,002 | 2010-09-05T12:11:00.000 | 2 | 0 | 0 | 0 | 0 | python,django,frameworks,web2py,turbogears | 0 | 3,757,753 | 0 | 7 | 0 | false | 1 | 0 | Django: Heard it has the best administrative
interface. But uses it's own ORM, i.e. doesn't use SQL-Alchemy.
Web2py: Didn't research this.
Turbogears2:
Uses SQL-Alchemy by default, uses Catwalk for admin
interface, but documentation isn't as
great.
I chose Turbogears2 because it uses popular components, so I didn't h... | 3 | 20 | 0 | 0 | I got a project in mind that makes it worth to finally take the plunge into programming.
After reading a lot of stuff, here and elsewhere, I'm set on making Python the one I learn for now, over C# or java. What convinced me the most was actually Paul Graham's excursions on programming languages and Lisp, though Arc is... | Django, Turbo Gears, Web2Py, which is better for what? | 0 | 0.057081 | 1 | 0 | 0 | 15,591 |
3,647,518 | 2010-09-05T19:46:00.000 | 33 | 0 | 1 | 0 | 0 | python,coding-style,pyqt,pyqt4,pep8 | 0 | 3,647,541 | 0 | 6 | 0 | false | 0 | 0 | In your shoes, I wouldn't fight your framework, just like, as a general principle, I don't fight City Hall;-). I happen to share your preference for lowercase-with-underscore function names as PEP 8 specifies, but when I'm programming in a framework that forces a different capitalization style, I resign myself to adop... | 4 | 35 | 0 | 0 | I'm starting to use PyQt in some projects and I'm running into a stylistic dilemma. PyQt's functions use camel case, but PEP8, which I prefer to follow, says to use underscores and all lowercase for function names.
So on the one hand, I can continue to follow PEP8, meaning that my code will have mixed functions calls ... | PEP8 and PyQt, how to reconcile function capitalization? | 0 | 1 | 1 | 0 | 0 | 3,416 |
3,647,518 | 2010-09-05T19:46:00.000 | 6 | 0 | 1 | 0 | 0 | python,coding-style,pyqt,pyqt4,pep8 | 0 | 3,647,555 | 0 | 6 | 0 | false | 0 | 0 | Use what fits best.
If you're subclassing Qt classes, or have a function heavily integrated with them UseCamelCase.
Otherwise, use_underscores. | 4 | 35 | 0 | 0 | I'm starting to use PyQt in some projects and I'm running into a stylistic dilemma. PyQt's functions use camel case, but PEP8, which I prefer to follow, says to use underscores and all lowercase for function names.
So on the one hand, I can continue to follow PEP8, meaning that my code will have mixed functions calls ... | PEP8 and PyQt, how to reconcile function capitalization? | 0 | 1 | 1 | 0 | 0 | 3,416 |
3,647,518 | 2010-09-05T19:46:00.000 | 14 | 0 | 1 | 0 | 0 | python,coding-style,pyqt,pyqt4,pep8 | 0 | 5,201,198 | 0 | 6 | 0 | false | 0 | 0 | The pep8 document says what to do in this case (emphasis mine):
New modules and packages (including third party frameworks) should be written to these standards, but where an existing library has a different style, internal consistency is preferred. | 4 | 35 | 0 | 0 | I'm starting to use PyQt in some projects and I'm running into a stylistic dilemma. PyQt's functions use camel case, but PEP8, which I prefer to follow, says to use underscores and all lowercase for function names.
So on the one hand, I can continue to follow PEP8, meaning that my code will have mixed functions calls ... | PEP8 and PyQt, how to reconcile function capitalization? | 0 | 1 | 1 | 0 | 0 | 3,416 |
3,647,518 | 2010-09-05T19:46:00.000 | 0 | 0 | 1 | 0 | 0 | python,coding-style,pyqt,pyqt4,pep8 | 0 | 3,647,955 | 0 | 6 | 0 | false | 0 | 0 | Maybe sensible use of modules to separate the styles in different modules can help. At least try to modularize basic PEP8 style code to own module of helper functions. | 4 | 35 | 0 | 0 | I'm starting to use PyQt in some projects and I'm running into a stylistic dilemma. PyQt's functions use camel case, but PEP8, which I prefer to follow, says to use underscores and all lowercase for function names.
So on the one hand, I can continue to follow PEP8, meaning that my code will have mixed functions calls ... | PEP8 and PyQt, how to reconcile function capitalization? | 0 | 0 | 1 | 0 | 0 | 3,416 |
3,648,339 | 2010-09-06T00:04:00.000 | 1 | 0 | 1 | 0 | 0 | python,namespaces,module | 0 | 3,648,494 | 0 | 4 | 0 | false | 0 | 0 | Not sure if it is a good practice but maybe you could pass the objects and variables you need as parameters to the methods or classes you call in the imported module. | 1 | 21 | 0 | 0 | Specifically, I need to get at some objects and globals from the main module in an imported module. I know how to find those things when the parent module wants some particular thing from a child module, but I can't figure out how to go in the other direction. | In Python, how can I access the namespace of the main module from an imported module? | 0 | 0.049958 | 1 | 0 | 0 | 8,627 |
3,653,239 | 2010-09-06T17:26:00.000 | 1 | 1 | 0 | 1 | 0 | python,django,nginx,subdomain | 0 | 3,653,270 | 0 | 2 | 0 | false | 0 | 0 | I think directories are the way to go. I believe it would be easier to adapt Django to the directories way much easier than to subdomains. And as one user commented you can avoid restarting your server each time.
I prefer to keep subdomains reserved for system use. Users should get their own directories instead. This i... | 2 | 3 | 0 | 0 | I'm currently building a web application and I would like my users to have their own URLs to identify them. I could either do this using subdomains or using folders and am wondering what are the advantages and disadvantages of either one.
I really like the folder solution because my URL mapping would be fairly easy. I ... | Subdomains vs folders/directories | 1 | 0.099668 | 1 | 0 | 0 | 286 |
3,653,239 | 2010-09-06T17:26:00.000 | 0 | 1 | 0 | 1 | 0 | python,django,nginx,subdomain | 0 | 3,653,257 | 0 | 2 | 0 | false | 0 | 0 | Use something like mod_wsgi instead of cgi scripts, they allow you to use arbitrary URL configs (example: Django, web.py, Zope ...) | 2 | 3 | 0 | 0 | I'm currently building a web application and I would like my users to have their own URLs to identify them. I could either do this using subdomains or using folders and am wondering what are the advantages and disadvantages of either one.
I really like the folder solution because my URL mapping would be fairly easy. I ... | Subdomains vs folders/directories | 1 | 0 | 1 | 0 | 0 | 286 |
3,655,306 | 2010-09-07T02:06:00.000 | 7 | 0 | 0 | 1 | 1 | python,ubuntu-9.04 | 0 | 66,512,967 | 0 | 7 | 0 | false | 0 | 0 | @mchid's answer is the one you should go for it.
just FYI,
if you do this:
$ python
it will say Command 'python' not found ...
But if you do this:
$ python3, it should work.
So, just modify the shebang line
from !#/usr/bin/env python
to !#/usr/bin/env python3, you're good to go.
(which is automatically done by doing
su... | 1 | 91 | 0 | 0 | I update the kernel, after that the Ubuntu doesn't work well, PS: I try to exec "meld" command, it will report that "/usr/bin/env: python: No such file or directory",
then I exec "sudo apt-get install python" and get the result "python is already the newest version.", what should I do for it.
I'm not good at linux, c... | ubuntu /usr/bin/env: python: No such file or directory | 0 | 1 | 1 | 0 | 0 | 161,757 |
3,656,500 | 2010-09-07T07:16:00.000 | 0 | 1 | 0 | 1 | 0 | python | 0 | 3,656,550 | 0 | 3 | 0 | false | 0 | 0 | Just some basic ideas, with important python functions for that:
read the file; open
go through all lines and sum up the number of occurences of a line; for, dict
in case you only want to check parts of a command (for example treat cd XY and cd .. the same), normalize the lines by removing the command arguments after ... | 1 | 1 | 0 | 0 | I want to write a python script which reads the '.bash_history' file and prints the statistics. Also, I would like to print the command which was used the most. I was able to read the bash history through the terminal but I'm not able to do it through python programming. Can someone please help me with how to start wit... | reading .bash_history file through python script | 0 | 0 | 1 | 0 | 0 | 696 |
3,666,676 | 2010-09-08T10:17:00.000 | 0 | 0 | 0 | 0 | 1 | python,single-sign-on,plone,zope | 0 | 3,698,638 | 0 | 2 | 0 | false | 1 | 0 | If both sites are on the same domain (but different subdomain), you can try to set the cookie on ".domain.tld". But I'm not sure if that will work - sending the original credentials as cookies is highly insecure, a session should be used in stead, and you can't share this session between two different instances.
Have y... | 1 | 2 | 0 | 0 | I'm installing an environment where I had two Zope/Plone servers:
plone1 -> for web content & user authentication
plone2 -> for web applications
I want to implement SSO around both servers but I don't know how to do it. I try to modify login_next and setAuthCookie(..) to share the __ac cookie in the domain, but didn'... | Two Zope/Plone machines and SSO | 0 | 0 | 1 | 0 | 0 | 560 |
3,666,750 | 2010-09-08T10:27:00.000 | 0 | 0 | 1 | 0 | 0 | python,version,backwards-compatibility | 0 | 3,668,628 | 1 | 2 | 0 | false | 0 | 0 | Mac OS X 10.6 (Snow Leopard) has 2.6.1 as the installed version.
IIRC, 10.5 (Leopard) has 2.5 as the installed version. | 1 | 5 | 0 | 1 | Is there an officially updated recommendation indicating which versions of Python should be supported by released modules? Or perhaps a page giving a survey of production usage of various versions? It's difficult to know how much use to make of newish features like context managers, class decorators, etc. when writin... | earliest commonly used version of Python | 1 | 0 | 1 | 0 | 0 | 323 |
3,674,568 | 2010-09-09T07:27:00.000 | 0 | 0 | 1 | 0 | 0 | php,python,mysql,ruby-on-rails | 0 | 3,675,235 | 0 | 3 | 0 | false | 1 | 0 | I would go the vitual road (VMware or virtual box). Multiple enviroments have a lot of dependencies, so its just much much easier with vitual hosts. | 2 | 0 | 0 | 0 | Beginner here, stuck wondering what I need to do to learn development in different web environments. Say, for instance I want to play around in PHP & MySQL. But I also want to try things with Ruby on Rails and maybe even server things with Python. Do I need a different environment for each platform? Am I required t... | Multiple Web Development Environments on Windows | 0 | 0 | 1 | 0 | 0 | 225 |
3,674,568 | 2010-09-09T07:27:00.000 | 1 | 0 | 1 | 0 | 0 | php,python,mysql,ruby-on-rails | 0 | 3,675,212 | 0 | 3 | 0 | true | 1 | 0 | I started off with php and mysql, it's a lower-level then the rest of the environments like Django and Ruby on Rails; so it's much easier to understand what is really happening.
If you want to get into web development, php is a solid foundation and has easy bundle installers such as WAMP, and has a massive community.
... | 2 | 0 | 0 | 0 | Beginner here, stuck wondering what I need to do to learn development in different web environments. Say, for instance I want to play around in PHP & MySQL. But I also want to try things with Ruby on Rails and maybe even server things with Python. Do I need a different environment for each platform? Am I required t... | Multiple Web Development Environments on Windows | 0 | 1.2 | 1 | 0 | 0 | 225 |
3,678,221 | 2010-09-09T15:49:00.000 | 2 | 1 | 0 | 0 | 0 | python,pylons,textmate | 0 | 3,679,180 | 0 | 2 | 0 | false | 1 | 0 | If you look under the Bundles menu in TextMate there is a Python-specific sub-menu that exposes a bunch of helpful things like syntax checking, script debugging, insertion of oft used code blocks, manual look ups and so on. Most of them are bound to keyboard shortcuts (or can be bound if they are not).
Also, under the ... | 1 | 0 | 0 | 0 | I have textmate, but honestly the only thing I can do with it is simply edit a file.
The handy little file browser is aslo useful. (how can I show/hide that file browser anyhow!)
But I have no other knowledge/tricks up my sleeve, care to help me out? | How can textmate make my python (pylons) development easier? | 0 | 0.197375 | 1 | 0 | 0 | 274 |
3,680,245 | 2010-09-09T20:17:00.000 | 1 | 0 | 1 | 0 | 0 | python,tuples | 0 | 3,680,293 | 0 | 4 | 0 | false | 0 | 0 | (u'1S²') is not a tuple.
(u'1S²',) is a tuple containing u'1S²'.
len((u'1S²',)) returns the length of the tuple, that is, 1.
also, when printing variables, beware there are 2 types of output :
the programmer friendly string representation of the object : that is repr(the_object)
the text representation of the object, ... | 1 | 1 | 0 | 0 | When I print the tuple (u'1S²') I get the predicted output of 1S²
However, when I print the tuple (u'1S²',u'2S¹') I get the output (u'1S\xb2', u'2S\xb9').
Why is this? What can I do about this?
Also, how do I get the number of items in a tuple? | Need help with tuples in python | 0 | 0.049958 | 1 | 0 | 0 | 1,290 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.