Re: re question

2006-06-23 Thread Paul McGuire
Shouldn't End Package Test; read: End Package Test123; -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Help req: Problems with MySQLdb

2006-06-23 Thread Simon Forman
Bruno Desthuilliers wrote: > Simon Forman wrote: > > rodmc wrote: ... > > except: > > print "A database connection error has occurred" > > How can you assert it is a database connection error ? assert "database connection" in error (just kidding) I was really just leaving as much of the OP's

Re: Python in HTML

2006-06-23 Thread Andy Dingley <[EMAIL PROTECTED]>
[EMAIL PROTECTED] wrote: > Python, like it's (evil?) cousin Perl, Isn't that evil cousin Ruby? Perl's the mad old grandmother in the attic, spewing out incomprehensible [EMAIL PROTECTED]&% swearing all day. > can be used as a CGI. If you > don't have one already, go download Apache server to pl

Re: re question

2006-06-23 Thread Daniel Sch
"Paul McGuire" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Shouldn't > > End Package Test; > > read: > > End Package Test123; > > > -- Paul yes it must :) my mistake thx -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Joe Marshall
Marshall wrote: > Joe Marshall wrote: > > > > That's the important point: I want to run broken code. > > I want to make sure I understand. I can think of several things > you might mean by this. It could be: > 1) I want to run my program, even though I know parts of it > are broken, because I thi

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Rob Thorpe wrote: > David Hopwood wrote: > > The term "dynamically typed" is well used and understood. The term > untyped is generally associated with languages that as you put it "have > no memory safety", it is a pejorative term. "Latently typed" is not > well used unfortunately, but more descr

USB and Python

2006-06-23 Thread Philippe Martin
Hi, I need to talk to a USB device (PC or other) from Python - I am not talking about mounting a file system but sharing information as you would though a TCP-IP socket layer or an RS232 interface. Is there such "low-level" module available for Windows / Linux ? Thanks, Philippe -- http://mai

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Andreas Rossberg wrote: > Marshall wrote: > > > > What we generally (in programming) call variables are locals > > and globals. If the languages supports an update operation > > on those variables, then calling them variables makes sense. > > But "variable" has become such a catch-all term that we

Re: Opening a file with system default application

2006-06-23 Thread BartlebyScrivener
don't know Jython, but in Python, I think you want: import os os.system('mytextfile.txt') Whatever file you reference should open in the application associated with it. At least that's the way it works on Win XP rd -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Joe Marshall
Marshall wrote: > Timo Stamm wrote: > > > > This is actually one of the most interesting threads I have read in a > > long time. If you ignore the evangelism, there is a lot if high-quality > > information and first-hand experience you couldn't find in a dozen books. > > Hear hear! This is an *exc

Re: Opening a file with system default application

2006-06-23 Thread tac-tics
BartlebyScrivener wrote: > don't know Jython, but in Python, I think you want: > > import os > > os.system('mytextfile.txt') > > Whatever file you reference should open in the application associated > with it. At least that's the way it works on Win XP > > rd I didn't think about that. It would pr

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Dr.Ruud
Marshall schreef: > It seems we have languages: > with or without static analysis > with or without runtime type information (RTTI or "tags") > with or without (runtime) safety > with or without explicit type annotations > with or without type inference > > Wow. And I don't think that's a complete

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Dr.Ruud
Rob Thorpe schreef: > I would suggest that at least assembly should be referred to as > "untyped". There are many different languages under the umbrella of "assembly", so your suggestion is bound to be false. -- Affijn, Ruud "Gewoon is een tijger." -- http://mail.python.org/mailman/listinfo

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Pascal Costanza wrote: > Marshall wrote: > > Pascal Costanza wrote: > >> Consider a simple expression like 'a + b': In a dynamically typed > >> language, all I need to have in mind is that the program will attempt to > >> add two numbers. In a statically typed language, I additionally need to > >>

Getting Python scripts to execute in RedHat

2006-06-23 Thread Pythor
I apologise if this is a stupid newbie error, but I've been googling "hash bang" and "shebang" all morning. I've added the shebang to my scripts: #!/usr/bin/python I've added execute permissions: chmod +rx shebang.py But I still can't execute my scripts by themselves shebang.py ## produces e

Re: Opening a file with system default application

2006-06-23 Thread BartlebyScrivener
>> It would probably break like mad under *nix I bet it would work the same way on linux or os x; it's the equivalent of double-clicking on the file. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a type error?

2006-06-23 Thread Chris Smith
Chris Uppal <[EMAIL PROTECTED]> wrote: > That was the point of my first sentence (quoted above). I take it, and I > assumed that you shared my view, that there is no single "the" type system -- > that /a/ type system will yield judgements on matters which it has been > designed to judge. Yes, I

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Rob Thorpe
Dr.Ruud wrote: > Rob Thorpe schreef: > > > I would suggest that at least assembly should be referred to as > > "untyped". > > There are many different languages under the umbrella of "assembly", so > your suggestion is bound to be false. Well yes, it is false, I know of several typed assemblers. B

Re: Saying "latently-typed language" is making a category mistake

2006-06-23 Thread Chris Uppal
Pascal Costanza wrote: > Sorry, obviously I was far from being clear. ACL2 is not > Turing-complete. All iterations must be expressed in terms of > well-founded recursion. How expressive does that end up being for real problems ? I mean obviously in some sense it's crippling, but how much of a

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Chris Uppal
Andreas Rossberg wrote: > So what you are suggesting may be an interesting notion, but it's not > what is called "type" in a technical sense. Overloading the same term > for something different is not a good idea if you want to avoid > confusion and misinterpretations. Frivolous response: the wor

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Darren New
Marshall wrote: > I can't see how you'd call + on a and b if you think they might > not be numbers. Now substitute "<" for "+" and see if you can make the same argument. :-) -- Darren New / San Diego, CA, USA (PST) Native Americans used every part of the buffalo, including the win

Re: Network Programming in Python

2006-06-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2006-06-23, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> How will Pyon help my cause ? > >What's Pyon? . . . A misreading of "Pyro". Pyro http:

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Chris Smith
Marshall <[EMAIL PROTECTED]> wrote: > Ouch; I have a really hard time understanding this. > > I can't see how you'd call + on a and b if you think they might > not be numbers. If they could be something other than numbers, > and you're treating them as if they are, is that sort of like > doing a c

Re: Clearing pythonwin environment

2006-06-23 Thread Steven Bethard
Network Ninja wrote: > I want to restart the environment occasionally to default (like I > restarted pythonwin). I wrote this script. I know why it doesn't work, > cause it deletes my variable (item) on each iteration. My question is: > is it possible to do this? What other things might I try? > >

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Chris Smith
Chris Smith <[EMAIL PROTECTED]> wrote: > Programming languages do this all the time, as well. The most popular > example is the OO sense of the word polymorphism. That's all about > being able to write code that works with a range of values regardless of > (or, at least, a range that less cons

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Chris Uppal wrote: > > But, as a sort of half-way, semi-formal, example: consider the type > environment > in a Java runtime. The JVM does formal type-checking of classfiles as it > loads > them. In most ways that checking is static -- it's treating the bytecode as > program text and doing a st

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Chris Smith
Marshall <[EMAIL PROTECTED]> wrote: > Java has a static type system. > Java has runtime tags and tag checks. Yes. > The two are distinct, and neither one is less than complete How is neither one less than complete? -- Chris Smith - Lead Software Developer / Technical Trainer MindIQ Corporation

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Rob Thorpe
Andreas Rossberg wrote: > Rob Thorpe wrote: > > > > Its easy to create a reasonable framework. > > Luca Cardelli has given the most convincing one in his seminal tutorial > "Type Systems", where he identifies "typed" and "safe" as two orthogonal > dimensions and gives the following matrix: > >

PEP 314 - requirements for Python itself

2006-06-23 Thread Mark Nottingham
PEP 314 introduces metadata that explains what packages are required by a particular package. Is there any way to express what version of Python itself is required? Cheers, -- Mark Nottingham http://www.mnot.net/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Opening a file with system default application

2006-06-23 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, BartlebyScrivener wrote: >>> It would probably break like mad under *nix > > I bet it would work the same way on linux or os x; it's the equivalent > of double-clicking on the file. No it doesn't work. Double clicking is not an OS thing but a a GUI thing. Ciao,

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread rossberg
Rob Thorpe wrote: > > But it differs from latently typed languages like python, perl or lisp. > In such a language there is no information about the type the variable > stores. The programmer cannot write code to test it, and so can't > write functions that issue errors if given arguments of the

Re: Getting Python scripts to execute in RedHat

2006-06-23 Thread Daniel Nogradi
> I apologise if this is a stupid newbie error, but I've been googling > "hash bang" and "shebang" all morning. I've added the shebang to my > scripts: > > #!/usr/bin/python > > I've added execute permissions: > > chmod +rx shebang.py > > But I still can't execute my scripts by themselves > > sheb

Re: hard to explain for a french ;-)

2006-06-23 Thread Daniel Nogradi
> hi everybody, > > i have a problem with a script. > after a research with my directory, i want to do a popup of a person's > photo but i don't know the syntax (i'm a newbie) : > > with a javascript : "">Popup don't work > > with the function window.open : tal:attributes="python:onClick string:j

Re: serial port servo control

2006-06-23 Thread Scott David Daniels
Several have suggested struct, I'd suggest you look at array: import array v = array.array('B', [1, 2, 3]) for i in range(17): v[i % 3] *= max(1, i // 3) v.tostring() --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: hard to explain for a french ;-)

2006-06-23 Thread Tim Chase
> As explained in this thread > http://mail.python.org/pipermail/python-list/2006-June/348241.html > what you try to do will never work because your attempts are > at using python on the client side and only javascript works > for that purpose. Sounds like an opportunity to write JSPython...writ

Re: PEP 314 - requirements for Python itself

2006-06-23 Thread Serge Orlov
On 6/23/06, Mark Nottingham <[EMAIL PROTECTED]> wrote: > PEP 314 introduces metadata that explains what packages are required > by a particular package. Is there any way to express what version of > Python itself is required? No, but you can do it yourself: # do not edit this file, edit actualset

Re: Network Programming in Python

2006-06-23 Thread Grant Edwards
On 2006-06-23, Cameron Laird <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Grant Edwards <[EMAIL PROTECTED]> wrote: >>On 2006-06-23, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> >>> How will Pyon help my cause ? >> >>What's Pyon? > . >

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Rob Thorpe
[EMAIL PROTECTED] wrote: > Rob Thorpe wrote: > > > > But it differs from latently typed languages like python, perl or lisp. > > In such a language there is no information about the type the variable > > stores. The programmer cannot write code to test it, and so can't > > write functions that is

Re: How to generate all permutations of a string?

2006-06-23 Thread Boris Borcic
Another generator solution, based on computing a permutation from its rank according to some natural order. Written for strings. def perms(s) : def nth(n,L,k=1) : if k>len(L) : if n : raise StopIteration return '' return nth(n/k,L,

Re: Flight search automation

2006-06-23 Thread mkPyVS
If you look at the <> generated HTML @Travelocity **Snippet function on_load() { var finurl = "AirSearch.do?SEQ=11510863338485232006"; window.location.replace(finurl); ** It is basically a re-direct.. you should be able to re-request an HTTP to the base path from the original q

Python on intel osx

2006-06-23 Thread John Lockwood
Title: Python on intel osx Can some one please suggest the most suitable python  for mac osx 10.4.6 Finding the right the installs doesn’t seem quite as cut and dried as it is for linux or windows. I’m also looking for numeric and pyopengl. Cheers -- http://mail.python.org/mailman/list

Re: PEP 314 - requirements for Python itself

2006-06-23 Thread Mark Nottingham
Yep, I'm doing that (thanks!). I was looking for some normal (hopefully, machine-readable) way to indicate it so that people can figure out the version of Python required before they download the package. On 2006/06/23, at 11:04 AM, Serge Orlov wrote: > On 6/23/06, Mark Nottingham <[EMAIL P

Re: Python in HTML

2006-06-23 Thread Mitja Trampus
[EMAIL PROTECTED] wrote: > Does anyone know of a way to embed python scripts into html, much like > you would javascript or php? Two very different things, JS and PHP... First make sure you know what you're after. If you want PHP-like embedding of code, google for "python server pages". Several

Re: Reuseable iterators - which is better?

2006-06-23 Thread Mitja Trampus
zefciu wrote: > In the tutorial there is an example iterator class that revesrses the > string given to the constructor. The problem is that this class works > only once, unlike built-in types like string. How to modify it that it > could work several times? I have tried two approaches. They bo

templating languages for webdev

2006-06-23 Thread a
cheetah vs django vs kid Any of you have experience using kid templates please let us know what you feel about it thanks sincerely jason -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Dr.Ruud
Chris Smith schreef: > Static types are not fuzzy Static types can be fuzzy as well. For example: a language can define that extra accuracy and bits may be used for the implementation of calculations: d = a * b / c Often some minimum is guaranteed. > I see it as quite reasonable when there's an

Re: What is a type error?

2006-06-23 Thread Eliot Miranda
Darren New wrote: > Eliot Miranda wrote: > >> can only actually carry-out operations on objects that implement them. > > > Execpt that every operation is implemented by every object in Smalltalk. No they are not. Objects implement the methods defined by their class and (inherit) those im

Re: Clearing pythonwin environment

2006-06-23 Thread Scott David Daniels
Network Ninja wrote: > I want to restart the environment occasionally to default (like I > restarted pythonwin). I wrote this script. I know why it doesn't work, > cause it deletes my variable (item) on each iteration. My question is: > is it possible to do this? What other things might I try? > >

Re: Getting Python scripts to execute in RedHat

2006-06-23 Thread Pythor
Dennis Lee Bieber wrote: > Now, if you mean you store all your python programs in > "~/pyscripts/" but you want them to run from any directory, you need to > add "~/pyscripts/" to your login PATH definition. If you want to always > make the local directory valid, add the "./". Thank You. Betwee

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Chris Uppal
Marshall wrote: [me:] > > But, as a sort of half-way, semi-formal, example: consider the type > > environment in a Java runtime. The JVM does formal type-checking of > > classfiles as it loads them. In most ways that checking is static -- > > it's treating the bytecode as program text and doing

Re: What is a type error?

2006-06-23 Thread Chris Uppal
Chris Smith wrote: > But then, I > dislike discussion of strong/weak type systems in the first place. It > doesn't make any sense to me to say that we verify something and then > don't do anything if the verification fails. In those cases, I'd just > say that verification doesn't really exist or

Re: What is a type error?

2006-06-23 Thread Darren New
Eliot Miranda wrote: > classes do _not_ have to inherit from Object, I was unaware of this subtlety. Thanks! -- Darren New / San Diego, CA, USA (PST) Native Americans used every part of the buffalo, including the wings. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread rossberg
Rob Thorpe write: > > > > Take one of these languages. You have a variable that is supposed to > > store functions from int to int. Can you test that a given function > > meets this requirement? > > The answer is no for python and perl AFAIK. Also no for lisp _aux > naturelle_ (you can do it by mo

PIL problems

2006-06-23 Thread defcon8
Hello. I have been trying to use PIL's .putdata() method and I have been having some problems. The error I get is: Traceback (most recent call last): File "realautomata.py", line 72, in ? nim.putdata(y) File "C:\Python24\Lib\site-packages\PIL\Image.py", line 1120, in putdata self.im.pu

Re: Opening a file with system default application

2006-06-23 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >In <[EMAIL PROTECTED]>, >BartlebyScrivener wrote: > It would probably break like mad under *nix >> >> I bet it would work the same way on linux or os x; it's the equivalent >> of double-clicking on the file.

Re: hard to explain for a french ;-)

2006-06-23 Thread johnzenger
How about an effort to "compile" Python into JavaScript? Such an effort is underway for Scheme. http://www-sop.inria.fr/mimosa/personnel/Florian.Loitsch/scheme2js/ Tim Chase wrote: > > As explained in this thread > > http://mail.python.org/pipermail/python-list/2006-June/348241.html > > what you

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Chris Smith
Dr.Ruud <[EMAIL PROTECTED]> wrote: > Chris Smith schreef: > > > Static types are not fuzzy > > Static types can be fuzzy as well. For example: a language can define > that extra accuracy and bits may be used for the implementation of > calculations: d = a * b / c > Often some minimum is guarantee

Re: templating languages for webdev

2006-06-23 Thread Roman Yakovenko
On 23 Jun 2006 12:28:24 -0700, a <[EMAIL PROTECTED]> wrote: > cheetah vs django vs kid > > Any of you have experience using kid templates please let us know what > you feel about it thanks kid templates is great piece of software. I built my site http://www.language-binding.net/ using it and Docu

Re: Saying "latently-typed language" is making a category mistake

2006-06-23 Thread Pascal Costanza
Chris Uppal wrote: > Pascal Costanza wrote: > >> Sorry, obviously I was far from being clear. ACL2 is not >> Turing-complete. All iterations must be expressed in terms of >> well-founded recursion. > > How expressive does that end up being for real problems ? I mean obviously > in > some sense

subprocess.Popen on Windows

2006-06-23 Thread madpython
playing with subprocess.Popen on Windows I stumbled into the following problem: Python 2.4.3 (#69, Mar 29 2006, 17:35:34) IDLE 1.1.3 >>> import subprocess >>> p1=subprocess.Popen("c:\\asd.bat") #works OK >>> p2=subprocess.Popen("c:\\asd.bat",stdout=subprocess.PIPE) Traceback (most recent call la

Re: hard to explain for a french ;-)

2006-06-23 Thread Gerard Flanagan
Daniel Nogradi wrote: > > hi everybody, > > > > i have a problem with a script. > > after a research with my directory, i want to do a popup of a person's > > photo but i don't know the syntax (i'm a newbie) : > > > > > src="user.gif"> it's good but, it's open the photo in a large > > window, not

Re: What is a type error?

2006-06-23 Thread Marshall
Chris Uppal wrote: > /Given/ a set of operations which I want to forbid, > I would like to say that a "dynamic type system" which prevents them executing > is doing very much the same job as a static type system which stops the code > compiling. There are similarities, (classifying values into ca

Re: need helping tracking down weird bug in cPickle

2006-06-23 Thread Dieter Maurer
[Carl J. Van Arsdall] > Hey everyone, cPickle is raising an ImportError that I just don't quite > understand. When I get in such a situation, I replace "cPickle" with Python's "pickle". Usually, I get the same exception -- but this time with a traceback that can be analysed with "pdb.pm()". Usuall

Re: Remote Boot Manager Scripting (Python)

2006-06-23 Thread Dieter Maurer
[EMAIL PROTECTED] writes on 21 Jun 2006 07:43:17 -0700: > ... > I have to remotely start a computer. It has dual boot (WinXP and > Linux). > My remote computer is Linux which will send command to remotely boot > the other computer. > > Can we write python script or some utility which would let us

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Chris Uppal wrote: > David Hopwood wrote: > > > > But some of the advocates of statically > > > typed languages wish to lump these languages together with assembly > > > language a "untyped" in an attempt to label them as unsafe. > > > > A common term for languages which have defined behaviour at r

Re: Saying "latently-typed language" is making a category mistake

2006-06-23 Thread Patricia Shanahan
Chris Smith wrote: > Patricia Shanahan <[EMAIL PROTECTED]> wrote: >> Vesa Karvonen wrote: >> ... >>> An example of a form of informal reasoning that (practically) every >>> programmer does daily is termination analysis. There are type systems >>> that guarantee termination, but I think that is fai

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Andreas Rossberg wrote: > > ... And the reason is that "type" has a > well-established use in theory. It is not just my "assumption", it is > established practice since 80 or so years. Wouldn't it be fair to say it goes back a least to Principia Mathematica, 1910? > So far, this discussion has >

Re: Saying "latently-typed language" is making a category mistake

2006-06-23 Thread Chris Uppal
Chris Smith wrote: > Perhaps, if you wanted to be quite careful about your distinctions, you > may want to choose different words for the two. However, then you run > into that same pesky "you can't choose other people's terminology" block > again. There may be more flexibility in this area than

Re: Opening a file with system default application

2006-06-23 Thread BartlebyScrivener
>>> That also pops up a command shell window, which may not be >>> desirable. On Windows, there is >>> os.startfile("someknown.type") Ack. You're right. I get them mixed up. And os.startfile is Windows only. Sorry. rd -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen on Windows

2006-06-23 Thread 3c273
"madpython" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > playing with subprocess.Popen on Windows I stumbled into the following > problem: > Python 2.4.3 (#69, Mar 29 2006, 17:35:34) > > IDLE 1.1.3 > > >>> import subprocess > >>> p1=subprocess.Popen("c:\\asd.bat") #works OK > >>> p

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Joe Marshall wrote: > Marshall wrote: > > Joe Marshall wrote: > > > > > > That's the important point: I want to run broken code. > > > > I want to make sure I understand. I can think of several things > > you might mean by this. It could be: > > 1) I want to run my program, even though I know part

Re: code is data

2006-06-23 Thread Paul Boddie
Anton Vredegoor wrote: > Paul Boddie wrote: > > > > I was going to write a long reply to one of your previous messages, but > > the above link references a project which may intersect with some of > > your expectations. Meanwhile, it should be noted that the availability > > Somehow I get the impre

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Joe Marshall wrote: > Marshall wrote: > > Timo Stamm wrote: > > > > > > This is actually one of the most interesting threads I have read in a > > > long time. If you ignore the evangelism, there is a lot if high-quality > > > information and first-hand experience you couldn't find in a dozen books.

Re: What is a type error?

2006-06-23 Thread Chris Smith
Chris Uppal <[EMAIL PROTECTED]> wrote: > > if (x != 0) y = 1 / x; > > else y = 9; > > > > is not all that much different from: > > > > try { y = 1 / x; } > > catch (ArithmeticException e) { y = 9; } > My immediate thought is that the same question is equally applica

Re: Saying "latently-typed language" is making a category mistake

2006-06-23 Thread Marshall
Chris Uppal wrote: > Pascal Costanza wrote: > > > Sorry, obviously I was far from being clear. ACL2 is not > > Turing-complete. All iterations must be expressed in terms of > > well-founded recursion. > > How expressive does that end up being for real problems ? I mean obviously > in > some sens

Trouble including Python.h

2006-06-23 Thread Marcelo Gosling
Hi, everyone. This is on WinXP SP2, with Python 2.4.3 and DJGPP gcc 4.1.0. I'm having trouble including Python.h in a C file. The following C code: #include "Python.h" int main() { return 0; } when compiled with "gcc -I..\Python2.4\include\", gives more than 1000 lines of errors, beginning

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Darren New wrote: > Marshall wrote: > > I can't see how you'd call + on a and b if you think they might > > not be numbers. > > Now substitute "<" for "+" and see if you can make the same argument. :-) If your point is about overloading, then I don't see how it affects my point. My point was, I do

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Chris Smith wrote: > Marshall <[EMAIL PROTECTED]> wrote: > > Ouch; I have a really hard time understanding this. > > > > I can't see how you'd call + on a and b if you think they might > > not be numbers. If they could be something other than numbers, > > and you're treating them as if they are, is

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Chris Smith wrote: > Marshall <[EMAIL PROTECTED]> wrote: > > Java has a static type system. > > Java has runtime tags and tag checks. > > Yes. > > > The two are distinct, and neither one is less than complete > > How is neither one less than complete? In the same way that a mule is less than a com

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Rob Thorpe wrote: > > Can I make a type in C that can only have values between 1 and 10? > How about a variable that can only hold odd numbers, or, to make it > more difficult, say fibonacci numbers? Well, of course you can't in *C*; you can barely zip you pants with C. But I believe you can do th

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Marshall
Chris Uppal wrote: > Marshall wrote: > > [me:] > > > But, as a sort of half-way, semi-formal, example: consider the type > > > environment in a Java runtime. The JVM does formal type-checking of > > > classfiles as it loads them. In most ways that checking is static -- > > > it's treating the byt

Re: Clearing pythonwin environment

2006-06-23 Thread Network Ninja
Scott David Daniels wrote: > keep = set(['__builtins__', '__doc__', '__name__', > 'pywin', 'keep', 'item', 'globs']) # Faster to test > globs = globals() > for item in dir(): > if item not in keep: > del globs[item] > del globs, item Thi

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Darren New
Marshall wrote: > point. My point was, I don't see why you'd be writing code using > operators that you thought might not be applicable to the operands. I see. I thought your point was that you might write code for which you didn't know the type of arguments. Unless you equate "type" with what s

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Duane Rettig
"Marshall" <[EMAIL PROTECTED]> writes: > Pascal Costanza wrote: >> Marshall wrote: >> > Pascal Costanza wrote: >> >> Consider a simple expression like 'a + b': In a dynamically typed >> >> language, all I need to have in mind is that the program will attempt to >> >> add two numbers. In a statical

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Duane Rettig
Darren New <[EMAIL PROTECTED]> writes: > Marshall wrote: >> I can't see how you'd call + on a and b if you think they might >> not be numbers. > > Now substitute "<" for "+" and see if you can make the same argument. :-) Sure. Properly extended to handle strings, "abc" < "def" might return true.

Python on intel osx

2006-06-23 Thread John Lockwood
Can someone please suggest the most suitable python for mac osx 10.4.6 Finding the right installs doesn¹t seem quite as cut and dried as it is for linux or windows. I¹m also looking for numeric and pyopengl. Cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble including Python.h

2006-06-23 Thread vduber6er
Try #undef _DEBUG #include "C:\Python24\include\python.h" or which ever path your python.h is located at works for me Marcelo Gosling wrote: > Hi, everyone. > > This is on WinXP SP2, with Python 2.4.3 and DJGPP gcc 4.1.0. > > I'm having trouble including Python.h in a C file. The following C >

Re: Python on intel osx

2006-06-23 Thread Lawrence Oluyede
John Lockwood <[EMAIL PROTECTED]> wrote: > Can someone please suggest the most suitable python for mac osx 10.4.6 > Finding the right installs doesn't seem quite as cut and dried as it is for > linux or windows. open google, type "python osx" and go to the _second_ result. It's http://pythonmac.

Re: Unicode problem with exec

2006-06-23 Thread John Machin
On 23/06/2006 9:06 PM, Thomas Heller wrote: > I'm using code.Interactive console but it doesn't work correctly > with non-ascii characters. I think it boils down to this problem: > > Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on > win32 > Type "help", "copyright", "cre

Re: Trouble including Python.h

2006-06-23 Thread Marcelo Gosling
No, that didn't do the trick. The main reason I'm posting this here is that I get all tese error messages just from including Python.h, the code itself does absolutely nothing. Cheers vduber6er wrote: > Try > > #undef _DEBUG > #include "C:\Python24\include\python.h" > > or which ever path your py

Re: Saying "latently-typed language" is making a category mistake

2006-06-23 Thread Chris Smith
Chris Uppal wrote: > > I'd be more careful in the analogy, there. Since type theory (as > > applied to programming languages, anyway) is really just a set of > > methods of proving arbitrary statements about program behaviors, > > Not "arbitrary" -- there is only a specific class of statements th

Re: Error with OpenOffice

2006-06-23 Thread w chun
> Subject: Error with OpenOffice > From: "Mario Lacunza" > Date: Thu Apr 20 06:30:19 CEST 2006 > > I try to make the exercises found in Ooo website but I receipt this > error: > > mario at laptop:~$ python > Python 2.4.2 (#2, Sep 30 2005, 21:19:01) > [GCC 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-

Re: urllib2 OpenerDirector question on usage.

2006-06-23 Thread John J. Lee
"Ant" <[EMAIL PROTECTED]> writes: > I am using urllib2 as a part of a web testing tool. One of the things I > am testing is the effect of two different people perforing the same > actions on the website - do they interfer with each other or not. > > So to emulate this, I essentially have the foll

Re: OpenOffice UNO export PDF help needed

2006-06-23 Thread w chun
> > Subject: OpenOffice UNO export PDF help needed > > From: "Sells, Fred" > > Date: Sun Apr 30 04:17:43 CEST 2006 > > > > I've geen googling for 3 days now, and cannot find out how to do this. > > > > I'm trying to use OpenOffice 2.0 and UNO to generate PDF documents. I'm > > using windows, but

Re: pyuno and oootools with OpenOffice 2.0

2006-06-23 Thread w chun
> Subject: pyuno and oootools with OpenOffice 2.0 > From: "Sells, Fred" > Date: Thu May 4 17:37:35 CEST 2006 > > I'm using windows xp and OpenOffice 2.0 and doing my first project with > pyuno. > > I've got the basics to work,. An example I googled at > http://blogs.nuxeo.com/sections/aggregators

Re: Clearing pythonwin environment

2006-06-23 Thread Scott David Daniels
Network Ninja wrote: > Scott David Daniels wrote: >> keep = set(['__builtins__', '__doc__', '__name__', >> 'pywin', 'keep', 'item', 'globs']) # Faster to test >> globs = globals() >> for item in dir(): >> if item not in keep: >> del globs[item]

Re: pyuno and PDF output

2006-06-23 Thread w chun
> Subject: pyuno and PDF output > From: "Sells, Fred" > Date: Thu May 4 19:20:57 CEST 2006 > > I can use java to output a PDF file using uno, but when I try to do it in > python, I get an IO Exception with no added information. The relevant code > snippet follows: > > from com.sun.star.beans imp

Travails of the JVM type system (was: What is Expressiveness in a Computer Language)

2006-06-23 Thread David Hopwood
Chris Uppal wrote: > Maybe you are thinking that I mean that /because/ the JVM does verification, > etc, at "runtime" the system is hybrid ? > > Anyway that is /not/ what I mean. I'm (for these purposes) completely > uninterested in the static checking done by the Java to bytecode translator, > j

Re: What is a type error?

2006-06-23 Thread David Hopwood
Pascal Costanza wrote: > Chris Smith wrote: > >> While this effort to salvage the term "type error" in dynamic >> languages is interesting, I fear it will fail. Either we'll all have >> to admit that "type" in the dynamic sense is a psychological concept >> with no precise technical definition (a

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Dr.Ruud
Marshall schreef: > Rob Thorpe: >> Can I make a type in C that can only have values between 1 and 10? >> How about a variable that can only hold odd numbers, or, to make it >> more difficult, say fibonacci numbers? > > Well, of course you can't in *C*; you can barely zip you pants with C. > But I

<    1   2   3   >