Re: Frameworks for "Non-Content Oriented Web Apps"

2005-01-04 Thread paolo_veronelli
[EMAIL PROTECTED] wrote: Hi, There are great Python Web Application Framework. But most of them are meant for content oriented web apps. Is there something that can ease the development of application that are not content oriented(I call them "NON CONTENT-ORIENTED WEB APPLICATIONS" because I don't

Re: Integrating Python into a C++ app

2005-01-04 Thread Alex Martelli
Ben Sizer <[EMAIL PROTECTED]> wrote: > I know the conventional wisdom is to write the whole app in Python and > only extend with C++ where speed is an issue, but I already have a > large C++ app that I'd like to add Python to. Ideally I'd rewrite the > whole app in Python but I don't have time to

Re: input record sepArator (equivalent of "$|" of perl)

2005-01-04 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: ... > Trivia question: Name the second most powerfull country on earth not > using the metric system for everything. Well, then, just name the 2nd most powerful country on earth, period (I'm not going to get myself in trouble by guessing whether said 2nd co

Re: Frameworks for "Non-Content Oriented Web Apps"

2005-01-04 Thread michele . simionato
Well, with your first post you managed to get a very unclear picture of what you mean by "non-content oriented Web Application" ;-) Judging from your following posts, you want an easy way to construct Web interfaces, i.e. forms. This can be done with any Web framework, but a typical Web framework

Re: Using ICL to compile C extensions

2005-01-04 Thread "Martin v. Löwis"
[EMAIL PROTECTED] wrote: Does anyone know how I can use "icl" (Intel C++) to compile C extensions? I'm on Windows, and my Python is compiled using VS7.1 (binary distribution). Right now, when I run setup.py install, it uses cl.exe (MSVC++ Toolkit 2003), and I would like to use icl because MSVC++ 20

Re: The Industry choice

2005-01-04 Thread Eric Pederson
Alex Martelli commented: > It's not just _foreign_ companies -- regional clustering of all kinds > of > business activities is a much more widespread phenomenon. Although I'm > not sure he was the first to research the subject, Tjalling Koopmans, > as > part of his lifework on normative econom

Re: Frameworks for "Non-Content Oriented Web Apps"

2005-01-04 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > Moreover, I recently saw Dabo(http://www.dabodev.com/about), a > framework for developing 3 tier apps with Python and wxPython(and other > supported GUI toolkits). I have not tried it but I think something > similar, but for web-apps, is a close definition of "A Framew

Re: Python evolution: Unease

2005-01-04 Thread flamesrock
Well, I'm not a seasoned programmer like you but I have to say Python is the singlebest language I've worked with to date. In a matter of weeks I learned to do things that took me months in other languages and even found the process enjoyable. Maybe you are right. If so, couldn't Python be forked

search backward

2005-01-04 Thread Robert
I need to find the location of a short string in a long string. The problem however is that i need to search backward. Does anybody know how to search in reverse direction? Thanks, Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
"flamesrock" <[EMAIL PROTECTED]> writes: > Maybe you are right. If so, couldn't Python be forked into something > like you describe, while still remaining compatible at the core? (if > anyones willing) It's not an issue with the Python core (language); I read that post as mostly bemoaning the poor

Deferred expressions (was Re: Lambda as declarative idiom)

2005-01-04 Thread Nick Coghlan
Steven Bethard wrote: Nick Coghlan: def-from syntax [4] (def f(a) + o(b) - o(c) from (a, b, c)) (def x * x from (x)) (def x from ()) (def x.bar(*a, **k) from (*a, **k)) ((def x(*a, **k) from ()) for x, a, k in funcs_and_args_list) After a bit more musing, this is definitely my preferred syntax. I'd

Re: search backward

2005-01-04 Thread Aaron Bingham
Robert wrote: I need to find the location of a short string in a long string. The problem however is that i need to search backward. Does anybody know how to search in reverse direction? >>> "foofoo".find("foo") 0 >>> "foofoo".rfind("foo") 3 >>> "foofoo".index("foo") 0 >>> "foofoo".rindex("foo") 3

python 3000 and removal of builtin callable

2005-01-04 Thread Mirko Zeibig
Hello everybody, I recently stumbled across the proposal of removing `callable` in Python 3000 (http://python.org/peps/pep-3000.html) catching an exception instead, maybe something like this: --- snip --- [EMAIL PROTECTED] mize]$ python2.3 Python 2.3.3 (#1, Apr 6 2004, 01:47:39) [GCC 3.3.3 (SuSE

Re: Python evolution: Unease

2005-01-04 Thread michele . simionato
Maybe a PSF grant would help? I guess this has been considered ... Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Hlelp clean up clumpsy code

2005-01-04 Thread Steven Bethard
It's me wrote: Another newbie question. There must be a cleaner way to do this in Python: section of C looking Python code a = [[1,5,2], 8, 4] a_list = {} i = 0 for x in a: if isinstance(x, (int, long)): x = [x,] for w in [y for y in x]: i = i + 1 a_list[w]

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread holger krekel
On Fri, Dec 31, 2004 at 19:18 +0100, Alex Martelli wrote: > Cameron Laird <[EMAIL PROTECTED]> wrote: >... > > Yippee! The martellibot promises to explain Unicode for Pythoneers. > > http://groups-beta.google.com/group/comp.lang.python/msg/6015a5a05c206712 > > Uh -- _did_ I? Eeep... I guess

Re: search backward

2005-01-04 Thread Steven Bethard
Robert wrote: I need to find the location of a short string in a long string. The problem however is that i need to search backward. Does anybody know how to search in reverse direction? How about str.rfind? py> s = 'abc:def:abc' py> s.rfind('abc') 8 Steve -- http://mail.python.org/mailman/listinfo

csh to Python

2005-01-04 Thread Nader Emami
Hello, I am new in Python world, and would like to begin with translate a csh file to a python script. Could somebody give me an advise (documentation or web-site) where I can do that. with regards, Nader -- http://mail.python.org/mailman/listinfo/python-list

Re: Hlelp clean up clumpsy code

2005-01-04 Thread Nick Coghlan
It's me wrote: Another newbie question. There must be a cleaner way to do this in Python: section of C looking Python code a = [[1,5,2], 8, 4] a_list = {} i = 0 for x in a: if isinstance(x, (int, long)): x = [x,] for w in [y for y in x]: i = i + 1 a_list[w]

Re: Python evolution: Unease

2005-01-04 Thread Alex Martelli
Iwan van der Kleyn <[EMAIL PROTECTED]> wrote: > to be determine the way foreward for Python: more features, increased > complexity, less dynamism. Lots of syntax crud, without addressing the As a student of human nature, I'm _really_ curious as to how one could possibly read the key document:

why does UserDict.DictMixin use keys instead of __iter__?

2005-01-04 Thread Steven Bethard
Sorry if this is a repost -- it didn't appear for me the first time. So I was looking at the Language Reference's discussion about emulating container types[1], and nowhere in it does it mention that .keys() is part of the container protocol. Because of this, I would assume that to use UserDict.Di

Re: How can engineers not understand source-code control?

2005-01-04 Thread Mark Carter
> Cameron Laird wrote: > >> I've seen the infatuation for Excel (and so on) for years, True story: when I began working for my current employer, there was a guy there doing some work with a spreadsheet. He was given two weeks to perform the task. It was a loss-leader to get some real work from th

Re: why does UserDict.DictMixin use keys instead of __iter__?

2005-01-04 Thread Nick Coghlan
Steven Bethard wrote: Sorry if this is a repost -- it didn't appear for me the first time. So I was looking at the Language Reference's discussion about emulating container types[1], and nowhere in it does it mention that .keys() is part of the container protocol. Because of this, I would assume t

Re: How do I make Windows Application with Python ?

2005-01-04 Thread Ola Natvig
BOOGIEMAN wrote: On Mon, 03 Jan 2005 17:19:22 -0500, Peter Hansen wrote: What do you mean by "Windows Applications"? I'm running Python on Windows XP, so every program I write with Python is a "Windows application" by my definition. Obviously you are using a different one. (And if you just mean

Re: The Industry choice

2005-01-04 Thread michele . simionato
But then I have THREE published recipes!! Does that mean that I get three free copies of the cookbook ? ;-) Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: why does UserDict.DictMixin use keys instead of __iter__?

2005-01-04 Thread John Machin
Steven Bethard wrote: > Sorry if this is a repost -- it didn't appear for me the first time. > > > So I was looking at the Language Reference's discussion about emulating > container types[1], and nowhere in it does it mention that .keys() is > part of the container protocol. I don't see any refe

Problem with Python module

2005-01-04 Thread Maneesh
Hi, I want to connect to a remote MS SQL Server 2000 database through my Fedora Core 2 machine via Python scripts. I have successfully installed freetds & unixODBC and can now connect to the desired DB through tsql(freetds) & isql(unixODBC). I installed mxODBC (RPM & source) to be able to connec

Re: hidding the "console" window + system global shortcut keys

2005-01-04 Thread Richie Hindle
[Gabriel] > 2. Set global key biddings. You can do this using ctypes: http://groups.google.co.uk/groups?selm=mailman.929.1069345408.702.python-list%40python.org -- Richie Hindle [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Iwan van der Kleyn
Also, you keep talking about "the core python team" on the basis, it would appear, of reading one document by Guido. Have you bothered doing a MINIMUM of homework, such as, looking at http://www.amk.ca/diary/archives/cat_python.html Well, you being a member of that core team (meaning nog an

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-04 Thread Bengt Richter
On Mon, 03 Jan 2005 18:54:06 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: >Roman Suzi wrote: >> I wish lambdas will not be deprecated in Python but the key to that is >> dropping the keyword (lambda). If anybody could think of a better syntax for >> lambdas _with_ arguments, we could develop PEP

Re: csh to Python

2005-01-04 Thread Max M
Nader Emami wrote: Hello, I am new in Python world, and would like to begin with translate a csh file to a python script. Could somebody give me an advise (documentation or web-site) where I can do that. You are probably interrested in the os 6 os.path modules. -- hilsen/regards Max M, Denmark htt

Re: ODBC Connection on Windows XP

2005-01-04 Thread Andrew MacIntyre
On Mon, 3 Jan 2005, Greg Lindstrom wrote: > I am running Python 2.3 on Windows XP and am trying to connect to an > ODBC datasource. I have done this many times on this same box but this > time I get an error message saying > > dbi.operation-error: [WSOCK32.DLL]Connection refused, is the host > li

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-04 Thread Roman Suzi
On Mon, 3 Jan 2005, Steven Bethard wrote: > Roman Suzi wrote: > > I wish lambdas will not be deprecated in Python but the key to that is > > dropping the keyword (lambda). If anybody could think of a better syntax for > > lambdas _with_ arguments, we could develop PEP 312 further. > > Some suggest

Re: Python evolution: Unease

2005-01-04 Thread Ville Vainio
> "Iwan" == Iwan van der Kleyn <[EMAIL PROTECTED]> writes: Iwan> And then I read the following sentence by Van Rossum: Iwan> "In order to make type inferencing a little more useful, I'd Iwan> like to restrict certain forms of extreme dynamic behavior Iwan> in Python" Iwan

Re: How do I make Windows Application with Python ?

2005-01-04 Thread Fuzzyman
You need py2exe to bundle applications so they can be used on machines without python. When you do that you have a choice of whether or not your application should have a console box or not. In order to use buttons and other widgets you will need to choose a GUI toolkit. I recommend starting with T

Re: The Industry choice

2005-01-04 Thread Kent Johnson
Alex Martelli wrote: Roy Smith <[EMAIL PROTECTED]> wrote: Stefan Axelsson <[EMAIL PROTECTED]> wrote: Yes, ignoring most of the debate about static vs. dynamic typing, I've also longed for 'use strict'. You can use __slots__ to get the effect you're after. Well, sort of; it only works for instance

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
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 time used on language > features isn't removed from improving the infrastructure around the > language. There aren't THAT many people working o

RE: Python evolution: Unease

2005-01-04 Thread Batista, Facundo
Title: RE: Python evolution: Unease [Iwan van der Kleyn] #- need: a better standard ide, an integrated db interface with #- a proper #- set of db drivers (!!), a better debugger, a standard widget/windows #- toolkit, something akin to a standard for web programming, better #- documentati

Re: input record sepArator (equivalent of "$|" of perl)

2005-01-04 Thread Steve Holden
Dennis Lee Bieber wrote: On Mon, 03 Jan 2005 19:14:54 -0500, Steve Holden <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: Plus the builders quite routinely ask suppliers for things like "a meter of two (inches) by four (inches)". They don;t care that they're getting the closest

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread michele . simionato
Holger: > FWIW, i added the recipe back to the online cookbook. It's not perfectly > formatted but still useful, i hope. > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/361742 Uhm... on my system I get: >>> german_ae = unicode('\xc3\xa4', 'utf8') >>> print german_ae # dunno if it wi

Re: Python evolution: Unease

2005-01-04 Thread Ville Vainio
> "Paul" == Paul Rubin 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 time used on >> language features isn't removed from imp

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
Ville Vainio <[EMAIL PROTECTED]> writes: > But the people working on wxPython, pygtk, pyqt, pydev, whatever, are > largely not the same guys that commit stuff to CPython CVS. Right, but for that reason, they don't count as being working on Python. > Type declarations are a feature that might bene

RE: Python evolution: Unease

2005-01-04 Thread Roman Suzi
On Tue, 4 Jan 2005, Batista, Facundo wrote: Maybe OP doesn't yet fully comprehend the ways of Python universe? As for his claims, I am quite surprised that Python lacks something in the docs. Concerning better hierarchy in the standard library, it is interesting that there are some movements in

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread Stephan Diehl
On Tue, 04 Jan 2005 05:43:32 -0800, michele.simionato wrote: > Holger: > >> FWIW, i added the recipe back to the online cookbook. It's not > perfectly >> formatted but still useful, i hope. > >> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/361742 > > Uhm... on my system I get: > >

Re: why does UserDict.DictMixin use keys instead of __iter__?

2005-01-04 Thread Steven Bethard
Nick Coghlan wrote: Steven Bethard wrote: Sorry if this is a repost -- it didn't appear for me the first time. So I was looking at the Language Reference's discussion about emulating container types[1], and nowhere in it does it mention that .keys() is part of the container protocol. Because of th

Re: Problem remotely shutting down a windows computer with python

2005-01-04 Thread Tim G
> I have a problem when using the python script found here: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/360649 > > It is a script to remotely shutdown a windows computer. When I use it, > the computer shuts down, but doesn't power off like with a regular > shutdown. It stays on the

Re: Python evolution: Unease

2005-01-04 Thread Istvan Albert
Iwan van der Kleyn wrote: And I do sense (reading planet python/this newsgroup) a mindset or at least a tendency by the people who really matter in these discussion to keep on adding features to the syntax; to add "structure" to Python. My personal preference would be to leave the language alone

Re: why does UserDict.DictMixin use keys instead of __iter__?

2005-01-04 Thread Steven Bethard
John Machin wrote: Steven Bethard wrote: So I was looking at the Language Reference's discussion about emulating container types[1], and nowhere in it does it mention that .keys() is part of the container protocol. I don't see any reference to a "container protocol". Sorry, I extrapolated "containe

Re: HTTP GET request with basic authorization?

2005-01-04 Thread Fuzzyman
There's example code with discussion at : http://www.voidspace.org.uk/atlantibots/recipebook.html#auth Regards, Fuzzy http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list

python intergration bus ?

2005-01-04 Thread Tonino
Hi, Just an interested question - I friend is testing a few JAVA intergration bus's that will be used to intergrate his companies services - I was wondering if there was a python intergration bus ? other than maybe Pyro ? Thanks Tonino -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-04 Thread Steven Bethard
Bengt Richter wrote: On Mon, 03 Jan 2005 18:54:06 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: Roman Suzi wrote: I wish lambdas will not be deprecated in Python but the key to that is dropping the keyword (lambda). If anybody could think of a better syntax for lambdas _with_ arguments, we could

Reaching the real world

2005-01-04 Thread Fuzzyman
I have a friend who would like to move and program lights and other electric/electro-mechanical devices by computer. I would like to help - and needless to say Python would be an ideal language for the 'programmers interface'. What I'd like is an electronic interface that connects to several relay

Re: How to access database?

2005-01-04 Thread Swaroop C H
Florian Lindner wrote: Hello, AFAIK python has a generic API for database access which adapters are supposed to implement. How can I found API documentation on the API? I found these pages useful when learning the DB API: * http://www.kitebird.com/articles/pydbapi.html * http://www.amk.ca/python/wr

Re: How do I make Windows Application with Python ?

2005-01-04 Thread BOOGIEMAN
On Mon, 03 Jan 2005 19:56:10 -0600, Rob Emmons wrote: > I believe also if you want to use MS Visual Studio -- Active State sells > python programming tools that plug into MS Visual Studio if you want to do > that. I've not tried these so I don't know how they work or if they are > any good. Than

Re: Optional Static Typing

2005-01-04 Thread Jacek Generowicz
[EMAIL PROTECTED] (Alex Martelli) writes: > I've always liked the (theoretical) idea that assertions (including of > course contracts) could be used as axioms used to optimize generated > code, rather than (necessarily) as a runtime burden. E.g. (and I don't > know of any implementation of this c

Re: Python evolution: Unease

2005-01-04 Thread Aahz
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: > >Maybe a PSF grant would help? I guess this has been considered ... The first three PSF grants were all in some way not directly related to changing the core language. One was for a library, one for improving Jython, and one for improv

Re: Hlelp clean up clumpsy code

2005-01-04 Thread It's me
Thanks, Steve and Nick. Yes, that's what I need to do. I didn't know it's call "flattening" a list structure but that's precisely what I needed to do. Steve, I am using 2.3 and so I will go with Nick's version. Thanks to both for helping. "Nick Coghlan" <[EMAIL PROTECTED]> wrote in message

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread Skip Montanaro
michele> BTW what's the difference between .encode and .decode ? I started to answer, then got confused when I read the docstrings for unicode.encode and unicode.decode: >>> help(u"\xe4".decode) Help on built-in function decode: decode(...) S.decode([encoding[,errors]])

Unicode universe (was Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30))

2005-01-04 Thread Aahz
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: > >BTW what's the difference between .encode and .decode ? >(yes, I have been living in happy ASCII-land until now ... ;) Here's the stark simple recipe: when you use Unicode, you *MUST* switch to a Unicode-centric view of the universe.

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
Roman Suzi <[EMAIL PROTECTED]> writes: > As for his claims, I am quite surprised that Python lacks > something in the docs. Python is lacking plenty in the docs. Care to figure out from the docs how tkinter works? That's not explained anywhere at all, except in some off-site resources and in som

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-04 Thread Steven Bethard
Roman Suzi wrote: On Mon, 3 Jan 2005, Steven Bethard wrote: Roman Suzi wrote: I wish lambdas will not be deprecated in Python but the key to that is dropping the keyword (lambda). If anybody could think of a better syntax for lambdas _with_ arguments, we could develop PEP 312 further. Some suggest

Re: Python evolution: Unease

2005-01-04 Thread michele . simionato
Aahz: > The first three PSF grants were all in some way not directly related to > changing the core language. One was for a library, one for improving > Jython, and one for improving docs. Giving the PSF more money increases > the chances for additional work. Here is the link you forgot to post ;

Re: Reaching the real world

2005-01-04 Thread Thomas Bartkus
"Fuzzyman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a friend who would like to move and program lights and other > electric/electro-mechanical devices by computer. I would like to help - > and needless to say Python would be an ideal language for the > 'programmers inter

Re: Unicode universe (was Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30))

2005-01-04 Thread Skip Montanaro
aahz> Here's the stark simple recipe: when you use Unicode, you *MUST* aahz> switch to a Unicode-centric view of the universe. Therefore you aahz> encode *FROM* Unicode and you decode *TO* Unicode. Period. It's aahz> similar to the way floating point contaminates ints. That's wh

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread michele . simionato
Yep, I did the same and got confused :-/ Michele -- http://mail.python.org/mailman/listinfo/python-list

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread michele . simionato
Stephan: > I'd rather use german_ae.encode('latin1') ^^ > which returns '\xe4'. uhm ... then there is a misprint in the discussion of the recipe; BTW what's the difference between .encode and .decode ? (yes, I have been living in happy ASCII-land until now ... ;) I should probably ask for an

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread Thomas Heller
Skip Montanaro <[EMAIL PROTECTED]> writes: > michele> BTW what's the difference between .encode and .decode ? > > I started to answer, then got confused when I read the docstrings for > unicode.encode and unicode.decode: > > >>> help(u"\xe4".decode) > Help on built-in function decode:

Re: Python evolution: Unease

2005-01-04 Thread Skip Montanaro
Paul> Care to figure out from the docs how tkinter works? That's not Paul> explained anywhere at all, except in some off-site resources and Paul> in some printed books. Even some language features like class Paul> methods and slots are explained only in PEP's and release notes,

Re: How can engineers not understand source-code control?

2005-01-04 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Mark Carter <[EMAIL PROTECTED]> wrote: . . . >True story: when I began working for my current employer, there was a >guy there doing some work with a spreadsheet. He was given two weeks to

Re: Reaching the real world

2005-01-04 Thread Gregor Horvath
Hi, I have just written a python module to program the M232 measurement unit from elv. It has 8 digital I/O and 6 analog ports (0-5V). Works fine, although it is a little bit slow (0,2 s to measure) Furthermore the digital ports do not have enough power to switch a relay directly, I had to do it

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread Max M
[EMAIL PROTECTED] wrote: uhm ... then there is a misprint in the discussion of the recipe; BTW what's the difference between .encode and .decode ? (yes, I have been living in happy ASCII-land until now ... ;) # -*- coding: latin-1 -*- # here i make a unicode string unicode_file = u'Some danish cha

Pythonic search of list of dictionaries

2005-01-04 Thread Bulba!
Hello everyone, I'm reading the rows from a CSV file. csv.DictReader puts those rows into dictionaries. The actual files contain old and new translations of software strings. The dictionary containing the row data looks like this: o={'TermID':'4', 'English':'System Administration', 'Polish':

Re: How can engineers not understand source-code control?

2005-01-04 Thread Mark Carter
;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, first visit that file with C-x C-f, ;; then enter the text in that file's own buffer. Cameron Laird wrote: > Well *that* certainly made my morning unpleasant. Then let's see if I can spoil

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Dec 30)

2005-01-04 Thread Jp Calderone
On Tue, 04 Jan 2005 16:41:05 +0100, Thomas Heller <[EMAIL PROTECTED]> wrote: >Skip Montanaro <[EMAIL PROTECTED]> writes: > > > michele> BTW what's the difference between .encode and .decode ? > > > > I started to answer, then got confused when I read the docstrings for > > unicode.encode and u

Re: Python evolution: Unease

2005-01-04 Thread Michael Hobbs
Ville Vainio <[EMAIL PROTECTED]> wrote: > What form of extreme dynamic behaviour have you been using lately? One real-world example: in my new coverage analysis tool (to be released any month now), I need to trace threads without changing any code. To do so, I redefine the thread.start_new_thread

Re: Parallelization with Python: which, where, how?

2005-01-04 Thread Albert Hofkamp
On Mon, 20 Dec 2004 14:03:09 +0100, Mathias <[EMAIL PROTECTED]> wrote: > Can someone recommend a parallelization approach? Are there examples or > documentation? Has someone got experience with stability and efficiency? If you think a light-weight approach of distributing work and collecting the

Re: The Industry choice

2005-01-04 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Peter Dembinski <[EMAIL PROTECTED]> wrote: . . . >def foo(x): >return str(x) > >str = foo(x) > >And now, let's say that foo()'s definition is in another module. >It is hard for a programmer

Re: The Industry choice

2005-01-04 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alan Gauld <[EMAIL PROTECTED]> wrote: >On Sat, 01 Jan 2005 16:08:07 GMT, [EMAIL PROTECTED] (Cameron >Laird) wrote: > >> I argue that it's a false opposition to categorize projects in >> terms of use of single languages. Many projects are MUCH better >> off with a m

Re: Python evolution: Unease

2005-01-04 Thread Doug Holton
Istvan Albert wrote: But if python were to become overly complicated I'll find something else. Three years ago I have not not used python at all, now I'm using it for everything. You're in luck, python 2.4 won't be significantly changing anytime soon. PS. why can't decorators solve this optional ty

Cookbook 2nd ed Credits (was Re: The Industry choice)

2005-01-04 Thread Alex Martelli
<[EMAIL PROTECTED]> wrote: > But then I have THREE published recipes!! > Does that mean that I get three free copies of the cookbook ? ;-) ...ti piacerebbe eh...?-) Sorry, "one each", even though you have _five_ credits. For the curious, here's the roster of most credited contributors (remember

Re: Hlelp clean up clumpsy code

2005-01-04 Thread Scott David Daniels
Nick Coghlan wrote: A custom generator will do nicely: Py> def flatten(seq): ... for x in seq: ... if hasattr(x, "__iter__"): ... for y in flatten(x): ... yield y ... else: ... yield x Avoiding LBYL gives you: def flatten(seq): for x in seq: try

Re: How can engineers not understand source-code control?

2005-01-04 Thread Mark Carter
Mark Carter wrote: I'm thinking that the I-Ching is a vast untapped resource for programming wisdom, plus it makes it funny. Well, carrying on in the same frivilous and some might say off-topic mood, I did a bit of a Google, and found that you can generate your very own I-Ching reading: http://ww

Re: Using python to convert PDF document to MSWord documents

2005-01-04 Thread support
You can use "pdf to word", it can help you to batch convert pdf to word or text at one time, keeping source layout, and Standalone software, MS Word, Adobe Acrobat and Reader NOT required! and you can get more information from http://www.convertzone.com/net/cz-PDF%20to%20Word-1-1.htm. ConvertZone

Re: Cookbook 2nd ed Credits (was Re: The Industry choice)

2005-01-04 Thread Premshree Pillai
Do contributors of less than 5 recipes get a copy too? :-? Btw, is there a comprehensive list of ALL contributors put up anywhere? On Tue, 4 Jan 2005 17:15:53 +0100, Alex Martelli <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote: > > > But then I have THREE published recipes!! > > Does tha

Re: python 3000 and removal of builtin callable

2005-01-04 Thread Nicolas Fleury
Mirko Zeibig wrote: This is not an option for e.g. IDEs as some functions might actually do something when called ;-) and I like `callable` for introspection. Other ways would be to check for the `__call__` attribute or use several methods of the `inspect`-Module, both of which are not better th

Pexpect getting a defuct process

2005-01-04 Thread Baillargeon, Sonny
I am trying to use a pexpect script using python v2.3.4 with pexpect module .999 on Solaris 8. I try to execute this script. #!/usr/bin/env python '''This runs "ls -l" on a remote host using SSH. At the prompts enter hostname, user, and password. ''' import pexpect logfile = open('sshls.log'

Re: Hlelp clean up clumpsy code

2005-01-04 Thread Jp Calderone
On Tue, 04 Jan 2005 08:18:58 -0800, Scott David Daniels <[EMAIL PROTECTED]> wrote: >Nick Coghlan wrote: > > A custom generator will do nicely: > > > > Py> def flatten(seq): > > ... for x in seq: > > ... if hasattr(x, "__iter__"): > > ... for y in flatten(x): > > ... yield y

Re: Python evolution: Unease

2005-01-04 Thread Hans Nowak
Alex Martelli wrote: Iwan van der Kleyn <[EMAIL PROTECTED]> wrote: to be determine the way foreward for Python: more features, increased complexity, less dynamism. Lots of syntax crud, without addressing the As a student of human nature, I'm _really_ curious as to how one could possibly read the

Re: Python evolution: Unease

2005-01-04 Thread Alex Martelli
Iwan van der Kleyn <[EMAIL PROTECTED]> wrote: ... > And I do sense (reading planet python/this newsgroup) a mindset or at > least a tendency by the people who really matter in these discussion to > keep on adding features to the syntax; to add "structure" to Python. My > personal preference woul

Re: How can engineers not understand source-code control?

2005-01-04 Thread Christopher Koppler
On Tue, 04 Jan 2005 15:52:03 +, Mark Carter wrote: > ;; This buffer is for notes you don't want to save, and for Lisp evaluation. > ;; If you want to create a file, first visit that file with C-x C-f, > ;; then enter the text in that file's own buffer. Now, _where_ have I seen that before? >

Re: Pythonic search of list of dictionaries

2005-01-04 Thread Tim Hochberg
Bulba! wrote: Hello everyone, I'm reading the rows from a CSV file. csv.DictReader puts those rows into dictionaries. The actual files contain old and new translations of software strings. The dictionary containing the row data looks like this: o={'TermID':'4', 'English':'System Administration'

Re: Pexpect getting a defuct process

2005-01-04 Thread Jorge Luiz Godoy Filho
Baillargeon, Sonny, TerÃa 04 Janeiro 2005 14:42, wrote: > This used to work before but now I get a defunct process after it runs. > Any ideas? "before" what? What has changed in your environment to make it stop working? -- Godoy. <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/lis

Re: Python evolution: Unease

2005-01-04 Thread Istvan Albert
Doug Holton wrote: application is so important that I expect Python 3000 will have optional type declarations integrated into the argument list." I think that *optional* part of the "optional type declaration" is a myth. It may be optional in the sense that the language will accept missing declarat

Re: Python evolution: Unease

2005-01-04 Thread Carlos Ribeiro
On Tue, 4 Jan 2005 10:39:10 -0300, Batista, Facundo <[EMAIL PROTECTED]> wrote: > #- need: a better standard ide, an integrated db interface with > #- a proper > #- set of db drivers (!!), a better debugger, a standard widget/windows > #- toolkit, something akin to a standard for web programming,

Re: How can engineers not understand source-code control?

2005-01-04 Thread Carlos Ribeiro
On Tue, 04 Jan 2005 15:52:03 +, Mark Carter <[EMAIL PROTECTED]> wrote: > I'm thinking that the I-Ching is a vast untapped resource for > programming wisdom, plus it makes it funny. LOL! +1 QOTW! -- Carlos Ribeiro Consultoria em Projetos blog: http://rascunhosrotos.blogspot.com blog: http://

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-04 Thread Roman Suzi
On Tue, 4 Jan 2005, Steven Bethard wrote: >Roman Suzi wrote: >> On Mon, 3 Jan 2005, Steven Bethard wrote: >> >> >>>Roman Suzi wrote: >>> I wish lambdas will not be deprecated in Python but the key to that is dropping the keyword (lambda). If anybody could think of a better syntax for l

Re: DB-API 2.0 in pysqlite and pgdb

2005-01-04 Thread Gerhard Haering
On Sat, Jan 01, 2005 at 06:33:24PM +0300, Roman Suzi wrote: > > Happy New Year to all Pythoneers! > > I am playing with pysqlite and pgdb and their DB-API conformancy. > It was quite interesting to know: > > - sqlite doesn't have mandatory helper-functions Date, Tim, etc. >(due to an error

Re: The Industry choice

2005-01-04 Thread Bulba!
On Mon, 3 Jan 2005 00:08:25 +0100, [EMAIL PROTECTED] (Alex Martelli) wrote: >> True. I have a bit of interest in economics, so I've seen e.g. >> this example - why is it that foreign branches of companies >> tend to cluster themselves in one city or country (e.g. >It's not just _foreign_ companie

Re: The Industry choice

2005-01-04 Thread Bulba!
On Sun, 02 Jan 2005 17:18:43 -0600, Mike Meyer <[EMAIL PROTECTED]> wrote: >> This "free software" (not so much OSS) notion "but you can >> hire programmers to fix it" doesn't really happen in practice, >> at least not frequently: because this company/guy remains >> ALONE with this technology, the c

Re: Python evolution: Unease

2005-01-04 Thread Aahz
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Aahz: >> >> The first three PSF grants were all in some way not directly related to >> changing the core language. One was for a library, one for improving >> Jython, and one for improving docs. Giving the PSF more money increases >> the

  1   2   3   >