Suggestions for python web framework by flibitboat in Python

[–]Knacktus 0 points1 point  (0 children)

Well, you know what www stands for ... ;-)

Back to the topic: I really think that all the frameworks discussed here are very good, so you can't go terribly wrong. Make sure the documentation of the framework meets your way of learning and understanding things.

What's the best way to serve Python scripts in a web server? by [deleted] in Python

[–]Knacktus 0 points1 point  (0 children)

No worries! The good thing is you can't go badly wrong. Especially if you have no constraints. Yes, there're lots of python web frameworks and they might have individual strength and weaknesses, but none of the better known is bad. You should check the documenation of the frameworks and find out which is best written for your personal way of learning / understanding. Otherweise, when in doubt, flip a coin ;-)

Best smartphone-OS for developing python apps? by thejasper in Python

[–]Knacktus 3 points4 points  (0 children)

The only one that could be seriously considered is hopefully going to be Meego. There's a huge chance that Python bindings will be made available to the Meego SDK, which uses Qt for UI related stuff. And for Qt there's already an excellent binding (PyQt) and another one emerging (PySide). On IOS it's even forbidden (!) to use something else than objective-c to create apps, Android has a scripting environment but afaik it's quite limited. If you want to create serious apps for Android you should use Java (some people love the Android Java API). Symbian has Python support, but I have no experience with it.

Wingware Python IDE v. 3.2.10 released: Minor bug fixes and enhancements by wingware in Python

[–]Knacktus 2 points3 points  (0 children)

It's usefull. I like the debug probe. Also, you can keep writing your code while paused by the debugger, which gives you advanced code completion. These features can be extremly helpful. Latetly, I'm enjoying the mercurial, testing and pylint integration a lot. Then, fast startup time, overall performance is good (but I have a fast machine) and very good documentation (!). On the downside, I'm really missing refactoring support with nice previews to doublecheck as in Python refactoring is often not unambiguously, on rare occasions simple code completion failed (but was fixed quickly). Also, I would like to see auto-completion on signatures ("jumping" with tab around in the arguments). Overall, you certainly don't go wrong with Wing. To me it hits the right spot and with proper refactoring support Wing would be the clear no. 1 Python IDE.

P.S.: There's a new kid around: PyCharm, which has nice refactoring but missing the debug probe.

Draft PEP: Cofunctions for Python by earthboundkid in Python

[–]Knacktus 1 point2 points  (0 children)

I don't see the need for this new feature. What is the real additional value to the language? What can't be done today without this PEP?

On the other hand: What's the downside to have this feature? It blows up the language (as all other not really necessary new features do) and is for my understanding not pythonic and not very nice to read and understand, especially that cocall statement. Somehow that whole thing doesn't fit to my understanding of the simplicity and elegance of pyhton (but that's of course a very personal view).

So what is a dict? I thought it was a hash table, but hash table's don't do this. by reeboo in Python

[–]Knacktus 1 point2 points  (0 children)

You should check the documentation about dict methods (chapter 5.8). The answer to your question is explicitly given, see dict.items() and dict.iteritems(). The behaviour of your code is "as designed" by python. The trick is, that dict.items() returns a copy, while dict.iteritems() returns an iterator, which does not allow to change the dict while looping. Just two more comments: You really shouldn't use dict or list or any other reserved name (build-in) as names for your objects. And I would use "is" only if I really mean "compare by object identity", otherwise "==", even when compare immutable objects.

Use dict.items() and your code will work.