idle 2.x and unicode literals

2010-04-02 Thread Joe P. Cool
Hi, I'm working with Python 2.6.4 on Ubuntu 9.10 and noticed a difference between IDLE and command line python. If I enter an é (accented e, LATIN SMALL LETTER E WITH ACUTE) as a unicode string in command line python I get this: >>> u'é' u'\xe9' In IDLE 2.6.4 I get this: >>> u'é' u'\xc3\xa9'

Re: Python3: to add, remove and change

2009-04-05 Thread Joe P. Cool
ouce public-money- > funded vaporwere that has tried to do too much). How about moving these lines to a separate message with a matching header? Regards, Joe. P. Cool -- http://mail.python.org/mailman/listinfo/python-list

multi-platform browser embedding

2008-07-05 Thread Joe P. Cool
I fiddled a little with pyGTK and was quite happy to discover gtkMozEmbed because I want to write an application for Linux and Windows with a powerful browser widget. Unfortunatly I couldnt find a way to make gtkMozEmbed work on Windows. Are there alternatives? I'm lazy so I prefer to download bina

Re: surprising behaviour of os.environ.clear

2008-06-28 Thread Joe P. Cool
On 28 Jun., 23:06, "Joe P. Cool" <[EMAIL PROTECTED]> wrote: > On 28 Jun., 04:05, Benjamin <[EMAIL PROTECTED]> wrote: > > > On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote: > > This is because of how os.environ is implement

Re: surprising behaviour of os.environ.clear

2008-06-28 Thread Joe P. Cool
On 28 Jun., 04:05, Benjamin <[EMAIL PROTECTED]> wrote: > On Jun 27, 4:05 pm, "Joe P. Cool" <[EMAIL PROTECTED]> wrote: > This is because of how os.environ is implement with a UserDict > subclass. You should report this at bugs.python.org. issue 3227: os.envir

Re: surprising behaviour of os.environ.clear

2008-06-28 Thread Joe P. Cool
On 28 Jun., 08:54, [EMAIL PROTECTED] wrote: > For one thing, the expression 'os.environ.keys' will yield a method > object (not a list, as you're probably expecting), but iterating over > a method as you did should produce an exception. If you want to get > the list of environment vars, you have to

surprising behaviour of os.environ.clear

2008-06-27 Thread Joe P. Cool
If I call os.environ.clear in a python program child processes still see the deleted entries. But when I iterate over the keys like so names = os.environ.keys for k in names: del os.environ[k] then the entries are also deleted for the child processes. Where is the difference? Is this a bug?

Re: Why does python not have a mechanism for data hiding?

2008-05-25 Thread Joe P. Cool
On 24 Mai, 15:58, Ben Finney <[EMAIL PROTECTED]> wrote: > Sh4wn <[EMAIL PROTECTED]> writes: > > first, python is one of my fav languages, and i'll definitely keep > > developing with it. But, there's 1 one thing what I -really- miss: > > data hiding. I know member vars are private when you prefix t

Re: What's wrong with that comment?

2008-05-20 Thread Joe P. Cool
Ludwig Miniatur wrote: > For example: > #!/usr/bin/env python > > from parser import suite, ast2list > fh = file(__file__) > s = fh.read() > fh.close() > ast = suite(s) > > while False: > print "hello world" > # comment > > Looks like a little bug in parser; but what I don't understand is that >

Re: Python GUIs and custom controls

2008-05-11 Thread Joe P. Cool
On 9 Mai, 10:14, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > If you can work with the license (GPL), I suggest Qt4 Thanks for your helpful hints, guys. -- Joe P. Cool -- http://mail.python.org/mailman/listinfo/python-list

Python GUIs and custom controls

2008-05-08 Thread Joe P. Cool
So far I have a little experience with Tkinter and wxPython. I wonder which of the numerous Python GUI kits would be the best choice for a multi platform application that makes heavy use of custom controls, 3D views and the like? Thanks in advance for your hints and advice. Joe -- http://mail.pyth

Re: How is GUI programming in Python?

2008-04-15 Thread Joe P. Cool
On 12 Apr., 03:34, baalbek <[EMAIL PROTECTED]> wrote: > Delphi/Object Pascal simply sucks big time! I disagree. Delphi/Object Pascal with the VCL (Visual Component Library) is one of the most sophisticated IDEs ever, even better than Qt IMO. The only drawback is that it is Windows only. > No rea

Gecko 1.9

2008-04-15 Thread Joe P. Cool
In 2005 I heard of plans to add Python as a second language to the Gecko engine. Is this still true? Or has this plan been abandoned? -- http://mail.python.org/mailman/listinfo/python-list

Re: method to create class property

2008-03-18 Thread Joe P. Cool
On 18 Mrz., 21:59, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Joe P. Cool schrieb: > >     def _property_y(self): > >         def _get(self): > >             [...] > > There are a few recipies, like this: > > class Foo(object): > >    

method to create class property

2008-03-18 Thread Joe P. Cool
Hi, I like C#'s style of defining a property in one place. Can the following way to create a property be considered reasonable Python style (without the print statements, of course)? class sample(object): def __init__(self): sample.y = self._property_y() def _property_y(self):