Re: Documentation suggestions

2005-12-06 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > I proposed a documentation sprint for PyCon a couple of years ago, but > nobody thought it was important enough to work on. It would be a good > idea next year, too. IMO this should definitely be done. That nobody thought docs were important enough to wo

Re: Output: Number of digits in exponent?

2005-12-06 Thread Paul Rubin
Jens Bloch Helmers <[EMAIL PROTECTED]> writes: > How can I control the number of digits in the exponent when writing > floats to a file? It seems that Python2.4.2(winXP) prints three > digits anyway. > > >>> print 1.0e50 > 1e+050 That's weird; must be version and/or OS dependent. On Fedora Core

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-07 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > But lately I have been wondering about doing the following: > end = None > ... > if ...: > ... > end > IMO it looks better, but I'm reluctant because it suggest > some checking by the compilor, which just doesn't happen. I don't think you can alw

Re: what's wrong with "lambda x : print x/60,x%60"

2005-12-07 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > > All joking aside, when I have names (temporary variables or scaffolding > > functions) that I need to initialise a module or data structure, but then > > outlive their usefulness, I del the name afterwards. Am I the only one? I > > can't say I've seen an

Re: what's wrong with "lambda x : print x/60,x%60"

2005-12-08 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > > if cond: > > my x = 7# make a new scope for x, goes out of scope at end of if > > > If this genuinely troubles you then you can always isolate the scope > with a function, though of course you also no longer have the code > inline then. > >>I d

Re: Another newbie question

2005-12-08 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > Yes. Reaching through objects to do things is usually a bad idea. > I don't necessarily disagree, but I don't understand why you say this. Why > it is bad? The traditional OOP spirit is to encapsulate the object's entire behavior in the class defini

Re: Documentation suggestions

2005-12-09 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > I'm working on puttingn this up for Python. I'm planning on using AJAX > to pass the input string to eval on the server. I.e. - you'll be > limited to expressions, which is what it seems like the Ruby thing is > limited to. > > On the other hand, with itera

Re: Thoughts on object representation in a dictionary

2005-12-10 Thread Paul Rubin
"py" <[EMAIL PROTECTED]> writes: > Well the other thing is that I am allowed to store strings in this > dictionary...so I can't just store the Engine and Body object and later > use them. this is just a requirement (which i dont understand > either)...but its what I have to do. Probably so th

Re: The Industry choice

2004-12-31 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > Well, Google's market capitalization must be around 50 billion dollars > or more, in the range of the top-100 companies, I believe, and they've > never kept their Python use a secret. They use Python for a lot of internal tools but their high-volume se

Re: Securing a future for anonymous functions in Python

2004-12-31 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > We should have an Evilly Cool Hack of the Year, and I nominate Paul du > Bois's one as the winner for 2004. Do I hear any second...? The year's not over yet :). -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2004-12-31 Thread Paul Rubin
Christopher Koppler <[EMAIL PROTECTED]> writes: > >> 2. "plausible but there are sound technical reasons to be wary" > > > > A security-critical financial application. > > Why, specifically? Would you need to eval user input? Static typing, checked exceptions, etc. > > I haven't used those eith

Re: The Industry choice

2005-01-01 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > > It seems to me > > that IDLE and a lot of the rest of Python are examples of someone > > having a cool idea and writing a demo, then releasing it with a lot of > > missing components and rough edges, without realizing that it can't > > reasonably be call

Re: The Industry choice

2005-01-01 Thread Paul Rubin
[EMAIL PROTECTED] (Cameron Laird) writes: > That is, while I have a LOT of respect for Paul's programming > and judgment, and question myself when I'm on the side opposite > him, I ultimately value type declarations in languages such as > Java as more cost than benefit. I don't find static type de

Re: The Industry choice

2005-01-01 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Overall I agree with you and would like to have OPTIONAL static type > declarations in Python, as has often been discussed. But without > facilities for generic programming, such as templates in C++, static > type declarations can force one to duplicate a LOT of code, wi

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

2005-01-01 Thread Paul Rubin
Tim Churches <[EMAIL PROTECTED]> writes: > Can you give some URL for publicly accessible examples of what you > mean by a "NON CONTENT-ORIENTED WEB APPLICATIONS", so we can get a > better idea of what you mean? I don't think there was anything unclear about it. A spreadsheet might be a good examp

Re: The Industry choice

2005-01-01 Thread Paul Rubin
"Donn Cave" <[EMAIL PROTECTED]> writes: > Yes, it would be really weird if Python went that way, and the > sort of idle speculations we were reading recently from Guido > sure sounded like he knows better. But it's not like there aren't > some interesting issues farther on downstream there, in the

Re: The Industry choice

2005-01-02 Thread Paul Rubin
Mark Carter <[EMAIL PROTECTED]> writes: > We might be doing a project which involves web-type stuff. I pointed > out that if they did, they wouldn't be able to use VB/VBA, and may > need to use something like Python. They'll probably use vb.net. -- http://mail.python.org/mailman/listinfo/python-l

Re: Continuations Based Web Framework - Seaside.

2005-01-02 Thread Paul Rubin
Kendall Clark <[EMAIL PROTECTED]> writes: > That was me, actually. I remain surprised that there isn't a move > afoot either to implement something like Seaside or Borges in Python > or to adapt one of the existing web frameworks to be > modal/continuation style. Since Python doesn't have continua

Re: The Industry choice

2005-01-02 Thread Paul Rubin
Roy Smith <[EMAIL PROTECTED]> writes: > Around here, AOL/Moviephone has been trolling for years for Tcl people; > I guess that counts as a big company. The AOL web server also uses tcl as a built-in dynamic content generation language (i.e. sort of like mod_python), or at least it used to. -- ht

Re: Continuations Based Web Framework - Seaside.

2005-01-02 Thread Paul Rubin
[EMAIL PROTECTED] (Valentino Volonghi aka Dialtone) writes: > Since I've already said Nevow with wolf works the same as borges. > The only thing that wouldn't work without continuations is the back > button. With greenlet module (from Armin Rigo) also the back button will > work. Thanks, I'm not f

Re: Python evolution: Unease

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

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
Ville Vainio <[EMAIL PROTECTED]> writes: > Also, Python is not a monolithic entity. Guido certainly isn't going > to write a better IDE for Python, so the time used on language > features isn't removed from improving the infrastructure around the > language. There aren't THAT many people working o

Re: Python evolution: Unease

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

Re: Python evolution: Unease

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

Re: Embedding a restricted python interpreter

2005-01-04 Thread Paul Rubin
Rolf Magnus <[EMAIL PROTECTED]> writes: > I would like to embed a python interpreter within a program, but since that > program would be able to automatically download scripts from the internet, > I'd like to run those in a restricted environment, which basically means > that I want to allow only a

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
Skip Montanaro <[EMAIL PROTECTED]> writes: > Start writing (or reorganizing). Folks, this is open source. I'm > sure by the traffic on the list most people here know how to write. Irrelevant, the issue isn't what docs can be written if someone wants to do it, it's what docs are actually already

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
Jeremy Bowers <[EMAIL PROTECTED]> writes: > So, nobody should have to write the docs because they should already be > there, but "somebody" should have to write the docs? > > You need to think more clearly about the pronouns you are slinging around. > Who is this "they" that should write the docs?

Re: The Industry choice

2005-01-04 Thread Paul Rubin
"Rob Emmons" <[EMAIL PROTECTED]> writes: > Me personally, I believe in free software, but always talk about open > source. My answer regarding forcing people to share -- I like the GPL > -- and I am perfectly happy to have anyone who does not like the GPL > not to use any GPLed software. I don'

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
Peter Hansen <[EMAIL PROTECTED]> writes: > The key distinction is that "well-documented" is clearly > a judgment call, a personal opinion, No it's not. If a program has significant modules with complicated public API's and no documentation, it's poorly documented in an absolute sense. A well-doc

Re: Python evolution: Unease

2005-01-04 Thread Paul Rubin
"alex23" <[EMAIL PROTECTED]> writes: > It's called "having an opinion". "Good" documentation does its job, if > noone else thought it was poorly documented then to them it wasn't. Obviously other people thought Tkinter is poorly documented in the Python distro, since the Python library manual says

Re: Embedding a restricted python interpreter

2005-01-04 Thread Paul Rubin
Maurice LING <[EMAIL PROTECTED]> writes: > I won't really count on that. In my opinions, which may be wrong, > Python is not constructed to work in a sandbox like Java. Java does it > by subjecting all classes that it loads through a security > manager. What you seems to want is a Python to have Ja

Re: Python evolution: Unease

2005-01-05 Thread Paul Rubin
Ville Vainio <[EMAIL PROTECTED]> writes: > To me, this seems to be the job for the Fedora maintainers, not Python > maintainers. If something essential is not in the distro the distro > maintainers have screwed up. I can't parse that. It says two contradictory things. Sentence 2 says that if som

Re: Python evolution: Unease

2005-01-05 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Dunno about Fedora, I stopped using Red Hat just because they were > *not* using the standard Python distribution, and the version they > shipped was cripped in various ways. Eh? I used Red Hat for a long while and don't remember their crippling the Python distribution

Re: Python evolution: Unease

2005-01-05 Thread Paul Rubin
"EP" <[EMAIL PROTECTED]> writes: > Python: it tastes so good it makes you hungrier. QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Paul Rubin
Roman Suzi <[EMAIL PROTECTED]> writes: > As for concepts, they are from Generic Programming (by Musser and > Stepanov) and I feel that Python is in position to implement them to > the fullest extent. And IMHO it will be nicer than just Java-like > interfaces or Eiffel's contract approach. I keep

Re: Concepts RE: Python evolution: Unease

2005-01-05 Thread Paul Rubin
Paul Rubin <http://[EMAIL PROTECTED]> writes: > There is nothing in Wikipedia about [Generic programming]. Oops: http://en.wikipedia.org/wiki/Generic_programming This helps. But I don't see how it's different from what used to be called polymorphism. -- http://mail.python.o

Re: Python evolution: Unease

2005-01-05 Thread Paul Rubin
Ville Vainio <[EMAIL PROTECTED]> writes: > Paul> I can't parse that. It says two contradictory things. > Paul> Sentence 2 says that if something essential is not in the > Paul> (Python) distro then the (Python) distro maintainers have > Paul> screwed up. Sentence 1 says it's the F

Re: is python more popular than coldfusion?

2005-01-05 Thread Paul Rubin
[EMAIL PROTECTED] writes: > But Python IS tied for first. This may indicate that the > relatively small number of jobs listing Python as a requirement is due > in part to a relatively small supply of Python programmers, not lack of > demand for such programmers. I think it mostly means Python pro

Re: Python evolution: Unease

2005-01-05 Thread Paul Rubin
Skip Montanaro <[EMAIL PROTECTED]> writes: > Okay, then start doing the work necessary to incorporate that stuff into the > core. Get Fredrik to say "okay" to including his Tkinter docs, then do what > it takes to incorporate it. The fact that Fredrik can check those docs in > himself but hasn't

Re: Securing a future for anonymous functions in Python

2005-01-05 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > Do you consider generator expressions or list comprehensions deficient > because they don't allow several statements in the body of the for > loop? I don't see what it would mean to do otherwise. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-05 Thread Paul Rubin
[EMAIL PROTECTED] (Bengt Richter) writes: > What do you think of automated secure importing/installing from a > remote server? You know, you try to import something and it imports > a stub that was included as a battery-place-holder and that has > basic help info and will give you reasonable optio

Re: sorting on keys in a list of dicts

2005-01-06 Thread Paul Rubin
J Berends <[EMAIL PROTECTED]> writes: > Suppose I have a list of dictionaries and each dict has a common > keyname with a (sortable) value in it. > > How can I shuffle their position in the list in such way that they > become sorted. Do I understand the question right? Can't you just say thel

Re: Embedding a restricted python interpreter

2005-01-06 Thread Paul Rubin
Jp Calderone <[EMAIL PROTECTED]> writes: > A Python sandbox would be useful, but the hosting provider's excuse > for not allowing you to use mod_python is completely bogus. All the > necessary security tools for that situation are provided by the > platform in the form of process and user sepa

Re: The Industry choice

2005-01-06 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > Yes, apart from libraries and similar cases (frameworks etc), it's no > doubt rare for closed-source "end-user packages" to be sold with > licenses that include source and allow you to "do anything with it". > > However, allowing customization (at least

Re: Embedding a restricted python interpreter

2005-01-06 Thread Paul Rubin
Peter Maas <[EMAIL PROTECTED]> writes: > I think PHP has a safe mode which solves the probem of isolating > scripts of different users on application level. This is not optimal > but better than nothing. Best solution would probably be to create > a thread for each request that can operate only wit

Re: Embedding a restricted python interpreter

2005-01-06 Thread Paul Rubin
Gerhard Haering <[EMAIL PROTECTED]> writes: > > But mod_python is an apache module and runs in the same apache process > > with other users' scripts. > > Which is why it's a good idea for each customer to have it's own > system user and their virtual hosts running under this uid. Which > was the i

Re: The Industry choice

2005-01-06 Thread Paul Rubin
Jeff Shannon <[EMAIL PROTECTED]> writes: > Note that the so-called 'viral' nature of GPL code only applies to > *modifications you make* to the GPL software. Well, only under an unusually broad notion of "modification". The GPL applies to any program incorporating GPL'd components, e.g. if I di

Re: The Industry choice

2005-01-06 Thread Paul Rubin
Bulba! <[EMAIL PROTECTED]> writes: > Making derived work proprietary in no way implies that the base > work is publicly unavailable anymore. Since you want to be able to incorporate GPL code in your proprietary products, and say there's no problem since the base work is still available from the sa

Re: The Industry choice

2005-01-06 Thread Paul Rubin
"Terry Reedy" <[EMAIL PROTECTED]> writes: > > Which I find again wrong: suppose this developer used GPL-ed > > library A, developed patches B and C. He provided you with > > the source code of publicly available library A and a patch > > C, but he doesn't want to release patch B. > > Then he does

Re: Securing a future for anonymous functions in Python

2005-01-06 Thread Paul Rubin
Jeff Shannon <[EMAIL PROTECTED]> writes: > It seems to me that in other, less-dynamic languages, lambdas are > significantly different from functions in that lambdas can be created > at runtime. What languages are those, where you can create anonymous functions at runtime, but not named functions?

Re: The Industry choice

2005-01-06 Thread Paul Rubin
[EMAIL PROTECTED] (Aahz) writes: > >I don't like what I perceive as end effect of what GPL license > >writers are attempting to achieve: vendor lock-in. > And my counter-argument is that I believe your perception is wrong. If > I agreed with your focus on lock-in, I'd say that what the GPL is tr

Re: Python evolution: Unease

2005-01-06 Thread Paul Rubin
"Terry Reedy" <[EMAIL PROTECTED]> writes: > Would it be possible, at least for Windows, to write a Python script > implementing a 'virtual distribution'? IE, download Python, install it, > download next package, install it, etc. -- prefereably table driven? I just don't understand why you'd wa

Re: Python evolution: Unease

2005-01-06 Thread Paul Rubin
[EMAIL PROTECTED] (Bengt Richter) writes: > I agree 1000% !! Importing a stub should get you an imported stub that > prints info as it imports, so you know its not functional. But I don't even understand why I'd even want to use these stubs, instead of just having the full installation from day 1

Re: Python evolution: Unease

2005-01-06 Thread Paul Rubin
Roman Suzi <[EMAIL PROTECTED]> writes: > I do not like the idea of having stubs. Once I had an experience working with > CPAN (I tried to install SpamAssassin and it required some specific modules.) > "Magic" install shell, provided by Perl, upgraded half the Perl distro, > including newer version

Re: Python evolution: Unease

2005-01-07 Thread Paul Rubin
adamc <[EMAIL PROTECTED]> writes: > I've not experienced problems installing wxPython on Debian (unstable). > It just *works* out of the box with apt-get. Perhaps this is more of a > problem with the package maintainers? I think the problem I encountered was that the version of WxWidgets currentl

Re: Excluded and other middles in licensing

2005-01-07 Thread Paul Rubin
Robert Kern <[EMAIL PROTECTED]> writes: > > http://en.wikipedia.org/wiki/Closed_source > > "any program whose licensing terms do not qualify as open source". > > A definition with a nice big "This article may need to be reworded to > conform to a neutral point of view" warning at the top. ;-) > ..

Re: Excluded and other middles in licensing

2005-01-07 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > > Note also from the Heine-Borel theorem that every closed source > > program can be covered by some finite collection of open source > > programs. > > Every _compact_ one, surely? Quoting by heart from old memories, but, > isn't Heine-Borel about (bein

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Paul Rubin
"Anna" <[EMAIL PROTECTED]> writes: > Having taken some calculus (derivatives, limits, some integrals) but > never even heard of lambda calculus, to me, lambda means absolutely > NOTHING. Less than nothing. Lambda calculus is from mathematical logic, but more to the point "lambda" has been the term

Re: Python evolution: Unease

2005-01-07 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > Paul Rubin <http://[EMAIL PROTECTED]> wrote: > > Really, I just want to buy a new > > computer, turn it on, and have everything there. That's generally > > impossible without running satanware from Redmond > >

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > Perhaps what we really need is a good Lisp subsystem for Python? I've thought the other way around, it would be nice to have a Python subsystem for Lisp. -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2005-01-07 Thread Paul Rubin
Bulba! <[EMAIL PROTECTED]> writes: > From the viewpoint of looking at availability of source code A, > it's completely irrelevant if those guys are fishmongers or > make derived work A' and redistribute only binary of A'. Not > a single line of publicly available source code appeared or > disapp

Re: Securing a future for anonymous functions in Python

2005-01-07 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > Add in the fact that there are many, many Python programmers with > non-CS backgrounds, and the term 'lambda' sticks out like a sore thumb > from amongst Python's other English-based keywords. 'def' is probably > the second-most cryptic when you first enco

Re: Python Operating System???

2005-01-07 Thread Paul Rubin
[EMAIL PROTECTED] (Michael Hobbs) writes: > The problem when using Python instead of C for OS development is that > C was *specifically designed* to create an OS, while Python was designed > for completely different purposes. If you want to write an OS, it would > be wise to use a language that is

Re: python3: 'where' keyword

2005-01-07 Thread Paul Rubin
Donn Cave <[EMAIL PROTECTED]> writes: > I don't by any means agree that this notation is worth adopting, and > in general I think this kind of readability issue is more or less a lost > cause for a language with Python's scoping rules, but the motive makes > sense to me. But we're talking about

Re: DOS problem (simple fix??)

2005-01-07 Thread Paul Rubin
Gavin Bauer <[EMAIL PROTECTED]> writes: > Thank you, and please make all answers simple enough to be understood > by a highschool student and his father :) . You might like to try IDLE, which is included with Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-07 Thread Paul Rubin
aurora <[EMAIL PROTECTED]> writes: > Just gone though an article via Slashdot titled "The Free Lunch Is > Over: A Fundamental Turn Toward Concurrency in Software" > [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that > the continous CPU performance gain we've seen is finally ove

Re: how to extract columns like awk $1 $5

2005-01-07 Thread Paul Rubin
[EMAIL PROTECTED] (Roy Smith) writes: > Something along the lines of: > > words = input.split() > print words[4], words[5] That throws an exception if there are fewer than 6 fields, which might or might not be what you want. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-07 Thread Paul Rubin
Arich Chanachai <[EMAIL PROTECTED]> writes: > >But I thought Python was an all-purpose language. After all, OS's > >have been written in Lisp before too. > > > Pure Lisp? Or a Lisp/C/Asm combo? Lisp has a compiled flavor by the way. Compiled flavor? Lisp has been compiled since the 1950's.

Re: python3: 'where' keyword

2005-01-07 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > > Usage could be something like: > > >>> res = [ f(i) for i in objects ] where: > > >>> def f(x): > > >>> #do something > > Hmm, this is actually a really interesting idea. Avoiding accidental > namespace conflicts is certainly one of the a

Re: How to read/write blobs with mysqldb?

2005-01-08 Thread Paul Rubin
"Christopher J. Bottaro" <[EMAIL PROTECTED]> writes: > That doesn't sound very efficient to me. What if my computer only has 64 MB > of memory and the data I want to insert is 128 MB? Don't use such large blobs. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-08 Thread Paul Rubin
"Roose" <[EMAIL PROTECTED]> writes: > An OS is NOT an application. It is a completely different kind of program. > Do you guys understand the difference between user and kernel mode? Do you > know what address spaces and hardware interrupts are? Python is not > equipped to handle these things.

Re: python3: accessing the result of 'if'

2005-01-08 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > So let's use it for expression naming in 'if' statements, too. > > if someregexp.match(s) as m: ># blah using m > elif someotherregexp.match(s) as m: ># blah using m Certainly an improvement over what we have now. -- http://mail.python.org/mailm

Re: python3: 'where' keyword

2005-01-08 Thread Paul Rubin
AdSR <[EMAIL PROTECTED]> writes: > > Killer app for this keyword: > > class C(object): > > x = property(get, set) where: > > def get(self): > > return "Silly property" > > def set(self, val): > > self.x = "Told you it was silly" > > Hey, this is super-elegant! Heh, even furt

Re: The best way to do web apps with Python?

2005-01-08 Thread Paul Rubin
"worzel" <[EMAIL PROTECTED]> writes: > What is the best way to web developemnt with Python? Is there > anything close to PHP style in-page script placement that can create > and use other Python objects? I am not really interested in Zope (I > believe that is more a CMS than anything else?) I am al

Re: Embedding a restricted python interpreter

2005-01-08 Thread Paul Rubin
Dieter Maurer <[EMAIL PROTECTED]> writes: > It uses a specialized compiler that prevents dangerous bytecode operations > to be generated and enforces a restricted builtin environment. Does it stop the user from generating his own bytecode strings and demarshalling them? -- http://mail.python.

Re: Python Operating System???

2005-01-08 Thread Paul Rubin
"Roose" <[EMAIL PROTECTED]> writes: > > Is an OS written in Lisp also ludicrous? Because it's been done. > > Can you point me to this? I'd like to see how "truly" Lisp it is. http://en.wikipedia.org/wiki/Lisp_machine > My first guess would be -- not very. And I'd like to install it on my PC.

Re: Pre/Postconditions with decorators

2005-01-08 Thread Paul Rubin
Stephen Thorne <[EMAIL PROTECTED]> writes: > Unresolved Problems: > 1) How do you handle duck types, i.e. a method that accepts StringIO, > cStringIO or any other object that has a .readlines(), .seek() and > .read() method? That should really be done through having those classes inherit a file-op

Re: python3: 'where' keyword

2005-01-08 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > You misunderstand. There "where" is not part of the expression but the > statement. The above example would be a modified print statement, a > print...where statement, if you will. Under this suggestion, there > would be modified versions of various sim

Re: python3: 'where' keyword

2005-01-08 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > ># compute sqrt(2) + sqrt(3) > >x = (sqrt(a) where: > > a = 2.) \ > >+ sqrt (a) where: > >a = 3. > > > > Hmmm. > > What would be the advantage of that over this? > > . x = sqrt(a) + sqrt(b) where: > . a = 2.0 > .

Re: Python Operating System???

2005-01-08 Thread Paul Rubin
"Roose" <[EMAIL PROTECTED]> writes: > My point was that you can't do a lot of hardware interface programming in > pure Python -- there would be so much non-trivial code in C that it would be > hard to call it a Python OS. Why do you say that? Is the same thing not true of C, where you need some a

Re: python3: 'where' keyword

2005-01-08 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > I think having to keep the names unique within the statement you are > currently writing is a reasonable request :) Um, you could say the same thing about the function, the module, etc. ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-08 Thread Paul Rubin
"Roose" <[EMAIL PROTECTED]> writes: > But are you really going to write a virtual memory system in Python? Are > you going to write a file system, and a task scheduler in Python? Are you > going to have people write device drivers in Python? Do you know how virtual memory systems, file systems,

Re: python3: 'where' keyword

2005-01-08 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: >x = (sqrt(a) where (a=2.0)) + (sqrt(b) where (a=3.0)) Hmm, I like that too. -- http://mail.python.org/mailman/listinfo/python-list

Re: The best way to do web apps with Python?

2005-01-09 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > You can read about it in Philip Eby's excellent PEP at > >http://www.python.org/peps/pep-0333.html I looked at this and I have the impression that it tries to do something worthwhile, but I can't tell precisely what. The "rationale and goals" sectio

Re: Pre/Postconditions with decorators

2005-01-09 Thread Paul Rubin
Stephen Thorne <[EMAIL PROTECTED]> writes: > > It should be left on. Leaving it in for development and turning it > > off for production is like wearing a parachute during ground training > > and taking it off once you're in the air. > So we can't use this for a case where we have an extremely lar

Re: python3: 'where' keyword

2005-01-09 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > Trying to push it a level further (down to expressions) would, IMO, be > a lot of effort for something which would hurt readability a lot. I think we should just try to do things in a simple and general way and not try to enforce readability. For example

Re: Old Paranoia Game in Python

2005-01-09 Thread Paul Rubin
Oh cool, I sort of remember that game from back in the day. I didn't play it very much so never got very far in it. I'll have to try your version. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python3: on removing map, reduce, filter

2005-01-09 Thread Paul Rubin
Andrey Tatarinov <[EMAIL PROTECTED]> writes: > How does GvR suggestions on removing map(), reduce(), filter() > correlate with the following that he wrote himself (afaik): > > http://www.python.org/doc/essays/list2str.html I think that article was written before list comprehensions were added to

Re: Python3: on removing map, reduce, filter

2005-01-09 Thread Paul Rubin
Andrey Tatarinov <[EMAIL PROTECTED]> writes: > anyway list comprehensions are just syntaxic sugar for > >>> for var in list: > >>> smth = ... > >>> res.append(smth) > > (is that correct?) I would expect lc's to work more like map does. -- http://mail.python.org/mailman/listinfo/python

Re: python3: 'where' keyword

2005-01-09 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > And a suite, be it a def statement, a where block, or whatever, belongs > in a statement, not an expression. So do you approve of the movement to get rid of the print statement? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-09 Thread Paul Rubin
"Roose" <[EMAIL PROTECTED]> writes: > > I've written file systems in Python, and task schedulers in > > Javascript, and they were fine for their purposes > > Uh, not to be rude, but what are you talking about? If I'm not mistaken > Javascript is that scripting language that runs inside a browser,

Re: Python Operating System???

2005-01-09 Thread Paul Rubin
Arich Chanachai <[EMAIL PROTECTED]> writes: > >Yes, compiled Lisp. There are Python compilers too.\ > > > ??? You mean like Pyrex or some such? I wouldn't exactly call these > "Python" compilers, as that kind of obscures some underlying > (critical) facts. Also psyco. And I think Pypy is curre

Re: Python Operating System???

2005-01-09 Thread Paul Rubin
"Roose" <[EMAIL PROTECTED]> writes: > Are you actually going to answer any of my questions? Let's see > this "JavaScript task scheduler" you have written! I wrote it at a company and can't release it. It ran inside a browser. There was nothing terribly amazing about it. Obviously the tasks it

Re: Python Operating System???

2005-01-09 Thread Paul Rubin
Arich Chanachai <[EMAIL PROTECTED]> writes: > > And I think Pypy is currently set up to compile Python > >into Pyrex and then run the Pyrex results through GCC. > > > But of course, who's going to argue that Pyrex produces "compiled > Python"? Pyrex produces compiled Python in the same sense th

Re: Python serial data aquisition

2005-01-10 Thread Paul Rubin
[EMAIL PROTECTED] (Flavio codeco coelho) writes: > I'll put your Ideas to the test ASAP, meanwhile, could you point me to > references to these bit operations in Python? I am new to this stuff, > and might need to do more of this to support other hardware... > > I havent been able to find anything

Re: python3: 'where' keyword

2005-01-10 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > > So do you approve of the movement to get rid of the print statement? > > Any little incremental change in Python you could make by having or not > having a print statement would be minor compared to the H-Bomb of > ugliness we'd get if suites of stateme

Re: Port blocking

2005-01-10 Thread Paul Rubin
Mark Carter <[EMAIL PROTECTED]> writes: > Supposing I decide to write a server-side application using something > like corba or pyro. > > What's the chance that in big corporations, the client's ports (in > both senses of the word: fee-paying, and application) will be blocked, > thereby immediatel

Re: python3: 'where' keyword

2005-01-10 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > Paul Rubin wrote: > > "Carl Banks" <[EMAIL PROTECTED]> writes: > > > > So do you approve of the movement to get rid of the print > statement? > > > > > > Any little increment

Re: python3: 'where' keyword

2005-01-10 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > When I asked you to do this, it was just a rhetorical way to tell you > that I didn't intend to play this game. It's plain as day you're > trying to get me to admit something. I'm not falling for it. > > If you have a point to make, why don't you just m

Re: Python Operating System???

2005-01-10 Thread Paul Rubin
"Roose" <[EMAIL PROTECTED]> writes: > Well, then of course you know I have to say: An OS does not run inside a > browser. There's a sentence I never thought I'd utter in my lifetime. > > So that is an irrelevant example, since it obviously isn't a task scheduler > in the context of this thread.

<    3   4   5   6   7   8   9   10   11   12   >