Re: Python 3! Finally!

2005-10-02 Thread Steve Bergman
Duncan Booth wrote: >Did you download the file using Firefox? It seems to have a 'feature' that >when you download a file and there is already a file of the same name it >finds the first number in the filename and increments it. > > > Yes, isn't that fun? This has been a known problem with a

Statement orders

2005-10-02 Thread Monu Agrawal
Hi I am making a gui based tool. When user preses a perticular button I am running a heavy command, before this I want to say user to wait with a image showing infront of her. My code is like: def loadData(self): top=Toplevel(self.parent) top.focus_set()

Re: Statement orders

2005-10-02 Thread Fredrik Lundh
Monu Agrawal wrote: > Hi I am making a gui based tool. When user preses a perticular button I > am running a heavy command, before this I want to say user to wait with > a image showing infront of her. > > My code is like: > > def loadData(self): >top=Toplevel(self.parent) >top.focus_set()

Re: Python 3! Finally!

2005-10-02 Thread Steven D'Aprano
On Sun, 02 Oct 2005 02:06:26 -0500, Steve Bergman wrote: > Someone proposes that in the case that there is a > filename collision, the user might simply be prompted to decide on a > filename. You mean like every single other GUI application that saves files does? > Firefox devs totally reject

Python CGI Script

2005-10-02 Thread Efrat Regev
Hello, I'm a data-structures course TA trying to write a python CGI script for automatically compiling and testing students' projects. Unfortunately, I've run into some questions while writing this, which I couldn't solve with the various (and helpful) python-CGI documentation. (It's

Problems posting with urlencode

2005-10-02 Thread Joseph Chase
I have the following form : Created User Auction title Auction url Modification rec State I post the form data with the following calls: params = urllib.urlencode({"auction[user]" :user, "auction[auction_title]": auction_title,"auction[auction_url]": auction_url, "auction[modificatio

Re: Class Help

2005-10-02 Thread Fredrik Lundh
Ivan Shevanski wrote: > To continue with my previous problems, now I'm trying out classes. But I > have a problem (which I bet is easily solveable) that I really don't get. > The numerous tutorials I've looked at just confsed me.For intance: > > >>>class Xyz: > ... def y(self): > ...

Re: Problems posting with urlencode

2005-10-02 Thread Fredrik Lundh
Joseph Chase wrote: > When I go and view the inserted record, the record exists, but the field > values are null. It is my thinking that the backend needs the "id" value > for each input value; how do I add that data to the urlencode() call? since the id isn't part of the form data set: htt

Re: Python CGI Script

2005-10-02 Thread Steve Holden
Efrat Regev wrote: > Hello, > > I'm a data-structures course TA trying to write a python CGI script > for automatically compiling and testing students' projects. > Unfortunately, I've run into some questions while writing this, which I > couldn't solve with the various (and helpful) p

Re: Problems posting with urlencode

2005-10-02 Thread Steve Holden
Fredrik Lundh wrote: > Joseph Chase wrote: > > >>When I go and view the inserted record, the record exists, but the field >>values are null. It is my thinking that the backend needs the "id" value >>for each input value; how do I add that data to the urlencode() call? > > > since the id isn't

Re: Python CGI Script

2005-10-02 Thread Ivan Herman
Efrat, I am afraid a CGI script is never *executed* by the browser. Instead, it sends the URL to a server, expects the server to execute the script, and display the server's response. If you just put a file name then (it seems, I never even tried that) Firefox uses the local file store as a 'serve

Re: Nufox : Xul + Python

2005-10-02 Thread salvatore . didio
Thank you for testing Indeed it is very interesting :-) I've had some problems with my ports forwarding and no-ip.org. Here is then the new address : http://artyprog.dyndns.org:8080 Regards Betwise, I live in France so the site is close when i'am at work -- http://mail.python.org/mailman/lis

Re: Nufox : Xul + Python

2005-10-02 Thread Oliver Andrich
I would like to test it, but as soon as I try to execute an example my browser is guided to connect to 192.168.0.40. First off it is an non-routeable address and secondly my own too. :))) May be you have to fix your setup another time. Best regards, Oliver 2 Oct 2005 03:40:50 -0700, [EMAIL PROTEC

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Paul Rubin
[EMAIL PROTECTED] (Bengt Richter) writes: > I decided to read this thread today, and I still don't know exactly > what your requirements are for "private" whatevers. No one seems to > have discussed what you could do with properties and __getattribute__ > and metaclasses and decorators, yet there a

Re: Nufox : Xul + Python

2005-10-02 Thread salvatore . didio
You are perfectly right ;-) And I've been a network technician !!! I've modified the address, thank you for testing Regards Salvatore -- http://mail.python.org/mailman/listinfo/python-list

Re: Nufox : Xul + Python

2005-10-02 Thread bearophileHUGS
It doesn't work yet, to me... bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Background process for ssh port forwarding

2005-10-02 Thread Jesse Rosenthal
On Sun, 02 Oct 2005 08:44:48 +0200, Fredrik Lundh wrote: > Jesse Rosenthal wrote: > >> If I end this with 'connection.interact()', I will end up logged in to the >> forwarding server. But what I really want is to go on and run rsync to >> localhost port 2022, which will forward to my_server port

Re: how to send a SIGINT to a Python process?

2005-10-02 Thread [EMAIL PROTECTED]
AFAIK there isn't. You could browse through this http://starship.python.net/crew/tmick/ to get an idea on how to kill on both platforms. -- http://mail.python.org/mailman/listinfo/python-list

Setting optimum gtkhtml2 widget size.

2005-10-02 Thread Sam
I'm putting gtkhtml2.View() inside a gtk.ScrolledWindow, which goes into a gtk.Dialog.vbox. How do I obtain gtkhtml2.View's preferred height, and set the dialog's height accordingly, given a specific width? I can do a gtk.Dialog.set_default_size() up front, specifying the width and height la

Re: A Moronicity of Guido van Rossum

2005-10-02 Thread Lucas Raab
Xah Lee wrote: [snip] >(they tried, with their limited implementation of lambda and > shun it like a plaque) Can't say I've heard that expression before... -- -- Lucas Raab lvraab"@"earthlink.net dotpyFE"@"gmail.com AIM:Phoenix11890 MSN:dotpyfe "@" gmail.com IRC

python guru.. for a short conversation regarding bittorrent..

2005-10-02 Thread bruce
hi.. i'm not a python developer, but i have a few questions regarding python (some quite basic), and bittorrent. i'm looking to talk to someone/anyone who has experience with the infrastructure of bittorrent, not just running a bittorrent client app... the bittorrent mailing lists/groups haven't

Distributing programs

2005-10-02 Thread Jason
A non-python programming friend of mine has said that any programs made with Python must be distributed with, or an alternative link, to the source of the program. Is this true? -- http://mail.python.org/mailman/listinfo/python-list

Re: Distributing programs

2005-10-02 Thread Fredrik Lundh
Jason wrote: > A non-python programming friend of mine has said that any programs made > with Python must be distributed with, or an alternative link, to the source of > the program. > > Is this true? no. the license is here: http://www.python.org/doc/Copyright.html "Python is absolutel

Re: [OT] A Moronicity of Guido van Rossum

2005-10-02 Thread Matt Garrish
"Lucas Raab" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Xah Lee wrote: > > [snip] > >>(they tried, with their limited implementation of lambda and >> shun it like a plaque) > > Can't say I've heard that expression before... > Burns: I'm afraid it's not that simple. As punishm

Re: Distributing programs

2005-10-02 Thread Jeff Schwab
Jason wrote: > A non-python programming friend of mine has said that any programs made > with Python must be distributed with, or an alternative link, to the > source of the program. > > Is this true? Sorta, but not really. Typically, you might distribute the source (.py) files, but if you

Re: Distributing programs

2005-10-02 Thread Fredrik Lundh
> the license is here: > > http://www.python.org/doc/Copyright.html > >"Python is absolutely free, even for commercial use (including > resale). There is no GNU-like "copyleft" restriction." except that the current license is (no longer?) linked from that page. the current license is

IDLE dedent/unindent key bindings for non-us keybord?

2005-10-02 Thread gjohannes
Hi. I use Idle 1.1.1 on Python 2.4.1. The "Ctrl-[" and "Ctrl-]" key bindings for indenting do not work on non-us keyboards where brackets are accessed by the "Alt Gr" key. The Tab key seem to work for indenting a selected textblock on my swedish keyboard, but Shift-tab does not dedent as you wou

Re: Nufox : Xul + Python

2005-10-02 Thread Andrew Gwozdziewycz
This looks very cool, and i'm sure it's in early stages of development (it crashed firefox 1.07 on osx). A question or two. In the button click example, when I got there, it said I had clicked 17 times, though I had not clicked. Is the application reinitialized on load? Is it just a py

Re: Class Help

2005-10-02 Thread Ivan Shevanski
Thanks everyone for helping me out and tolerating the noob question =D The last part was confusing to me and thanks for explaining it so I get it! -Ivan _ Express yourself instantly with MSN Messenger! Download today - it's FREE!

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread John Perks and Sarah Mount
> 1) Something that fixes the broken name mangling in the current > system, but still doesn't try to defeat intentional unmangling. > Currently, if you have a class with the same name as one of its > superclasses, the name mangling can fail even its existing purpose of > preventing accidental colli

Re: Nufox : Xul + Python

2005-10-02 Thread Salvatore
As you said this is in early stage 0.1-alpha-alpha :-) I'm not the author of this interesting piece of work it is Tim Stebbing I only wanted to share Tim's work. Don't hesitate to contact him on the nufox mailin list It runs on top of twisted-nevow. Indeed for now the application is not reinitiali

forum

2005-10-02 Thread csheppard91
Forum commuication is easier, and I've just started a new forum and would like to invite all of you to sign up and post there. I'm still looking for moderators and anyone who will help out. If you are intersted: www.wizardsolutionsusa.com -- follow the forum link. Remember it doesn't take but a

Re: output events on select

2005-10-02 Thread Piet van Oostrum
> "Tor Erik Sønvisen" <[EMAIL PROTECTED]> (TES) wrote: >TES> When using select, what exactly will trigger an output-event? I have >TES> a socket registered in the output-list of the select but an >TES> output-event is never generated for that socket. I know the socket is >TES> ready to send da

Re: Distributing programs

2005-10-02 Thread Leif K-Brooks
Jeff Schwab wrote: > Sorta, but not really. Typically, you might distribute the source (.py) > files, but if you don't want to do that, you can distribute the > compiled .pyc files instead. Python creates these files automatically > when your modules are imported. But remember that Python bytec

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread El Pitonero
Bengt Richter wrote: > > I decided to read this thread today, and I still don't know exactly > what your requirements are for "private" whatevers. No name collision in subclassing. Notice that even if you use self._x = 3 in a parent class, it can be overriden in a sub-sub-class accidentally. >

Re: Distributing programs

2005-10-02 Thread Steve Bergman
Leif K-Brooks wrote: >But remember that Python bytecode can be easily decompiled with a >publicly-available program. > > I hope it is not considered too antisocial to bring it up here, but there is always PyObfuscate: http://www.lysator.liu.se/~astrand/projects/pyobfuscate/ -Steve Bergman --

Re: python guru.. for a short conversation regarding bittorrent..

2005-10-02 Thread Paul Rubin
"bruce" <[EMAIL PROTECTED]> writes: > if there's anyone here that i could talk with (phone) who's knowledgable > about these areas, i'd appreciate it. i'm trying to get a much better > understanding of the actual underlying app. There's a #bittorrent irc channel on irc.freenode.net. Try there. --

Question about stdin and PATHEXT on Windows XP

2005-10-02 Thread Lasse Vågsæther Karlsen
I got a loop like this: while True: line = sys.stdin.readline() if not line: break line = line.rstrip() log_message(options.channel_name, line) print line this loop will read text if I execute it from a command prompt like this: dir

Re: Question about stdin and PATHEXT on Windows XP

2005-10-02 Thread Lasse Vågsæther Karlsen
Lasse Vågsæther Karlsen wrote: > I got a loop like this: Ok, I've found some information. I don't like the answer but it doesn't seem to be any good way to do this without hacking it one way or the other. If someone has a brilliant answer that isn't in google yet, please let me know. -- Lass

Re: forum

2005-10-02 Thread Sam Francke
[EMAIL PROTECTED] wrote at 2-10-2005 19:00:23: >Forum commuication is easier, and I've just started a new forum and >would like to invite all of you to sign up and post there. I don't agree with you, I like news-commuication. It's more free than forum use. -- with kind regards / met vriendelij

Virgin keyword (Was: Will python never intend to support private, protected and public?)

2005-10-02 Thread Roy Smith
"El Pitonero" <[EMAIL PROTECTED]> wrote: > Python's lack of Java-style "private" surely has its drawback: name > collisions can happen. But, that's just one side. Name collisions are > allowed in many dynamic languages, where you can override the default > system behavior (in some languages, you ca

Re: Distributing programs

2005-10-02 Thread Wouter van Ooijen (www.voti.nl)
>A non-python programming friend of mine has said that any programs made >with Python must be distributed with, or an alternative link, to the >source of the program. Yes, and you must also include a blank sheet, signed by you in blood. Seriously, whatever the license of Python itself is, a pro

Re: Statement orders

2005-10-02 Thread David Murmann
Fredrik Lundh wrote: > Monu Agrawal wrote: > >> Hi I am making a gui based tool. When user preses a perticular button I >> am running a heavy command, before this I want to say user to wait with >> a image showing infront of her. >> >> My code is like: >> >> def loadData(self): >>top=Toplevel(

Re: Distributing programs

2005-10-02 Thread Steve Bergman
Wouter van Ooijen (www.voti.nl) wrote: >Yes, and you must also include a blank sheet, signed by you in blood. > > I thought you only had to do that if you were submitting a patch to MySQL, Qt, OpenOffice, or OpenSolaris. ;-) -Steve Bergman -- http://mail.python.org/mailman/listinfo/python-li

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Gregor Horvath
El Pitonero schrieb: > > The fact that you can override Python's "list()" function can be either > viewed as pro or con. The fact that you can override member variables > can also be viewed as pro or con. > If there is a tool like pyChecker, which can detect such pitfalls and warns but not forb

Re: OT: Phases of the moon [was Re: A Moronicity of Guido van Rossum]

2005-10-02 Thread Matija Papec
X-Ftn-To: Paul F. Dietz "Paul F. Dietz" <[EMAIL PROTECTED]> wrote: >> As a similar example: I've been told by various women independently, >> that "there are more babies born near a full moon." > >That's also a myth. Perhaps not, consider deamon or vampire babies. :) --

mod_python works as standalone, does not as service (Windows XP)

2005-10-02 Thread tt
My mod_python 3.1.4 installation works when Apache 2.0.54 is run in standalone mode (apache -k standalone) but refuses to operate when run as a service (apache -k restart). Logs yield the usual and well-known "make_obcallback: could not import mod_python.apache" error. I have tried PYTHONHOME, Loa

Re: Statement orders

2005-10-02 Thread jepler
Here's one case where it's bad to call update. def perform_longrunning_calculation(): time.sleep(1) app.update() time.sleep(1) suppose you kick this off with a keybinding, such as: app.bind("c", lambda e: perform_longrunning_calculat

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > > Yes, the point is that it's something that you can check for by > > examining the class in question without having to examine any other > > classes. > > That's a pretty restrictive convention to follow. What convention? It just makes it possible to writ

mod_python works as standalone, does not as service (Windows XP)

2005-10-02 Thread Tau
My mod_python 3.1.4 installation works when Apache 2.0.54 is run in standalone mode (apache -k standalone) but refuses to operate when run as a service (apache -k restart). Logs yield the usual and well-known "make_obcallback: could not import mod_python.apache" error. I have tried PYTHONHOME, Loa

Re: A Moronicity of Guido van Rossum

2005-10-02 Thread Michael
Xah Lee wrote: > as i have hinted > ( http://xahlee.org/perl-python/list_comprehension.html ), the > so-called List Comprehension is just a irregular syntax to facilitate > generating lists. The name is a terrible jargon, and the means is also > quite fucked up. The proper name should be something

Re: RELEASED Python 2.4.2 (final)

2005-10-02 Thread Martin v. Löwis
Bugs wrote: > - I had an old ActiveState python24.dll in \windows\system32 which I > deleted. That must've been left over from a 2.4.1 ActiveState > installation which I had installed then uninstalled sometime ago. > > - I then uninstalled Python 2.4.2 and re-installed it for "all" users. > After

Re: Statement orders

2005-10-02 Thread David Murmann
[EMAIL PROTECTED] wrote: > Here's one case where it's bad to call update. > > def perform_longrunning_calculation(): > time.sleep(1) > app.update() > time.sleep(1) > would it be advisable to guard against this with something like this? def perform

Parrot & Python ?

2005-10-02 Thread Do Re Mi chel La Si Do
Hi ! On the site of Amber : http://xamber.org/index.html We can to view the sentence : "Parrot version of Python" Question : what is "Parrot version of Python" ? @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Program help

2005-10-02 Thread FX
can anybody write a code for a program that reads from a /location/file & according to file contents, it execute script. e.g. if file contains "mp" it runs media player. I hope the code is small .. plz help me out! -- http://mail.python.org/mailman/listinfo/python-list

struct.unpack

2005-10-02 Thread g.franzkowiak
Hello Everybody, I've read a pipe and store it in a object. My next step was the separation from 4 bytes with obj = string.join(list(dataObject)[:4] ==> '\x16 \x00 \x00 \x00' and the converting by value = struct.unpack('I', obj) generated the error "unpack str size does not match format" Unfort

Re: Program help

2005-10-02 Thread Jeff Schwab
FX wrote: > can anybody write a code for a program that reads from a > /location/file & according to file contents, it execute script. e.g. if > file contains "mp" it runs media player. > I hope the code is small .. plz help me out! You might be interested in the FileInfo class, defined and thorou

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Mike Meyer
Paul Rubin writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> > Yes, the point is that it's something that you can check for by >> > examining the class in question without having to examine any other >> > classes. >> >> That's a pretty restrictive convention to follow.

Re: struct.unpack

2005-10-02 Thread Fredrik Lundh
"g.franzkowiak" wrote: > I've read a pipe and store it in a object. > My next step was the separation from 4 bytes with > obj = string.join(list(dataObject)[:4] ==> '\x16 \x00 \x00 \x00' > and the converting by > value = struct.unpack('I', obj) generated the error > "unpack str size does not matc

Re: A Moronicity of Guido van Rossum

2005-10-02 Thread Fredrik Lundh
"Michael" wrote: > List comprehensions get their name (AFAICT) very clearly from set > comprehensions in mathematics. As a result anyone who has ever seen > a set comprehension in maths goes "oooh, I see". They're not the same, but > IMO they're close enough to warrant that name. fwiw, they've al

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Mike Meyer
Paul Rubin writes: > Well, it's a discussion of why a certain feature might be useful, not > that it's required. Mike Meyer points out some reasons it might be > hard to do smoothly without changing Python semantics in a deep way > (i.e. Python 3.0 or later). Actually

Re: Program help

2005-10-02 Thread Mike Meyer
"FX" <[EMAIL PROTECTED]> writes: > can anybody write a code for a program that reads from a > /location/file & according to file contents, it execute script. e.g. if > file contains "mp" it runs media player. > I hope the code is small .. plz help me out! open http://www.mired.org/downloads/ > wi

"no variable or argument declarations are necessary."

2005-10-02 Thread James A.Donald
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that means that if I misspell a variable name, my program will mysteriously fail to work with no error messag

Re: Statement orders

2005-10-02 Thread jepler
> would it be advisable to guard against this with something like this? > > def perform_longrunning_calculation(): > if not app.busy: > app.busy = 1 [...] By using that kind of construct, instead of using update_idletasks(), you force all code to be aware of and manage the app.busy

Re: "no variable or argument declarations are necessary."

2005-10-02 Thread D H
James A. Donald wrote: > I am contemplating getting into Python, which is used by engineers I > admire - google and Bram Cohen, but was horrified to read > > "no variable or argument declarations are necessary." > > Surely that means that if I misspell a variable name, my program will > mysteriou

Re: "no variable or argument declarations are necessary."

2005-10-02 Thread Will McGugan
James A. Donald wrote: > I am contemplating getting into Python, which is used by engineers I > admire - google and Bram Cohen, but was horrified to read > > "no variable or argument declarations are necessary." > > Surely that means that if I misspell a variable name, my program will > mysteriou

Re: "no variable or argument declarations are necessary."

2005-10-02 Thread Jean-François Doyon
Wow, never even occured ot me someone would have a problem with this! But, this might help: http://www.logilab.org/projects/pylint In more detail: > Surely that means that if I misspell a variable name, my program will > mysteriously fail to work with no error message. No, the error message

Automating, Building, Testing and Deploying to Production Server

2005-10-02 Thread yoda
Hi Guys, I've been used to deploying code to the production server by checking out of subversion and manually sorting out any kinks. (yes, I know, it sounds primitive) I realize I'm losing so much time I could spend more productively. I'd therefore like to know the different approaches you guys em

Python for search engine development

2005-10-02 Thread corebump
hi everybody, i planinng develop a search engine and i think using the python. Python performance is enough this project? Best Regards -- http://mail.python.org/mailman/listinfo/python-list

Re: struct.unpack

2005-10-02 Thread g.franzkowiak
Fredrik Lundh schrieb: > "g.franzkowiak" wrote: > > >>I've read a pipe and store it in a object. >>My next step was the separation from 4 bytes with >>obj = string.join(list(dataObject)[:4] ==> '\x16 \x00 \x00 \x00' >>and the converting by >>value = struct.unpack('I', obj) generated the error >>

Re: Parrot & Python ?

2005-10-02 Thread D H
Do Re Mi chel La Si Do wrote: > Hi ! > > On the site of Amber : http://xamber.org/index.html > We can to view the sentence : "Parrot version of Python" > Question : what is "Parrot version of Python" ? > Parrot is a virtual machine runtime, like the java vm or .NET CLR. http://www.parrotcode.o

Re: Python for search engine development

2005-10-02 Thread [EMAIL PROTECTED]
Well, Google applies some Python in their implementation, see http://www-db.stanford.edu/~backrub/google.html -- http://mail.python.org/mailman/listinfo/python-list

Re: what does 0 mean in MyApp(0)

2005-10-02 Thread Peter Hansen
Alex wrote: > Thanks for the replies. It seems that I have three options > 1. app=MyApp() > 2. app=MyApp(0) > 3. app=MyApp('myfile.txt') I just want to emphasize the part of vincent's reply in which he points out that using the keyword arguments makes this more readable. If more examples and act

Python based unacceptable language filter

2005-10-02 Thread David Pratt
Hi. Is anyone aware of any python based unacceptable language filter code to scan and detect bad language in text from uploads etc. Many thanks. David -- http://mail.python.org/mailman/listinfo/python-list

Re: "no variable or argument declarations are necessary."

2005-10-02 Thread [EMAIL PROTECTED]
The easiest way to avoid this problem (besides watching for NameError exceptions) is to use an editor that has automatic name completion. Eric3 is a good example. So, even though in theory it could be an issue, I rarely run into this in practice. -Don -- http://mail.python.org/mailman/listinfo/

Re: struct.unpack

2005-10-02 Thread Peter Otten
g.franzkowiak wrote: > tmpList = list(dataObject)[:4]) > obj = tmpList[0]+tmpList[1]+tmpList[2]+tmpList[3]. Have you tried just obj = dataObject[:4] without the intermediate list? If that failed, can you tell us the type of the dataObject? E. g. >>> print type(dataObject) Peter -- http

Re: A Moronicity of Guido van Rossum

2005-10-02 Thread Michael
Fredrik Lundh wrote: ... > fwiw, they've also been around for ages: > > http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?list+comprehension > > (the name goes back to the early eighties, the construct is older than > that) Ahh... Fair enough. I hadn't come across it as a programming construct un

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Steven D'Aprano
On Sun, 02 Oct 2005 12:05:53 -0700, Paul Rubin wrote: > I just don't understand your point here. Yes, you can do all those > things and leak any variable. However, if you want to NOT leak some > particular variable, "private" lets you code in a way that lets you > easily confirm that you didn't

Re: Program help

2005-10-02 Thread Steven D'Aprano
On Sun, 02 Oct 2005 12:57:29 -0700, FX wrote: > can anybody write a code for a program that reads from a > /location/file & according to file contents, it execute script. e.g. if > file contains "mp" it runs media player. > I hope the code is small .. plz help me out! There are lots of people who

Re: Python for search engine development

2005-10-02 Thread Mike Meyer
"corebump" <[EMAIL PROTECTED]> writes: > hi everybody, > i planinng develop a search engine and i think using the python. Python > performance is enough this project? If you're going to do the heavy lifting in Python, maybe. It depends on what you're going to search, and the performance requirem

Re: Automating, Building, Testing and Deploying to Production Server

2005-10-02 Thread Mike Meyer
"yoda" <[EMAIL PROTECTED]> writes: > Hi Guys, > I've been used to deploying code to the production server by checking > out of subversion and manually sorting out any kinks. (yes, I know, it > sounds primitive) Actually, it sounds like your test/development environment is primitive. There should

Re: python guru.. for a short conversation regarding bittorrent..

2005-10-02 Thread billie
If it can helps you "ABC" is a (good) bittorent client written in py. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for search engine development

2005-10-02 Thread gene tani
http://groups.google.com/group/comp.lang.python/browse_thread/thread/6e6dc84e68e25039/1436d0b3466e262a?q=lucene&rnum=1#1436d0b3466e262a Mike Meyer wrote: > "corebump" <[EMAIL PROTECTED]> writes: > > > hi everybody, > > i planinng develop a search engine and i think using the python. Python > > per

Re: "no variable or argument declarations are necessary."

2005-10-02 Thread James A.Donald
James A. Donald: > > Surely that means that if I misspell a variable name, my program will > > mysteriously fail to work with no error message. On Sun, 02 Oct 2005 17:11:13 -0400, Jean-François Doyon > No, the error message will be pretty clear actually :) Now why, I wonder, does this loop ne

Re: Automating, Building, Testing and Deploying to Production Server

2005-10-02 Thread Paul Rubin
"yoda" <[EMAIL PROTECTED]> writes: > I realize I'm losing so much time I could spend more productively. I'd > therefore like to know the different approaches you guys employ to > deploy builds from your staging servers (or laptops:) to the production > server in an automated repeatable safe manner.

Re: "no variable or argument declarations are necessary."

2005-10-02 Thread Michael
James A. Donald wrote: > On Sun, 02 Oct 2005 17:11:13 -0400, Jean-François Doyon > James A. Donald: >> > Surely that means that if I misspell a variable name, my program will >> > mysteriously fail to work with no error message. >> No, the error message will be pretty clear actually :) > Now why,

Re: forum

2005-10-02 Thread [EMAIL PROTECTED]
is there any forum writen by python like vbb...phped -- http://mail.python.org/mailman/listinfo/python-list

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-02 Thread Michael
Rocco Moretti wrote: > That is, what would happen with the following constructs: > > A if B else C if D else F > A if B if C else D else F The correct answer should be the person who wrote it would get told off for writing code that a person reading would have no idea what the code was doing (wi

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > > What convention? It just makes it possible to write code with some > > specific invariants if there's a need to do so. > > That you don't pass private variables to a function unless it's a builtin. No, I don't see that as "convention", it's just somethi

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-02 Thread Michael
Paul Rubin wrote: > I'm not > sure what Guido saw in the "A if C else B" syntax but it's not a big deal. Maybe Guido's done some perl programming on the side? When I've been doing perl programming I've quite liked the if (...); construct, however, on occasion it's been desirable to have an e

Re: what does 0 mean in MyApp(0)

2005-10-02 Thread MrJean1
See the documentation for the __init__() method here Btw, this is wxPython 2.6, AFAIK. /Jean Brouwers -- http://mail.python.org/mailman/listinfo/python-list

Re: Python based unacceptable language filter

2005-10-02 Thread Nigel Rowe
David Pratt wrote: > Hi. Is anyone aware of any python based unacceptable language filter > code to scan and detect bad language in text from uploads etc. > > Many thanks. > David You might be able to adapt languagetool. http://www.danielnaber.de/languagetool/features.html Later versions have

Re: "no variable or argument declarations are necessary."

2005-10-02 Thread George Sakkis
"Michael" <[EMAIL PROTECTED]> wrote: > James A. Donald wrote: > > On Sun, 02 Oct 2005 17:11:13 -0400, Jean-Francois Doyon > > James A. Donald: > >> > Surely that means that if I misspell a variable name, my program will > >> > mysteriously fail to work with no error message. > >> No, the error m

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > The philosophy of dynamic languages like Python is that the class designer > shouldn't be the only one who decides whether or not a particular variable > should be private or public. I don't see that as part of the philosophy of dynamic languages. For

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > Actually, I think that the semantic changes required to make private > do what you want are deep enough that the resulting language > wouldn't be Python any longer. It has deep implications from the > interpeter implementation all the way out to the design o

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Paul Rubin
Mike Meyer <[EMAIL PROTECTED]> writes: > >> Compile-time restrictions don't matter for squat - you need > >> serious restrictions on what the program can do at runtime. > > > > You need both. > > Yup. Any language besides Java even *try* to provide both for a > production environment? Yes. Pyth

Unicode charmap decoders slow

2005-10-02 Thread Tony Nelson
Is there a faster way to decode from charmaps to utf-8 than unicode()? I'm writing a small card-file program. As a test, I use a 53 MB MBox file, in mac-roman encoding. My program reads and parses the file into messages in about 3..5 seconds, but takes about 13.5 seconds to iterate over the c

gtk.TextView.move_mark_onscreen() broken?

2005-10-02 Thread Tony Nelson
Is gtk.TextView.move_mark_onscreen() broken? Perhaps only in Python's gtk module, in Python 2.3, gtk 2.4.14? I'm asking here because I'm using gtk from Python and don't want to write a C program to verify my issue. I've also tried gtk.TextView.scroll_to_mark() and gtk.TextView.place_cursor_o

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Mike Meyer
Paul Rubin writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> > What convention? It just makes it possible to write code with some >> > specific invariants if there's a need to do so. >> That you don't pass private variables to a function unless it's a builtin. > No, I

Re: Will python never intend to support private, protected and public?

2005-10-02 Thread Mike Meyer
Paul Rubin writes: > Mike Meyer <[EMAIL PROTECTED]> writes: >> >> Compile-time restrictions don't matter for squat - you need >> >> serious restrictions on what the program can do at runtime. >> > You need both. >> Yup. Any language besides Java even *try* to provide both

  1   2   >