Re: compiling python (or ironpython) to .exe or .dll for or not for .NET

2006-06-28 Thread jussij
per9000 wrote: > Is the newest Ironpython really as old as from 2004 July 28 (as > stated on http://www.ironpython.com/)? I think the site is dead but IronPython is far from dead. In fact the IronPython 1.0 beta has just been release. For more details go to this link: http://www.gotdotnet.com/

Re: Python in a nutshell - new edition ?

2006-06-28 Thread vbgunz
> Let me assure you that it _won't_ be on paper this coming Saturday (two > days from now). I am absolutely certain it will be worth the wait. The Python in a Nutshell book that covers 2.2 is so well written, it's practically amazing the author was able to cram so much in so little space. Although

Re: mmap -- memory mapped file

2006-06-28 Thread Alex Martelli
Carl Mackey <[EMAIL PROTECTED]> wrote: > hi, i'm new to this list and new to python as well. > > i have a question on the memory mapped file ability python has. when i > use a mmap on a file, will it copy the whole thing to ram or just > whatever part of it i'm working on? basically, i'm wonderin

Re: Python in a nutshell - new edition ?

2006-06-28 Thread Alex Martelli
BartlebyScrivener <[EMAIL PROTECTED]> wrote: > >> Yep, we're still aiming for OSCON '06 (Portland, end of July). > > Amazon says July 1st. Let me assure you that it _won't_ be on paper this coming Saturday (two days from now). Alex -- http://mail.python.org/mailman/listinfo/python-list

cheetah - how do i use .refreshcaceh() in cheetah

2006-06-28 Thread a
cheetah - how do i use .refreshcaceh() in cheetah the doc is skimpy and doesnt tell more than you can use refreshcache with id to refresh a cache my code in html has #cache 30m, id =cachei #end cache -- http://mail.python.org/mailman/listinfo/python-list

Re: how do i make an array global

2006-06-28 Thread a
please tell me how to do it if i should not make it global like you guys worry i m not comfortable making it global and mutating it in every subblock thanks for reading and helping out -- http://mail.python.org/mailman/listinfo/python-list

how do i use refreshCache with cheetah

2006-06-28 Thread a
how do i use refreshCache with cheetah -- http://mail.python.org/mailman/listinfo/python-list

Re: how do i make an array global

2006-06-28 Thread a
hi bruno georg and erik you are right i m a newbie, i just want to do some stuff read out some stuff from a feed and display it in a page, so my py code, builds this list and when it goes to cheetah it gives me an error and hence i posted global has fixed the error but i keep getting this again and

Re: Correr Programas Externos

2006-06-28 Thread Luis M. González
La lista en español esta acá: http://listas.aditel.org/listinfo/python-es Saludos, Luis -- http://mail.python.org/mailman/listinfo/python-list

mmap -- memory mapped file

2006-06-28 Thread Carl Mackey
hi, i'm new to this list and new to python as well. i have a question on the memory mapped file ability python has. when i use a mmap on a file, will it copy the whole thing to ram or just whatever part of it i'm working on? basically, i'm wondering if it would be ok for me to have multiple mmap'

Re: Having problems with strings in HTML

2006-06-28 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, "Richard Brodie" <[EMAIL PROTECTED]> wrote: >"Sion Arrowsmith" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > >>>By the way, you _do_ realize that your "&" characters should be escaped >>>as "&", don't you? >> >> No they shouldn't. They part of the

Re: Correr Programas Externos

2006-06-28 Thread Luis M. González
Gabriel wrote: > Hola a todos: > > Necesitaría correr otros programas desde python. Es decir Cuando > aprieto un boton que se abra el block de notas (por ejemplo) ¿Alguien > sabe como hacerlo? > Gracias > > -- > Gabriel Se hace así: import os os.startfile("notepad.exe") Esto te sirve para abrir

Re: Python in a nutshell - new edition ?

2006-06-28 Thread BartlebyScrivener
>> Yep, we're still aiming for OSCON '06 (Portland, end of July). Amazon says July 1st. http://tinyurl.com/js5ky I have some experience in these matters, which makes me think that you're right, and Amazon is wrong. ;) I'll post when my preordered copy arrives. rd www.dooling.com -- http://ma

Re: decimal by default

2006-06-28 Thread Alex Martelli
Daniel <[EMAIL PROTECTED]> wrote: ... > Ideally I'd like to have a way to tell the interpreter to use Decimal > by default instead of float (but only in the eval() calls). I > understand the performance implications and they are of no concern. I'm > also willing to define a single global Decimal

Re: Python in a nutshell - new edition ?

2006-06-28 Thread Alex Martelli
Helmut Jarausch <[EMAIL PROTECTED]> wrote: > is there a new edition of "Python in a Nutshell" > covering Python 2.5 coming soon? Yep, we're still aiming for OSCON '06 (Portland, end of July). The coverage centers on 2.4, with mentions of what was changed in that version (to make the book usable

decimal by default

2006-06-28 Thread Daniel
I'm writing an application that (among other things) evaluates mathematical expressions. The user enters strings containing literals and names that later get evaluated using the Python interpreter. Here's a short (very simplified) example: >>> from decimal import Decimal >>> names = dict(a=Decimal

need help with a new site

2006-06-28 Thread da404LewZer
hell all, i'm starting a new wiki for programming called "CoderWiki" i plan on documenting all functions of all programming languages. I have started a couple portals for C, VB, PHP, HTML, Java, Smalltalk, etc, and just added a API Guide section for talking about the Google API, Win32 API, etc e

Web transaction server in Python

2006-06-28 Thread Philippe Martin
Hi, I know a bit Python as application programming, but very little as a web server. I need to get one server to accept connection requests from many devices (not all PC-Based) and then have a bi-lateral "conversation" with those devices prior to closing the connection. The said devices have at

Correr Programas Externos

2006-06-28 Thread Gabriel
Hola a todos: Necesitaría correr otros programas desde python. Es decir Cuando aprieto un boton que se abra el block de notas (por ejemplo) ¿Alguien sabe como hacerlo? Gracias -- Gabriel -- http://mail.python.org/mailman/listinfo/python-list

Icono en wxpython

2006-06-28 Thread Gabriel
Hola: He echo un programa en wxpython. Se trata de un programa para desarrollos con microcontroladores como PIC's etc. en cuanto a transmisión RS232 se refiere. El programa es GNU y quiero publicarlo pronto pero no se como poner el ícono a la ventana y al archivo en si... ¿Alguien puede darme una

Re: USB

2006-06-28 Thread jmdeschamps
Gabriel wrote: > ¿Alguien conoce algún módulo para python con el que se pueda tener > acceso a los puertos USB y que sea multiplataforma? > > -- > Gabriel Hola Gabriel, Voy... http://sourceforge.net/projects/pyusb (multiplataforma sin Windows) mas http://web.media.mit.edu/~dmerrill/sensor_network

Re: web Develop question

2006-06-28 Thread Luis M. González
Just to give you an idea of what it is, you can check this article: http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html... This explains the whole thing much better than I did with my poor english... Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: locating strings approximately

2006-06-28 Thread John Machin
On 29/06/2006 10:07 AM, BBands wrote: > On 6/28/06, John Machin <[EMAIL PROTECTED]> wrote: >> On 29/06/2006 9:28 AM, BBands wrote: >> > I'd like to see if a string exists, even approximately, in another. For >> > example if "black" exists in "blakbird" or if "beatles" exists in >> > "beatlemania".

Re: web Develop question

2006-06-28 Thread Luis M. González
[EMAIL PROTECTED] wrote: > Dear Luis , > > Thanks for your kindly answer , so you say that installing mod_python > and a template like chetaah or dyango I can do like as I do with php > and Apache ? Do not get confussed: Django is a complete web development framework, and "Cheetah" is just a templ

Re: web Develop question

2006-06-28 Thread [EMAIL PROTECTED]
Dear Luis , Thanks for your kindly answer , so you say that installing mod_python and a template like chetaah or dyango I can do like as I do with php and Apache ? < ? print ?> Thanks , regards Richard Luis M. González ha escrito: > [EMAIL PROTECTED] wrote: > > hi guys , > > >

Re: Numeric help!

2006-06-28 Thread Carl Banks
Sheldon wrote: > Hi, > > I have the following loop that I think can be written to run faster in > Numeric. I am currently using Numeric. > range_va = [60,61,62,63,64,65,66,67,68,69,70,71,72] > main.xsize= 600 > main.ysize= 600 > #msgva is an (600x600) Numeric array with mutiple occurrences of the >

USB

2006-06-28 Thread Gabriel
¿Alguien conoce algún módulo para python con el que se pueda tener acceso a los puertos USB y que sea multiplataforma? -- Gabriel -- http://mail.python.org/mailman/listinfo/python-list

Re: for and while loops

2006-06-28 Thread Bruno Desthuilliers
Bayazee a écrit : > hi > > #Exercise 1 : > s=0 > while 1: > s+=input("Enter a num : ") > if s>=100: > print "The sum is greater than 100 : ",s > break Why do you manually check the condition when the construct is meant to take care of it ? the_sum = 0 while the_sum < 100: try:

Re: mmap as a sequence behavior

2006-06-28 Thread Scott David Daniels
Lawrence Oluyede wrote: > While wrapping mmap indexing/sequence emulation I noticed something > "strange". What's got my attention was the fact that passing -1 from > Python does not trigger the exception but is changed to the last > positive and valid index > I expect this raise IndexEr

Re: locating strings approximately

2006-06-28 Thread John Machin
On 29/06/2006 9:28 AM, BBands wrote: > I'd like to see if a string exists, even approximately, in another. For > example if "black" exists in "blakbird" or if "beatles" exists in > "beatlemania". The application is to look though a long list of songs > and return any approximate matches along with

Re: locating strings approximately

2006-06-28 Thread Irmen de Jong
BBands wrote: > I'd like to see if a string exists, even approximately, in another. For > example if "black" exists in "blakbird" or if "beatles" exists in > "beatlemania". The application is to look though a long list of songs > and return any approximate matches along with a confidence factor. I

Re: [Pyrex] pyrex functions to replace a method (Re: replace a method in class: how?)

2006-06-28 Thread Greg Ewing
Brian Blais wrote: > TypeError: unbound method pyrex_update_within_class() must be called > with update_funcs instance as first argument (got str instance instead) Hm. Okay, so that doesn't work either. But I just tried the following, and it seems to work: import new class C(str):

socket close problems with Python 2.5b1

2006-06-28 Thread Irmen de Jong
I'm having some troubles with closing sockets using Python 2.5b1 Simply closing a client socket (on the server side) doesn't seem to actually shutdown the socket anymore. A connected client simply hangs, while with older Pythons it aborted with a socket close error. Can someone confirm this for me

locating strings approximately

2006-06-28 Thread BBands
I'd like to see if a string exists, even approximately, in another. For example if "black" exists in "blakbird" or if "beatles" exists in "beatlemania". The application is to look though a long list of songs and return any approximate matches along with a confidence factor. I have looked at edit di

Re: Generator naming convention?

2006-06-28 Thread [EMAIL PROTECTED]
iter- clicks for me, thanks :) wy infidel wrote: > > Any idea? Do you have a naming convention for generators? > > Sometimes I use the prefix 'iter', like dictionaries have .items() and > .iteritems(). sometimes I use 'x', like range() vs. xrange(). You > could simply use 'i' like some of the

Re: Immutability

2006-06-28 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : > Georg Brandl a écrit : (snip) >> >> That's another sign that property isn't intended to be used as a >> decorator. >> Normally, decorators wrap functions with other functions. > > > Normally, decorators take a function and return anything appropriate. > >> proper

Re: Immutability

2006-06-28 Thread Bruno Desthuilliers
Georg Brandl a écrit : > Steve Holden wrote: > > Thanks very much. And, what's more, I have even found its documentation! Whatsnew2.2. The 2.4.2 reference is, er, unhelpful. >>> >>> >>>Is it? >>> >>>http://docs.python.org/lib/built-in-funcs.html >>> >>>documents "property" quite well. >

Re: Immutability

2006-06-28 Thread Bruno Desthuilliers
Georg Brandl a écrit : > Nick Maclaren wrote: > >>In article <[EMAIL PROTECTED]>, >>"Fredrik Lundh" <[EMAIL PROTECTED]> writes: >>|> >>|> identical? you only applied @property to one of the methods, and then >>you're >>|> surprised that only one of the methods were turned into a property? >> >>

Re: for and while loops

2006-06-28 Thread Simon Forman
[EMAIL PROTECTED] wrote: > i was wondering if anyone could point me to some good reading about the > for and while loops > > i am trying to write some programs > "Exercise 1 > > Write a program that continually reads in numbers from the user and > adds them together until the sum reaches 100. Write

Re: Module executed twice when imported!

2006-06-28 Thread Bruno Desthuilliers
Michael Abbott a écrit : > It seems to be an invariant of Python (insofar as Python has invariants) > that a module is executed at most once in a Python session. I have a > rather bizzare example that breaks this invariant: can anyone enlighten > me as to what is going on? > > --- test.py ---

Re: ? on scipy.fftpack

2006-06-28 Thread Mike Duffy
Oops, sorry. I see what you mean. I was reading the docs for the regular (complex) fft function, since that was what I was initially having the bug with. I was just using the rfft to simplify things, but I guess that was ironic. Anyway, I appreciate your help and don't mean to burden you. Again, I

Re: Module executed twice when imported!

2006-06-28 Thread Simon Forman
Michael Abbott wrote: > It seems to be an invariant of Python (insofar as Python has invariants) > that a module is executed at most once in a Python session. I have a > rather bizzare example that breaks this invariant: can anyone enlighten > me as to what is going on? > > --- test.py --- > impor

Re: for and while loops

2006-06-28 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > i was wondering if anyone could point me to some good reading about the > for and while loops There's not much to say. while : will execute as long as is True. for in : will execute for each in . ie : for letter in ["a", "b", "c"]: do_something_wi

sys.settrace() and Python 2.3

2006-06-28 Thread Josiah Carlson
According to my reading of Python 2.3 docs, the call to goo() at the end should exit with a KeyboardInterrupt... import sys def goo(): while 1: pass count = [100] def foo(frame, event, arg): count[0] -= 1 if not count[0]: raise Key

Re: Generator naming convention?

2006-06-28 Thread infidel
> Any idea? Do you have a naming convention for generators? Sometimes I use the prefix 'iter', like dictionaries have .items() and .iteritems(). sometimes I use 'x', like range() vs. xrange(). You could simply use 'i' like some of the functions in the iteritems module (imap(), izip(), etc). I g

Re: Building Web Site Using Python

2006-06-28 Thread Simon Forman
Roman wrote: > I am new to python. > > I am looking to read in a 12mb csv file, parse it, generate web pages, > summarize on a column and make drop down bottons. > > Where would I be able to find sample code that does something similar > to this? > > Also, I know that microsoft has put out .net bet

Re: for and while loops

2006-06-28 Thread Schüle Daniel
[EMAIL PROTECTED] schrieb: > i was wondering if anyone could point me to some good reading about the > for and while loops > > i am trying to write some programs > "Exercise 1 > > Write a program that continually reads in numbers from the user and > adds them together until the sum reaches 100. W

Re: ? on scipy.fftpack

2006-06-28 Thread Mike Duffy
Robert Kern wrote: > You will probably want to ask scipy questions on scipy-user. There aren't many > scipy people here. > >http://www.scipy.org/Mailing_Lists > > I haven't run your code, yet, but one of the things you are running into is > the > FFT packing convention for FFTs on real functi

Re: curiosity about the nature of identity (in python)

2006-06-28 Thread Grant Edwards
On 2006-06-29, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Now what about this: > id(600) > 134745616 id(601) > 134745616 > > id of an object is unique *for the lifetime of this object*. Nothing > prevents it from being reused later. Indeed. Since in CPython, it's the address of

Re: for and while loops

2006-06-28 Thread Bayazee
hi #Exercise 1 : s=0 while 1: s+=input("Enter a num : ") if s>=100: print "The sum is greater than 100 : ",s break #Exercise 2 : s=0 for i in range(5): s+=input("Enter num #%d > "%(i+1)) print "The Sum is : " , s -- http://mail.python.org/mailman/listinfo/python-list

Re: for and while loops

2006-06-28 Thread Bayazee
hi #Exercise 1 : s=0 while 1: s+=input("Enter a num : ") if s>=100: print "The sum is greater than 100 : ",s break #Exercise 1 : s=0 for i in range(5): s+=input("Enter num #%d > "%(i+1)) print "The Sum is : " , s -- http://mail.python.org/mailman/listinfo/python-list

Re: curiosity about the nature of identity (in python)

2006-06-28 Thread Bruno Desthuilliers
James Stroud a écrit : > Hello all, > > What /is/ identity in python? A unique identifier associated with each and every object in the process. What exactly is this identifier is left to the implementation - FWIW and IIRC, CPython uses the memory address of the C 'object' datastructure. > For

Re: Building Web Site Using Python

2006-06-28 Thread Simon Forman
Roman wrote: > I am new to python. > > I am looking to read in a 12mb csv file, parse it, generate web pages, > summarize on a column and make drop down bottons. > > Where would I be able to find sample code that does something similar > to this? > > Also, I know that microsoft has put out .net be

Re: to py or not to py ?

2006-06-28 Thread Tom Plunket
Carl J. Van Arsdall wrote: > Because of the GIL only one thread can actually run at a time. I've recently been wondering about this, since in the work I do, a lot of time is spent doing disk I/O. So if I want the UI to remain responsive, I could spawn an IO thread to handle requests, and do a pr

Re: how do i make an array global

2006-06-28 Thread Erik Max Francis
Georg Brandl wrote: > No need for "global" here. Yes, that's true. I was just following the original poster's lead, but I tend to use a `global` statement whenever I'm mutating a global in a local block. That works as self-documentation and means you don't have to be concerned about the prec

curiosity about the nature of identity (in python)

2006-06-28 Thread James Stroud
Hello all, What /is/ identity in python? For example, we can always count on py> None is None True But I have noticed that this works for strings: py> "none" is "none" True and, for example, integers: py> 42 is 42 True And I have noticed that this works for equivalent expressions: py> 42 is

for and while loops

2006-06-28 Thread [EMAIL PROTECTED]
i was wondering if anyone could point me to some good reading about the for and while loops i am trying to write some programs "Exercise 1 Write a program that continually reads in numbers from the user and adds them together until the sum reaches 100. Write another program that reads 100 numbers

Module executed twice when imported!

2006-06-28 Thread Michael Abbott
It seems to be an invariant of Python (insofar as Python has invariants) that a module is executed at most once in a Python session. I have a rather bizzare example that breaks this invariant: can anyone enlighten me as to what is going on? --- test.py --- import imptest execfile('subtest.py',

mmap as a sequence behavior

2006-06-28 Thread Lawrence Oluyede
While wrapping mmap indexing/sequence emulation I noticed something "strange". The source code of this oddity is: static PyObject * mmap_item(mmap_object *self, Py_ssize_t i) { CHECK_VALID(NULL); if (i < 0 || (size_t)i >= self->size) { PyErr_SetString(PyExc_IndexError, "mmap index

Re: compiling python (or ironpython) to .exe or .dll for or not for .NET

2006-06-28 Thread per9000
Update: I have found a holy handgrenade. I found something that seems to work fine for me - I've only tried it for 5 minutes but seems to work very smoothly. Open-source, Mozilla license, you know the drill... http://www.py2exe.org/ py2exe (the name makes me fall in love) creates some dll's for

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread David Hopwood
Anton van Straaten wrote: > Chris Smith wrote: > >> What makes static type systems interesting is not the fact that these >> logical processes of reasoning exist; it is the fact that they are >> formalized with definite axioms and rules of inference, performed >> entirely on the program before exe

XML validationg against XSD file in Python

2006-06-28 Thread colincolehour
I have tried searching for tips or tutorials on validating an XML file against and XSD file in python but I haven't had any luck. Can someone point me in the right direction to how this would be achieved. I've read that Python has built in libraries for DTD validation but nothing about XSD. Thanks

Building Web Site Using Python

2006-06-28 Thread Roman
I am new to python. I am looking to read in a 12mb csv file, parse it, generate web pages, summarize on a column and make drop down bottons. Where would I be able to find sample code that does something similar to this? Also, I know that microsoft has put out .net beta version of it. If I am us

Re: Function to prune dictionary keys not working

2006-06-28 Thread Bruno Desthuilliers
Girish Sahani a écrit : > hi ppl, > Here is a simple function to remove those keys of a dictionary whose > values are less than some specified value. > > But it isnt working. "is not working" is the worst possible description of a problem. > def prune(d,cp): > l = [] > for rule,value in

[OT] Prolog and Regular Expressions, Was: Re: perspective on ruby

2006-06-28 Thread Kenneth McDonald
Lawrence D'Oliveiro wrote: > In article <[EMAIL PROTECTED]>, > Edward Elliott <[EMAIL PROTECTED]> wrote: > > >> XML? Conceptually (and more elegantly) covered >> as LISP s-expressions. >> > > "...Lisp is still #1 for key algorithmic techniques such as recursion > and condescension." >

Re: Generator naming convention?

2006-06-28 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I use generators a lot. E.g. > > > def gen_words(text) > ... parse text ... > yield each word in text > > for word in gen_words(text): > print word > > > I don't like the name gen_xxx() very much. Nor do I. > Looking for some inspiration > to name generato

Re: handling unicode data

2006-06-28 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Filipe wrote: > The error I'm getting is beeing thrown when I print the value to the > console. If I just convert it to unicode all seems ok (except for not > beeing able to show it in the console, that is... :). > > For example, when I try this: > print unicode("Fran\xd8a

Re: Passing a Cookie with httplib

2006-06-28 Thread Grant Edwards
On 2006-06-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > From a shell script, I have used /usr/bin/curl to access a web site > and pass a cookie I use ClientCookie for that. http://wwwsearch.sourceforge.net/ClientCookie/ -- Grant Edwards grante Yow! I'm into

Re: Generator naming convention?

2006-06-28 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I use generators a lot. E.g. > > > def gen_words(text) > ... parse text ... > yield each word in text > > for word in gen_words(text): > print word > > > I don't like the name gen_xxx() very much. Looking for some inspiration > to name generators. Here are so

Passing a Cookie with httplib

2006-06-28 Thread scott
Hello, >From a shell script, I have used /usr/bin/curl to access a web site and pass a cookie (as required by the site). But, I can't seem to accomplish this task with Python. I would like to use the httplib module to do this. Any thoughts on this subject? I would like to hard code the cookie i

Re: Psyco tagging the same function multiple times

2006-06-28 Thread skip
>> What (if anything) does it mean that it tagged Watcher.processUpdate >> more than once? olsongt> I think that's what Armin means by a *specializing* compiler. olsongt> I believe it will compile multiple versions based on the olsongt> arguments going into a block of code. I

Re: how do i make an array global

2006-06-28 Thread Georg Brandl
Bruno Desthuilliers wrote: > Georg Brandl wrote: >> Bruno Desthuilliers wrote: >> >>>a wrote: >>> def fn(): for i in range(l) >>> >>>l is not defined - you should have an error here. >>> >>> global count count[i]= how do i declare count to b

Re: Immutability

2006-06-28 Thread Georg Brandl
Nick Maclaren wrote: > In article <[EMAIL PROTECTED]>, > "Fredrik Lundh" <[EMAIL PROTECTED]> writes: > |> > |> identical? you only applied @property to one of the methods, and then > you're > |> surprised that only one of the methods were turned into a property? > > I wasn't expecting EITHER to

Re: Immutability

2006-06-28 Thread Georg Brandl
Duncan Booth wrote: > Georg Brandl wrote: > >> In my opinion property isn't really meant to be used as a decorator since >> it's impossible to create a read-write property. The decorator pattern >> doesn't really fit here. >> > I agree that property isn't currently intended to be used as a decora

Re: What is Expressiveness in a Computer Language [correction]

2006-06-28 Thread Joe Marshall
Andreas Rossberg wrote: > >~/> ocaml -rectypes > Objective Caml version 3.08.3 > ># let rec blackhole x = blackhole;; >val blackhole : 'b -> 'a as 'a = > > The problem is, though, that almost everything can be typed once you > have unrestricted recursive types (e.g. missing a

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread Pascal Costanza
Matthias Blume wrote: > Pascal Costanza <[EMAIL PROTECTED]> writes: > >>> And I am convinced that updating a running system in the style of, >>> e.g., Erlang, can be statically typed. >> Maybe. The interesting question then is whether you can express the >> kinds of dynamic updates that are releva

Re: How to parse timestamps containing milliseconds

2006-06-28 Thread skip
Chris> I'm trying to read a file containing timestamps with milliseconds Chris> ("2006/3/18 8:20:34.050") When I try to parse I get an error Chris> about the trailing ".050". Chris> How should I approach this? Here's the bad hack I use... def timeparse(t, format):

Re: [Pyrex] pyrex functions to replace a method (Re: replace a method in class: how?)

2006-06-28 Thread Lenard Lindstrom
On 28 Jun 2006 at 7:02, Brian Blais wrote: > Greg Ewing wrote: > > Brian Blais wrote: > >> I have found a very similar problem trying to replace a method using a > >> function defined in pyrex. > > > > > > What *should* work is to define the method inside a > > class in Pyrex (plain class, not

Re: Psyco tagging the same function multiple times

2006-06-28 Thread olsongt
[EMAIL PROTECTED] wrote: > I'm trying some stuff with Psyco and am confused about its apparent desire > to compile the same function (or method) multiple times). Here's an > abstract from a recent run: > > 12:45:15.99 tag function: __main__.Watcher.processUpdate% > 12:45:24.95 t

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread Matthias Blume
"Marshall" <[EMAIL PROTECTED]> writes: > Matthias Blume wrote: >> >> How does this "create" such a problem? The problem is there in either >> approach. In fact, I believe that the best chance we have of >> addressing the problem is by adopting the "replace the code" model >> along with a "transl

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread Joe Marshall
David Hopwood wrote: > Joe Marshall wrote: > > > > The point is that there exists (by construction) programs that can > > never be statically checked. > > I don't think you've shown that. I would like to see a more explicit > construction of a dynamically typed [*] program with a given specificati

Generator naming convention?

2006-06-28 Thread [EMAIL PROTECTED]
I use generators a lot. E.g. def gen_words(text) ... parse text ... yield each word in text for word in gen_words(text): print word I don't like the name gen_xxx() very much. Looking for some inspiration to name generators. Here are some of my ideas: enumerate_words gen_words gene

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread Matthias Blume
Pascal Costanza <[EMAIL PROTECTED]> writes: >> And I am convinced that updating a running system in the style of, >> e.g., Erlang, can be statically typed. > > Maybe. The interesting question then is whether you can express the > kinds of dynamic updates that are relevant in practice. Because a >

Re: Immutability

2006-06-28 Thread Duncan Booth
Georg Brandl wrote: > In my opinion property isn't really meant to be used as a decorator since > it's impossible to create a read-write property. The decorator pattern > doesn't really fit here. > I agree that property isn't currently intended to be used as a decorator, but it isn't actually *i

Psyco tagging the same function multiple times

2006-06-28 Thread skip
I'm trying some stuff with Psyco and am confused about its apparent desire to compile the same function (or method) multiple times). Here's an abstract from a recent run: 12:45:15.99 tag function: __main__.Watcher.processUpdate% 12:45:24.95 tag function: __main__.Watcher.process

Re: to py or not to py ?

2006-06-28 Thread Carl J. Van Arsdall
Robert Kern wrote: >> Carl , what are the problems that could arise with threading ?? >> Because of the GIL only one thread can actually run at a time. So if you are going for speed (say you have an SMP box) and your two requests require significant computation, you'd want each processor to

Re: What is Expressiveness in a Computer Language

2006-06-28 Thread Marshall
Matthias Blume wrote: > > How does this "create" such a problem? The problem is there in either > approach. In fact, I believe that the best chance we have of > addressing the problem is by adopting the "replace the code" model > along with a "translate the data where necessary at the time of > r

Re: ? on scipy.fftpack

2006-06-28 Thread Robert Kern
Mike Duffy wrote: > I've been debugging a simulation I wrote a while ago, and it seems that > the problem is in the fft module itself. I'm trying a simple test by > just feeding the function a basic real gaussian. Obviously, I should > get back the same real gaussian, but what I get is not even clo

A Solution using Tasks Re: [Stackless] Suggestion for a Solution ? Re: Blocking Problem with Stackless Python and Twisted

2006-06-28 Thread Andrew Francis
Hello Patrick: --- "Patrick M. Nielsen" <[EMAIL PROTECTED]> wrote: > I had a similar problem, and Radix's threadless > Twisted snippet proved to be > a very viable solution > > Have a look at: > >http://twistedmatrix.com/trac/browser/sandbox/radix/threadless.py?rev=17407 Thanks for the advice.

Python in a nutshell - new edition ?

2006-06-28 Thread Helmut Jarausch
Hi, is there a new edition of "Python in a Nutshell" covering Python 2.5 coming soon? Many thanks, Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - Aachen University D 52056 Aachen, Germany -- http://mail.python.org/mailman/listinfo/python-list

Re: Immutability

2006-06-28 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> writes: |> |> well, I completely fail to see how the following is compatible with the |> interpretation "attaches a non-default property, but doesn't do anything |> else": Because I was using a decorator and defining an attribut

Re: handling unicode data

2006-06-28 Thread Filipe
Fredrik Lundh wrote: > works for me, given your example: > >>> s = "Fran\xd8a" > >>> unicode(s, "iso-8859-1") > u'Fran\xd8a' > > what does > print repr(row[1]) > > print in this case ? It prints: 'Fran\xd8a' The error I'm getting is beeing thrown when I print the value to the console. If I

Re: compiling python (or ironpython) to .exe or .dll for or not for .NET

2006-06-28 Thread Luis M. González
per9000 wrote: > Hi python people, > > I am working with .NET (in C++/CLI and C#) but since I really love > python I'd like to do things for .NET (or whatever) from python. > > Has anyone tried it? > > What (costless) compilers are good? > > Are there any (costless) editors like MS Visual Express

Re: web Develop question

2006-06-28 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I' m new to python ...and I would like to ask you , wich is the best > template for developing dinamic generated pages using python ? > > I would like to use something easy to install and develop like php ? > tags and with a lots of features . > > thanks in advanc

Re: web Develop question

2006-06-28 Thread Luis M. González
[EMAIL PROTECTED] wrote: > hi guys , > > I' m new to python ...and I would like to ask you , wich is the best > template for developing dinamic generated pages using python ? > > I would like to use something easy to install and develop like php ? > tags and with a lots of features . > > than

Re: handling unicode data

2006-06-28 Thread Filipe
Hi, Martin v. Löwis wrote: > Also, it appears that DB-Library (the API used by pymssql) always > returns CP_ACP characters (unless ANSI-to-OEM conversion is enabled); > so the "right" encoding to use is "mbcs". do you mean using something like the following line? term = unicode(row[1], "mbcs") W

Re: Immutability

2006-06-28 Thread Fredrik Lundh
Nick Maclaren wrote: > I wasn't expecting EITHER to be turned INTO a property - I was expecting > both methods to be the same, but one would have non-default properties > attached to it. > |> that's what the documentation > |> says, and that's what your code is doing. > > Er, no, it doesn't. Wh

Re: handling unicode data

2006-06-28 Thread Fredrik Lundh
Filipe wrote: > Thanks for the reply. > Instead of: > term = row[1] > I tried: > term = unicode(row[1], "iso-8859-1") > > but the following error was returned when printing "term": > Traceback (most recent call last): > File "test.py", line 11, in ? > print term > File "c:\Program

web Develop question

2006-06-28 Thread [EMAIL PROTECTED]
hi guys , I' m new to python ...and I would like to ask you , wich is the best template for developing dinamic generated pages using python ? I would like to use something easy to install and develop like php tags and with a lots of features . thanks in advance and sorry for this silly questio

Re: Questions about OSS projects.

2006-06-28 Thread Terry Hancock
Paul McGuire wrote: > "Daniel Dittmar" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > If you've written a few small scripts that might be of use to > > others and that you assume that there are others who do the same, > > you might start with a wiki or something like the Pyth

  1   2   3   >