Re: Python vs. Lisp -- please explain

2006-02-19 Thread Steven D'Aprano
On Sat, 18 Feb 2006 23:35:27 -0600, DH wrote: > > I'm wondering if someone can explain to me please what it is about > > Python that is so different from Lisp that it can't be compiled into > > something as fast as compiled Lisp? From this above website and > > others, I've learned that compiled

Re: os.mkdir simple help

2006-02-19 Thread Steven D'Aprano
On Sat, 18 Feb 2006 23:51:42 -0800, m.wanstall wrote: > test = input("Please enter project name: ") > setupProject(test) > > If I enter "roger" as my input I get : NameError: name 'roger' is not > defined > > I know it's incredibly simple but help would be much appreciated! > Thanks in advance!

Re: Multiplication optimization

2006-02-19 Thread Atanas Banov
Paul McGuire wrote: > Does Python's run-time do any optimization of multiplication > operations, like it does for boolean short-cutting? That is, for a > product a*b, is there any shortcutting of (potentially expensive) > multiplication operations no. and the reason is very simple: to the extent

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Robert J. Hansen
> what [is it] about Python that is so different from Lisp that it > can't be compiled into something as fast as compiled Lisp? IMO, it's the lack of competing implementations. LISP has a very well-defined ANSI specification. Lots of different people have written LISPs, from Franz to Steel Bank

Re: os.mkdir simple help

2006-02-19 Thread m . wanstall
That's got it, thanks Steven! -- http://mail.python.org/mailman/listinfo/python-list

Re: aborting without killing the python interpreter

2006-02-19 Thread Fabrizio Milo
import sys def main(): print 'exiting' sys.exit() try: main() except SystemExit: pass > I suspect I may need to use exceptions, but I'm hoping > not to need them. Thanks. Use the Exceptions! -- http://mail.python.org/mailman/listinfo/python-list

Re: Komodo - Will it Lock Me In?

2006-02-19 Thread Jarek Zgoda
Matt Trivisonno napisał(a): > Any other thoughts on Komodo? I am considering it because I am hoping to find > a solution to the install-packages-until-you-go-blind aspect of Python. > Setting up a serious, cross-platform, gui development environment is quite a > struggle for a newbie. Komodo i

Re: general coding issues - coding style...

2006-02-19 Thread calmar
On 2006-02-18, Justin Azoff <[EMAIL PROTECTED]> wrote: Hi all, > Dylan Moreland wrote: >> I would look into one of the many Vim scripts which automatically fold >> most large blocks without the ugly {{{. > > Who needs a script? > "set foldmethod=indent" > works pretty well for most python progra

Re: ANN: FreeImagePy 1.2.2

2006-02-19 Thread Uwe Grauer
Andrew Gwozdziewycz wrote: >> Knowing some details about PIL and as good as no details about >> FreeImage, I would like in this context to become enlightened by the >> answer to the question, when does it make sense to use FreeImage instead >> of PIL? >> From what I know up to now I can't see any

Re: Should we still be learning this?

2006-02-19 Thread Felipe Almeida Lessa
Em Sáb, 2006-02-18 às 15:13 +0200, Max escreveu: > > I wonder if they need some updating. > > > > And so does Dive Into Python (our textbook, diveintopython.org) which > has the same deficiencies in its outline. Are they being *paid* for teaching? Then they should overcome this issue of Dive In

Re: Python vs. Lisp -- please explain

2006-02-19 Thread bearophileHUGS
The question about the speed is interesting. Generally the more dynamic and flexible your language is, the slower are the programs it produces. Lisp is almost unique in such matters (and in this regard it's maybe better than CPython) because it allows the programmer to mix and blend different level

Re: ANN: FreeImagePy 1.2.2

2006-02-19 Thread Fredrik Lundh
Uwe Grauer wrote: > Did you read the PIL licence? > Seems to be a more free licence than GPL. footnote: PIL's using the old Python license, which is also known as the "Historical Permission Notice and Disclaimer": http://www.opensource.org/licenses/historical.php -- http://mail.python.

Re: general coding issues - coding style...

2006-02-19 Thread calmar
On 2006-02-18, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, > 1585 if sys.path[0][-12:] == "\library.zip": #for py2exe > if sys.path[0].endswith( "\\library.zip" ): cool, thx, > (did you really mean one back-slash there?) (yeah, one backslash) > 499 tuple = os.path.split(filename) >

How to configure proxy authentication when using urllib2?

2006-02-19 Thread Licheng Fang
I use a HTTP proxy to connect to Internet. When I run ulropen command I get HTTP Error 407: Proxy authorization required. Could anybody tell me how to resolve this? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to configure proxy authentication when using urllib2?

2006-02-19 Thread hanxianpei
I want to know that, too! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Roy Smith
DH <[EMAIL PROTECTED]> wrote: > -python has true closures (although nothing like ruby's blocks) What is a "true closure"? Or, maybe what I'm asking is what kind of closure wouldn't be a true closure? Is there some kind of ersatz closure other language try to pass off, in violation of truth in

Re: commenting out blocks of code

2006-02-19 Thread Peter Hansen
Steve Holden wrote: > Steven D'Aprano wrote: >>On Fri, 17 Feb 2006 19:12:01 -0500, Peter Hansen wrote: >>>Scite, for example, lets me selected a block and hit Ctrl-Q to either >>>comment or uncomment the block. >>>(It does this by prefixing each line >>>with #~ instead of just #, which allows it

Re: How to configure proxy authentication when using urllib2?

2006-02-19 Thread Jarek Zgoda
Licheng Fang napisał(a): > I use a HTTP proxy to connect to Internet. When I run ulropen command I > get HTTP Error 407: Proxy authorization required. Could anybody tell me > how to resolve this? Thanks! You can build and install opener instance, then all urllib2 calls will use it. Some informat

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Roy Smith
"Robert J. Hansen" <[EMAIL PROTECTED]> wrote: > LISP has a very well-defined ANSI specification. Lots of different > people have written LISPs, from Franz to Steel Bank to GNU to... etc. > Each of these competes with the others on different grounds; some are > purely interpreted (ala CLISP), some

Re: How many web framework for python ?

2006-02-19 Thread Bruno Desthuilliers
Bo Yang a écrit : > Hello everybody , > I am a student major in software engeering . > I need to do something for my course . > > There are very good web framework for java and ruby , > Is there one for python ? In fact, there are actually too much *good* python web frameworks. > I want to write

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Torsten Bronger
Hallöchen! Roy Smith <[EMAIL PROTECTED]> writes: > [...] > > It's been a while since I've dabbled in lisp, but my recollection > is that the plethora of different implementations has also meant > that portability is a fantasy. > > I dread the day that competing Python implementations spring up.

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Fredrik Lundh
Roy Smith wrote: > I dread the day that competing Python implementations spring up. where were you in 1997? http://www.python.org/workshops/1997-10/proceedings/hugunin.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Get parameters from URL using CGI

2006-02-19 Thread John Zenger
import cgi import cgitb; cgitb.enable() # Optional; for debugging only print "Content-Type: text/html" print f = cgi.FieldStorage() for i in f.keys(): print "",i,":",f[i].value abcd wrote: > i want to create a CGI script which simply prints out values given via > the URL (such as when a GE

Re: Any Tkinker based rich text widget?

2006-02-19 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I am using the standard python GUI Tkinter as my program's main > interface. Although I know wxPython has some widget to support rich > text widget, but I do not have time to shift to wx series. Does > anyone know any Tkinter based widget that support: > > 1. Blod, I

Re: 2-dimensional data structures

2006-02-19 Thread Gerard Flanagan
anthonyberet wrote: > I want to work on a sudoku brute-forcer, just for fun. >... > Thanks for the advice (to everyone in the thread). > I think I will go with nested lists. > However, I am running into a conceptual problem. > My approach will be firstly to remove all the impossible digits for a >

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Luis M. González
>IMO, it's the lack of competing implementations. I beg to differ in this point. There are other implementations, but they are not called "python" and they are not a 100% python in syntax and features. For example, Boo is 95% python syntax wise, but statically typed. This fundamental difference ma

Re: define loop statement?

2006-02-19 Thread David Isaac
"Benji York" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Here's a flagrant hack: Admiration wins out over revulsion. ;-) Thanks, Alan Isaac PS Here's the motivation. Python closely resembles pseudocode. With a very little LaTeX hacking, it is often possible to write algorith

Python multithreading on cluster system? Embedding python in PVM?

2006-02-19 Thread abhinav
Hi guys.I have read that one cannot perform true multithreading in python due to global interpreter lock mechanism.Suppose i have to implement a crawler on a say cluster system like clusterknoppix so that i can use parallel virtual machine (PVM)for programming in multiprocessor environment or say o

Re: How many web framework for python ?

2006-02-19 Thread Sybren Stuvel
Bruno Desthuilliers enlightened us with: >> I want to write a web framework for python based on mod_python as >> my course homework , could you give some advise ? > > Yes : forget it. Why forget it? I've written my own web framework (http://www.unrealtower.org/) and it works great! It was a good l

Re: Python vs. Lisp -- please explain

2006-02-19 Thread bearophileHUGS
Luis M. González>[Shed-Skin] ... but so far it looks great (only one developer though..).< Two developers, I am there too :-) I think people aren't much interested so far because there aren't good ways to link/join/use SSPython compied code from CPython code. A good solution is probably to: - Dev

Re: Should we still be learning this?

2006-02-19 Thread Max
Felipe Almeida Lessa wrote: > Em Sáb, 2006-02-18 às 15:13 +0200, Max escreveu: > >>>I wonder if they need some updating. >>> >> >>And so does Dive Into Python (our textbook, diveintopython.org) which >>has the same deficiencies in its outline. > > > Are they being *paid* for teaching? Then they

Re: Should we still be learning this?

2006-02-19 Thread Max
John Zenger wrote: > Don't overly concern yourself with your course being 100% up to date. > When learning programming, the concepts are what is important, not the > syntax or libraries you happen to be using. Even if they were to teach > you the latest and greatest features of 2.4.2, that woul

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Alexander Schmolck
"Terry Reedy" <[EMAIL PROTECTED]> writes: > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > In learning Python I've read more about Lisp than when I was actually > > trying to learn it, and it seems that the two languages have lots of > > similarities: > > > > http://www.norvig.

Re: How many web framework for python ?

2006-02-19 Thread Alex Martelli
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: ... > > There are very good web framework for java and ruby , > > Is there one for python ? > > In fact, there are actually too much *good* python web frameworks. Dear Mr. BDFL, there are too many good web frameworks nowadays. Please eliminate th

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Roy Smith <[EMAIL PROTECTED]> wrote: >DH <[EMAIL PROTECTED]> wrote: >> -python has true closures (although nothing like ruby's blocks) > >What is a "true closure"? Or, maybe what I'm asking is what kind of >closure wouldn't be a true closure? Is there some kind o

Re: define loop statement?

2006-02-19 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, David Isaac <[EMAIL PROTECTED]> wrote: . . . >Admiration wins out over revulsion. ;-) >Thanks, >Alan Isaac > >PS Here's the motivation. Python closely resembles pseudocode. With >a very little

[ANN] SPE IDE videos and more...

2006-02-19 Thread SPE - Stani's Python Editor
I'm happy to spread the word about showmedo.com, an excellent collection of python programming videos. >From the website http://showmedo.com/videoListPage?listKey=TheBigPythonList: """Want to learn how to use some of the best Python programming tools out there, including the supercharged IPython

Re: ANN: FreeImagePy 1.2.2

2006-02-19 Thread Terry Hancock
On Thu, 16 Feb 2006 09:34:18 -0500 Andrew Gwozdziewycz <[EMAIL PROTECTED]> wrote: > > Knowing some details about PIL and as good as no details > > about FreeImage, I would like in this context to become > > enlightened by the answer to the question, when does it > > make sense to use FreeImage inst

[ANN] ConfigObj 4.2.0

2006-02-19 Thread Fuzzyman
`ConfigObj 4.2.0 `_ is now available. The main improvements are *full* Unicode support,a s well as the addition of the 'convenience' `Section Methods `_ * *as_bool* * *as_int* * *

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Kay Schluehr
Roy Smith wrote: > DH <[EMAIL PROTECTED]> wrote: > > -python has true closures (although nothing like ruby's blocks) > > What is a "true closure"? Or, maybe what I'm asking is what kind of > closure wouldn't be a true closure? Is there some kind of ersatz closure > other language try to pass off

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Terry Hancock
On Sun, 19 Feb 2006 00:54:22 -0500 "Terry Reedy" <[EMAIL PROTECTED]> wrote: > In order to be that fast, some of the dynamism of > intepreted Lisp must be given up. In particular object > code is not list data. Python with type-dynamism > eliminated can also be translated to decent C/C++ and the

Re: How many web framework for python ?

2006-02-19 Thread Ville Vainio
Sybren Stuvel wrote: > Why forget it? I've written my own web framework > (http://www.unrealtower.org/) and it works great! It was a good Some reasons: - Waste. When you write your own framework, you are helping yourself. If you use an existing framework and possibly contribute patches to it, yo

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Bruno Desthuilliers
DH a écrit : (snip) > > It is by design. Python is dynamically typed. It is essentially an > interpreted scripting language like javascript or ruby or perl, It's not a "scripting" language, and it's not interpreted. > although > python fans will be quick to tell you python is compiled to byte

Req. for module style/organization

2006-02-19 Thread RayS
I've begun a Python module to provide a complete interface to the Meade LX200 command set, and have searched for a style/development guide for Python Lib/site-packages type modules, but only saw guides for C-modules. I realize that I need to make some changes to follow http://www.python.org/doc

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Alexander Schmolck
[EMAIL PROTECTED] writes: > Hi, I've been thinking about Python vs. Lisp. I've been learning > Python the past few months and like it very much. A few years ago I > had an AI class where we had to use Lisp, and I absolutely hated it, > having learned C++ a few years prior. They didn't teach Lis

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Alexander Schmolck
Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > DH a écrit : > (snip) > > It is by design. Python is dynamically typed. It is essentially an > > interpreted scripting language like javascript or ruby or perl, > > > It's not a "scripting" language, and it's not interpreted. Of course it is. Wh

Re: Python vs. Lisp -- please explain

2006-02-19 Thread 63q2o4i02
Cool, thank you. That's the answer I was looking for :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Fredrik Lundh
Alexander Schmolck wrote: > What's far more interesting to me, however, is that I think there a good > reasons to suspect python's slowness is more of a feature than a flaw: I'd not > be suprised if on the whole it greatly increases programmer productivity and > results in clearer and more uniform

Re: general coding issues - coding style...

2006-02-19 Thread Bruno Desthuilliers
calmar a écrit : > Hi all, > > since I'm just a 'handicraft'/beginner or so, > > could anybody provide me with some (rough) hints, about how to enhance the > code > here: > > http://calmar.ws/tmp/cal.html 1/ learn OO and get rid of globals. 2/ use dict or list based dispatch instead of long if

Re: Python vs. Lisp -- please explain

2006-02-19 Thread 63q2o4i02
Great, thanks for a very complete answer. michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Fredrik Lundh
Alexander Schmolck wrote: > You might want to argue about whether scriping language is a meaningful and > useful concept, but it's really hard to see how you could talk about > "scripting > languages" without including python. define "scripting language". the only even remotely formal definitio

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Bruno Desthuilliers
Alexander Schmolck a écrit : > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > > >>DH a écrit : >>(snip) >> >>>It is by design. Python is dynamically typed. It is essentially an >>>interpreted scripting language like javascript or ruby or perl, >> >> >>It's not a "scripting" language, and it's

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Ed Jensen
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > It's not a "scripting" language, and it's not interpreted. http://www.python.org/doc/faq/general.html#what-is-python "Python is an interpreted, interactive, object-oriented programming language." -- http://mail.python.org/mailman/listinfo/python-l

Countdown Timer

2006-02-19 Thread KennethGorelick
Could someone tell me what modules I should look at in the Python Manual to create a countdown timer that counts the years, days, hours, minutes, and seconds to a given day? Thanks in advance! I'm fairly new to the language, so please put it in newbie terms. I only know the basics. -- http://m

Re: Another stupid newbie question

2006-02-19 Thread Byte
"Do yourself a HUGE favour and read this before posting any more questions to comp.lang.python. Trust me, you really will thank us. http://www.catb.org/~esr/faqs/smart-questions.html " I find that webpage highly insulting, and so should you. It is treating you like a small child, who needs to be

Re: Python vs. Lisp -- please explain

2006-02-19 Thread 63q2o4i02
Great, thank you and everyone for this nice discussion. Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Torsten Bronger
Hallöchen! Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > Alexander Schmolck a écrit : > >> Bruno Desthuilliers <[EMAIL PROTECTED]> writes: >> >>> [...] >>> >>> It's not a "scripting" language, and it's not interpreted. >> >> Of course it is. What do you think happens to the bytecode? > > Ok,

Re: Countdown Timer

2006-02-19 Thread [EMAIL PROTECTED]
take a look at the time module. -- http://mail.python.org/mailman/listinfo/python-list

Re: editor for Python on Linux

2006-02-19 Thread Rene Pijlman
Mladen Adamovic: >I wonder which editor or IDE you can recommend me for writing Python >programs. vi -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: editor for Python on Linux

2006-02-19 Thread Jonathan Daugherty
# I wonder which editor or IDE you can recommend me for writing Python # programs. I tried with jEdit but it isn't perfect. It depends on what you need; what don't you like about JEdit? What do you think a good editor or IDE should provide? -- Jonathan Daugherty http://www.parsed.org -- ht

Re: editor for Python on Linux

2006-02-19 Thread Sriram Krishnan
Mladen Adamovic wrote: > Hi! > > I wonder which editor or IDE you can recommend me for writing Python > programs. I tried with jEdit but it isn't perfect. > Check out http://wiki.python.org/moin/PythonEditors. I personally use Emacs -- Sriram -- http://mail.python.org/mailman/listinfo/python

Re: Python multithreading on cluster system? Embedding python in PVM?

2006-02-19 Thread Armin Steinhoff
abhinav wrote: > Hi guys.I have read that one cannot perform true multithreading in > python due to global interpreter lock mechanism.Suppose i have to > implement a crawler on a say cluster system like clusterknoppix so that > i can use parallel virtual machine (PVM)for programming in > multiproce

Re: editor for Python on Linux

2006-02-19 Thread Armin Steinhoff
Mladen Adamovic wrote: > Hi! > > I wonder which editor or IDE you can recommend me for writing Python > programs. I tried with jEdit but it isn't perfect. > Nothing is perfect ... but try SciTE and Eric http://www.die-offenbachs.de/detlev/eric3.html --Armin http://www.steinhoff-automation.com

Re: editor for Python on Linux

2006-02-19 Thread F. Petitjean
Le Sun, 19 Feb 2006 21:33:59 +0100, Rene Pijlman a écrit : > Mladen Adamovic: >>I wonder which editor or IDE you can recommend me for writing Python >>programs. > > vi I beg to disagree :-) Use ed "Ed is the standard text editor." http://www.gnu.org/fun/jokes/ed.msg.html -- http://mail.python.

Re: editor for Python on Linux

2006-02-19 Thread SPE - Stani's Python Editor
SPE: http://pythonide.stani.be I use it on Ubuntu. For a quick start, view: http://showmedo.com/videoListPage?listKey=PythonDevelopmentWithSPE Stani -- http://mail.python.org/mailman/listinfo/python-list

Re: number ranges (was Re: Matlab page on scipy wiki)

2006-02-19 Thread Colin J. Williams
Bryan Cole wrote: >> >> >>First, I think the range() function in python is ugly to begin with. >>Why can't python just support range notation directly like 'for a in >>0:10'. Or with 0..10 or 0...10 syntax. That seems to make a lot more >>sense to me than having to call a named function.

Re: editor for Python on Linux

2006-02-19 Thread Rene Pijlman
F. Petitjean: >Rene Pijlman: >> vi > >I beg to disagree :-) Use ed >"Ed is the standard text editor." >http://www.gnu.org/fun/jokes/ed.msg.html That was 1991. This is 2006. -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Paul Boddie
Torsten Bronger wrote: > Hallöchen! > > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > > > > Ok, then what do you think happens to 'machine' code ? > > > > "interpreted" usually means "no compilation, all parsing etc > > redone at each execution", which is not the case with a > > bytecode/vm bas

Re: editor for Python on Linux

2006-02-19 Thread Rene Pijlman
Sriram Krishnan: >Check out http://wiki.python.org/moin/PythonEditors. This page can't be taken seriously. vi is not listed. -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

Re: editor for Python on Linux

2006-02-19 Thread Colin J. Williams
Rene Pijlman wrote: > Mladen Adamovic: > >>I wonder which editor or IDE you can recommend me for writing Python >>programs. > > > vi > Scite is a good editor. It is available for both Windows and Linux. Boa-Constructor is an IDE rather than an editor. Although it focuses on wxPython, it has

Re: number ranges (was Re: Matlab page on scipy wiki)

2006-02-19 Thread Colin J. Williams
Colin J. Williams wrote: > Bryan Cole wrote: > >>> >>> First, I think the range() function in python is ugly to begin with. >>> Why can't python just support range notation directly like 'for a in >>> 0:10'. Or with 0..10 or 0...10 syntax. That seems to make a lot more >>> sense to me tha

Re: How many web framework for python ?

2006-02-19 Thread Sybren Stuvel
Ville Vainio enlightened us with: > When you write your own framework, you are helping yourself. True. And if that doesn't have a negative effect on others (which I think it doesn't) there is nothing wrong with that. > If you use an existing framework and possibly contribute patches to > it, you

Re: editor for Python on Linux

2006-02-19 Thread Benji York
Rene Pijlman wrote: > Sriram Krishnan: > >>Check out http://wiki.python.org/moin/PythonEditors. > > > This page can't be taken seriously. vi is not listed. I hope your key is broken; I wouldn't wish old-school vi on my worst enemy. Fortunately that page lists the wonderful Vim instead, so s

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Steven D'Aprano
On Sun, 19 Feb 2006 19:26:20 +, Alexander Schmolck wrote: > Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > >> DH a écrit : >> (snip) >> > It is by design. Python is dynamically typed. It is essentially an >> > interpreted scripting language like javascript or ruby or perl, >> >> >> It's

Re: editor for Python on Linux

2006-02-19 Thread Sybren Stuvel
Mladen Adamovic enlightened us with: > I wonder which editor or IDE you can recommend me for writing Python > programs. I tried with jEdit but it isn't perfect. I use gvim (if I have X) and vim (if I don't). The only negative thing about it, is its learning curve ;-) Sybren -- The problem with

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Alexander Schmolck
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Alexander Schmolck wrote: > > > What's far more interesting to me, however, is that I think there a good > > reasons to suspect python's slowness is more of a feature than a flaw: I'd > > not > > be suprised if on the whole it greatly increases progr

Re: Making mouse wheel work with pmw ScrolledCanvas widget

2006-02-19 Thread dan . gass
This looks like it has nothing to do with Pmw (Mega widgets) but is really a basic Tkinter problem. -- http://mail.python.org/mailman/listinfo/python-list

Format file size for printing

2006-02-19 Thread abcd
is there a built-in way of printing the size of a file nicely? So if the file size is 103803 bytes it prints out like: 103.8K or 0.1MB something liek that? -- http://mail.python.org/mailman/listinfo/python-list

Re: editor for Python on Linux

2006-02-19 Thread Old Duck
Mladen Adamovic wrote: > Hi! > > I wonder which editor or IDE you can recommend me for writing Python > programs. I tried with jEdit but it isn't perfect. My personal favorite is Kate (comes with KDE). - Duck -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Steven D'Aprano
On Sun, 19 Feb 2006 13:02:16 -0800, Paul Boddie wrote: > Torsten Bronger wrote: >> Hallöchen! >> >> Bruno Desthuilliers <[EMAIL PROTECTED]> writes: >> > >> > Ok, then what do you think happens to 'machine' code ? >> > >> > "interpreted" usually means "no compilation, all parsing etc >> > redone at

Re: Countdown Timer

2006-02-19 Thread KennethGorelick
Thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Valentino Volonghi aka Dialtone
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > By that logic, all languages are interpreted. What do you think happens to > the machinecode? Interpreted to transistors state by an internal mapping in the CPU opcode ==> input configuration. -- Valentino Volonghi aka Dialtone Now Running MacOSX 10.

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Alexander Schmolck
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Alexander Schmolck wrote: > > > You might want to argue about whether scriping language is a meaningful and > > useful concept, but it's really hard to see how you could talk about > > "scripting > > languages" without including python. > > define "

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Terry Reedy
>> Of course it is. What do you think happens to the bytecode? > Ok, then what do you think happens to 'machine' code ? I believe that on modern CISC processors the human level 'machine code' is interpreted by subroutines written in the actual machine code usually called 'microcode'. tjr

RE: Which is faster? (if not b in m) or (if m.count(b) > 0)

2006-02-19 Thread Delaney, Timothy (Tim)
Farel wrote: > Tim, Are you saying that: > not (b in m) > is faster than: > b not in m On the contrary. `not (b in m)` requires negating the result of `b in m` (via an additional bytecode operation). `b not in m` doesn't. However, the difference in performance is minimal, as testing usin

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Paul Boddie
Steven D'Aprano wrote: > On Sun, 19 Feb 2006 13:02:16 -0800, Paul Boddie wrote: > > >> Bruno Desthuilliers <[EMAIL PROTECTED]> writes: > >> > > >> > Ok, then what do you think happens to 'machine' code ? > >> > > >> > "interpreted" usually means "no compilation, all parsing etc > >> > redone at eac

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Alex Martelli
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > DH a écrit : > (snip) > > > > It is by design. Python is dynamically typed. It is essentially an > > interpreted scripting language like javascript or ruby or perl, > > It's not a "scripting" language, and it's not interpreted. OK, but then we s

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Alex Martelli
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: ... > Ho, really ? How many applications using Python as scripting language ? http://wiki.python.org/moin/AppsWithPythonScripting lists many, but it's obviously woefully incomplete -- e.g., it's missing Civilization IV, a very popular, major new ga

Re: number ranges (was Re: Matlab page on scipy wiki)

2006-02-19 Thread Tim Hochberg
Colin J. Williams wrote: >> >>It would be good if the range and slice could be merged in some way, >>although the extended slice is rather complicated - I don't understand it. >> >> The semantics for an extended slicing are as follows. The primary >> must evaluate to a mapping object, and it i

MySQLDB - parameterised SQL - "TypeError: not all arguments converted during string formatting"

2006-02-19 Thread shearichard
Hi - I have written some python to insert a row into a table using MySQLDB. I have never before written SQL/Python using embedded parameters in the SQL and I'm having some difficulties. Could someone point me in the right direction please ? The python looks like this : import MySQLdb import MySQL

Re: SPE IDE videos and more...

2006-02-19 Thread Claudio Grondi
[EMAIL PROTECTED] wrote: > I'm happy to spread the word about showmedo.com, an excellent > collection of python programming videos. > >>From the website > http://showmedo.com/videoListPage?listKey=TheBigPythonList: The server response under: http://showmedo.com/videoListPage?listKey=TheBigPyt

Re: Req. for module style/organization

2006-02-19 Thread Ziga Seilnacht
RayS wrote: > I've begun a Python module to provide a complete interface to the > Meade LX200 command set, and have searched for a style/development > guide for Python Lib/site-packages type modules, but only saw guides > for C-modules. I realize that I need to make some changes to follow > http:/

RE: Which is faster? (if not b in m) or (if m.count(b) > 0)

2006-02-19 Thread Jean-Paul Calderone
On Mon, 20 Feb 2006 10:08:48 +1100, "Delaney, Timothy \(Tim\)" <[EMAIL PROTECTED]> wrote: >Farel wrote: > >> Tim, Are you saying that: >> not (b in m) >> is faster than: >> b not in m > >On the contrary. `not (b in m)` requires negating the result of `b in m` >(via an additional bytecode

Re: commenting out blocks of code

2006-02-19 Thread Neil Hodgson
Atanas Banov: > here is something you both seems to have not considered: imagine you > make decision if ^Q has to comment or uncomment based on the 1st line > and not on each line individually in the block. When first implementing Ctrl+Q, this looked to have similar advantages and disadvantag

RE: Which is faster? (if not b in m) or (if m.count(b) > 0)

2006-02-19 Thread Delaney, Timothy (Tim)
Jean-Paul Calderone wrote: > Not since Python 2.4: > > >>> dis.dis(lambda: x not in y) > 1 0 LOAD_GLOBAL 0 (x) > 3 LOAD_GLOBAL 1 (y) > 6 COMPARE_OP 7 (not in) > 9 RETURN_VALUE > >

Re: editor for Python on Linux

2006-02-19 Thread funktion
gedit -- http://mail.python.org/mailman/listinfo/python-list

Eric3 Help/Tutorial

2006-02-19 Thread Julius Lucks
Does anyone know of Help docs/tutorials that explain Eric3's plethora of features? http://www.die-offenbachs.de/detlev/eric3.html Thanks, Julius -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLDB - parameterised SQL - "TypeError: not all arguments converted during string formatting"

2006-02-19 Thread shearichard
Hi Dennis - Thanks for your help with this Dennis Lee Bieber wrote: > On 19 Feb 2006 16:26:15 -0800, [EMAIL PROTECTED] declaimed the > following in comp.lang.python: > > > Hi - I have written some python to insert a row into a table using > > MySQLDB. I have never before written SQL/Python us

New Module: CommandLoop

2006-02-19 Thread Crutcher
This is something I've been working on for a bit, and I think it is more or less ready to bring up on this list. I'd like to add a module (though probably not for 2.5). Before you ask, this module is _not_ compatible with cmd.py, as it is command oriented, whereas cmd.py is line oriented. Anyway,

Re: Python vs. Lisp -- please explain

2006-02-19 Thread Fredrik Lundh
Alexander Schmolck wrote: > My point was that Guido probably (and fortunately!) was unaware of the extent > to which you can have both dynamism and speed any my point was that chosing to ignore something doesn't mean that you're ignorant. (but since you keep repeating this nonsense, it's clear t

  1   2   >