Domain: python.org
Stories and comments across the archive that link to python.org.
Comments · 1,513
-
Not news in any way
This has been known for donkey's years. Guido has been talking about this compatibility break since the 90s. The changes were laid out in detail in PEP 3000, first published in 2006. They have already released two alphas. A conversion tool to automatically make some of the required changes (such as changing print statements to print() function calls) already exists.
-
Not news in any way
This has been known for donkey's years. Guido has been talking about this compatibility break since the 90s. The changes were laid out in detail in PEP 3000, first published in 2006. They have already released two alphas. A conversion tool to automatically make some of the required changes (such as changing print statements to print() function calls) already exists.
-
in fact, such a utility already exists
http://svn.python.org/view/sandbox/trunk/2to3/
And, as others have stated, there'll be the 2.6 branch, which will be backwards compatible.
Or, in other words, the story is stupid and misleading. -
For more info, check out
The "What's New for 3.0?" article over on python.org:
http://docs.python.org/dev/3.0/whatsnew/3.0.html -
Re:Ray Tracing
hmmm every IDE I use that has a python mode translates tabs to spaces.
I work in a corporate environment - so we have defined spaces to be the standard - and this follows the python recommendation for new projects per pep-0008.
Sounds like a non-issue to me. -
Transition learning works best
If there is anything that I have learned in the past 10 years of writing code (since before high school), I have learned that the following sequence of learning is ideal.
1. HTML/CSS/JavaScript - Get acquainted with web programming. None of that Nambly-pambly BBCode crap that they offer on MySpace.
2. Python - I wish I had got into this before I learned C++. Good for learning about shells if you decide to switch to Linux or BSD, especially if you decide to create your own website through a webhosting provider that uses SSH.
3. C/C++ and/or PHP/MySQL. - Playing with the big-boy toys at this point. The safety net that points 1 and 2 provided has been lowered.
4. OpenGL or Assembly Programming. - Really advanced programming! OpenGL is high-level. Assembly is low-level.
From there on, the sky is the limit. -
Re:Merry Christmas!
I'm very happy to see something productive out of the Parrot community. They've promised some great things, and we've been waiting a long time to use their offerings. Some people in the community (see article below) have started to doubt the Parrot project's usefulness, but maybe this cool Perl6 development will make them re-think their stance.
Will Parrot ever truly deliver? (http://pinderkent.blogsavy.com/archives/124)
Earlier today I was reading an article about Parrot. Parrot is, as stated on the projects Web site, a virtual machine designed to efficiently compile and execute bytecode for dynamic languages. Parrot currently hosts a variety of language implementations in various stages of completion, including Tcl, Javascript, Ruby, Lua, Scheme, PHP, Python, Perl 6, APL, and a
.NET bytecode translator.So Parrot does sound like an interesting piece of technology. Its understandable how a common runtime for scripting languages could prove beneficial. But will it ever be a platform suitable for serious, production usage? I have my doubts.
Parrot has been under active development for quite some time now. The initial 0.0.1 release was made on September 10, 2001. During 2007, weve seen a release every month or so. So a lot of effort has been put into Parrot over the past six years. It has surpassed one of the major stumbling blocks with many Open Source projects, in that it has managed to build at least some development momentum. Unfortunately for its supporters, Parrot has never really seemed to catch on. I think there are a number of reasons for this.
Stability is probably the first problem. I dont mean stability in terms of the runtime crashing, or anything of that sort. Im talking about concept stability. There has always seemed to be a relatively large amount of change between releases. While this is good, in that there are improvements being made and new ideas being implemented, this causes problems for users who want to build reliably upon Parrot. Individuals and businesses often do not, or cannot, invest the time and effort to track a continually-moving target like Parrot.
The language implementations for Parrot, while many in number, have been of limited use. Looking at the status messages of some of the most promising and practical language implementations shows why this might be the case. Such messages include:
- Incomplete - but all examples and test cases are working. (Amber for Parrot)
- Most of the samples work. (BASIC/compiler)
- Has been broken for a long time. (BASIC/interpreter)
- Parser is pretty complete. Generates PIR for basic Ruby programs (Cardinal, Ruby CVS Head 1.9 implementation)
- Functioning, all samples working, lacks IO routines (Cola)
- Working for some simple forms. Due to some broken features, most of the bootstrapping code has been commented out. (Common Lisp)
- Functioning for handcrafted test cases. Loading frozen state is currently broken. Far from complete. (Parrot m4)
- This project has been abandoned. Any takers? (Pint, an experimental PHP implementation)
- Passes nearly 25% of tcls (lightly converted) test suite, using a Test::More like harness. (Tcl)
So while there are many interesting language implementation projects for smaller or more obscure languages that have reached further stages of completion, the ones that were most likely to be of practical use seem to be lacking. Now, this is understandable. Maintaining a suitably complete Ruby, Python, Perl or Tcl implementati
-
Re:BFD?Python does NOT lack library support. It comes with many built-in modules [1], and there are plenty of extra modules available online
[1] - http://docs.python.org/modindex.html
Python does NOT lack expressive power either. Things like list comprehensions are beautiful:
>>> [str(round(355/113.0, i)) for i in range(1,6)]
['3.1', '3.14', '3.142', '3.1416', '3.14159']
http://www.network-theory.co.uk/docs/pytut/ListComprehensions.html
Both powerful and easy to remember without needing any extra documentation -
Re:You, Sir, are stupido.
Except that he isn't limiting how you can program in Python. lambdas are still in Python 3 if you really want to use them. But for most applications of lambda in Python, list comprehensions are superior. They're not only easier to read, but also provide better performance.
Considering the vast gulf of language flexibility between Python and actual "bondage and discipline" languages such as Pascal or OCaml, the notion it should be counted among them is difficult to take seriously.
-
Re:One word rebuttel to TFA
Python has been ported to both of those systems, actually. And a fairly large number of others. I'd say they have their bases covered. There's no version for, say, PaulOS. But I think it'll squeeze by.
http://www.python.org/download/other/ -
Good and bad newsThe good news is that they are doing in a free way what the Matlab Co. has been charging (a lot!) for, which is distributing an API to use all those libraries the US Federal Government labs give away for free.
The bad news is that they are wasting their time using the Matlab syntax, while there is a much better alternative for doing exactly the same thing. Python is universal, if there's anything you can do with a computer, the simplest way to do it is with Python, so why do it the hard way? -
Re:There's not much hope for the C++ committee
Not sure about the C++ problems you mention, but in Python there is Kamaelia and a dozen of other libraries targeted for creating scalable parallel systems.
Btw. an earlier post mentions the upcoming QT concurrency framework - if Trolltech is able to pull this out on all C++ platforms they support, then it kind of justifies Stroustrup's position, isn't it?
-
Re:Why I don't trust Python
The question is, would you also be ok with python being even slower than it is now?
Yes. Using Python is already a trade-off about it being easier to write code over it being optimally efficient.
I am pretty sure (without having searched for it) that an 'exact' class exists for Python, where all math is handled internally, perhaps base 10 to avoid strange rounding errors.
Something like that. The Demical class was created to overcome this problem. In fact, reading from PEP 327, it's clear there's another major problem with Python's "out of the box" floating point support. As it states (from Alex Martelli), "Python (out of the box) doesn't let you have binary floating point numbers with whatever precision you specify: you're limited to what your hardware supplies."
Considering that Python was designed to run on all varities of hardware, having such a core variability with floating point numbers really makes the native floating point support rather risky to ever use. Python's tutorials even include an Floating Point Arithmetic: Issues and Limitations whose final answer basically reduces to: Pathological cases exist, but use clever % formatting to hide it. Personally, I'd be happier if they used Decimal for floating point arithmetic with "sane" defaults (and yes, I'm punting on what exactly "sane" defaults would be).
-
Re:Why I don't trust Python
The question is, would you also be ok with python being even slower than it is now?
Yes. Using Python is already a trade-off about it being easier to write code over it being optimally efficient.
I am pretty sure (without having searched for it) that an 'exact' class exists for Python, where all math is handled internally, perhaps base 10 to avoid strange rounding errors.
Something like that. The Demical class was created to overcome this problem. In fact, reading from PEP 327, it's clear there's another major problem with Python's "out of the box" floating point support. As it states (from Alex Martelli), "Python (out of the box) doesn't let you have binary floating point numbers with whatever precision you specify: you're limited to what your hardware supplies."
Considering that Python was designed to run on all varities of hardware, having such a core variability with floating point numbers really makes the native floating point support rather risky to ever use. Python's tutorials even include an Floating Point Arithmetic: Issues and Limitations whose final answer basically reduces to: Pathological cases exist, but use clever % formatting to hide it. Personally, I'd be happier if they used Decimal for floating point arithmetic with "sane" defaults (and yes, I'm punting on what exactly "sane" defaults would be).
-
Re:Forgetting that it's Microsoft for a minute...
What exactly is "bad" about JQuery?
Bad GUI standards? What does that have to do with JavaScript? If you can name a GUI standard within a single language that it better, please let me know. Certainly you don't mean Python's GUI since there's no standard there at all. It's the same story with C, C++, Ruby, Perl, Pascal, and all of the others. A notable exception is Java (aside from the AWT/Swing duplication), and a large number of people hate that. Name something better.
What's wrong with DOM/CSS, especially when there is nothing about JavaScript itself that's intimately tied with DOM/CSS. There's no reason within the language's constraints that an applications programmer couldn't integrate JavaScript with GTK+ or Qt.
As for debuggers, have you even used Venkman? Or are you still using alert() calls for your debugging? -
Re:Can it...
Probably, but I wouldn't be surprised if it fails on 0.1
-
Re:sad
>>> [print i for i in range(30, 0, 1)]
File "<stdin>", line 1
[print i for i in range(30, 0, 1)]
^
SyntaxError: invalid syntax
>>>You hit the "print is a statement" design flaw. If you were thinking p3k, then it requires parentheses.
-
Re:losing the print statementyou can't just type "map(print, listname)" or anything else as compact and "clean". And in Python 3k you won't be able to do that either, because Map now returns an iterator object and that would result in no function actually being called unless the iterator is used. One good solution would be to:
[print(line) for line in listname]
-
Re:Strange Guido's reply
Python 3000 is fixing that issue with PEP 3104: http://www.python.org/dev/peps/pep-3104/
-
Re:Python2Perl?
I want to run Python scripts in my Perl environment because, among other reasons, Python's runtime has the problems mentioned in this Slashdot story summary. And I don't want to have to install and maintain a Python runtime, or learn its peculiarities. But I do want all its functionality, including the Python scripts embedded in lots of my OS. During my transitions from Ubuntu 6.4 to 6.10 to 7.4, the Python libraries and installs got very corrupted, including some apps using different versions of Python side by side, getting entangled (not to mention the bloated redundancy). So I'd like to just have a wrapper for Perl that can handle all those Python scripts.
Python claims to "run everywhere", but I can't find an actual list. I'd be surprised if it actually runs on the extremely complete range of platforms Perl actually runs on. If Python scripts actually ran on Perl engines, then it would. -
Re:Syntactic whitespace* regular {} blocks instead of semantic whitespace I don't think this fits particularly well into Python's philosophy. {} are largely redundant, and whilst whitespace seems to cause you some issue, I've never had a problem with it. Lamdba's might benefit from this, but any multi-line lambda should be indented anyway, so you might as well use whitespace for that, too. * non-trivial lambda-statements This would be on my personal wishlist. Maybe some syntactic sugar that would turn this:
on_connect do(self):
Into this:
self.connected = Truedef on_connect_block(self):
* explicit scoping of variables like with the "var"-keyword in Javascript The nonlocal keyword in Python 3000 goes some way to rectifying this. It's not as neat as "var" in my opinion, but I can see why they shied away from explicit declarations. * ++ and its friends x += 1 is more explicit, and I don't think that many Pythonists would welcome an increment operator. * ternary statements Already in Python 2.5:
self.connected = True
on_connect(on_connect_block)x = a if b else c
* switch statements, preferably supporting strings. I tend to agree with you. A "switch" or "case" statement would be nice, especially if it was like the one in Ruby. -
Re:Compiled Python 3000?I love Python, but it's often just too slow!
Try this, in increasing order of work required (and likely reward).
One: try Psyco. It may give you the bump you needed, or it may do nothing, but since it's so easy you might as well try it.
Two: write faster code. Basically, let Python do the work for you by handing off as much processing as possible to the language. For example, this:
output = []
for value in input: output.append(transformfunc(value))is longer to type and possibly vastly longer to execute than:
output = [transformfunc(value) for value in input]
since the latter knows how many values it needs to pre-allocate memory for, and can perform the operations in a tight C loop instead of evaluating a much slower Python loop.
Three: profile. Once you're sure that you've written good algorithms are aren't re-implementing large bits of Python in Python, run a profiler to find out where you can direct extra attention. Some people do this before #2, but I don't touch it until I know that everything else is right.
I wrote a "diff" function in native Python that searches two many-gig files for lines that appear in one but not the other. Said function is IO bound on a SCSI-320 RAID-0 system with 4 15K RPM drives, and typically uses about 20% CPU for the duration. You can write slow Python, but that doesn't mean that you have to.
-
Re:Compiled Python 3000?I love Python, but it's often just too slow!
Try this, in increasing order of work required (and likely reward).
One: try Psyco. It may give you the bump you needed, or it may do nothing, but since it's so easy you might as well try it.
Two: write faster code. Basically, let Python do the work for you by handing off as much processing as possible to the language. For example, this:
output = []
for value in input: output.append(transformfunc(value))is longer to type and possibly vastly longer to execute than:
output = [transformfunc(value) for value in input]
since the latter knows how many values it needs to pre-allocate memory for, and can perform the operations in a tight C loop instead of evaluating a much slower Python loop.
Three: profile. Once you're sure that you've written good algorithms are aren't re-implementing large bits of Python in Python, run a profiler to find out where you can direct extra attention. Some people do this before #2, but I don't touch it until I know that everything else is right.
I wrote a "diff" function in native Python that searches two many-gig files for lines that appear in one but not the other. Said function is IO bound on a SCSI-320 RAID-0 system with 4 15K RPM drives, and typically uses about 20% CPU for the duration. You can write slow Python, but that doesn't mean that you have to.
-
Re:documentation
It is insulting that you say that, and you deserve being modded down. I started learning Python with the official tutorial, which is completely clear and exposes you all the language features in an afternoon. There is also a module index that contains the documentation for the different modules, exposing the objects, functions and constants from every module, as well as a list of modules. There's the library reference, that exposes all the modules (again, grouped by topic), all the built-in functions, data types and operations, etc. There is also a document describing the syntax in detail. There is also a document explaining how to embed and extend Python. Complain about its syntax, the way it does some things. Whatever you like to whine about. However, the Python documentation is excellent. No discussion allowed, coward.
http://www.python.org/doc/ -
Re:Sounds familiar.
So why does Python scatter its standard libraries across half a dozen packages?
The Python standard library is actually many dozens of packages. If you have a suggestion for a way to improve library design, I'm sure we'd all be happy to hear it.
Probably one of the biggest problems beginners have with Python is that they can never remember whether something is in os, os.path, sys, string, re, or whether it's maybe just a method on an object, or maybe it changed in some recent release.
os / sys: OK, this one is a bit weird (similar to Java's System/Runtime weirdness)
os.path: dealing with paths
re: dealing with regular expressions
string: you basically never need this; it's a holdover from Python 1.something, and string instances now have most of the interesting functionality themselves
And you can't just safely import everything from those packages either.
Sure you can. It'll cause a lot of extra files to be loaded when your program starts, but it won't break anything. Later you can run pylint on your program, to get a list of packages you're not using, and remove those imports. -
Re:documentation
One example says more than enough:
http://docs.python.org/lib/module-SocketServer.html
I had to google a lot of missing info to be really able to use SocketServer. -
Re:documentation
That's a very unusual complaint about Python, which has great documentation. http://docs.python.org/ has info about everything bundled with Python (this is big -- "batteries included"). You can also get help from the Python interpreter by calling the built-in help() function, which takes a module, class or method name as a parameter. help() also works for many third party Python extensions.
I am surprised that none of your searches took you to docs.python.org. But perhaps you were using lots of third party extensions with their own documentation. -
Re:documentation
Huh. One of the things that really attracted me to Python was the (perceived) quality of the Web documentation. The Python Tutorial and Python Reference Manual are very complete and provide an excellent high-level overview of the language, something which can be rather difficult to come across in, for example, the land of Perl. Granted, the Library Reference could be stronger, but I can still usually find what I need in there; and if not, it's easy enough to invoke dir() and view the __doc__ string on any objects of interest from Python's command line.
I guess it's just a matter of personal taste. But for what it's worth, I found it much easer to pick up Python without resorting to any third-party books or reference materials than to start fresh with either Ruby or Perl.
-
Re:documentation
Huh. One of the things that really attracted me to Python was the (perceived) quality of the Web documentation. The Python Tutorial and Python Reference Manual are very complete and provide an excellent high-level overview of the language, something which can be rather difficult to come across in, for example, the land of Perl. Granted, the Library Reference could be stronger, but I can still usually find what I need in there; and if not, it's easy enough to invoke dir() and view the __doc__ string on any objects of interest from Python's command line.
I guess it's just a matter of personal taste. But for what it's worth, I found it much easer to pick up Python without resorting to any third-party books or reference materials than to start fresh with either Ruby or Perl.
-
Re:documentation
Huh. One of the things that really attracted me to Python was the (perceived) quality of the Web documentation. The Python Tutorial and Python Reference Manual are very complete and provide an excellent high-level overview of the language, something which can be rather difficult to come across in, for example, the land of Perl. Granted, the Library Reference could be stronger, but I can still usually find what I need in there; and if not, it's easy enough to invoke dir() and view the __doc__ string on any objects of interest from Python's command line.
I guess it's just a matter of personal taste. But for what it's worth, I found it much easer to pick up Python without resorting to any third-party books or reference materials than to start fresh with either Ruby or Perl.
-
Re:More than one side to this one...
Indeed:
Backslash can be used to allow continuing the program line past a carriage-return, but you almost never have to use it. Python is smart enough to do the right thing when it sees an open bracket, a comma separated list, and a carriage-return.
-
Perfect timing! Meet Nick.
-
Re:Might I Suggest...My preference would be files in XML. Now, say what you will about it, but XML is one of the few methods of storing data that is both easily human & machine readable. So is a delimited table such as fstab, and so is INI. What we really need isn't standardization on XML as much as a schema: a solid definition of each file's syntax and some level of its semantics. We'd need a schema with XML anyway; otherwise, you're just editing a DOM tree and likely making it inconsistent.
-
Re:Might I Suggest...My preference would be files in XML. Now, say what you will about it, but XML is one of the few methods of storing data that is both easily human & machine readable. So is a delimited table such as fstab, and so is INI. What we really need isn't standardization on XML as much as a schema: a solid definition of each file's syntax and some level of its semantics. We'd need a schema with XML anyway; otherwise, you're just editing a DOM tree and likely making it inconsistent.
-
MS ignores Python style guide
It is just sad to read the Python implementation of this functionality. Almost nothing is written according to the Python Style Guide. Weird "__foo"-variables can be found, then it's not Python2.3 compliant because of ONE silly "staticmethod", many "getters" and "setters" which are just useless in this script. If MS wants to show their code to the scripting community, they should at least make it pretty and according to the language's coding standards. But maybe that is their understanding of "pretty". Who knows.
-
Re:Java Programmers == Typists
Python is not compiled. Perl is not compiled. Javascript is not compiled. These languages are read in, line by line, and executed.
Wrong, wrong and wrong. The other AC mentioned Parrot and Tamarin, but it's not even necessary to look that far ahead. The current canonical implementations of Perl, Python and JavaScript all compile the program to bytecode before execution.You fail it.
Right back atcha. -
Re:Heh heh.Not much chance they will merge a Python project (bittorrent 5.0) with a C++ project (uTorrent) if you ask me.. O RLY? Every copy of Python comes with docs describing how to embed the Python interpreter in a app written in C or in C++.
-
Re:Equivalent PythonBut I like pretty. After using C++, Java, PHP, and ugghhh...VB for a while, I finally got around to learning Python...and I'm hooked. I haven't gotten to the point of handling command line options in the 2 wxPython apps I'm working on. When I saw the C++ code, I looked at 3 Python examples and synthesized the Python version. And posted it, cause it was so pretty. If, on the other hand, you were more interested in demonstrating how a Python program with
nice command line handling might talk to C or C++ for some function, I applaud you and
also recommend that you also explore:
* Boost::program_options
* Boost::Python
* SWIG
* Shed Skin (Python -> C++ compiler) ...have fun! Nah to do that I'd have to import the ctypes library. It would have added a few LOC. I'm interested in integrating C/C++ code if necessary for performance, but I haven't focused on that yet, preferring pure Python for its simplicity.
But, similar to Shed Skin, PyPy is pretty nifty. It's currently Python written on top of Python, but you can "translate" the high-level code to C, .Net, JVM, even Javascript (!). It's very similar to the pseudo-code and code generators in books like the Pragmatic Programmer. Crazy. -
Re:Seems strange to me
If you're interested in Python Web development, you'll find a host of network and Web specific frameworks. I suggest checking out Twisted, Zope, Plone, and Django for examples. You may also find some other goodies when you explore the Python Cheese Shop.
Of course, no mention of Python can pass by without someone bringing up Ruby on Rails, so I'll just do that right now.
:) However, I have no experience with it whatsoever, so I'll withhold any opinion. -
Damn!-Group Hug!
"We would still be thankful for RMS though. "
Thank you, Richard!
Thank you, Richard!
Thank you, Richard!
Thank you, Richard!
Thank you, Richard!
Thank you, Richard!
Thank you, Richard!
Thank you, Richard! And happy birthday! -
M-x untabifyPaper is much more convenient in the car and/or the bathroom, however. Then can you normalize the whitespace before printing it? Python Style Guide recommends M-x untabify if you use Emacs. I presume xe's not a Lisp programmer, given the closing marker phobia? What you see as phobia I see as a devil's advocate viewpoint to your philia. And no, I have never programmed in Common Lisp, but I have programmed in Scheme. Hmmm, I missed the ability to use spaces instead of tabs, perhaps that's changed from early Python days? Python Style Guide states: "Use the default of Emacs Python-mode: 4 spaces for one indentation level. [...] Never mix tabs and spaces. The most popular way of indenting Python is with spaces only."
-
M-x untabifyPaper is much more convenient in the car and/or the bathroom, however. Then can you normalize the whitespace before printing it? Python Style Guide recommends M-x untabify if you use Emacs. I presume xe's not a Lisp programmer, given the closing marker phobia? What you see as phobia I see as a devil's advocate viewpoint to your philia. And no, I have never programmed in Common Lisp, but I have programmed in Scheme. Hmmm, I missed the ability to use spaces instead of tabs, perhaps that's changed from early Python days? Python Style Guide states: "Use the default of Emacs Python-mode: 4 spaces for one indentation level. [...] Never mix tabs and spaces. The most popular way of indenting Python is with spaces only."
-
Tabs vs. spacesMy objection to Python's choice is neither the dependence on indenting, which is fine, nor the lack of block-end keywords. Rather, it's the dependance on characters that are not visually distinguishable. I can produce two visually equivalent texts, one of which is a valid Python program and the other of which is just text -- If I do the indenting with space characters, instead of tab characters, it's not valid. Guido uses 4 space characters. IDLE, the editor that comes with Python for Windows, uses 4 space characters. If your favorite text editor cannot be set to visually distinguish a horizontal tab character from a space character, such as by drawing the keyboard symbol for tab in light gray, then it has a defect and should be repaired or replaced. You don't mix tabs with spaces for the same reason you don't mix Do While
... Loop with While ... Wend. I understand why tabs are "better", but that doesn't change the fact that I can't find the error by reading the printed version of the program. By "printed" do you mean on paper? How often do you read programs on paper, as opposed to in a purpose-built editor? -
Re:getting tired of Java = Python!Python. PyQt or wxPython (or PyObjC+Cocoa if you are OS X'y) OR Jython + SWT or Swing.
I'll be flamed for sure (espec. by the usual Ruby suspects), BUT... I was once where you are now, and I ain't lookin back.
;)My 2 cents anyhow, for what they're worth (...wait...2 cents?)
-
Re:Answers
Hmm. It seems to have changed recently (for some value of recently).
See this mailing list post for a copy of it as it was a few years ago. -
Re:Emacs has excellent documentation
As far as having to learn Elisp goes, one thing I can think of specifically is folding. Vim has this built in. That doesn't seem to be the case with Emacs. I searched Google and the best I could come up with was a bunch of Elisp. I didn't want to paste a bunch of code without having any idea how it worked.
To be fair, Emacs can do things that Vim cannot (e.g. a built-in shell, which is handy sometimes) but there are also other Emacs problems for which the solution seems to be "use this mode and paste in this Elisp code." -
Re:If you already used CVS...
git-svn looks very interesting, as it should provide a way to add distributed scm capabilities on top of svn, where you're working with projects that use svn. It'd be useful even just for the ability to take partial local history and keep local modifications under revision control. I wonder if there's anything similar for Mercurial...
http://cheeseshop.python.org/pypi/hgsvn -
Apply a limited threading paradigm to processes
Having written MPI and Linda work-alike libraries, developed parallel and distributed systems, and being a heavy user of threads and remote procedure calls (via xml-rpc), I will say that the general issue that all of these different systems try to handle is one of API. How does one have data X handled by function Y in thread/process Z. In the realm of threading, we use queues with locks. MPI/PVM/Linda/XML-RPC all use sockets to pass data between processes, and all but Linda requires that you specify the destination process explicitly.
One interesting recent development is the processing package for Python: http://www.python.org/pypi/processing/ . The idea is that you create processes like you would threads, then use shared queues, key-value mappings, etc., to pass data between the processes like you would threads. By sticking with generalizations that are seen to be 'easy' to understand and use (primarily queues), they bypass the majority of the difficulty people have when using threads and processes. Of course it doesn't hurt that the data transfer is pretty fast.
The only limiting factors with the particular implementation is that it relies on fork in *nix, and the transfer of code as data in Windows (which isn't generally possible for all languages, especially with the NX processor extension). If Windows had a usable fork, and if there was a 'fork across machines' (think mosix), many of these discussions would result in "just program it like you had a thread and use shared queues and the processing package for your language". -
Does anyone actually use Python?"I guess not many people tried even installing the Windows version much less use it."
Blender 2.43 needs Python 2.4.4.msi
You also have to set some enviromental variables in Windows as well.Python Path For Windows 2k and XP, Python20 !!
Install Python in the root of your C. i.e. C:\Python20\
Go to your start button, go up to My Computer and Right click it and go to properties.
Click on the Advanced tab, click on Environment Variables button at the bottom.
Below the System Variables box, (the second box), hit New.
In the Variable Name box, type PYTHONPATH
In the Variable Value box, type this exactly:
C:\PYTHON20;C:\PYTHON20\DLLS;C:\PYTHON20\LIB;C:\PY THON20\LIB\LIB-TK
You can copy and paste that.
Hit OK repeatedly.
Reboot.
Adjust for your particular version.
You'll know you've done correctly when Blender indicates it's found it. -
Re:Examples of PHP inconsistency and performance
Oh, you forgot:
5,343 built-in functions, assuming all the standard modules are installed. By comparison Python has 71. In other words, you have to keep track of about 75 times the number of name collisions when dealing with PHP versus Python.
This could be almost instantly fixed if they'd add namespaces to PHP, but that keeps getting shot down.