RE: Python IDE

2007-06-21 Thread Ethan Kennerly
xhm wrote: > PyScripter http://mmm-experts.com/Downloads.aspx?ProductId=4 If PyScripter is your style, Stani's Python Editor also is feature-rich and GUIy. Stani's Python Editor http://pythonide.blogspot.com/ It's got winpdb and a shell integrated. Although, from reading this thread, I've gone b

Re: "assert" annoyance

2007-06-21 Thread Evan Klitzke
On 6/21/07, Miles <[EMAIL PROTECTED]> wrote: > On Jun 22, 1:31 am, Paul Rubin wrote: > > What I really want is for any assertion failure, anywhere in the > > program, to trap to the debugger WITHOUT blowing out of the scope > > where the failure happened, so I can examine

Re: why __repr__ affected after __getattr__ overloaded?

2007-06-21 Thread Roc Zhou
I'm sorry but I still have a question, look at this example: >>> class test: ... def __init__(self): ... self.x = 1 ... def __getattr__(self, attr_name): ... print attr_name ... if attr_name == 'y': ... return 2 ... else: ... raise Att

[OT] Re: Error in following code

2007-06-21 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Im working with python2.2 on red hat linux. > The following program is supposed to print decreasing numbers from an > entered number till 1, each decrement being = 1 : > > #! usr/bin/env/python > > def f(n=int(raw_input("enter number: "))): > print 'n=',n >

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-21 Thread John Nagle
Kay Schluehr wrote: > That's simply because no one knows about the effects it has on Pythons > programming practices. Hence it is outsourced to "3rd party packages" > and these can be x-compilers as well that do all the inference stuff > and translate to Pyrex, C++, D or any other language having a

Re: "assert" annoyance

2007-06-21 Thread Miles
On Jun 22, 1:31 am, Paul Rubin wrote: > What I really want is for any assertion failure, anywhere in the > program, to trap to the debugger WITHOUT blowing out of the scope > where the failure happened, so I can examine the local frame. That > just seems natural, but I d

Re: import mysteries

2007-06-21 Thread Steven D'Aprano
On Thu, 21 Jun 2007 16:03:42 -0400, David Abrahams wrote: > I'm pretty comfortable with Python, but recently I'm constantly finding > mysterious issues with import. For example, looking at > > http://genshi.edgewall.org/browser/trunk/genshi/filters/transform.py > > the examples use the symbol

Re: comparing two lists and returning "position"

2007-06-21 Thread Steven D'Aprano
On Fri, 22 Jun 2007 03:11:16 +, hiro wrote: > Hi there, I have a 2 lists.. for simplicities sake lets say the are: > > l1 = [ 'abc' 'ghi' 'mno' ] > > l2 = [ 'abc' 'def' 'ghi' 'jkl 'mno' 'pqr'] > > what I need to do is compare l1 against l2 and return the "position" of > where each object in

Re: Error in following code

2007-06-21 Thread Efrat Regev
[EMAIL PROTECTED] wrote: > Im working with python2.2 on red hat linux. > The following program is supposed to print decreasing numbers from an > entered number till 1, each decrement being = 1 : > > #! usr/bin/env/python > > def f(n=int(raw_input("enter number: "))): > print 'n=',n > if

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-21 Thread Steven D'Aprano
On Thu, 21 Jun 2007 15:25:37 -0400, Douglas Alan wrote: > You are imagining something very different from what is proposed. > Lisp-like macros don't allow "anything goes". Provided people avoid doing anything "which would be considered very rude" (your own words). Python already allows me to sh

Re: comparing two lists and returning "position"

2007-06-21 Thread hiro
On Jun 22, 1:46 am, Charles Sanders <[EMAIL PROTECTED]> wrote: > Paul Rubin wrote: > > > from itertools import izip > > pos = map(dict(izip(l2, count())).__getitem__, l1) > > or probably less efficiently ... > > >>> l1 = [ 'abc', 'ghi', 'mno' ] > >>> l2 = [ 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqr

Problems with HTTP Request

2007-06-21 Thread Rodolfo S. Carvalho
Hi folks! I'm writing my own web server in python, and I'm getting problems to handle POST requests. This is a snippet of my code (of an HttpRequest class): try: length = int(self.myRequestHandler.headers.get('content-length', 0)) except ValueError: length = 0 pdata = self.myRequestHandler

Returned mail: Data format error

2007-06-21 Thread rhmatola
-- http://mail.python.org/mailman/listinfo/python-list

Re: Error in following code

2007-06-21 Thread Jay Loden
[EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] root]# python t4.py > enter number: 6 > [EMAIL PROTECTED] root]# > > i.e it takes the input but doesn't print anything. If anybody can > help... Thanx! You're creating a function called "f" in the first line, but the script never does anything with i

Re: Error while installing Python2.5.1

2007-06-21 Thread Martin v. Löwis
> So how do i overcome this problem?? How do i access my distribution > repositories(if any) or installation media? You need to move to your living room. In the closet on the right side, in the second drawer from the top, you are keeping the keeping the Redhat DVDs. Open the drawer, pick the DVD c

Error in following code

2007-06-21 Thread zaperaj
Im working with python2.2 on red hat linux. The following program is supposed to print decreasing numbers from an entered number till 1, each decrement being = 1 : #! usr/bin/env/python def f(n=int(raw_input("enter number: "))): print 'n=',n if n>1: return n*f(n-1) els

Re: why __repr__ affected after __getattr__ overloaded?

2007-06-21 Thread Roc Zhou
return hex(id(self)) On 6 22 , 1 48 , Roc Zhou <[EMAIL PROTECTED]> wrote: > I know what's wrong. Thank you. And I think > try: > return self.__dict__[attr_name] > is unnecessary, because python will do it itself for us. > > So now I have to overload __str__, but how can I make self.__str__ >

Re: Error while installing Python2.5.1

2007-06-21 Thread zaperaj
So how do i overcome this problem?? How do i access my distribution repositories(if any) or installation media? -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with using ConfigParser.py

2007-06-21 Thread David Wahler
On 6/22/07, shridhar kurhade <[EMAIL PROTECTED]> wrote: > Hi, > Thanks for your reply. I tried changing the ownership and it looks as below: > # ls -l /home/ast/ast-linux.conf > -rw-r--r-- 1 ast ast 7936 Jun 21 11:11 /home/ast/ast-linux.conf > > But when I try to read through browser, it gives per

Re: why __repr__ affected after __getattr__ overloaded?

2007-06-21 Thread Roc Zhou
I know what's wrong. Thank you. And I think try: return self.__dict__[attr_name] is unnecessary, because python will do it itself for us. So now I have to overload __str__, but how can I make self.__str__ print as builtin str(): at here, I want get the result like: ? On 6 22 , 12 55 , "Gab

Re: comparing two lists and returning "position"

2007-06-21 Thread Charles Sanders
Paul Rubin wrote: > > from itertools import izip > pos = map(dict(izip(l2, count())).__getitem__, l1) or probably less efficiently ... >>> l1 = [ 'abc', 'ghi', 'mno' ] >>> l2 = [ 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqr'] >>> pos = [ l2.index(i) for i in l1 ] >>> print pos [0, 2, 4] Charles

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-21 Thread Douglas Alan
"Terry Reedy" <[EMAIL PROTECTED]> writes: > | It allows the community to develop language features in a modular way > | without having to sully the code base for the language itself. > [etc] > Some of the strongest opposition to adding macros to Python comes > from people like Alex Martelli who h

"assert" annoyance

2007-06-21 Thread Paul Rubin
So I have some assert statements in my code to verify the absence of some "impossible" conditions. They were useful in debugging and of course I left them in place for "real" runs of the program. Umpteen hours into a run, an assertion failed, and of course since failure was "impossible", I didn't

Re: Internationalised email subjects

2007-06-21 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > That's really strange. The chinese characters I am inputing into the > post are not being displayed. Basically, what I am doing is this: > > h = Header('(Some Chinese characters inserted here', 'GB2312') What encoding do "Some Chinese characters" have at that point?

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-21 Thread Robert Brown
Neil Cerutti <[EMAIL PROTECTED]> writes: > On 2007-06-21, Douglas Alan <[EMAIL PROTECTED]> wrote: >> A prime example of this is how CLOS, the Common Lisp Object System was >> implemented completely as a loadable library (with the help of many >> macros) into Common Lisp, which was not an OO languag

Re: subprocess.popen question

2007-06-21 Thread Gabriel Genellina
En Fri, 22 Jun 2007 01:05:36 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: >> >> >> cmd = ["gawk", "-f", "altertime.awk", "-v", "time_offset=4", "-v", >> >> >> "outfile=testdat.sco", "i1.sco"] >> >> >> output = subprocess.Popen(cmd, >> >> stdout=subprocess.PIPE).communicate()[0] >> >> >

Re: Google breaks international charset messages

2007-06-21 Thread Ben Finney
"Evan Klitzke" <[EMAIL PROTECTED]> writes: > Ironically, you're sending out us-ascii encoded emails as well. Yes, because I was (a) replying to a message already in that encoding, and (b) that encoding was sufficient to encode all the characters in my message. Where the original poster's message

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-21 Thread Robert Brown
Stephen R Laniel <[EMAIL PROTECTED]> writes: > Granted, in a dynamic language we won't always (maybe "won't > often") have a situation where the types are known this well > at compile time. But sometimes we will. And it would be nice > to catch these before the program even runs. > > So my questio

Re: why __repr__ affected after __getattr__ overloaded?

2007-06-21 Thread Gabriel Genellina
En Fri, 22 Jun 2007 00:30:43 -0300, Roc Zhou <[EMAIL PROTECTED]> escribió: > Now I have to design a class that overload __getattr__, but after > that, I found the __repr__ have been affected. This is a simple > example model: You are creating many attributes with value "inexistent", even specia

Re: How to Encode Parameters into an HTML Parsing Script

2007-06-21 Thread Gabriel Genellina
En Thu, 21 Jun 2007 23:37:07 -0300, <[EMAIL PROTECTED]> escribió: > So for example if I wanted to navigate to an encoded url > http://online.investools.com/landing.iedu?signedin=true rather than > just http://online.investools.com/landing.iedu How would I do this? > How can I modify the script t

Re: comparing two lists and returning "position"

2007-06-21 Thread Paul Rubin
hiro <[EMAIL PROTECTED]> writes: > what I need to do is compare l1 against l2 and return the "position" > of where each object in l1 is in l2 > > ie: pos = 0, 2, 4 Is it September already? from itertools import izip pos = map(dict(izip(l2, count())).__getitem__, l1) Heh heh heh. -- http://mail

Re: Changing the names of python keywords and functions

2007-06-21 Thread Martin v. Löwis
>>> "<> OS"- (THIS IS MY IMAGINARY EXAMPLE OF KEYWORD), >>> my program must write this code in some user file, but my >>> program must read this command like: "import os".How >>> can I do something like that?? >> The keywords are listed in Grammar/Grammar. You need to edit >> this file, then recomp

Re: subprocess.popen question

2007-06-21 Thread [EMAIL PROTECTED]
On Jun 21, 1:22 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 20 Jun 2007 22:28:06 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribió: > > > > > > > On Jun 20, 7:50 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> En Wed, 20 Jun 2007 20:02:52 -0300, [EMAIL PROTECTED

Re: Issues with nonfunctioning VTK under python 2.5

2007-06-21 Thread Robert Kern
Eric Carlson wrote: > Any suggestions would be greatly appreciated. Please bring these bug reports to [EMAIL PROTECTED] and possibly make a ticket on our Trac. https://mail.enthought.com/mailman/listinfo/enthought-dev https://svn.enthought.com/enthought Thanks. -- Robert Kern "I have com

Type of __builtins__ changes from module import to execution?

2007-06-21 Thread Adam Hupp
I've noticed some unexpected behavior with __builtins__ during module import. It seems that during module import __builtins__ is a dict but at all other times it is a module. For example, if the file testmod.py has these contents: print type(__builtins__) print "has str attr", hasattr(__builtin

gettext and __doc__ for class methods?

2007-06-21 Thread Roc Zhou
from gettext import gettext as _ __doc__ = _("""module docstrings""") class test: __doc__ = _("""class docstrings""") def __setattr__(self, attr_name, value): _("""class method docstrings""") But I found when the module and class docstrings take effect(must use __doc__ to specify i

Re: comparing two lists and returning "position"

2007-06-21 Thread Neil Cerutti
On 2007-06-22, hiro <[EMAIL PROTECTED]> wrote: > Hi there, I have a 2 lists.. for simplicities sake lets say the are: > > l1 = [ 'abc' 'ghi' 'mno' ] > > l2 = [ 'abc' 'def' 'ghi' 'jkl 'mno' 'pqr'] > > what I need to do is compare l1 against l2 and return the "position" > of where each object in l1 i

why __repr__ affected after __getattr__ overloaded?

2007-06-21 Thread Roc Zhou
Now I have to design a class that overload __getattr__, but after that, I found the __repr__ have been affected. This is a simple example model: #!/usr/bin/env python class test: def __init__(self): self.x = 1 def __getattr__(self, attr_name): try: return self.__dic

why __repr__ affected after __getattr__ overloaded?

2007-06-21 Thread Roc Zhou
Now I have to design a class that overload __getattr__, but after that, I found the __repr__ have been affected. This is a simple example model: #!/usr/bin/env python class test: def __init__(self): self.x = 1 def __getattr__(self, attr_name): try: return self._

cannot have test scripts in packages?

2007-06-21 Thread Alan Isaac
This is really a repackaging of an earlier question, probably illustrating that I still do not understand relative imports. Suppose I have the package structure (taken from the example at http://www.python.org/dev/peps/pep-0328/) package/ __init__.py subpackage1/ __init__.py

why __repr__ affected after __getattr__ overloaded?

2007-06-21 Thread Roc Zhou
Now I have to design a class that overload __getattr__, but after that, I found the __repr__ have been affected. This is a simple example model: #!/usr/bin/env python class test: def __init__(self): self.x = 1 def __getattr__(self, attr_name): try: return self._

__repr__ affected after __getattr__ overloaded?

2007-06-21 Thread Roc Zhou
Now I have to design a class that overload __getattr__, but after that, I found the __repr__ have been affected. This is a simple example model: #!/usr/bin/env python class test: def __init__(self): self.x = 1 def __getattr__(self, attr_name): try: return self.

comparing two lists and returning "position"

2007-06-21 Thread hiro
Hi there, I have a 2 lists.. for simplicities sake lets say the are: l1 = [ 'abc' 'ghi' 'mno' ] l2 = [ 'abc' 'def' 'ghi' 'jkl 'mno' 'pqr'] what I need to do is compare l1 against l2 and return the "position" of where each object in l1 is in l2 ie: pos = 0, 2, 4 Thanks in advance, -h -- http

Re: Error while installing Python2.5.1

2007-06-21 Thread Evan Klitzke
On 6/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I dont understand What are my distribution repositories? AFAIK there aren't any repositories for Red Hat 9. But there should be a gcc rpm on your installation media. -- Evan Klitzke <[EMAIL PROTECTED]> -- http://mail.python.org/mail

Re: Google breaks international charset messages (was: Internationalised email subjects)

2007-06-21 Thread Evan Klitzke
On 6/21/07, Ben Finney <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > > Seems some characters are missing from my last post. The line that > > says: > > > > h = Header(' ', 'GB2312') > > > > should say: > > > > h = Header(' ', 'GB2312') > > Your message has this field in the header:

Re: Error while installing Python2.5.1

2007-06-21 Thread zaperaj
I dont understand What are my distribution repositories? -- http://mail.python.org/mailman/listinfo/python-list

Re: Error while installing Python2.5.1

2007-06-21 Thread zaperaj
I dont understand What are my distribution repositories? -- http://mail.python.org/mailman/listinfo/python-list

How to Encode Parameters into an HTML Parsing Script

2007-06-21 Thread SMERSH009X
I've written a Script that navigates various urls on a website, and fetches the contents. The Url's are being fed from a list "urlList". Everything seems to work splendidly, until I introduce the concept of encoding parameters for a certain url. So for example if I wanted to navigate to an encoded

Re: Logger vs. Handler log levels

2007-06-21 Thread Steve Greenland
According to John J. Lee <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] (Steve Greenland) writes: > > import logging, logging.handlers > > logging.basicConfig(level=logging.WARNING) > > > > newlog = logging.handlers.TimedRotatingFileHandler( > > filename='/home/steveg/logtest.log', >

Re: possible to preserve subprocess.Popen objects for later?

2007-06-21 Thread zacherates
On Jun 21, 6:32 pm, Ratko <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a python gui app that launches multiple applications using > subprocess.Popen class and prints their output in the gui (using > PIPEs, threads and wxPython). Everything works great but the problem > is that some applications

Re: import mysteries

2007-06-21 Thread Ben Finney
David Abrahams <[EMAIL PROTECTED]> writes: > I'm pretty comfortable with Python, but recently I'm constantly > finding mysterious issues with import. For example, looking at > > http://genshi.edgewall.org/browser/trunk/genshi/filters/transform.py > > the examples use the symbol 'HTML' but it's

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-21 Thread Galen Boyer
On Thu, 21 Jun 2007, [EMAIL PROTECTED] wrote: > but it is easy to use. A Windows or Mac OS text editor may have an > easier learning curve, but it'll never be as easy to use. This really is the biggest argument. Emacs takes more time to learn than any other environment I've used. But, Emacs is

Re: variable sub in a list- how to

2007-06-21 Thread Gabriel Genellina
En Thu, 21 Jun 2007 22:16:59 -0300, hari sirigibathina <[EMAIL PROTECTED]> escribió: > How can I substitute a variable into a list ? > ex: > list() > var = 'Prog' > list.append($Prog) //error occur here Considering the usage of // and $Prog (btw, did you meant $var?) I think you should start

Re: something similar to shutil.copytree that can overwrite?

2007-06-21 Thread Justin Ezequiel
def copytree(src, dst, symlinks=False): """Recursively copy a directory tree using copy2(). The destination directory must not already exist. XXX Consider this example code rather than the ultimate tool. """ names = os.listdir(src) if not os.path.exists(dst): os.makedirs(

Re: import mysteries

2007-06-21 Thread Gabriel Genellina
En Thu, 21 Jun 2007 17:03:42 -0300, David Abrahams <[EMAIL PROTECTED]> escribió: > Another example: I was recently working on some code that did an > import from inside a class method. That import was failing. I moved > the import to the top of the file (at module scope) and it succeeded. > I'

variable sub in a list- how to

2007-06-21 Thread hari sirigibathina
D- How can I substitute a variable into a list ? ex: list() var = 'Prog' list.append($Prog) //error occur here -- Warm Regards, Hari -- http://mail.python.org/mailman/listinfo/python-list

Setuptools, build and install dependencies (was: eggs considered harmful)

2007-06-21 Thread Ben Finney
Harry George <[EMAIL PROTECTED]> writes: > Historically, python packages played well in this context. Install > was a simple download, untar, setup.py build/install. > > Eggs and with other setuptools-inspired install processes break this > paradigm. The tarballs are incomplete in the first plac

Re: unable to execute to a python script

2007-06-21 Thread Gabriel Genellina
En Thu, 21 Jun 2007 12:47:30 -0300, Bala Subramanyam vemu <[EMAIL PROTECTED]> escribió: > It executes fine in the python shell, but the problem is in when i > execute > as a python script i get the following error > > DCA-TestMachine:~/python_scripts # python2.5 -v rpmqa.py > # /root/pytho

rsync module?

2007-06-21 Thread Evan Klitzke
Are there any python modules for accessing rsync from python? I would like to be able to rsync files from a python script to a remote server running an rsync daemon. I'm well aware that I can invoke rsync using subprocess, os.system, etc., but I am curious if there is a way to do it directly. --

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-21 Thread Terry Reedy
"Douglas Alan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | > But why is the ability to abstract syntax good? | | It allows the community to develop language features in a modular way | without having to sully the code base for the language itself. Anyone can write modules, expe

Re: Collections of non-arbitrary objects ?

2007-06-21 Thread Grant Edwards
On 2007-06-21, Ben Finney <[EMAIL PROTECTED]> wrote: > walterbyrd <[EMAIL PROTECTED]> writes: > >> Python seems to have a log of ways to do collections of >> arbitrary objects: lists, tuples, dictionaries. But what if I >> want a collection of non-arbitrary objects? Lists never contain arbitrary o

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-21 Thread Terry Reedy
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On Wed, 20 Jun 2007 17:23:42 -0400, Douglas Alan wrote: | > Macros are a way to abstract syntax the way that objects are used to | > abstract data types and that iterators and generators abstract control, | > etc. | |

Re: Changing the names of python keywords and functions

2007-06-21 Thread Ben Finney
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > (unattributed author) wrote: > > "<> OS"- (THIS IS MY IMAGINARY EXAMPLE OF KEYWORD), > > my program must write this code in some user file, but my > > program must read this command like: "import os".How > > can I do something like that?? > > The key

Issues with nonfunctioning VTK under python 2.5

2007-06-21 Thread Eric Carlson
Hello, I have tried to install the entire stash of eggs in the svn repository at enthought using enthought enstaller on Windows XP,and it mostly seems to have been successful for my python2.5 installation. Unfortunately, I can not seem to load up my vtk modules. Every time I try to import vtk

Re: eggs considered harmful

2007-06-21 Thread Robert Kern
Harry George wrote: > ...at least around here. > > I run a corporate Open Source Software Toolkit, which makes hundreds > of libraries and apps available to thousands of technical employees. > The rules are that a) a very few authorized downloaders obtain > tarballs and put them in a depot and b)

Re: Collections of non-arbitrary objects ?

2007-06-21 Thread Ben Finney
walterbyrd <[EMAIL PROTECTED]> writes: > Python seems to have a log of ways to do collections of arbitrary > objects: lists, tuples, dictionaries. But what if I want a > collection of non-arbitrary objects? A list of records, or something > like that? Then collect them in a non-arbitrary way. Th

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-21 Thread Terry Reedy
"Douglas Alan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Steven D'Aprano <[EMAIL PROTECTED]> writes: | | > On Wed, 20 Jun 2007 17:23:42 -0400, Douglas Alan wrote: | | >> Macros are a way to abstract syntax the way that objects are used to | >> abstract data types and that iter

Re: Indenting in Emacs

2007-06-21 Thread John J. Lee
Eugene Morozov <[EMAIL PROTECTED]> writes: > Steven W. Orr пишет: > > Ok. I'm not stupid but I do not see a 4.78 anywhere even though I > see refs >> from google. I have 4.75 The SVN tree doesn't seem to even have >> that. >> >> I checked the latest copy out from sourceforge and that was 4.75 to

Google breaks international charset messages (was: Internationalised email subjects)

2007-06-21 Thread Ben Finney
[EMAIL PROTECTED] writes: > Seems some characters are missing from my last post. The line that > says: > > h = Header(' ', 'GB2312') > > should say: > > h = Header(' ', 'GB2312') Your message has this field in the header: Content-Type: text/plain; charset="us-ascii" which is why the non-

Re: Python live environment on web-site?

2007-06-21 Thread [EMAIL PROTECTED]
On Jun 21, 8:49 pm, André <[EMAIL PROTECTED]> wrote: > On Jun 21, 3:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > > > On Jun 21, 1:18 am, [EMAIL PROTECTED] (Thomas Lenarz) wrote: > > > > Hi all, > > > > I was wondering if there was a python-live-environment available on a > > > publ

Re: eggs considered harmful

2007-06-21 Thread John J. Lee
Harry George <[EMAIL PROTECTED]> writes: [...] > These are unacceptable behaviors. I am therefore dropping ZODB3, and > am considering dropping TurboGears and ZSI. If the egg paradigm > spreads, yet more packages will be dropped (or will never get a chance > to compete for addition). > > I've as

Re: possible to preserve subprocess.Popen objects for later?

2007-06-21 Thread Diez B. Roggisch
Ratko schrieb: > Hi all, > > I have a python gui app that launches multiple applications using > subprocess.Popen class and prints their output in the gui (using > PIPEs, threads and wxPython). Everything works great but the problem > is that some applications should run in the background (ie they

Re: Logger vs. Handler log levels

2007-06-21 Thread John J. Lee
[EMAIL PROTECTED] (Steve Greenland) writes: > Apparently I don't understand logging levels. The code: > > import logging, logging.handlers > > > logging.basicConfig(level=logging.WARNING) > > newlog = logging.handlers.TimedRotatingFileHandler( > filename='/home/steveg/logtest.l

possible to preserve subprocess.Popen objects for later?

2007-06-21 Thread Ratko
Hi all, I have a python gui app that launches multiple applications using subprocess.Popen class and prints their output in the gui (using PIPEs, threads and wxPython). Everything works great but the problem is that some applications should run in the background (ie they don't close when the gui c

Re: import mysteries

2007-06-21 Thread Peter Otten
David Abrahams wrote: > I'm pretty comfortable with Python, but recently I'm constantly > finding mysterious issues with import. For example, looking at > > http://genshi.edgewall.org/browser/trunk/genshi/filters/transform.py > > the examples use the symbol 'HTML' but it's not defined locally

Re: string formatter %x and a class instance with __int__ cannot handle long

2007-06-21 Thread Kenji Noguchi
I looked at python2.5.1 source code. I noticed that, in Objects/stringobject.c around line 4684, long type is exceptionally handled, which is hack, and everything else falls to formatint. This explains why explicit converting to long before formatting fixes the problem. I made a patch but this is

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-21 Thread Douglas Alan
Neil Cerutti <[EMAIL PROTECTED]> writes: >>> But why is the ability to abstract syntax good? >> It allows the community to develop language features in a >> modular way without having to sully the code base for the >> language itself. > That's not an advantage exclusive to macros, though. No,

Re: import mysteries

2007-06-21 Thread Martin v. Löwis
David Abrahams schrieb: > I'm pretty comfortable with Python, but recently I'm constantly > finding mysterious issues with import. For example, looking at > > http://genshi.edgewall.org/browser/trunk/genshi/filters/transform.py > > the examples use the symbol 'HTML' but it's not defined local

Re: newbie question: parsing street name from address

2007-06-21 Thread John Machin
On Jun 22, 4:43 am, Eric <[EMAIL PROTECTED]> wrote: > On Jun 21, 9:47 am, cjl <[EMAIL PROTECTED]> wrote: > > > > > P: > > > I am working on a project that requires geocoding, and have written a > > very simple geocoder that uses the Google service. > > > I would like to be able to extract the name

Re: Split file into several and reformat

2007-06-21 Thread Gabriel Genellina
En Thu, 21 Jun 2007 02:45:38 -0300, <[EMAIL PROTECTED]> escribió: > I want to take read an input file (sels.txt) that looks like: > > Begin sels >sel1 = {1001, 1002, 1003, ... >... >1099} > >sel2 = {1001, 1008, 1009 ... >... >1299} > End sels

Re: visual gui ides for python/jythpn

2007-06-21 Thread Luis M . González
On Jun 20, 3:16 pm, kromakey <[EMAIL PROTECTED]> wrote: > Hi, > > Are there any free visual GUI IDE's available for python/jython, which > have a drag and drop form designer similar to Visual Studio or > Delphi ? > > Cheers > kromakey PythonCard is an extremely easy to use alternative. It's like a

Re: sqlite newbie questions

2007-06-21 Thread Luis M . González
On Jun 21, 4:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I have a sqlite database table which has a table named "Transmittal". > Before inserting a new record into the database, i'd like to perform > some checking. How do i select all records with certain value (say > "Smith"

Re: The Modernization of Emacs

2007-06-21 Thread Dave Hansen
On Jun 21, 9:49 am, Robert Uhl <[EMAIL PROTECTED]> wrote: > Twisted <[EMAIL PROTECTED]> writes: > > > Given that in its out-of-the-box configuration it's well-nigh unusable > > without a printed-out "cheat sheet" of some kind, of the sort that > > were supposed to have died out in the 80s, getting

Re: Inferring initial locals()

2007-06-21 Thread George Sakkis
On Jun 21, 4:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jun 21, 8:51 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > I wonder if there is a (preferably not too-hackish) solution to the > > following introspection problem: given a callable and a number of > > positional and/or

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-06-21 Thread kaens
On 6/21/07, Stephen R Laniel <[EMAIL PROTECTED]> wrote: > On Thu, Jun 21, 2007 at 10:11:57AM -0400, Stephen R Laniel wrote: > > "Use another language" is not a technical answer. "Python > > could not adopt static typing without substantially changing > > the language and destroying what everyone lo

import mysteries

2007-06-21 Thread David Abrahams
I'm pretty comfortable with Python, but recently I'm constantly finding mysterious issues with import. For example, looking at http://genshi.edgewall.org/browser/trunk/genshi/filters/transform.py the examples use the symbol 'HTML' but it's not defined locally, it's not explicitly imported, a

Logger vs. Handler log levels

2007-06-21 Thread Steve Greenland
Apparently I don't understand logging levels. The code: import logging, logging.handlers logging.basicConfig(level=logging.WARNING) newlog = logging.handlers.TimedRotatingFileHandler( filename='/home/steveg/logtest.log', when="midnight") newlog.setLevel(logging.I

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-21 Thread notbob
On 2007-06-21, Kaldrenon <[EMAIL PROTECTED]> wrote: > Feel free to disagree with what I'm about to say. [...] > And if you disagree with me, or if you think I expressed my point > poorly I think you expressed it well. I'll add that using one does not necessarilly exclude using the other. I

Re: try/except with multiple files

2007-06-21 Thread [EMAIL PROTECTED]
On Jun 21, 9:00 pm, Robert Hicks <[EMAIL PROTECTED]> wrote: > Is it good practice to do something like: > > try: > f1 = file('file1') > f2 = file('file2') > except: > # catch the exception It's bad practice. Because you use a bare except clause, and don't do anything useful with the ex

Re: Inferring initial locals()

2007-06-21 Thread [EMAIL PROTECTED]
On Jun 21, 8:51 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > I wonder if there is a (preferably not too-hackish) solution to the > following introspection problem: given a callable and a number of > positional and/or keyword arguments, infer what would be the frame's > locals() right after the fu

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-21 Thread Matthias Buelow
Kaldrenon wrote: > I don't think anyone can make the argument that any (past or current) > graphics-based editor is as efficient when being used to its fullest > as a text-based editor. Actually, I think the argument can be made: ``We’ve done a cool $50 million of R & D on the Apple Human Inter

Re: Help With Better Design

2007-06-21 Thread apollonius2
On Jun 21, 12:22 am, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > (snip) > > >>> I would like to be able to get a good hold of the concept > >> state machines ? > > > Well both state machines and classes (objects). That may be a bit of a > > tall order to take on all at once but the

eggs considered harmful

2007-06-21 Thread Harry George
...at least around here. I run a corporate Open Source Software Toolkit, which makes hundreds of libraries and apps available to thousands of technical employees. The rules are that a) a very few authorized downloaders obtain tarballs and put them in a depot and b) other users get tarballs from th

Re: Collections of non-arbitrary objects ?

2007-06-21 Thread [EMAIL PROTECTED]
On Jun 21, 8:19 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > Python seems to have a log of ways to do collections of arbitrary > objects: lists, tuples, dictionaries. And sets. > But what if I want a collection > of non-arbitrary objects? Then only put the kind of objects you want in the collect

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-21 Thread Kaldrenon
On Jun 21, 4:31 pm, Falcolas <[EMAIL PROTECTED]> wrote: > Your statement holds true if, and only if, a user does not take full > advantage of the keyboard commands. But if we're talking about > experienced users in both cases, then that's not an issue, is it? Granted. I suppose my claim should hav

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-21 Thread Falcolas
On Jun 21, 2:10 pm, Kaldrenon <[EMAIL PROTECTED]> wrote: > I don't think anyone can make the argument that any (past or current) > graphics-based editor is as efficient when being used to its fullest > as a text-based editor. It's basic math - it takes measurably more > time to move a hand to the m

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-21 Thread Neil Cerutti
On 2007-06-21, Douglas Alan <[EMAIL PROTECTED]> wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> On Wed, 20 Jun 2007 17:23:42 -0400, Douglas Alan wrote: >>> Macros are a way to abstract syntax the way that objects are >>> used to abstract data types and that iterators and generators >>> abst

Re: sqlite newbie questions

2007-06-21 Thread [EMAIL PROTECTED]
Thank you Carsten. Problem solved. -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-21 Thread Kaldrenon
> I don't think anyone can make the argument that any (past or current) > graphics-based editor is as efficient when being used to its fullest > as a text-based editor. Clarifying - this part of the claim assumes a fairly similar feature set, naturally. -- http://mail.python.org/mailman/listinf

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-21 Thread Kaldrenon
Feel free to disagree with what I'm about to say. I know that this thread would be far, FAR shorter if OP hadn't been instigating disagreement, but so far most of the discourse has been polite, so I'm going to say what I'm thinking. I think there are far too many people in all camps (the Emacs cam

  1   2   3   >