Turn $6 into $6.000

2005-10-04 Thread Ville
HOW TO TURN 6 BUCKS INTO 6 THOUSAND! (WORLD WIDE) WARNING: READING THIS WILL CHANGE YOUR LIFE! I found this on a Bulletin board and decided to try it. A little while back, I was browsing through newsgroups, just like you are now, and came across an article similar to this that said you could make

Re: How to run PyOS_InputHook from python code (i.e. yield to event loops)

2008-09-13 Thread ville
Sean DiZazzo <[EMAIL PROTECTED]> writes: >> My eventual code would be something like: >> >> launch_process_in_thread('bzr pull') >> >> while not is_done: >>   pyos_inputhook() >>   time.sleep(0.1) >> >> print "Done!" > > I'm still recovering from a hangover, so don't quote me. I think you > want

Python reliability

2005-10-09 Thread Ville Voipio
forever (at least a year without a reboot). Is the Python interpreter (on Linux) stable and leak-free enough to achieve this? - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

wxPython in a PDA

2005-10-09 Thread Ville Voipio
Does anyone know of an inexpensive PDA which would run wxPython? The availability of a conventional (wired) Ethernet would be nice, as well (e.g., using a CF adapter). TIA, - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python reliability

2005-10-10 Thread Ville Voipio
many problems before. Adding the Python interpreter adds one layer on uncertainty. On the other hand, I am after the simplicity of programming offered by Python. - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python reliability

2005-10-10 Thread Ville Voipio
ou did, would it matter? What's more important is > the state of the operating system. (I'm assuming that, with a year uptime > the requirements, you aren't even thinking of WinCE.) Not even in my worst nightmares! The platform will be an embedded Linux computer running

Re: Python reliability

2005-10-10 Thread Ville Voipio
o not try apply any adventorous programming techniques. - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python reliability

2005-10-10 Thread Ville Voipio
is not flying; downtime does not kill anyone. I just want to avoid choosing tools which belong more to the problem than to the solution set. - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python reliability

2005-10-10 Thread Ville Voipio
ibility (vs. C). But choosing a tool which is known to be bad for the task is not a good idea. - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python reliability

2005-10-10 Thread Ville Voipio
to debug the software in the quiet, air-conditioned lab than somewhere in a jungle on the other side of the globe with an extremely angry customer next to you... - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: UI toolkits for Python

2005-10-14 Thread Ville Voipio
exe for Windows and dmg for OS X) seems to work, as well. So, the installation should be easy for the user. - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python! Is! Truly! Amazing!

2005-01-03 Thread Ville Vainio
it is now. Lisp had it's heyday, while pure FP languages didn't even have that much. Hey, it's 2005, I don't think we've used up our yearly Lisp flamewar quota yet. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Ville Vainio
to provide you accurate code completion. Also, Python is not a monolithic entity. Guido certainly isn't going to write a better IDE for Python, so the time used on language features isn't removed from improving the infrastructure around the language. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Ville Vainio
>>>>> "Paul" == Paul Rubin <http://[EMAIL PROTECTED]> writes: Paul> Ville Vainio <[EMAIL PROTECTED]> writes: >> Also, Python is not a monolithic entity. Guido certainly isn't >> going to write a better IDE for Python, so the

Re: Python evolution: Unease

2005-01-04 Thread Ville Vainio
-contained free software Paul> documentation is supposed to mean. I'm not sure the free software documentation is going to evolve to be more self-contained; the exact opposite is more likely. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-05 Thread Ville Vainio
>>>>> "Paul" == Paul Rubin <http://[EMAIL PROTECTED]> writes: Paul> Ville Vainio <[EMAIL PROTECTED]> writes: >> To me, this seems to be the job for the Fedora maintainers, not >> Python maintainers. If something essential is

Re: Securing a future for anonymous functions in Python

2005-01-10 Thread Ville Vainio
QOTW material, unless you stole this from someone else :-). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Port blocking

2005-01-10 Thread Ville Vainio
or fee-paying clients. Still, if the consumption happens over the internet there is almost 100% chance of the communication being prevented by firewalls. This is exactly what "web services" are for. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Port blocking

2005-01-10 Thread Ville Vainio
so act as servers, e.g. when they register a callback object and expect the "server" to invoke something later on. This is possible (and typical) with CORBA at least. ORBs can use the same client-initiated connection for all the traffic, but this is probably somewhere in the gray area. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: OCAMl a more natural extension language for python?

2005-01-17 Thread Ville Vainio
ndering whether there's not a Jelle> more pythonic way of extending python. And frankly I think Jelle> there is: OCAML For many tasks the point of "extending" python is to gain access to libraries that have a C/C++ API. Extensions that merely provide a faster way to d

Re: [OT] Good C++ book for a Python programmer

2005-01-22 Thread Ville Vainio
ive C++" and "More effective C++" are also great to learn about all the nasty gotchas that your Python experience might make you neglect. They are also certain to deepen your appreciation of Python ;-). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: IPython Article on O'Reilly's ONLamp site

2005-01-28 Thread Ville Vainio
ns, but they are associated with each profile. @POR078[testrunner]|24> %bookmark tr @POR078[testrunner]|25> cd /prj/SyncML/doc/ @POR078[doc]|26> %bookmark smldoc @POR078[doc]|27> Exit (IPython exits, I start a new session) @POR078[environmentswitch]|1> cd tr (bookmark:tr) -> C

Python for S60 mentioned in a mainstream Finnish e-news website

2005-02-02 Thread Ville Vainio
developer friendly way to develop mobile applications, says Director Lee Epting from Forum Nokia. Nokia believes that Python for Series 60 is a good fit for developing prototype- and proof-of-concept apps. The company characterizes the language as efficient and relatively easy to learn. -- Ville Vain

Re: Python for S60 mentioned in a mainstream Finnish e-news website

2005-02-02 Thread Ville Vainio
;-). (Yeah, ctypes will probably be a problem because of the way Symbian handles DLLs) -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for S60 mentioned in a mainstream Finnish e-news website

2005-02-02 Thread Ville Vainio
e symbol name (in order to keep the size small). Linker finds the ordinals from the .LIB file that corresponds to the DLL. (Someone who knows better might want to correct me if I'm wrong). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop until condition is true

2005-06-22 Thread Ville Vainio
the first place, given that everyone can identify the idiom immediately. It's 4 keystrokes less. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: *Python* Power Tools

2005-06-22 Thread Ville Vainio
could evolve gradually, and reach a useful stage (i.e. have several handy tools) quickly. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on Guido's ITC audio interview

2005-07-01 Thread Ville Vainio
r editing if I Timothy> wished whilst still having everything readily available. Eclipse allows this as well. ctrl+m is maximize/unmaximize. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on Guido's ITC audio interview

2005-07-07 Thread Ville Vainio
t; What line of work is not supported in eclipse? C++ programming for Symbian OS. Editing the C++ code works, debugging doesn't, at least yet. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

wxPython and window sizing

2005-09-15 Thread Ville Voipio
e and the textbox by using the SetMinSize() method, but this does not seem to affect anything. Already when the window is shown the upper pane (i.e. the notebook curves) is smaller than (300,200) set in the code. TIA, - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mai

Re: wxPython and window sizing

2005-09-15 Thread Ville Voipio
ng the sizes myself or making any extra handlers, if the existing infrastructure can handle what I want. - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: That horrible regexp idiom

2005-02-10 Thread Ville Vainio
is only a Stephen> little confusing[1]! I'm always confused by for-else (lack of practice), but isn't the else clause going to be always executed when there is no break in the for suite? -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] IPython 0.6.11 is out.

2005-02-16 Thread Ville Vainio
Warning - if you are upgrading and have an old pysh.py dangling around in $HOME/.ipython, be sure to delete it. The old version is incompatible with the new ipython. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: [Fwd: Re: [Uuu-devel] languages] <-- Why Python

2005-02-17 Thread Ville Vainio
for heaps of Python vs. Lisp material. Go ahead and learn Lisp - I guess you'll quickly realize that perfectly rational people may well choose Python for reasons other than "not knowing Lisp". -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: [Fwd: Re: [Uuu-devel] languages] <-- Why Python

2005-02-20 Thread Ville Vainio
quot;cleaner" in a theoretical sense, but noi in practical sense. Donn> I don't know, I'm just thinking that while Python's notation Donn> might be just fine for people who've gotten here the way Donn> most of us have, it's not obvious from this

Re: [Fwd: Re: [Uuu-devel] languages] <-- Why Python

2005-02-21 Thread Ville Vainio
;re arguing about the wrong thing. In a sense C is the native language of Unix and Windows (system calls are in C). It might make sense to expose the OS as Python objects. I work w/ Symbian OS in my day job, with the OS API in C++. I'm not sure whether it's a good idea or not, but at

Re: [Fwd: Re: [Uuu-devel] languages] <-- Why Python

2005-02-21 Thread Ville Vainio
s. I don't know what the current status is - CORBA has always seemed more than fast enough for me. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Attaching to a Python Interpreter a la Tcl

2005-02-23 Thread Ville Vainio
i/o of the interpreter to a socket to which you connect via, say, telnet. There are libs that do such a thing, I even remember trying one out myself, but I couldn't find it quickly enough from google. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Best IDe

2005-02-24 Thread Ville Vainio
ppose Yeah, SPE seems to be quite a solid offering - but pydev (the Eclipse plugin) seems to be getting there really fast also. It also has a debugger that SPE lacks. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: wanted: C++ parser written in Python

2005-02-25 Thread Ville Vainio
mplement myself, if nothing is available. Check out http://pyparsing.sourceforge.net/ Before you start implementing one yourself. Regexp solution would probably be a bit flakier. And do share your results when you get some; I'm in need of a c++ parser myself. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Wishlist item: itertools.flatten

2005-03-11 Thread Ville Vainio
348 but something like this would be handy in itertools as well. It seems trivial, but I managed to screw up several times when trying to produce my own implementation (infinite recursion). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Wishlist item: itertools.flatten

2005-03-11 Thread Ville Vainio
hristos> on library (itertools module in this case) expansion Christos> when talking about such useful *building blocks*. Yeah - esp. in the case of flattening. If it was deemed useful enough to be the default behavior in perl (which is admittedly braindamaged), it should surely warrant b

Re: Licensing Python code under the Python license

2005-03-12 Thread Ville Vainio
... Isn't MIT license even shorter and simpler? A while ago some Debian guys were speculating whether even BSD license is "free enough" to include in Debian... -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Wishlist item: itertools.flatten

2005-03-12 Thread Ville Vainio
>>>>> "Michael" == Michael Spencer <[EMAIL PROTECTED]> writes: Michael> Here's a non-recursive implementation. Thanks. Michael> There are lots around. Yet another fact that suggest the inclusion in stdlib would make sense ;-). -- Ville

Re: Itertools wishlists

2005-03-14 Thread Ville Vainio
rtool functions are not very useful anymore, with the advent of genexps: ifilter(pred, seq) --> elements of seq where pred(elem) is True ifilterfalse(pred, seq) --> elements of seq where pred(elem) is False imap(fun, p, q, ...) --> fun(p0, q0), fun(p1, q1), ... starmap(fun, seq) --> fun(*

Re: Itertools wishlists

2005-03-14 Thread Ville Vainio
that if the atomicity criterion was any more complex in the API, the proposal would be shot down immediately on the grounds of not being fundamental enough as concept. -- Ville Vainio http://tinyurl.com/2prnbOB -- http://mail.python.org/mailman/listinfo/python-list

Re: Itertools wishlists

2005-03-14 Thread Ville Vainio
>>>>> "Raymond" == Raymond Hettinger <[EMAIL PROTECTED]> writes: Steven> complex atomicity test). I also have the feeling that any Steven> complicated atomictiy test is more than a simple and-ing Steven> of several tests... Raymond> &qu

Re: Python becoming less Lisp-like

2005-03-15 Thread Ville Vainio
ame name for all those little functions to avoid polluting the namespace. Choose 'L' if it gives you that cozy lambda-ish feel. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python becoming less Lisp-like

2005-03-15 Thread Ville Vainio
he real one would have the same problem. And who Torsten> knows how C# looks like in 10 years. http://c2.com/cgi/wiki?PythonVsRuby seems to suggest that Python has better Unicode support than Ruby. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp-likeness

2005-03-16 Thread Ville Vainio
ility Michele> concern. With normal for-loop (as opposed to genexps and LCs), the "last" value of the loop variable might be useful outside the loop if the loop was exited prematurely through 'break' statement or exception. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python like VB?

2005-03-16 Thread Ville Vainio
s of pyGTK as well. People coming from VB background probably also appreciate the ability to draw the UI in point&click style: http://gazpacho.sicem.biz/ http://wxglade.sourceforge.net/ Unfortunately these seem to still be a tad rough around the edges... -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python becoming less Lisp-like

2005-03-17 Thread Ville Vainio
the documentation I've seen regarding these features mentions that the user probably doesn't need to know about them; this is especially true for metaclasses. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: I can do it in sed...

2005-03-17 Thread Ville Vainio
Damjan> if line.endswith('end'): printing=0 No, it's still line.startswith('end'), not endswith. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: I can do it in sed...

2005-03-17 Thread Ville Vainio
>>>>> "John" == John Machin <[EMAIL PROTECTED]> writes: John> You can get gnu Windows versions of awk sed and most other John> suchlike goodies off the net ... Yeah, google for 'unxutils'. Cygwin versions of these tools can be a headache so

REPOST: Re: Python becoming less Lisp-like

2005-03-17 Thread Ville Vainio
ame name for all those little functions to avoid polluting the namespace. Choose 'L' if it gives you that cozy lambda-ish feel. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

REPOST: Re: Python becoming less Lisp-like

2005-03-17 Thread Ville Vainio
he real one would have the same problem. And who Torsten> knows how C# looks like in 10 years. http://c2.com/cgi/wiki?PythonVsRuby seems to suggest that Python has better Unicode support than Ruby. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Interface support?

2005-03-18 Thread Ville Vainio
ols.html, This (PyProtocols) seems to be the one with biggest momentum at the time being, so if you can't be bothered to perform an independent and balanced evaluation, go for PyProtocols :-). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: UML and OO design tool with Python support

2004-11-29 Thread Ville Vainio
hon session where you can go dir() - ing around to see all kinds of interesting diagram stuff. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Nokia Phones ?

2004-11-30 Thread Ville Vainio
a new version. There are lots of changes happening with S60 / Symbian OS in general ATM, so I wouldn't be surprised if they chose to delay Python a little bit, at least as far as shipping it with the phones goes. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Semaphore or what should I use?

2004-12-01 Thread Ville Vainio
> Isn´t it a good idea to do this with a semaphore? Semaphore will do, but this is a classical use case for threading.Lock. There should be lots of stuff regarding locks (or more googleably, "mutexes") on the net. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Semaphore or what should I use?

2004-12-02 Thread Ville Vainio
g google finds is http://www.majid.info/mylos/weblog/2004/11/04-1.html -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Ville Vainio
their temper for a moment and is willing to apologize. That is not not always the case. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Python for Series 60 update

2004-12-22 Thread Ville Vainio
Python for S60 seems to be available for the grand public as of today. Check out http://www.forum.nokia.com/main/0,,034-821,00.html Yes, this is good news :-). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional Static Typing

2004-12-27 Thread Ville Vainio
"hi" in l: # in does a bsearch because the list is sorted blah() but things like this probably belong to languages like Lisp where the user gets to expand and mess with the compiler. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional Static Typing

2004-12-28 Thread Ville Vainio
Python would become more complex, but I trust the people that are implementing it enough to not be overly concerned. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython 0.7 released!

2005-03-23 Thread Ville Vainio
ose who were afraid the project is dead due to silence... -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython 0.7 released!

2005-03-23 Thread Ville Vainio
>>>>> "Robin" == Robin Becker <[EMAIL PROTECTED]> writes: Robin> well that's nice, but I don't do blogs and certainly don't You don't need to "do" much - just go to planetpython.org -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestions for a Java programmer

2005-03-24 Thread Ville Vainio
es of Python. So a Java programmer, when confronted with a problem, should think "how can I solve this using lists, dicts and tuples?" (and perhaps also my new favourite, sets). Class-based solution should be chosen only after seeing that the problem can't be trivially sol

Re: Python for a 10-14 years old?

2005-03-24 Thread Ville Vainio
ke an OS than any other home computer till then. And Christos> man, wasn't 68k assembly a joy :) Linus Torvalds also bought Sinclair Ql back in the day - I was quite surprised to find out that it had a 32bit CPU (according to his autobiography). -- Ville Vainio http://tinyurl

Re: Python for a 10-14 years old?

2005-03-24 Thread Ville Vainio
d feel they should be. (urgh, way too serious to be pythonic, but it's 5:14am here) -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Ville Vainio
I don't really see the advantage in moving away from itertools. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuple with one item is no tuple

2005-03-29 Thread Ville Vainio
oncatenation (string Antoon> concatenation included) To me, nothing is more natural than "ab" + "cd" == "abcd". Also [1,2] + [3,4] == [1,2,3,4]. "Dot product" is not really too useful in real world (non-mathematical) apps. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Why tuple with one item is no tuple

2005-03-29 Thread Ville Vainio
>>>>> "Ville" == Ville Vainio <[EMAIL PROTECTED]> writes: Ville> To me, nothing is more natural than "ab" + "cd" == Ville> "abcd". Also [1,2] + [3,4] == [1,2,3,4]. "Dot product" is Ville> not really to

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-29 Thread Ville Vainio
e. I'd rather see a more modular and 'slimmer' Python, what with the advent of Python for S60 and other embedded uses. Perhaps what you need is 'from usefulstuff import *', with usefulstuff having os, sys, 'itertools as it', &c. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)

2005-03-30 Thread Ville Vainio
t such operations should not be dumped into the builtin iter. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Case-insensitive dict, non-destructive, fast, anyone?

2005-04-01 Thread Ville Vainio
.keys() ['Hi','hoho'] Note that 'Hi' preserved the case. I imagine that 'Hi' and 'hi' would need to share the same hash value in order for the lookup to be fast. Anyone have a an implementation that I could use? Quick googling only produced implem

Re: Case-insensitive dict, non-destructive, fast, anyone?

2005-04-01 Thread Ville Vainio
>>>>> "Daniel" == Daniel Dittmar <[EMAIL PROTECTED]> writes: Daniel> Ville Vainio wrote: >> I need a dict (well, it would be optimal anyway) class that >> stores the keys as strings without coercing the case to upper >> or l

Re: Case-insensitive dict, non-destructive, fast, anyone?

2005-04-05 Thread Ville Vainio
e for 'keytransform' feature apart from the uses that would be better covered by hash/comparison hooks? It would be lovely to have something like this in the stdlib (or anywhere, for that matter). Think about the use cases for hashing via by os.path.normcase, str.lower... -- Ville Vaini

Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-06 Thread Ville Vainio
ut what a piece of code does. It's a code that you wish you could train a monkey to write for you while you go for lunch. Think C++ or Java. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: boring the reader to death (wasRe: Lambda: the Ultimate DesignFlaw

2005-04-06 Thread Ville Vainio
on list comprehensions and generator expressions. You'll see the terse side of Python (and genexps look kinda poetic too ;-). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Best editor?

2005-04-06 Thread Ville Vainio
arning unless you are an emacs user already. Emacs also looks so horrible in Linux that I tend to go for Kate when I'm at home. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-06 Thread Ville Vainio
>>>>> "Sunnan" == Sunnan <[EMAIL PROTECTED]> writes: Sunnan> Ville Vainio wrote: Sunnan> Also, Guido recently urged people to explicitly write Sunnan> recursions rather than to use reduce - which I thought was Sunnan> completely in

Re: Best editor?

2005-04-06 Thread Ville Vainio
>>>>> "caneff" == ChinStrap <[EMAIL PROTECTED]> writes: caneff> Anyone want to send me a configuration setup with Python caneff> in mind, and decent colors? http://www.emacswiki.org/cgi-bin/wiki/ColorTheme -- Ville Vainio http://tinyurl.com/2pr

Re: Best editor?

2005-04-06 Thread Ville Vainio
rev-expand to F4, jjl> and it seems even better than 'proper' completion (for jjl> reducing keystrokes, anyway). But does not work when you don't know/can't recall what methods are available for the object you are looking at. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-11 Thread Ville Vainio
nstead of " when Claudio> trying to input quotation marks? This has been reported previously - apparently it's a problem with Gary's readline module (or however it was called ;-), and hacking it solved the problem for someone. I suggest you search the ipython mailing list

Re: Programming Language for Systems Administrator

2005-04-12 Thread Ville Vainio
tually bump into a problem where you need to be able to do bash scripting. There's the 'Unix romantic' movement that still thinks shell scripts are a good idea, but this is my .02EUR to point out that not everyone agrees with them. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-12 Thread Ville Vainio
dinavian character (ÃÃ) on ipython console, luckily I never have to do that :-). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

win32 readline maintenance (was Re: IPython - problem with...

2005-04-12 Thread Ville Vainio
27;t need to be "transferred" - just put up version control somewhere and we'll see what happens :-). In the meantime I would suggest win32 users to do as I do and use a different keyboard layout. US layout is better for programming anyway and you learn it in a day or two. Settings->

Re: Programming Language for Systems Administrator

2005-04-13 Thread Ville Vainio
MSH passes data between beliavsky> the various commandlets as arbitrary objects. They clearly read my rant from last summer http://groups.google.com/groups?threadm=du7brj2mpg9.fsf%40mozart.cc.tut.fi ;-) -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Language for Systems Administrator

2005-04-13 Thread Ville Vainio
t Ouput. Have you tried the 'subprocess' module to see whether it solves your problems, new in 2.4? That said, I've never had the problems you describe with normal popen* calls either. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: templating system

2005-04-13 Thread Ville Vainio
never had a need It would be interesting to see benchmarks comparing different templating system. I suppose a web templating system like PSP (of mod_python) would be optimized for speed. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Nokia to speak at Python-UK next week

2005-04-18 Thread Ville Vainio
mp; nope. It would be easy-ish to get Python working on a console level on 9300/9500 if there was access to the source code... There's also an open source implementation of Python for UIQ (UI toolkit used by SonyEricsson) See http://www.mobilewhack.com/programming/python/ --

Re: Regular Expressions - Python vs Perl

2005-04-22 Thread Ville Vainio
s. One Ilpo> example is the xmlproc parser in PyXML, Read the source for sre.py, esp. _compile. The compiled regexps are cached, so when you invoke e.g. re.match(), it doesn't recompile the regexp. So this point is moot, and perl's approach is excessive special casing. -- Ville Vaini

Re: Regular Expressions - Python vs Perl

2005-04-22 Thread Ville Vainio
he regexps? I can't imagine you change more than, say, 10 of the regexps a day (compiling of which is an insignificant performance hit) and when you "ship" the script, you will freeze the regexps anyway. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Caching compiled regexps across sessions (was Re: Regular Expressions - Python vs Perl)

2005-04-23 Thread Ville Vainio
x27;t you use external validation on the created xml? Validating it every time sounds like way too much like Javaic B&D to be fun anymore. Pickle should serve you well, and would probably remove about half of your code. "Do the simplest thing that could possibly work" and all that. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python or PHP?

2005-04-23 Thread Ville Vainio
uring Leif> completeness. PHP isn't. +1 QOTW. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Object oriented storage with validation (was: Re: Caching compiled regexps across sessions (was Re: Regular Expressions - Python vs Perl))

2005-04-24 Thread Ville Vainio
of getting Ilpo> the regexps, but how and where to store the compiled data? Ilpo> Is there a way to put it to the byte code file? Do what you already did - dump the regexp cache to a separate file. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Python or PHP?

2005-04-24 Thread Ville Vainio
less punctuation to worry about, no error handling needed (exceptions take care of it automatically). I would also venture to guess that random (adult) Python programmers would be of higher skill level as far as programming in general goes (know more languages, have a "good taste"...). -- Ville V

Re: Python or PHP?

2005-04-24 Thread Ville Vainio
d library functions didn't raise them, the feature would not be worth much. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Ville Vainio
t; in a list or a generator with () or []. Still, list comprehensions should be implemented in terms of genexps to get rid of the LC variable that is visible outside the scope of the LC. Jeremy> should be relatively simple), it's not worth breaking that Jeremy> code. Wel

  1   2   >