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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1,736,451 | 2009-11-15T03:19:00.000 | 0 | 0 | 1 | 1 | python,macos,ide,editor,python-idle | 2,854,788 | 12 | false | 0 | 0 | I would recommend you to look at Aptana(it's more attractive then Eclipse for me)+PyDev or PyCarm. I use TextMate too, but those are easy for debug. | 6 | 2 | 0 | I'm currently using IDLE, its decent, but I'd like to know if there're better lightweight IDEs built especially for Mac — free or commercial. | Native Python Editor for Mac? | 0 | 0 | 0 | 9,940 |
1,736,451 | 2009-11-15T03:19:00.000 | 0 | 0 | 1 | 1 | python,macos,ide,editor,python-idle | 3,432,322 | 12 | false | 0 | 0 | I use FRAISE (free) it is simple and useful, auto indentation, colorize, auto completion, shell. | 6 | 2 | 0 | I'm currently using IDLE, its decent, but I'd like to know if there're better lightweight IDEs built especially for Mac — free or commercial. | Native Python Editor for Mac? | 0 | 0 | 0 | 9,940 |
1,736,451 | 2009-11-15T03:19:00.000 | 1 | 0 | 1 | 1 | python,macos,ide,editor,python-idle | 1,736,465 | 12 | false | 0 | 0 | There is a commercial one - Textmate.
Most of the good free editors are cross-platform (if you are ok with it, I'd recommend EditRa - but it doesn't work properly under 10.6 yet, because of some bugs in wxPython). | 6 | 2 | 0 | I'm currently using IDLE, its decent, but I'd like to know if there're better lightweight IDEs built especially for Mac — free or commercial. | Native Python Editor for Mac? | 0.016665 | 0 | 0 | 9,940 |
1,736,451 | 2009-11-15T03:19:00.000 | 0 | 0 | 1 | 1 | python,macos,ide,editor,python-idle | 7,764,682 | 12 | false | 0 | 0 | check out Sublime Text 2 Alpha. seriously awesome. | 6 | 2 | 0 | I'm currently using IDLE, its decent, but I'd like to know if there're better lightweight IDEs built especially for Mac — free or commercial. | Native Python Editor for Mac? | 0 | 0 | 0 | 9,940 |
1,737,624 | 2009-11-15T14:17:00.000 | 1 | 0 | 0 | 0 | python,qt,pyqt | 4,600,372 | 2 | false | 0 | 1 | Try doing setCenterOn(0,0) on the QGraphicsView? | 1 | 2 | 0 | How to put QGraphicsScene's (0,0) to top-left corner of QGraphicsView? | QGraphicsScene and positioning | 0.099668 | 0 | 0 | 1,081 |
1,738,845 | 2009-11-15T21:12:00.000 | 4 | 0 | 1 | 0 | iphone,python,macos | 1,738,867 | 4 | false | 0 | 0 | Any of those platforms are going to be more than adequate for iPhone development, but since Apple is not allowing anything that requires a VM or an interpreted environment, there is no way to do iPhone development using Python at this time.
EDIT: Looks like I misread that as doing Python development on an iPhone, so ju... | 4 | 0 | 0 | What is the minimum configuration to do some Python and iPhone development on Mac ?
Platform wise: Mac Mini, Mac Pro, Mac Book, Mac Book Pro ?
Memory requirement
CPU speed
Thanks for your advice.
Laurent | Python and iPhone development on Mac - minimum/recommended hardware? | 0.197375 | 0 | 0 | 898 |
1,738,845 | 2009-11-15T21:12:00.000 | 4 | 0 | 1 | 0 | iphone,python,macos | 1,738,881 | 4 | true | 0 | 0 | The minimum requirement is an intel mac. Any intel mac will work. iPhone development is unsupported on PPC.
Python can be done on any mac that runs os x.
The minimum requirement, and what's pleasant are different things. Everything you've listed will work pretty great. You might want to bump up the ram a little on what... | 4 | 0 | 0 | What is the minimum configuration to do some Python and iPhone development on Mac ?
Platform wise: Mac Mini, Mac Pro, Mac Book, Mac Book Pro ?
Memory requirement
CPU speed
Thanks for your advice.
Laurent | Python and iPhone development on Mac - minimum/recommended hardware? | 1.2 | 0 | 0 | 898 |
1,738,845 | 2009-11-15T21:12:00.000 | 1 | 0 | 1 | 0 | iphone,python,macos | 1,738,884 | 4 | false | 0 | 0 | Rather ephemeral in our requirements, aren't we. 'Some' python/iPhone....
You will be well served by a mini, starting @ $600, they're a steal. Upgrade the processor (2.53ghz), add RAM to 4GB (after purchase, if you're comfortable) throw a generic keyboard, mouse and Monitor on it and you've got a heck of a machine.
D... | 4 | 0 | 0 | What is the minimum configuration to do some Python and iPhone development on Mac ?
Platform wise: Mac Mini, Mac Pro, Mac Book, Mac Book Pro ?
Memory requirement
CPU speed
Thanks for your advice.
Laurent | Python and iPhone development on Mac - minimum/recommended hardware? | 0.049958 | 0 | 0 | 898 |
1,738,845 | 2009-11-15T21:12:00.000 | 1 | 0 | 1 | 0 | iphone,python,macos | 1,738,885 | 4 | false | 0 | 0 | Any system that Apple sells is sufficient to do Python and iPhone development on the Mac. I generally consider 2 GB to be the minimum amount of RAM that I would want to use, and 4 GB if I'm going to be doing any significant amount of work in a VM (for instance, VMware Fusion or Parallels for running Windows within Mac ... | 4 | 0 | 0 | What is the minimum configuration to do some Python and iPhone development on Mac ?
Platform wise: Mac Mini, Mac Pro, Mac Book, Mac Book Pro ?
Memory requirement
CPU speed
Thanks for your advice.
Laurent | Python and iPhone development on Mac - minimum/recommended hardware? | 0.049958 | 0 | 0 | 898 |
1,739,543 | 2009-11-16T00:55:00.000 | 0 | 0 | 0 | 1 | python,google-app-engine,compression,gzip,zlib | 2,125,539 | 5 | false | 1 | 0 | You can store up to 10Mb with a list of Blobs. Search for google file service.
It's much more versatile than BlobStore in my opinion, since I just started using BlobStore Api yesterday and I'm still figuring out if it is possible to access the data bytewise.. as in changing doc to pdf, jpeg to gif..
You can storage Bl... | 2 | 1 | 0 | I im trying to store 30 second user mp3 recordings as Blobs in my app engine data store. However, in order to enable this feature (App Engine has a 1MB limit per upload) and to keep the costs down I would like to compress the file before upload and decompress the file every time it is requested. How would you suggest ... | Compress data before storage on Google App Engine | 0 | 0 | 0 | 2,545 |
1,739,543 | 2009-11-16T00:55:00.000 | 2 | 0 | 0 | 1 | python,google-app-engine,compression,gzip,zlib | 1,739,598 | 5 | true | 1 | 0 | "Compressing before upload" implies doing it in the user's browser -- but no text in your question addresses that! It seems to be about compression in your GAE app, where of course the data will only be after the upload. You could do it with a Firefox extension (or other browsers' equivalents), if you can develop tho... | 2 | 1 | 0 | I im trying to store 30 second user mp3 recordings as Blobs in my app engine data store. However, in order to enable this feature (App Engine has a 1MB limit per upload) and to keep the costs down I would like to compress the file before upload and decompress the file every time it is requested. How would you suggest ... | Compress data before storage on Google App Engine | 1.2 | 0 | 0 | 2,545 |
1,739,913 | 2009-11-16T03:37:00.000 | 116 | 0 | 1 | 0 | python,string | 1,739,928 | 3 | true | 0 | 0 | With a 64-bit Python installation, and (say) 64 GB of memory, a Python 2 string of around 63 GB should be quite feasible (if not maximally fast). If you can upgrade your memory much beyond that (which will cost you an arm and a leg, of course), your maximum feasible strings should get proportionally longer. (I don't ... | 1 | 93 | 0 | If it is environment-independent, what is the theoretical maximum number of characters in a Python string? | What is the max length of a Python string? | 1.2 | 0 | 0 | 117,047 |
1,739,924 | 2009-11-16T03:41:00.000 | 1 | 0 | 1 | 0 | python,python-import | 1,740,326 | 9 | false | 0 | 0 | reload() module X,
reload() module importing Y from X.
Note that reloading won't change already created objects bound in other namespaces (even if you follow style guide from Alex). | 2 | 120 | 0 | In Python, once I have imported a module X in an interpreter session using import X, and the module changes on the outside, I can reload the module with reload(X). The changes then become available in my interpreter session.
I am wondering if this also possible when I import a component Y from module X using from X imp... | Python: reload component Y imported with 'from X import Y'? | 0.022219 | 0 | 0 | 53,981 |
1,739,924 | 2009-11-16T03:41:00.000 | 54 | 0 | 1 | 0 | python,python-import | 1,739,931 | 9 | true | 0 | 0 | If Y is a module (and X a package) reload(Y) will be fine -- otherwise, you'll see why good Python style guides (such as my employer's) say to never import anything except a module (this is one out of many great reasons -- yet people still keep importing functions and classes directly, no matter how much I explain that... | 2 | 120 | 0 | In Python, once I have imported a module X in an interpreter session using import X, and the module changes on the outside, I can reload the module with reload(X). The changes then become available in my interpreter session.
I am wondering if this also possible when I import a component Y from module X using from X imp... | Python: reload component Y imported with 'from X import Y'? | 1.2 | 0 | 0 | 53,981 |
1,740,116 | 2009-11-16T04:50:00.000 | 3 | 0 | 1 | 0 | python,naming-conventions,camelcasing,pep8 | 7,610,318 | 10 | false | 0 | 0 | It is just a convention, but a useful one if you work with a lot of abbreviations.
How did you write EmailConfig (or was it EMailConfig)? HTTPRequest? email_config and http_request are then much clearer convention. | 8 | 23 | 0 | Depending on your interpretation this may or may not be a rhetorical question, but it really baffles me. What sense does this convention make? I understand naming conventions don't necessarily have to have a rhyme or reason behind them, but why deviate from the already popular camelCase? Is there a rhyme and reason beh... | For what reason do we have the lower_case_with_underscores naming convention? | 0.059928 | 0 | 0 | 6,910 |
1,740,116 | 2009-11-16T04:50:00.000 | 0 | 0 | 1 | 0 | python,naming-conventions,camelcasing,pep8 | 1,740,175 | 10 | false | 0 | 0 | Feel free to do whatever suits you best, but consider using one of the popular conventions. It makes it easier for other developers to get up to speed with your code.
Remember that over the life of the project, more time is spent reading the code than it takes to write it. | 8 | 23 | 0 | Depending on your interpretation this may or may not be a rhetorical question, but it really baffles me. What sense does this convention make? I understand naming conventions don't necessarily have to have a rhyme or reason behind them, but why deviate from the already popular camelCase? Is there a rhyme and reason beh... | For what reason do we have the lower_case_with_underscores naming convention? | 0 | 0 | 0 | 6,910 |
1,740,116 | 2009-11-16T04:50:00.000 | 5 | 0 | 1 | 0 | python,naming-conventions,camelcasing,pep8 | 1,740,132 | 10 | false | 0 | 0 | The lower case with underscores convention goes all the way back to unix apis. Their entire syscall are in this convention. | 8 | 23 | 0 | Depending on your interpretation this may or may not be a rhetorical question, but it really baffles me. What sense does this convention make? I understand naming conventions don't necessarily have to have a rhyme or reason behind them, but why deviate from the already popular camelCase? Is there a rhyme and reason beh... | For what reason do we have the lower_case_with_underscores naming convention? | 0.099668 | 0 | 0 | 6,910 |
1,740,116 | 2009-11-16T04:50:00.000 | 2 | 0 | 1 | 0 | python,naming-conventions,camelcasing,pep8 | 1,740,129 | 10 | false | 0 | 0 | Use the naming convention that your shop uses.
If they agree that the existing convention is dorky (or they don't have a standard), and don't mind a little work cleaning up all of the code to a new and improved (more standard) convention, then you can do that. | 8 | 23 | 0 | Depending on your interpretation this may or may not be a rhetorical question, but it really baffles me. What sense does this convention make? I understand naming conventions don't necessarily have to have a rhyme or reason behind them, but why deviate from the already popular camelCase? Is there a rhyme and reason beh... | For what reason do we have the lower_case_with_underscores naming convention? | 0.039979 | 0 | 0 | 6,910 |
1,740,116 | 2009-11-16T04:50:00.000 | 16 | 0 | 1 | 0 | python,naming-conventions,camelcasing,pep8 | 1,740,131 | 10 | false | 0 | 0 | I've heard it stated in other contexts that words_with_underscores are easier to separate for non-native English readers than are wordByCamelCase. Visually it requires less effort to parse the separate, foreign words. | 8 | 23 | 0 | Depending on your interpretation this may or may not be a rhetorical question, but it really baffles me. What sense does this convention make? I understand naming conventions don't necessarily have to have a rhyme or reason behind them, but why deviate from the already popular camelCase? Is there a rhyme and reason beh... | For what reason do we have the lower_case_with_underscores naming convention? | 1 | 0 | 0 | 6,910 |
1,740,116 | 2009-11-16T04:50:00.000 | 19 | 0 | 1 | 0 | python,naming-conventions,camelcasing,pep8 | 1,744,749 | 10 | false | 0 | 0 | LowerCaseWithUnderScoresAreSuperiorBecauseTheTextYouNormallyReadInABookOrNewsPaperForExampleIsNotWrittenLikeThis. . | 8 | 23 | 0 | Depending on your interpretation this may or may not be a rhetorical question, but it really baffles me. What sense does this convention make? I understand naming conventions don't necessarily have to have a rhyme or reason behind them, but why deviate from the already popular camelCase? Is there a rhyme and reason beh... | For what reason do we have the lower_case_with_underscores naming convention? | 1 | 0 | 0 | 6,910 |
1,740,116 | 2009-11-16T04:50:00.000 | 53 | 0 | 1 | 0 | python,naming-conventions,camelcasing,pep8 | 1,740,152 | 10 | true | 0 | 0 | camelCase and/or CamelCase (and that's a debate in its own right;-) may be overwhelmingly most popular for the kind of environments you are most familiar with, but that hardly makes them universal -- or have you never heard of the obscure language called C++, with its std::find_first_of and std::replace_copy_if algorit... | 8 | 23 | 0 | Depending on your interpretation this may or may not be a rhetorical question, but it really baffles me. What sense does this convention make? I understand naming conventions don't necessarily have to have a rhyme or reason behind them, but why deviate from the already popular camelCase? Is there a rhyme and reason beh... | For what reason do we have the lower_case_with_underscores naming convention? | 1.2 | 0 | 0 | 6,910 |
1,740,116 | 2009-11-16T04:50:00.000 | 7 | 0 | 1 | 0 | python,naming-conventions,camelcasing,pep8 | 1,740,207 | 10 | false | 0 | 0 | One reason could be historically, many computers did not have mixed case capabilities. In the days of COBOL, programs were all upper case. In the early 80's many 'personal computers' only came with upper case fonts. For example, you could get a lower case extender card for the Apple II+. When programs began allowin... | 8 | 23 | 0 | Depending on your interpretation this may or may not be a rhetorical question, but it really baffles me. What sense does this convention make? I understand naming conventions don't necessarily have to have a rhyme or reason behind them, but why deviate from the already popular camelCase? Is there a rhyme and reason beh... | For what reason do we have the lower_case_with_underscores naming convention? | 1 | 0 | 0 | 6,910 |
1,740,299 | 2009-11-16T05:48:00.000 | 0 | 0 | 0 | 0 | python,blender | 1,740,306 | 1 | true | 0 | 1 | If you mean Phantom Omni, the haptic feedback device, and you mean Blender, the rendering program, then I don't see any reason why you can't use the API for both of them in a program, together to make a game.
In short, if your questions means what I think it does, of course. | 1 | 0 | 0 | I have some project about game programming, which have to use blender with phanthom ,Don't know possible to do it | Can i integrate Blender with Phanthom Omni | 1.2 | 0 | 0 | 305 |
1,741,023 | 2009-11-16T09:23:00.000 | 2 | 0 | 0 | 0 | python,testing,powerbuilder | 1,741,142 | 4 | false | 0 | 1 | I'm experimenting with code for a tool for automating PowerBuilder-based GUIs as well. From what I can see, your best bet would be to use the PowerBuilder Native Interface (PBNI), and call PowerScript code from within your NVO.
If you like, feel free to send me an email (see my profile for my email address), I'd be int... | 2 | 6 | 0 | I'm not familiar with PowerBuilder but I have a task to create Automatic UI Test Application for PB. We've decided to do it in Python with pywinauto and iaccesible libraries. The problem is that some UI elements like newly added lists record can not be accesed from it (even inspect32 can't get it).
Any ideas how to re... | How to make PowerBuilder UI testing application? | 0.099668 | 0 | 1 | 3,825 |
1,741,023 | 2009-11-16T09:23:00.000 | 1 | 0 | 0 | 0 | python,testing,powerbuilder | 2,328,021 | 4 | false | 0 | 1 | I've seen in AutomatedQa support that they a recipe recommending using msaa and setting some properties on the controls. I do not know if it works. | 2 | 6 | 0 | I'm not familiar with PowerBuilder but I have a task to create Automatic UI Test Application for PB. We've decided to do it in Python with pywinauto and iaccesible libraries. The problem is that some UI elements like newly added lists record can not be accesed from it (even inspect32 can't get it).
Any ideas how to re... | How to make PowerBuilder UI testing application? | 0.049958 | 0 | 1 | 3,825 |
1,742,382 | 2009-11-16T14:06:00.000 | 1 | 1 | 0 | 0 | python,python-3.x,midi | 2,089,977 | 1 | false | 0 | 0 | Why Python 3? It generally doesn't have many libraries yet. Generally you want to look into high-level C-libraries with Python wrappers. I doubt many of these work under Python 3 at the moment. | 1 | 4 | 0 | Can anyone suggest a good Python 3 Library for sending / receiving reatime MIDI? | Python 3 Library for Realtime Midi Communication | 0.197375 | 0 | 0 | 618 |
1,746,818 | 2009-11-17T05:37:00.000 | 0 | 0 | 1 | 0 | python | 1,746,859 | 2 | false | 0 | 0 | You should be able to get away with installing the Python binaries in the same tree as the specific application I believe (Totally untested hunch though). | 2 | 0 | 0 | Various software installations on my laptop each require their own particular version of Python. ViewVC requires Python 2.5 and Blender requires Python 2.6. Mercurial (thankfully) comes with its Python interpreter packaged in a DLL in the Mercurial installation itself.
How do I get by without having to install the enti... | Minimal Python Installation | 0 | 0 | 0 | 1,050 |
1,746,818 | 2009-11-17T05:37:00.000 | 2 | 0 | 1 | 0 | python | 1,746,927 | 2 | true | 0 | 0 | It's hard to know which "bare minimum" the Blender scripts you'll want to use in the future may be counting on (short of the full Python standard library, which isn't all that large in term of disk space after all). Why not install both Python 2.5 and 2.6? They can coexist nicely (if your scriptable apps use hashbang... | 2 | 0 | 0 | Various software installations on my laptop each require their own particular version of Python. ViewVC requires Python 2.5 and Blender requires Python 2.6. Mercurial (thankfully) comes with its Python interpreter packaged in a DLL in the Mercurial installation itself.
How do I get by without having to install the enti... | Minimal Python Installation | 1.2 | 0 | 0 | 1,050 |
1,747,266 | 2009-11-17T07:59:00.000 | 27 | 1 | 0 | 0 | python,wsgi,fastcgi | 1,747,336 | 2 | false | 1 | 1 | They are two different things. WSGI is a Python specific interface for writing web applications. There are wrappers for about any web server protocol to provide the WSGI interface. FastCGI (FCGI) is one of such web server protocols. So, WSGI is an abstraction layer, while CGI / FastCGI / mod_python are how the actual w... | 2 | 39 | 0 | From the web I've gleaned that WSGI is a CGI for python web development/frameworks. FCGI seems to be a more generalised gateway for a variety of languages. Don't know the performance difference between the two in reference to the languages python and C/++. | Is there a speed difference between WSGI and FCGI? | 1 | 0 | 0 | 25,057 |
1,747,266 | 2009-11-17T07:59:00.000 | 80 | 1 | 0 | 0 | python,wsgi,fastcgi | 1,748,161 | 2 | true | 1 | 1 | Correct, WSGI is a Python programmatic API definition and FASTCGI is a language agnostic socket wire protocol definition. Effectively they are at different layers with WSGI being a higher layer. In other words, one can implement WSGI on top of something that so happened to use FASTCGI to communicate with a web server, ... | 2 | 39 | 0 | From the web I've gleaned that WSGI is a CGI for python web development/frameworks. FCGI seems to be a more generalised gateway for a variety of languages. Don't know the performance difference between the two in reference to the languages python and C/++. | Is there a speed difference between WSGI and FCGI? | 1.2 | 0 | 0 | 25,057 |
1,747,501 | 2009-11-17T09:07:00.000 | -1 | 0 | 0 | 0 | python,django,excel,postgresql | 11,293,612 | 9 | false | 1 | 0 | Just started using XLRD and it looks very easy and simple to use.
Beware that it does not support Excel 2007 yet, so keep in mind to save your excel at 2003 format. | 1 | 3 | 0 | How do I load data from an Excel sheet into my Django application? I'm using database PosgreSQL as the database.
I want to do this programmatically. A client wants to load two different lists onto the website weekly and they don't want to do it in the admin section, they just want the lists loaded from an Excel sheet. ... | Getting data from an Excel sheet | -0.022219 | 1 | 0 | 7,027 |
1,747,772 | 2009-11-17T09:59:00.000 | 1 | 1 | 0 | 0 | python,ruby,perl,automated-tests,integration-testing | 1,747,828 | 9 | false | 1 | 0 | I would also recommend Selenium. It got a really nice Firefox Plugin, that you can use to create your integration tests. | 1 | 10 | 0 | I want to do full integration testing for a web application. I want to test many things like AJAX, positioning and presence of certain phrases and HTML elements using several browsers. I'm seeking a tool to do such automated testing.
On the other hand; this is my first time using integration testing. Are there any spec... | Integration Testing for a Web App | 0.022219 | 0 | 0 | 5,279 |
1,748,482 | 2009-11-17T12:19:00.000 | 0 | 0 | 0 | 0 | python,blender | 2,397,249 | 1 | false | 0 | 0 | You must write the plug-in for blender and used the wintracker driver. It is ready for c Lagrange.
but you have "wintracker2"?
I wanted to buy it but the company said "it's not ready to seal". | 1 | 0 | 0 | I am trying to develop a project that uses a control model in Blender by using WinTracker machine, but I don't know how to connect it with Blender Game Engine.
How can I connect it with Blender Game Engine? | Python: Connect blender with WinTracker 2 | 0 | 0 | 0 | 178 |
1,748,923 | 2009-11-17T13:36:00.000 | -2 | 0 | 1 | 0 | python,file,md5,compare | 1,748,934 | 8 | false | 0 | 0 | yes, it is enough | 5 | 9 | 0 | Is making system call to "md5sum file1" and "md5sum file2" and compare two return values enough in this case? | How to detect whether two files are identical in Python | -0.049958 | 0 | 0 | 13,119 |
1,748,923 | 2009-11-17T13:36:00.000 | 3 | 0 | 1 | 0 | python,file,md5,compare | 1,748,938 | 8 | false | 0 | 0 | If you're on a system with md5sum, that's probably good enough.
You can do it with Python standard libraries -- checkout out hashlib. | 5 | 9 | 0 | Is making system call to "md5sum file1" and "md5sum file2" and compare two return values enough in this case? | How to detect whether two files are identical in Python | 0.07486 | 0 | 0 | 13,119 |
1,748,923 | 2009-11-17T13:36:00.000 | 0 | 0 | 1 | 0 | python,file,md5,compare | 1,748,941 | 8 | false | 0 | 0 | Depends if you feel comfortable with the probability of collision on the MD5 algorithm. Just note it is highly unlikely: so yes, go ahead. | 5 | 9 | 0 | Is making system call to "md5sum file1" and "md5sum file2" and compare two return values enough in this case? | How to detect whether two files are identical in Python | 0 | 0 | 0 | 13,119 |
1,748,923 | 2009-11-17T13:36:00.000 | 7 | 0 | 1 | 0 | python,file,md5,compare | 1,749,019 | 8 | false | 0 | 0 | Of course there is a simple test that you should do before comparing the file content at all - if the files are different sizes, then they can not possibly be the same.
Wouldn't it be more efficient to simply read each file and do a byte-by-byte comparison, avoiding the hashing algorithm altogether. This avoids the th... | 5 | 9 | 0 | Is making system call to "md5sum file1" and "md5sum file2" and compare two return values enough in this case? | How to detect whether two files are identical in Python | 1 | 0 | 0 | 13,119 |
1,748,923 | 2009-11-17T13:36:00.000 | 13 | 0 | 1 | 0 | python,file,md5,compare | 1,748,935 | 8 | true | 0 | 0 | Well, that will tell you whether they're definitely different or probably the same. It's possible for two files to have the same hash but not actually have the same data... just very unlikely.
In your situation, what is the impact if you get a false positive (i.e. if you think they're the same, but they're not)? MD5 is... | 5 | 9 | 0 | Is making system call to "md5sum file1" and "md5sum file2" and compare two return values enough in this case? | How to detect whether two files are identical in Python | 1.2 | 0 | 0 | 13,119 |
1,748,958 | 2009-11-17T13:40:00.000 | 5 | 0 | 1 | 1 | python,windows,macos,pickle | 1,748,972 | 2 | true | 0 | 0 | Pickle with the newest protocol version and open the files in binary mode in all cases. That should solve the problem. | 2 | 3 | 0 | I've got a simple class that I am pickling(dumping) to a file. On OS X this works fine, and on Windows this works fine.
However, while on windows I can load/unpickle the object fine - when windows then pickles this file and saves it back to disk, it becomes unreadable on OS X (although in Windows it still behaves as no... | Unable to unpickle a file on Mac that was pickled on Windows | 1.2 | 0 | 0 | 1,555 |
1,748,958 | 2009-11-17T13:40:00.000 | 3 | 0 | 1 | 1 | python,windows,macos,pickle | 1,748,998 | 2 | false | 0 | 0 | It will be line endings - if you are using ASCII pickle open file in ascii mode 'r' or 'w' - if you are using a binary pickle open in binary mode 'rb' 'wb'. From the docstring:
The default
protocol is 0, to be backwards compatible. (Protocol 0 is the
only protocol that can be written to a file opened in t... | 2 | 3 | 0 | I've got a simple class that I am pickling(dumping) to a file. On OS X this works fine, and on Windows this works fine.
However, while on windows I can load/unpickle the object fine - when windows then pickles this file and saves it back to disk, it becomes unreadable on OS X (although in Windows it still behaves as no... | Unable to unpickle a file on Mac that was pickled on Windows | 0.291313 | 0 | 0 | 1,555 |
1,749,818 | 2009-11-17T15:52:00.000 | 0 | 0 | 0 | 0 | python,pyqt,pyqt4,stackless,python-stackless | 2,047,183 | 2 | true | 0 | 1 | I tried to go down this path several months ago and decided it was not worth the effort.
I was able to run a binary install of PyQt (on Windows) against a stackless version of Python, but I found that I had to manually go in and change some of the files. I was getting an error message (sorry, I forget what it was), an... | 1 | 4 | 0 | What experiences do you have with Stackless Python and PyQt?
Issues i would be happy if people address:
Compilation of PyQt for Stackless: does PyQt need to be compiled especially for Stackless? is the compilation smooth? problems with bindings etc.
Stability: any unexpected crashes, freezes, pauses and other weirditi... | Stackless Python and PyQt | 1.2 | 0 | 0 | 1,679 |
1,750,676 | 2009-11-17T18:01:00.000 | 18 | 0 | 0 | 0 | python,django,cpu | 1,756,874 | 4 | true | 1 | 0 | FWIW, you should do the profiling, but when you do I'll bet you find that the answer is "polling for changes to your files so it can auto-reload." You might do a quick test with "python manage.py runserver --noreload" and see how that affects the CPU usage. | 2 | 7 | 0 | I'm noticing that my django development server (version 1.1.1) on my local windows7 machine is using a lot of CPU (~30%, according to task manager's python.exe entry), even in idle state, i.e. no request coming in/going out. Is there an established way of analysing what might be responsible for this?
Thanks!
Martin | Django development server CPU intensive - how to analyse? | 1.2 | 0 | 0 | 3,645 |
1,750,676 | 2009-11-17T18:01:00.000 | 4 | 0 | 0 | 0 | python,django,cpu | 1,750,793 | 4 | false | 1 | 0 | Hit Control-C and crash the process. It will probably crash somewhere that it's spending a lot of time.
Or you could use a profiler. | 2 | 7 | 0 | I'm noticing that my django development server (version 1.1.1) on my local windows7 machine is using a lot of CPU (~30%, according to task manager's python.exe entry), even in idle state, i.e. no request coming in/going out. Is there an established way of analysing what might be responsible for this?
Thanks!
Martin | Django development server CPU intensive - how to analyse? | 0.197375 | 0 | 0 | 3,645 |
1,750,757 | 2009-11-17T18:16:00.000 | 2 | 0 | 1 | 1 | python,auto-update | 1,750,798 | 8 | false | 0 | 0 | The cleanest solution is a separate update script!
Run your program inside it, report back (when exiting) that a new version is available. This allows your program to save all of its data, the updater to apply the update, and run the new version, which then loads the saved data and continues. To the user this can be ... | 1 | 47 | 0 | I have written a script that will keep itself up to date by downloading the latest version from a website and overwriting the running script.
I am not sure what the best way to restart the script after it has been updated.
Any ideas?
I don't really want to have a separate update script.
oh and it has to work on both li... | Restarting a self-updating python script | 0.049958 | 0 | 0 | 41,683 |
1,756,096 | 2009-11-18T13:46:00.000 | 11 | 0 | 1 | 0 | python,generator | 1,932,598 | 13 | false | 0 | 0 | I like to describe generators, to those with a decent background in programming languages and computing, in terms of stack frames.
In many languages, there is a stack on top of which is the current stack "frame". The stack frame includes space allocated for variables local to the function including the arguments passe... | 1 | 239 | 0 | I am reading the Python cookbook at the moment and am currently looking at generators. I'm finding it hard to get my head round.
As I come from a Java background, is there a Java equivalent? The book was speaking about 'Producer / Consumer', however when I hear that I think of threading.
What is a generator and why wou... | Understanding generators in Python | 1 | 0 | 0 | 151,393 |
1,757,276 | 2009-11-18T16:32:00.000 | 4 | 0 | 0 | 1 | python,ftp,client,twisted | 1,757,848 | 1 | true | 0 | 0 | There are a couple unit tests for behavior in this area.
twisted.test.test_ftp.FTPClientTestCase.test_failedRETR is the most directly relevant one. It covers the case where the control and data connections are lost while a file transfer is in progress.
It seems to me that test coverage in this area could be significan... | 1 | 3 | 0 | I'm writing a custom ftp client to act as a gatekeeper for incoming multimedia content from subcontractors hired by one of our partners. I chose twisted because it allows me to parse the file contents before writing the files to disk locally, and I've been looking for occasion to explore twisted anyway. I'm using 'twis... | Checking files retrieved by Twisted's FTPClient.retrieveFile method for completeness | 1.2 | 0 | 0 | 1,008 |
1,758,276 | 2009-11-18T19:02:00.000 | 5 | 0 | 0 | 0 | python,telnet | 1,758,310 | 4 | false | 0 | 0 | Make the Python script into the shell for that user. (Or if that doesn't work, wrap it up in bash script or even a executable).
(You might have to put it in /etc/shells (or equiv.)) | 2 | 3 | 0 | How can I run a Python program so it outputs its STDOUT and inputs its STDIN to/from a remote telnet client?
All the program does is print out text then wait for raw_input(), repeatedly. I want a remote user to use it without needing shell access. It can be single threaded/single user. | How can I run a Python program over telnet? | 0.244919 | 0 | 1 | 953 |
1,758,276 | 2009-11-18T19:02:00.000 | 0 | 0 | 0 | 0 | python,telnet | 1,760,716 | 4 | false | 0 | 0 | You can just create a new linux user and set their shell to your script.
Then when they telnet in and enter the username/password, the program runs instead of bash or whatever the default shell is. | 2 | 3 | 0 | How can I run a Python program so it outputs its STDOUT and inputs its STDIN to/from a remote telnet client?
All the program does is print out text then wait for raw_input(), repeatedly. I want a remote user to use it without needing shell access. It can be single threaded/single user. | How can I run a Python program over telnet? | 0 | 0 | 1 | 953 |
1,758,819 | 2009-11-18T20:27:00.000 | 6 | 0 | 1 | 1 | python | 1,758,845 | 4 | false | 0 | 0 | If you compile python with readline support, the REPL environment should do this for you. | 1 | 2 | 0 | I am using the python prompt to practice some regular expressions. I was wondering if there was a way to use the up/down arrows (like bash) to cycle through the old commands typed. I know its possible since it works on python on cygwin/windows.
thanks | python prompt with a bash like interface | 1 | 0 | 0 | 1,113 |
1,759,619 | 2009-11-18T22:29:00.000 | 0 | 0 | 1 | 0 | python,popen,newline | 1,761,077 | 6 | false | 0 | 0 | You can do s = s.replace('\r', '') too. | 1 | 3 | 0 | When you run something through popen in Python, the results come in from the buffer with the CR-LF decimal value of a carriage return (13) at the end of each line. How do you remove this from a Python string? | Remove
from python string | 0 | 0 | 0 | 19,650 |
1,760,025 | 2009-11-19T00:05:00.000 | 12 | 0 | 1 | 0 | python,memory,jvm | 1,760,046 | 3 | true | 1 | 0 | On *nix you can play around with the ulimit command, specifically the -m (max memory size) and -v (virtual memory). | 1 | 20 | 0 | I'm trying to find a way to limit the memory available for the Python VM, as the option "-Xmx" in the Java VM does. (The idea is to be able to play with the MemoryError exception)
I'm not sure this option exist but there may be a solution using a command of the OS to "isolate" a process and its memory.
Thank you. | Limit Python VM memory | 1.2 | 0 | 0 | 13,726 |
1,760,963 | 2009-11-19T04:53:00.000 | 5 | 0 | 1 | 0 | python,django | 1,760,987 | 3 | true | 1 | 0 | from myproject.folder import file (horrible name, btw, trampling over the builtin type file, but that's another rant;-), then use file.function -- if file (gotta hate that module name;-) is still too long for you, add e.g. as fi to the from statement, and use fi.function. If you want to rename myproject to myhorror, y... | 1 | 4 | 0 | I'm working on a Django project. Let's call it myproject. Now my code is littered with myproject.folder.file.function. Is there anyway I can remove the need to prefix all my imports and such with myproject.? What if I want to rename my project later? It kind of annoys me that I need to prefix stuff like that when the v... | Shorten Python imports? | 1.2 | 0 | 0 | 3,580 |
1,761,473 | 2009-11-19T07:20:00.000 | -1 | 0 | 0 | 0 | python,cookies,webkit | 1,762,266 | 2 | true | 0 | 1 | webkit is a html renderer, not a complete browser. I guess you must deal with persisting the cookies yourself. | 1 | 2 | 0 | The documentation for pyWebKitGTK is pretty scarce. I've looked through their python .def files but they don't seem to contain the words cookie, session, (lib)soup or (lib)curl.. so maybe it isn't possible, huh. I've also looked through the WebKitGTK docs (for the C-based library) and aside from a brief mention of libs... | How to enable cookie support with pyWebKit? | 1.2 | 0 | 0 | 2,065 |
1,761,663 | 2009-11-19T08:05:00.000 | 0 | 1 | 0 | 0 | python,image,testing,opencv | 1,762,591 | 2 | false | 0 | 0 | What's wrong with the "gold file" technique? It's part of your test fixture. Every test has a data fixture that's the equivalent to the "gold file" in a media-intensive application.
When doing ordinary TDD of ordinary business applications, one often has a golden database fixture that must be used.
Even when testing ... | 1 | 2 | 0 | What's are some ways of testing complex data types such as video, images, music, etc. I'm using TDD and wonder are there alternatives to "gold file" testing for rendering algorithms. I understand that there's ways to test other parts of the program that don't render and using those results you can infer. However, I'm p... | Testing complex datatypes? | 0 | 0 | 0 | 229 |
1,764,548 | 2009-11-19T16:21:00.000 | 1 | 0 | 1 | 0 | python,64-bit,long-integer | 1,764,630 | 4 | false | 0 | 0 | Have a look at the ctypes module, it is used to call foreign DLLs/libraries from python.
There a some data types that correspond to C types, for example
class c_longlong | 1 | 13 | 0 | I would like to represent a value as a 64bit signed long, such that values larger than (2**63)-1 are represented as negative, however Python long has infinite precision. Is there a 'quick' way for me to achieve this? | Python type long vs C 'long long' | 0.049958 | 0 | 0 | 38,686 |
1,765,560 | 2009-11-19T18:36:00.000 | 4 | 0 | 1 | 0 | python,scheme | 1,765,688 | 4 | true | 0 | 0 | In Python variable scope can be either global or function. In Scheme, the scope can be any block.
For example, in Scheme you could define a variable inside a loop, and it wouldn't be accessible from outside the loop. In Python, the scope being the whole function, this variable would 'leak' out of the loop into the re... | 2 | 1 | 0 | Refering to Variable Scoping.
I'm trying to figure out what are the differences between those 2.
For example, Anonymous functions in a scheme function has access to the variables local to that function. Does python have this?
Thanks! | What are the differences in variable scoping between Python and Scheme? | 1.2 | 0 | 0 | 384 |
1,765,560 | 2009-11-19T18:36:00.000 | 0 | 0 | 1 | 0 | python,scheme | 1,765,610 | 4 | false | 0 | 0 | Yes, Python has the ability to access variables that are local to an anonymous function (in Python, this is called a lambda function) within that function.
I'm not entirely sure if that answered you question, so if it didn't, please post some more detail | 2 | 1 | 0 | Refering to Variable Scoping.
I'm trying to figure out what are the differences between those 2.
For example, Anonymous functions in a scheme function has access to the variables local to that function. Does python have this?
Thanks! | What are the differences in variable scoping between Python and Scheme? | 0 | 0 | 0 | 384 |
1,766,510 | 2009-11-19T21:02:00.000 | 3 | 0 | 1 | 0 | python,escaping,backslash | 1,766,537 | 3 | true | 0 | 0 | If you are asking for the user for input, then a \ will go into a string as a \ correctly. Only if you then eval the user's string in some way will the backslash count as an escape char. You really only need to worry about escaping when you are writing strings within the code. | 2 | 1 | 0 | I'm making a program that asks for a path, and Windows' paths contain backslashes, which can be interpreted as an escape sequence by python if the letter right next is the wrong one. I tried string.replace() but it doesn't work as these backslashes get transformed into escape sequences before having the replace functio... | Python, removing the \'s before getting them processed | 1.2 | 0 | 0 | 2,514 |
1,766,510 | 2009-11-19T21:02:00.000 | 6 | 0 | 1 | 0 | python,escaping,backslash | 1,766,531 | 3 | false | 0 | 0 | No, the backslash is not interpreted as an escape sequence except in Python source code. Unless you're eval()ing the path, which would be Wrong, I'm not sure why you'd have a problem. | 2 | 1 | 0 | I'm making a program that asks for a path, and Windows' paths contain backslashes, which can be interpreted as an escape sequence by python if the letter right next is the wrong one. I tried string.replace() but it doesn't work as these backslashes get transformed into escape sequences before having the replace functio... | Python, removing the \'s before getting them processed | 1 | 0 | 0 | 2,514 |
1,767,575 | 2009-11-20T00:24:00.000 | 0 | 0 | 0 | 0 | python,windows,keyboard | 1,773,644 | 3 | false | 0 | 1 | I've used AutoIt (via it's COM interface) a lot of times | 1 | 2 | 0 | The problem I have is that I have this Python script to launch a application. After the application is launched (the GUI is shown on screen), I want to make it de-activated. It can be done manually by activating another window, or minimizing this app, or pressing the Show Desktop key for WindowsXP.
So is there any way ... | Are there any libraries for Python to simulate keyboard action? | 0 | 0 | 0 | 1,789 |
1,768,179 | 2009-11-20T03:34:00.000 | 2 | 0 | 0 | 0 | jquery,python,django | 1,768,324 | 1 | true | 1 | 0 | i think you have few options
Just change thumbnail at runtime based on $(window).width(); using jquery
Pass on screen resolution to django first time from client side, and later store it in session and render templates accordingly
Sometime you may get screen resolution in request headers, i am not sure though
Best wou... | 1 | 0 | 0 | In a thumbnail website, if I want to display 100x100 thumbs on screnn resolutions lower than 1280x1024 while display 150x150 thumbs for screens higher than 1280x1024, is the following procedure correct?
Render a page frame with no thumbs by view1()
On page frame loaded, it detects client's screen resolution and pass i... | Different response by screen solutions using Django and jQuery | 1.2 | 0 | 0 | 2,312 |
1,769,403 | 2009-11-20T09:40:00.000 | 4 | 0 | 1 | 0 | python,keyword-argument | 1,769,644 | 13 | false | 0 | 0 | kwargs are a syntactic sugar to pass name arguments as dictionaries(for func), or dictionaries as named arguments(to func) | 1 | 821 | 0 | What are the uses for **kwargs in Python?
I know you can do an objects.filter on a table and pass in a **kwargs argument.
Can I also do this for specifying time deltas i.e. timedelta(hours = time1)?
How exactly does it work? Is it classes as 'unpacking'? Like a,b=1,2? | What is the purpose and use of **kwargs? | 0.061461 | 0 | 0 | 650,544 |
1,770,312 | 2009-11-20T13:04:00.000 | 0 | 0 | 0 | 1 | python,macos,sendkeys | 1,770,681 | 5 | false | 0 | 0 | Maybe you could run an OSA script (man osascript) from Python, for instance, and drive the application? | 1 | 19 | 0 | In Mac 10.6, I want to cause an active application to become de-active, or minimized by Python
I know I could use sendKey in Windows with Python, then what about in Mac? | Is there a sendKey for Mac in Python? | 0 | 0 | 0 | 19,837 |
1,770,754 | 2009-11-20T14:25:00.000 | 1 | 0 | 1 | 1 | python,twisted,py2exe | 1,770,870 | 1 | true | 0 | 0 | The typical use of the reactor is not to call reactor.iterate. It's hard to say why exactly you're getting the behavior you are without seeing your program, but for a wild guess, I'd say switching to reactor.run might help. | 1 | 1 | 0 | I'm currently using an application in python which works quite well but when I'm converting it with py2exe, the application seems to be suspended at the first "reactor.iterate"
Each time I press Ctrl+C to stop the application, the error is always the same and the application seems to be bloqued on a "reactor.iterate(4)... | reactor.iterate seems to block a program with Py2exe | 1.2 | 0 | 0 | 116 |
1,772,133 | 2009-11-20T17:41:00.000 | 2 | 1 | 0 | 0 | python,svn,ssh,pysvn | 1,773,231 | 1 | true | 0 | 0 | Check out ssh configuration option PasswordAuthentication.
I'm not sure how pysvn interacts with ssh, but if you set this to no in your ~/.ssh/config (or maybe global config?) then it shouldn't prompt for a password. | 1 | 5 | 0 | I'm working with pysvn, and I'm trying to find a decent way to handle repositories that are only accessible via svn+ssh. Obviously SSH keys make this all incredibly easy, but I can't guarantee the end user will be using an SSH key. This also has to be able to run without user interaction, because it's going to be doing... | pysvn with svn+ssh | 1.2 | 0 | 0 | 1,664 |
1,772,599 | 2009-11-20T19:02:00.000 | 2 | 0 | 1 | 0 | python,video,thumbnails | 1,844,330 | 9 | false | 0 | 0 | You could use the Youtube API for storage and transcoding and grab the feed thumbnails for free. Honestly, that's the easiest way to handle online video and I'm not just shilling a 3rd party service, I'm a very happy user of that API and the internal video paths I was able to delete thanks to it. | 1 | 31 | 0 | I need to create thumbnails for a video file once I've uploaded to a webapp running python.
How would I go about this... I need a library that can basically either do this for me, or that can read the image frames out of video files (of several formats) automatically. | Creating thumbnails from video files with Python | 0.044415 | 0 | 0 | 35,280 |
1,773,063 | 2009-11-20T20:30:00.000 | 0 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,322 | 13 | false | 0 | 0 | Don't get me wrong, I am and will always be a devoted fan of C#.
But sometimes there are things I can't do in C#. lthough C# keeps reducing those gaps, Python is still the language I go to to fill them.
It's dynamic, flexible, powerful, and clean. Lovely language. Whenever I need to script or build dynamic or functiona... | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 0 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 1 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,317 | 13 | false | 0 | 0 | Like any programming language, it is just a tool in the box or a brush by which you may paint your creation. Any creative endeavour requires that the artist loves the tools he uses; otherwise, the outcome suffers. Some people like Python for the same reason others love Perl. Incidentally, I have found that most Pytho... | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 0.015383 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 11 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,987 | 13 | false | 0 | 0 | I'm a very heavy user of both C# and Python; I've built very complicated applications in both languages, and I've also embedded Python scripting in my major C# application. I'm not using either to do much in the way of web work right now, but other than that I feel like I'm pretty qualified to answer the question.
The... | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 1 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 10 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,278 | 13 | false | 0 | 0 | Your question is kind of like a plumber asking why carpenters are always going on and on about hammers. After all the plumber doesn't have a hammer and has never missed it. Python (even IronPython) and C# target different types of developers and different types of programs. I am very comfortable in Python and enjoy ... | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 1 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 2 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,315 | 13 | false | 0 | 0 | I'm an asymmetrical user of both languages, in a sense that I use C# mostly professionally and Python for all my "fun" projects (not that work is never fun, but... you know...)
This difference of context may skew my perspective, including my opinion that they are two distinct types (pun intended) of languages for, gene... | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 0.03076 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 18 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,087 | 13 | false | 0 | 0 | For me its the flexibility and elegance, but there are a handful of things I wish could be pulled in from other languages though (better threading, more robust expressions).
In typical I can write a little bit of code in python and do a lot more than the same amount of lines in many other languages. Also, in python co... | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 1 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 15 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,082 | 13 | false | 0 | 0 | Being able to type in some code and get the result back immediately.
(Disclaimer: I use both C# and Python regularly, and I think both have their good and bad points.) | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 1 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 11 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,224 | 13 | true | 0 | 0 | I'm primarily .NET developer and using Python for me personal projects.
What are the good things about python that developers love?
I can say for myself - Python is like a breath of fresh air.
1) It's simple to learn, took about a week for me in the evenings. I'm saying about Python + Django. Python syntax is quite ... | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 1.2 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 1 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,215 | 13 | false | 0 | 0 | I like all stuff with [] and {}. Selectors like this [-1:1]. Possibility to write less code, but more something meaningfull, that gives to write Models and other declarative things very DRY. | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 0.015383 | 0 | 0 | 3,108 |
1,773,063 | 2009-11-20T20:30:00.000 | 0 | 1 | 1 | 0 | c#,python,programming-languages | 1,773,312 | 13 | false | 0 | 0 | The main thing I like about Python is its very concise, readable syntax. Though using indentation as a block delimiter can seem strange at first, once you begin to code a lot in the language I find it begins to make sense. Though the core language is quite simple, its more advanced features, e.g. list comprehension, de... | 10 | 20 | 0 | For someone who’s been happily programming in C# for quite some time now and planning to learn a new language I find the Python community more closely knit than many others.
Personally dynamic typing puts me off, but I am fascinated by the way the Python community rallies around it. There are a lot of other things I ... | What Python features will excite the interest of a C# developer? | 0 | 0 | 0 | 3,108 |
1,773,222 | 2009-11-20T21:02:00.000 | 3 | 1 | 1 | 0 | python,tcl,tkinter,tk | 1,773,435 | 1 | false | 0 | 1 | The files you found are for linking directly to tcl/tk. Python depends on another library as well: _tkinter.so. It should be in /usr/lib/python2.5/lib-dynload/_tkinter.so.
How did you install python2.5? If you are using Debian or Ubuntu you need to install the python-tk package to get Tkinter support.
If the _tkinter.s... | 1 | 0 | 0 | I have an existing Python 2.4 and it is working properly with tkinter as I tested it using
python
import _tkinter
import Tkinter
Tkinter._test()
Now, I have installed python 2.5.2 but when I try the same tests (with the newer version), it returns (but the same tests are working for the previous version)
I... | Linking Tcl/Tk to Python 2.5 | 0.53705 | 0 | 0 | 1,073 |
1,774,915 | 2009-11-21T08:12:00.000 | 1 | 1 | 0 | 0 | python,django | 11,819,696 | 3 | false | 1 | 0 | Amir Hussain,
Yahoo mail using captcha, so it will not works for any scripts or service unless they have managed service with the help of a third party for captcha decoder. So u have to contact a service provider who provide managed service.
As far as I know, Improsys is the first Address Grabber marketer and they hav... | 1 | 5 | 0 | How can I import contacts of given email id/pwd from
gmail
yahoo
hotmail
etc
using python/django application. Please suggest? | how to import contacts from various services like gmail or yahoo using python/django | 0.066568 | 0 | 0 | 2,955 |
1,775,637 | 2009-11-21T14:38:00.000 | 1 | 0 | 1 | 0 | python,tags | 1,778,174 | 5 | false | 0 | 0 | Train Bayes or Fischer filter with already tagged data (e.g. with Stackoverflow data dump suggested by sth) and use it to classify new posts. I'd recommend reading excellent Programming Collective Intelligence book by Toby Segaran for more information and python examples on this topic. | 2 | 4 | 0 | How can I pick tags from an article or a user's post using Python?
Is the following method ok?
Build a list of word frequency from the text and sort them.
Remove some common words and pick the top 10 words remained in the list as the tags.
If the above method is ok, what library can detect if which words are common, ... | Automatically pick tags from context using Python | 0.039979 | 0 | 0 | 481 |
1,775,637 | 2009-11-21T14:38:00.000 | 0 | 0 | 1 | 0 | python,tags | 1,775,731 | 5 | false | 0 | 0 | Instead of blacklisting words that shouldn't be tags, why don't you instead build a whitelist of words that would make for good tags?
Start with an handful of tags that you would like to have, like Python, off-topic, football, rickroll or whatnot (depends on the kind of site you are building!) and have the system only ... | 2 | 4 | 0 | How can I pick tags from an article or a user's post using Python?
Is the following method ok?
Build a list of word frequency from the text and sort them.
Remove some common words and pick the top 10 words remained in the list as the tags.
If the above method is ok, what library can detect if which words are common, ... | Automatically pick tags from context using Python | 0 | 0 | 0 | 481 |
1,775,954 | 2009-11-21T16:34:00.000 | 4 | 1 | 1 | 0 | python,macos,python-3.x,textmate | 7,792,338 | 4 | false | 0 | 0 | the shebang is the best solution, to see where python 3 is installed type in terminal:
which python3
you will get something like this:
/usr/local/bin/python3
if nothing shows up first install python3
and at the top of your script insert:
#!/usr/local/bin/python3 | 1 | 28 | 0 | TextMate seems to use the built-in Python version I assume (sys.path doesn't work). How do you configure it to use 3.1 instead? I've already installed the 3.1 package and I can use IDLE for interactive sessions, but I need to use TextMate now.
Thanks | Using Python 3.1 with TextMate | 0.197375 | 0 | 0 | 17,177 |
1,776,066 | 2009-11-21T17:11:00.000 | 7 | 0 | 1 | 0 | python,html,unicode,python-3.x,newline | 1,776,100 | 6 | false | 1 | 0 | normally I do like this s=s.replace("\n","<br />\n")
because
<br /> is needed in web page display and
\n is needed in source display.
just my 2 cents | 1 | 7 | 0 | I have upgraded to Python 3 and can't figure out how to convert backslash escaped newlines to HTML.
The browser renders the backslashes literally, so "\n" has no effect on the HTML source. As a result, my source page is all in one long line and impossible to diagnose. | Python 3: Write newlines to HTML | 1 | 0 | 0 | 25,316 |
1,776,290 | 2009-11-21T18:24:00.000 | 13 | 0 | 0 | 0 | python,matlab | 1,777,708 | 8 | false | 0 | 0 | I've been programming with Matlab for about 15 years, and with Python for about 10. It usually breaks down this way:
If you can satisfy the following conditions:
1. You primarily use matrices and matrix operations
2. You have the money for a Matlab license
3. You work on a platform that mathworks supports
T... | 1 | 18 | 1 | i am a engineering student and i have to do a lot of numerical processing, plots, simulations etc. The tool that i use currently is Matlab. I use it in my university computers for most of my assignments. However, i want to know what are the free options available.
i have done some research and many have said that pyth... | replacing Matlab with python | 1 | 0 | 0 | 15,393 |
1,777,011 | 2009-11-21T22:32:00.000 | 1 | 0 | 1 | 0 | python,c,bash,vhdl | 1,777,112 | 6 | false | 0 | 0 | Pascal has only 2-3 pages of BNF notations | 2 | 12 | 0 | What programming language has short and beautiful grammars (in EBNF)?
Some languages are easer to be parsed. Some time ago I have created a simple VHDL parser, but it was very slow. Not because it is implemented completely in Python, but because VHDL grammar (in EBNF) is huge. The EBNF of Python is beautiful but it is ... | Which programming language has very short context-free Grammar in its formal specification? | 0.033321 | 0 | 0 | 5,182 |
1,777,011 | 2009-11-21T22:32:00.000 | 4 | 0 | 1 | 0 | python,c,bash,vhdl | 1,777,087 | 6 | false | 0 | 0 | Assembly languages!
...in general, and particularly for CPUs which have a simple architecture (few instructions, few addressing modes, few registers) have a relatively short grammar.
In fact, specialized processors, such as these found in programmable logic controllers can have a language with even simpler grammars. B... | 2 | 12 | 0 | What programming language has short and beautiful grammars (in EBNF)?
Some languages are easer to be parsed. Some time ago I have created a simple VHDL parser, but it was very slow. Not because it is implemented completely in Python, but because VHDL grammar (in EBNF) is huge. The EBNF of Python is beautiful but it is ... | Which programming language has very short context-free Grammar in its formal specification? | 0.132549 | 0 | 0 | 5,182 |
1,777,264 | 2009-11-22T00:13:00.000 | 19 | 1 | 1 | 0 | python,email,imap | 1,777,290 | 3 | false | 0 | 0 | Deleting an email over IMAP is performed in two phases:
mark one or more items for deletion: imap.store(msg_no, '+FLAGS', '\\Deleted')
expunge the mailbox: imap.expunge()
(imap is your IMAP4 object) | 1 | 14 | 0 | Can you delete emails with imaplib? If so how? | Using python imaplib to "delete" an email from Gmail? | 1 | 0 | 0 | 23,123 |
1,777,671 | 2009-11-22T02:51:00.000 | 2 | 1 | 1 | 0 | python,interactive,egg,non-interactive | 1,777,968 | 4 | true | 0 | 0 | I don't understand what do you mean by running script in interactive mode, so I can't say exactly. But the first place to look for modules (sys.path[0]) in interactive mode is current directory (even calling os.chdir() will affect imports), while for script it's directory where the script is located (derived from sys.a... | 3 | 5 | 0 | One of my Python scripts runs in interactive mode but fails when run from the command line. The difference is that when run from the command line, it imports modules from a bad .egg file, and when run interactively it uses my fixed (unzipped) version in the current directory.
My question is two-fold: a) why does Python... | Python importing modules differently when run interactively/non-interactively | 1.2 | 0 | 0 | 2,052 |
1,777,671 | 2009-11-22T02:51:00.000 | 2 | 1 | 1 | 0 | python,interactive,egg,non-interactive | 1,777,700 | 4 | false | 0 | 0 | On UNIX systems and Mac OS-X:
Do you have a ~/.python-eggs directory?
OS independent:
Are you sure that you use the same Python instance in both cases?
Can you print sys.path in each cases and see which package directory comes first on your module search path? | 3 | 5 | 0 | One of my Python scripts runs in interactive mode but fails when run from the command line. The difference is that when run from the command line, it imports modules from a bad .egg file, and when run interactively it uses my fixed (unzipped) version in the current directory.
My question is two-fold: a) why does Python... | Python importing modules differently when run interactively/non-interactively | 0.099668 | 0 | 0 | 2,052 |
1,777,671 | 2009-11-22T02:51:00.000 | 1 | 1 | 1 | 0 | python,interactive,egg,non-interactive | 1,778,097 | 4 | false | 0 | 0 | a) why does Python load modules differently when run from these locations
b) what are my options to work around it?
Check your environment variable PYTHONPATH. When python imports module, it searches those directories. One way to get around your problem is to add your local folder "the (unzipped) version in the curren... | 3 | 5 | 0 | One of my Python scripts runs in interactive mode but fails when run from the command line. The difference is that when run from the command line, it imports modules from a bad .egg file, and when run interactively it uses my fixed (unzipped) version in the current directory.
My question is two-fold: a) why does Python... | Python importing modules differently when run interactively/non-interactively | 0.049958 | 0 | 0 | 2,052 |
1,778,278 | 2009-11-22T09:39:00.000 | 0 | 1 | 1 | 0 | python,c++ | 1,778,322 | 5 | false | 0 | 0 | It should be fast and lightweight (not like the .NET Framework), but you should still be able to create fully functional and flexible GUI apps. | 1 | 0 | 0 | Just curious. If you had the time and inclination to create a programming language, what characteristics would it have?
One language I would like to see would borrow as much from the syntax of Python as possible but compile to machine code that runs as fast as C or C++. | If you had the time and inclination to create a programming language, what characteristics would it have? | 0 | 0 | 0 | 340 |
1,778,670 | 2009-11-22T13:17:00.000 | 7 | 0 | 1 | 0 | python | 1,778,686 | 6 | true | 0 | 0 | I'd say it depends on your target audience. For enterprise stuff I think RedHat (certainly CentOS 5) are still on 2.4 - so if you want typical RedHat/CentOS using people to able to install without resorting to third party python installations then I think you need to keep 2.4 for a while. If most of your users are more... | 5 | 8 | 0 | I maintain an open source python project. Right now it supports python 2.4, 2.5, 2.6. I am looking for to add support for python 3. I guess it will be easier if I drop 2.4 support.
I know it is possible to support all but it is very annoying if I have to install 4 or 5 python versions on my machine and run the tests on... | When should I drop support for python2.4 on my public python library? | 1.2 | 0 | 0 | 225 |
1,778,670 | 2009-11-22T13:17:00.000 | 1 | 0 | 1 | 0 | python | 1,779,015 | 6 | false | 0 | 0 | Track downloads of each version of your project. Graph the daily traffic (or weekly if there is too much variation day to day) for each version separately. Keep an eye on the trends and at some point you will see a distinctly downward trend for 2.4 compared to the rest. When that downward trend is well established, dis... | 5 | 8 | 0 | I maintain an open source python project. Right now it supports python 2.4, 2.5, 2.6. I am looking for to add support for python 3. I guess it will be easier if I drop 2.4 support.
I know it is possible to support all but it is very annoying if I have to install 4 or 5 python versions on my machine and run the tests on... | When should I drop support for python2.4 on my public python library? | 0.033321 | 0 | 0 | 225 |
1,778,670 | 2009-11-22T13:17:00.000 | 2 | 0 | 1 | 0 | python | 1,778,682 | 6 | false | 0 | 0 | It's a matter of weighing pros and cons.
I suppose the real answer to this question is how many features there are in 2.5/2.6 that would really improve your library. It seems as though 2.4 becomes less and less worth supporting as time goes by.
On the other hand, there are still some people on Python 2.4. You have ... | 5 | 8 | 0 | I maintain an open source python project. Right now it supports python 2.4, 2.5, 2.6. I am looking for to add support for python 3. I guess it will be easier if I drop 2.4 support.
I know it is possible to support all but it is very annoying if I have to install 4 or 5 python versions on my machine and run the tests on... | When should I drop support for python2.4 on my public python library? | 0.066568 | 0 | 0 | 225 |
1,778,670 | 2009-11-22T13:17:00.000 | 0 | 0 | 1 | 0 | python | 1,778,773 | 6 | false | 0 | 0 | Any answer here is going to be subjective. I suggest you make a feature and user list. There are 2 things to consider here.
1: How will your program benefit - what features are better nicer/faster/less buggy in newer versions of Python ? What extra dependent libraries can your program utilize by sticking to an older ve... | 5 | 8 | 0 | I maintain an open source python project. Right now it supports python 2.4, 2.5, 2.6. I am looking for to add support for python 3. I guess it will be easier if I drop 2.4 support.
I know it is possible to support all but it is very annoying if I have to install 4 or 5 python versions on my machine and run the tests on... | When should I drop support for python2.4 on my public python library? | 0 | 0 | 0 | 225 |
1,778,670 | 2009-11-22T13:17:00.000 | 1 | 0 | 1 | 0 | python | 1,778,792 | 6 | false | 0 | 0 | You don't have to drop anything, what works on 2.4, works on 2.5 and 2.6. You can easily avoid incompatibilities skipping "with", the ternary operation, et "import future".
Now, once you have a very stable and full featured version of your code and need to make a big achitectural change, start writting for Python 3.0. ... | 5 | 8 | 0 | I maintain an open source python project. Right now it supports python 2.4, 2.5, 2.6. I am looking for to add support for python 3. I guess it will be easier if I drop 2.4 support.
I know it is possible to support all but it is very annoying if I have to install 4 or 5 python versions on my machine and run the tests on... | When should I drop support for python2.4 on my public python library? | 0.033321 | 0 | 0 | 225 |
1,779,004 | 2009-11-22T15:21:00.000 | 13 | 0 | 0 | 0 | python,ubuntu,pyqt,pygtk | 1,818,306 | 4 | true | 0 | 1 | I've written reasonably large apps in both PyGTK and PyQt. On balance, my personal opinion is that PyQt is superior, but not by so much that it's worth worrying about. If you're only worried about supporting Ubuntu, then use PyGTK; it'll give a better look and feel. If you think you may want to port this app to othe... | 4 | 9 | 0 | I'm a web developer looking to get my feet wet with coding up a little desktop app for Ubuntu in Python. I've scoured the web looking for the pros and cons of PyGTK vs. PyQT and can't really find any good comparisons.
What do you guys think? Do they both produce native-looking widgets on a GNOME system? Is one easier t... | Is PyGTK or PyQT preferred for making GTK-native Python apps? | 1.2 | 0 | 0 | 3,384 |
1,779,004 | 2009-11-22T15:21:00.000 | 1 | 0 | 0 | 0 | python,ubuntu,pyqt,pygtk | 1,901,957 | 4 | false | 0 | 1 | In my experience, having made both PyGTK and PyQT apps, there is little difference on the underlying programming side of things. PyQT seems more consistent across different flavors of Linux, where GTK is constantly changing and breaking on older distributions.
PyQT has QTCreator, which is a great GUI designer. PyGTK ... | 4 | 9 | 0 | I'm a web developer looking to get my feet wet with coding up a little desktop app for Ubuntu in Python. I've scoured the web looking for the pros and cons of PyGTK vs. PyQT and can't really find any good comparisons.
What do you guys think? Do they both produce native-looking widgets on a GNOME system? Is one easier t... | Is PyGTK or PyQT preferred for making GTK-native Python apps? | 0.049958 | 0 | 0 | 3,384 |
1,779,004 | 2009-11-22T15:21:00.000 | 1 | 0 | 0 | 0 | python,ubuntu,pyqt,pygtk | 13,670,093 | 4 | false | 0 | 1 | In my opinion use PYQT as its definately superior for a few reasons. There is no worries with pixmaps ever, there is only one library coded in the same style and conventions. In pygtk you need to learn up to 4 libraries coded in a different style. You have to learn GLIB constants at least if not GLIB variable names as ... | 4 | 9 | 0 | I'm a web developer looking to get my feet wet with coding up a little desktop app for Ubuntu in Python. I've scoured the web looking for the pros and cons of PyGTK vs. PyQT and can't really find any good comparisons.
What do you guys think? Do they both produce native-looking widgets on a GNOME system? Is one easier t... | Is PyGTK or PyQT preferred for making GTK-native Python apps? | 0.049958 | 0 | 0 | 3,384 |
1,779,004 | 2009-11-22T15:21:00.000 | 5 | 0 | 0 | 0 | python,ubuntu,pyqt,pygtk | 1,779,036 | 4 | false | 0 | 1 | PyGTK application will look more native on a Gnome system. PyQt application will look more native on a KDE system.
As I found PyGTK have better documentation then PyQt.
It will take the same time to write a program on PyQt and PyGTK. | 4 | 9 | 0 | I'm a web developer looking to get my feet wet with coding up a little desktop app for Ubuntu in Python. I've scoured the web looking for the pros and cons of PyGTK vs. PyQT and can't really find any good comparisons.
What do you guys think? Do they both produce native-looking widgets on a GNOME system? Is one easier t... | Is PyGTK or PyQT preferred for making GTK-native Python apps? | 0.244919 | 0 | 0 | 3,384 |
1,779,372 | 2009-11-22T17:39:00.000 | 47 | 1 | 1 | 0 | python,decorator,metaclass | 1,779,404 | 2 | true | 0 | 0 | Decorators are much, much simpler and more limited -- and therefore should be preferred whenever the desired effect can be achieved with either a metaclass or a class decorator.
Anything you can do with a class decorator, you can of course do with a custom metaclass (just apply the functionality of the "decorator funct... | 1 | 43 | 0 | What are the main differences between Python metaclasses and class decorators? Is there something I can do with one but not with the other? | Python metaclasses vs class decorators | 1.2 | 0 | 0 | 8,667 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.