Re: enhancing 'list'

2010-01-17 Thread Terry Reedy
On 1/17/2010 5:37 PM, samwyse wrote: Consider this a wish list. I know I'm unlikely to get any of these in time for for my birthday, but still I felt the need to toss it out and see what happens. Lately, I've slinging around a lot of lists, and there are some simple things I'd like to do that j

Re: More version woes

2010-01-17 Thread Jive Dadson
Sorry. That deprecation warning has nothing to do with the slowness. It does torque my jaw, however. Komodo costs money, and Python 2.6 broke it. @#^&!!! (Again.) So, the new question is, does anyone know how to make Komodo 3.5 run at speed with Python 2.6? Or perhaps better yet, can someon

Re: Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
Jive Dadson wrote: Matt Newville wrote: On Jan 17, 7:25 pm, Jive Dadson wrote: I just found another module that broke when I went to 2.6. > Gnuplot. Apparently one of its routines has a parameter named "with." That used to be okay, and now it's not. This was fixed in version 1.8 of Gnuplo

More version woes

2010-01-17 Thread Jive Dadson
This has to do with Komodo. I cannot use Python 2.4, because numpy is broken on my machine for that release for reasons unknown. I want to use 2.6 anyway. But when I use Python 2.6 and Komodo 3.5, it runs slow as death. I think it might have something to do with the warning I'm getting. Do

Re: setattr() oddness

2010-01-17 Thread Steven D'Aprano
On Mon, 18 Jan 2010 07:25:58 +0100, Dieter Maurer wrote: > Lie Ryan writes on Sat, 16 Jan 2010 19:37:29 +1100: >> On 01/16/10 10:10, Sean DiZazzo wrote: >> > Interesting. I can understand the "would take time" argument, but I >> > don't see any legitimate use case for an attribute only accessibl

Re: Problems with collision response

2010-01-17 Thread John Nagle
Joabos wrote: I'm doing a project, and I need to insert collision detection and response on it. Here's the code. What am I doing wrong? Where to begin... 1. Most of your code will never be executed because it is inside multiline triple-quoted strings. 2. Your approach to

Re: setattr() oddness

2010-01-17 Thread Dieter Maurer
Lie Ryan writes on Sat, 16 Jan 2010 19:37:29 +1100: > On 01/16/10 10:10, Sean DiZazzo wrote: > > Interesting. I can understand the "would take time" argument, but I > > don't see any legitimate use case for an attribute only accessible via > > getattr(). Well, at least not a pythonic use case. >

Re: The answer

2010-01-17 Thread Lie Ryan
On 01/18/10 13:30, Jive Dadson wrote: > Okay, with your help I've figured it out. Instructions are below, but > read the caveat by Ben Fenny in this thread. All this stuff is good for > one default version of Python only. The PYTHONPATH described below, for > example, cannot specify a version nu

Re: pyserial: Unexpected Local Echo

2010-01-17 Thread Steve Holden
Steven Woody wrote: > 2010/1/16 John Nagle : >> Grant Edwards wrote: >>> On 2010-01-11, Steven Woody wrote: >>> I am using pyserial. But I always get the local echo after I write some characters onto serial port >>> I really doubt you're getting a local echo. Is the data coming >>> out

Re: Arrrrgh! Another module broken

2010-01-17 Thread r0g
Jive Dadson wrote: > Matt Newville wrote: >> On Jan 17, 7:25 pm, Jive Dadson wrote: >>> I just found another module that broke when I went to 2.6. > >>> Gnuplot. Apparently one of its routines has a parameter >>> named "with." That used to be okay, and now it's not. >> >> This was fixed in versi

Re: Arrrrgh! Another module broken

2010-01-17 Thread Chris Rebert
On Sun, Jan 17, 2010 at 9:44 PM, Jive Dadson wrote: > Matt Newville wrote: >> >> On Jan 17, 7:25 pm, Jive Dadson wrote: >>> >>> I just found another module that broke when I went to 2.6. > Gnuplot. >>>  Apparently one of its routines has a parameter >>> named "with."  That used to be okay, and no

Re: Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
Matt Newville wrote: On Jan 17, 7:25 pm, Jive Dadson wrote: I just found another module that broke when I went to 2.6. > Gnuplot. Apparently one of its routines has a parameter named "with." That used to be okay, and now it's not. This was fixed in version 1.8 of Gnuplot.py Once I get ev

Re: Inheriting methods but over-riding docstrings

2010-01-17 Thread Steven D'Aprano
On Mon, 18 Jan 2010 01:45:17 +0100, Alf P. Steinbach wrote: > Steven: on a personal note, earlier when I saw you (I think it was you) > using the "Norwegian Parrot" example I thought it referred to me because > that was the only sense I could make of it, it followed right after some > discussion w

Re: enhancing 'list'

2010-01-17 Thread Asun Friere
On Jan 18, 9:37 am, samwyse wrote: > Consider this a wish list.  I know I'm unlikely to get any of these in > time for for my birthday, but still I felt the need to toss it out and > see what happens. > > Lately, I've slinging around a lot of lists, and there are some simple > things I'd like to d

Re: The answer

2010-01-17 Thread alex23
Jive Dadson wrote: > That requires a directory whose name embeds the Python version number, > which is the evil from which I flee, or rather sought to flee.  Imagine > if all your C++ code had to go into directories that were named for some > specific C++ compiler.  It's just WRONG.  It's a mainte

Re: The answer

2010-01-17 Thread Jive Dadson
alex23 wrote: > > Actually, if you're using Python 2.6+/3.x, you can effectively skip > steps 1-5, as these versions now support user site-packages. > > Rather than create a Module folder and modify your PYTHONPATH, add (if > it doesn't exist already) the following folder: > %APPDATA%/Python/Pytho

Re: IDLE Namespace Toolbox? Windows.

2010-01-17 Thread alex23
On Jan 18, 8:22 am, "W. eWatson" wrote: > I've found it a bit aggravating that using dir and > help, for example, that the output just rolls on off the screen and I > have to play around with the shell scroll bars to find what I'm looking > for. A few simple changes to mydir should change that, bu

Re: The answer

2010-01-17 Thread alex23
On Jan 18, 12:30 pm, Jive Dadson wrote: > These instructions are for MS Windows. > > 1) Create your modules folder. Let's say it's named "Modules."  The > documentation calls it a "package." > > 2) In an explorer window or on the desktop, right click on My Computer, > and select Properties. > > 3)

Re: The answer

2010-01-17 Thread Alf P. Steinbach
* Jive Dadson: Okay, with your help I've figured it out. Instructions are below, but read the caveat by Ben Fenny in this thread. All this stuff is good for one default version of Python only. The PYTHONPATH described below, for example, cannot specify a version number. Yes, that's a pain i

Re: Is python not good enough?

2010-01-17 Thread alex23
Blog wrote: > Have you not heard about the "Unladen Swallow" project from google? > There's a new PEP coming up which will propose google's codebase to be > merged with Py3k, resulting in superior performance. This kind of worries me for a number of reasons: * unladen is _way_ too immature and u

Re: py2exe and pydocs. Downloads?

2010-01-17 Thread Gabriel Genellina
En Sun, 17 Jan 2010 19:43:25 -0300, W. eWatson escribió: According to Lutz's 4th edition (reading from Amazon), Pydoc is shipped with Python. I found this earlier in the Python Help under Global Index for modules. == The pydoc module automatically generates documen

Re: Inheriting methods but over-riding docstrings

2010-01-17 Thread Stephen Hansen
On Sun, Jan 17, 2010 at 4:45 PM, Alf P. Steinbach wrote: > Steven: on a personal note, earlier when I saw you (I think it was you) > using the "Norwegian Parrot" example I thought it referred to me because > that was the only sense I could make of it, it followed right after some > discussion we

Re: Arrrrgh! Another module broken

2010-01-17 Thread Stephen Hansen
On Sun, Jan 17, 2010 at 5:25 PM, Jive Dadson wrote: > I just found another module that broke when I went to 2.6. Gnuplot. > Apparently one of its routines has a parameter named "with." That used to > be okay, and now it's not. > > Once I get everything to work under 2.6, I am using it forever o

Re: Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
Matt Newville wrote: On Jan 17, 7:25 pm, Jive Dadson wrote: I just found another module that broke when I went to 2.6. > Gnuplot. Apparently one of its routines has a parameter named "with." That used to be okay, and now it's not. This was fixed in version 1.8 of Gnuplot.py Once I get ev

The answer

2010-01-17 Thread Jive Dadson
Okay, with your help I've figured it out. Instructions are below, but read the caveat by Ben Fenny in this thread. All this stuff is good for one default version of Python only. The PYTHONPATH described below, for example, cannot specify a version number. Yes, that's a pain in the butt, but

Re: Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
Matt Newville wrote: Hey, good luck with that forever plan. --Matt Yeah, I know. I'm just glad I don't have to get new executables and dll's from all my software vendors every Tuesday when the MS Window XP updates come out. 2.6 FOREVER! -- http://mail.python.org/mailman/listinfo/python-li

The answer

2010-01-17 Thread Jive Dadson
Okay, with your help I've figured it out. Instructions are below, but read the caveat by Ben Fenny in this thread. All this stuff is good for one default version of Python only. The PYTHONPATH described below, for example, cannot specify a version number. Yes, that's a pain in the butt, but

Re: Inheriting methods but over-riding docstrings

2010-01-17 Thread J
On Sun, Jan 17, 2010 at 19:45, Alf P. Steinbach wrote: > Steven: on a personal note, earlier when I saw you (I think it was you) > using the "Norwegian Parrot" example I thought it referred to me because > that was the only sense I could make of it, it followed right after some > discussion we had

Re: Arrrrgh! Another module broken

2010-01-17 Thread Matt Newville
On Jan 17, 7:25 pm, Jive Dadson wrote: > I just found another module that broke when I went to 2.6. > Gnuplot. > Apparently one of its routines has a parameter > named "with."  That used to be okay, and now it's not. This was fixed in version 1.8 of Gnuplot.py > Once I get everything to work u

Re: Inheriting methods but over-riding docstrings

2010-01-17 Thread Steve Holden
Gabriel Genellina wrote: > En Sat, 16 Jan 2010 14:55:11 -0300, Steven D'Aprano > escribió: > >> I have a series of subclasses that inherit methods from a base class, but >> I'd like them to have their own individual docstrings. The obvious >> solution (other than copy-and-paste) is this: >> >> >>

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Benjamin Kaplan
On Sun, Jan 17, 2010 at 8:09 PM, Jive Dadson wrote: > Okay, I might go this route anyway.  It's almost working. > > I created a directory (folder in MS-speak) named Modules, and put its path > in the PYTHONPATH env variable. > > I can now put a file foo.py into the directory Modules, and it will l

Re: Arrrrgh! Another module broken

2010-01-17 Thread Chris Rebert
On Sun, Jan 17, 2010 at 5:25 PM, Jive Dadson wrote: > I just found another module that broke when I went to 2.6.  Gnuplot. > Apparently one of its routines has a parameter named "with."  That used to > be okay, and now it's not. > > Once I get everything to work under 2.6, I am using it forever or

Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
I just found another module that broke when I went to 2.6. Gnuplot. Apparently one of its routines has a parameter named "with." That used to be okay, and now it's not. Once I get everything to work under 2.6, I am using it forever or until new releases no longer break working code, whicheve

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Okay, I might go this route anyway. It's almost working. I created a directory (folder in MS-speak) named Modules, and put its path in the PYTHONPATH env variable. I can now put a file foo.py into the directory Modules, and it will load foo.py when I say "import foo." Now I put a folder in

Re: A simple-to-use sound file writer

2010-01-17 Thread TimmyGee
On Jan 15, 3:43 pm, Steve Holden wrote: > Alf P. Steinbach wrote: > > [...]> Perhaps you'd also admit to being wrong, and retract your innuoendo > etc.? > > Disregarding any matters of right or wrong (for this post, at least), I > herebe retract anything I have said about you that you consider >

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Diez B. Roggisch wrote: Did "echo %PYTHONPATH%" yield anything? Or is it part of >>> import sys >>> sys.path ? Diez Update: It's working now. I guess I hadn't reloaded something that I need to. Thanks for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Diez B. Roggisch wrote: Did "echo %PYTHONPATH%" yield anything? Or is it part of >>> import sys >>> sys.path ? Diez Yes and no in that order. Never mind. Ben Fenny talked me out of it anyway. Gr. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Ben Finney wrote: Jive Dadson writes: How do I install a module that I wrote, without putting it in the site-packages directory for a specific release? I have stuff that, to the best of my knowledge and belief, ought to work under any release. Nevertheless, the compiled byte-code version

Re: Inheriting methods but over-riding docstrings

2010-01-17 Thread Alf P. Steinbach
* Gabriel Genellina: En Sat, 16 Jan 2010 14:55:11 -0300, Steven D'Aprano escribió: I have a series of subclasses that inherit methods from a base class, but I'd like them to have their own individual docstrings. The obvious solution (other than copy-and-paste) is this: class Base(object):

Re: IDLE Namespace Toolbox? Windows.

2010-01-17 Thread MRAB
W. eWatson wrote: John Bokma wrote: "W. eWatson" writes: This is a follow up to my post "Changing Lutz's mydir. It would seem there should be some sort of toolbox that allows one to do things like mydir, and perhaps a lot more. Maybe something like it exists in Linux. I'm a Windows user. I'v

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Diez B. Roggisch
Am 18.01.10 01:33, schrieb Jive Dadson: Diez B. Roggisch wrote: Am 18.01.10 01:07, schrieb Jive Dadson: (My apologies if this question shows up twice. I posted it quite a while ago, and it's yet to show up.) This is no doubt a beginner's question, but I've searched for the answer for quite a w

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Ben Finney
Jive Dadson writes: >How do I install a module that I wrote, without putting it in the > site-packages directory for a specific release? I have stuff that, to > the best of my knowledge and belief, ought to work under any release. Nevertheless, the compiled byte-code version will be specifi

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Diez B. Roggisch wrote: Am 18.01.10 01:07, schrieb Jive Dadson: (My apologies if this question shows up twice. I posted it quite a while ago, and it's yet to show up.) This is no doubt a beginner's question, but I've searched for the answer for quite a while, to no avail. I'm running Python

Re: IDLE Namespace Toolbox? Windows.

2010-01-17 Thread Chris Rebert
On Sun, Jan 17, 2010 at 4:11 PM, W. eWatson wrote: > John Bokma wrote: >> "W. eWatson" writes: >> >>> This is a follow up to my post "Changing Lutz's mydir.  It would seem >>> there should be some sort of toolbox that allows one to do things like >>> mydir, and perhaps a lot more. Maybe something

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Diez B. Roggisch
Am 18.01.10 01:07, schrieb Jive Dadson: (My apologies if this question shows up twice. I posted it quite a while ago, and it's yet to show up.) This is no doubt a beginner's question, but I've searched for the answer for quite a while, to no avail. I'm running Python 2.6 under Windows XP. Ho

Re: IDLE Namespace Toolbox? Windows.

2010-01-17 Thread W. eWatson
John Bokma wrote: "W. eWatson" writes: This is a follow up to my post "Changing Lutz's mydir. It would seem there should be some sort of toolbox that allows one to do things like mydir, and perhaps a lot more. Maybe something like it exists in Linux. I'm a Windows user. I've found it a bit ag

How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
(My apologies if this question shows up twice. I posted it quite a while ago, and it's yet to show up.) This is no doubt a beginner's question, but I've searched for the answer for quite a while, to no avail. I'm running Python 2.6 under Windows XP. How do I install a module that

Re: how to duplicate array entries

2010-01-17 Thread Munir
On Jan 11, 12:56 am, Munir wrote: > > I have an array  x=[1,2,3] > > > Is there an operator which I can use to get the result > > [1,1,1,2,2,2,3,3,3] ? > > > I tried x*3, which resulted in [1,2,3,1,2,3,1,2,3] > > Have you tried: > > y = x*3 > y.sort() > > Munir A single line version of this: sor

Re: PyQT 4.6.2 question about radiobuttons

2010-01-17 Thread woooee
QT uses "toggled". I do not use QT much but it would be something like self.radioButton_one.setCheckable(True) QtCore.QObject.connect(self.radioButton_one, QtCore.SIGNAL("toggled ()"),self.button_one_function) If this doesn't work, you can probably find more with a Google for "toggled". -- http:

Re: basic Class in Python

2010-01-17 Thread Wolfgang Rohdewald
On Monday 18 January 2010, BarryJOgorman wrote: > TypeError: object._new_() takes no parameters > def _init_(self, name, job=None, pay=0): __init__ needs two underscores left and right -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: r"string" vs R"string

2010-01-17 Thread Steven D'Aprano
On Sun, 17 Jan 2010 11:13:48 -0500, Roy Smith wrote: > In article , > "Colin W." wrote: > >> On 17-Jan-10 02:16 AM, Terry Reedy wrote: >> > On 1/17/2010 1:55 AM, Brendan Miller wrote: >> >> Is there any difference whatsoever between a raw string beginning >> >> with the captical R or one with t

Re: basic Class in Python

2010-01-17 Thread BarryJOgorman
On Jan 17, 11:09 pm, John Bokma wrote: > BarryJOgorman writes: > > class Person: > >     def _init_(self, name, job=None, pay=0): > >       def __init__(self, name, job=None, pay=0): > > Note 2x _ before and after init. > > -- > John Bokma                                                          

Re: basic Class in Python

2010-01-17 Thread Wolodja Wentland
On Sun, Jan 17, 2010 at 15:05 -0800, BarryJOgorman wrote: [...] > class Person: > def _init_(self, name, job=None, pay=0): ^^ --> __init__(self, ... It's __init__() not _init_()! Have fun learning Python! -- .''`. Wolodja Wentland : :' : `. `'` 4096R/CAF

Re: basic Class in Python

2010-01-17 Thread Peter Otten
BarryJOgorman wrote: > Working through Lutz's 'Learning Python' > > Trying to run the following code (from file person.py - see below): > > The file is held in Python31. > > at the Python31 prompt am entering ''person.py' > > Getting the following error: > Traceback (most recent call last) > F

Re: IDLE Namespace Toolbox? Windows.

2010-01-17 Thread John Bokma
"W. eWatson" writes: > This is a follow up to my post "Changing Lutz's mydir. It would seem > there should be some sort of toolbox that allows one to do things like > mydir, and perhaps a lot more. Maybe something like it exists in > Linux. I'm a Windows user. I've found it a bit aggravating tha

Re: basic Class in Python

2010-01-17 Thread John Bokma
BarryJOgorman writes: > class Person: > def _init_(self, name, job=None, pay=0): def __init__(self, name, job=None, pay=0): Note 2x _ before and after init. -- John Bokma j3b Hacking & Hiking in Mexico - http://johnbokm

Re: IDLE Namespace Toolbox? Windows.

2010-01-17 Thread Chris Rebert
On Sun, Jan 17, 2010 at 3:09 PM, Chris Rebert wrote: > On Sun, Jan 17, 2010 at 2:22 PM, W. eWatson wrote: >> This is a follow up to my post "Changing Lutz's mydir.  It would seem there >> should be some sort of toolbox that allows one to do things like mydir, and >> perhaps a lot more. Maybe some

basic Class in Python

2010-01-17 Thread BarryJOgorman
Working through Lutz's 'Learning Python' Trying to run the following code (from file person.py - see below): The file is held in Python31. at the Python31 prompt am entering ''person.py' Getting the following error: Traceback (most recent call last) File "C:python31\person.py", line 9, in (modu

Re: IDLE Namespace Toolbox? Windows.

2010-01-17 Thread Chris Rebert
On Sun, Jan 17, 2010 at 2:22 PM, W. eWatson wrote: > This is a follow up to my post "Changing Lutz's mydir.  It would seem there > should be some sort of toolbox that allows one to do things like mydir, and > perhaps a lot more. Maybe something like it exists in Linux. Indeed; on *nix, when in th

Re: py2exe and pydocs. Downloads?

2010-01-17 Thread W. eWatson
Gabriel Genellina wrote: En Sun, 17 Jan 2010 15:16:17 -0300, W. eWatson escribió: I'm using Python 2.5 under windows, and IDLE. Do py2exe and pydocs come with the package, or do I have to download them? py2exe has to be downloaded from www.py2exe.org I don't know pydocs, but pydoc comes wit

enhancing 'list'

2010-01-17 Thread samwyse
Consider this a wish list. I know I'm unlikely to get any of these in time for for my birthday, but still I felt the need to toss it out and see what happens. Lately, I've slinging around a lot of lists, and there are some simple things I'd like to do that just aren't there. s.count(x[, cmp[, ke

IDLE Namespace Toolbox? Windows.

2010-01-17 Thread W. eWatson
This is a follow up to my post "Changing Lutz's mydir. It would seem there should be some sort of toolbox that allows one to do things like mydir, and perhaps a lot more. Maybe something like it exists in Linux. I'm a Windows user. I've found it a bit aggravating that using dir and help, for e

Re: Changing Lutz's mydir from Edition 2, Learning Python

2010-01-17 Thread W. eWatson
Chris Rebert wrote: On Sun, Jan 17, 2010 at 12:11 PM, W. eWatson wrote: See Subject. The code is below with a few changes I made at the bottom by inserting import string import numpy module = raw_input("Enter module name: ") listing(module) As the error says, strings have no __na

Re: Problems with collision response

2010-01-17 Thread Steven D'Aprano
On Sun, 17 Jan 2010 06:14:59 -0800, Joabos wrote: > I'm doing a project, and I need to insert collision detection and > response on it. Here's the code. What am I doing wrong? > > >#Update all sprites, map > self.player.update(dt) > > #Collide other sprites >

Re: py2exe and pydocs. Downloads?

2010-01-17 Thread Gabriel Genellina
En Sun, 17 Jan 2010 15:16:17 -0300, W. eWatson escribió: I'm using Python 2.5 under windows, and IDLE. Do py2exe and pydocs come with the package, or do I have to download them? py2exe has to be downloaded from www.py2exe.org I don't know pydocs, but pydoc comes with Python -- Gabriel Gen

Re: C-API: Get scope in function

2010-01-17 Thread Gabriel Genellina
En Sun, 17 Jan 2010 10:23:03 -0300, moerchendiser2k3 escribió: I have a small problem how to get the scope from a C-API function. Check out this code snippet: [code] variable = 3 def test(): print variable #output: 3 print globals() # ... 'variable': 3, ... test() [/code In my ca

Re: Changing Lutz's mydir from Edition 2, Learning Python

2010-01-17 Thread Chris Rebert
On Sun, Jan 17, 2010 at 12:11 PM, W. eWatson wrote: > See Subject. The code is below with a few changes I made at the bottom by > inserting >    import string >    import numpy > >    module = raw_input("Enter module name: ") >    listing(module) As the error says, strings have no __name__ attrib

Re: Changing Lutz's mydir from Edition 2, Learning Python

2010-01-17 Thread Arnaud Delobelle
"W. eWatson" writes: > See Subject. The code is below with a few changes I made at the bottom > by inserting > import string > import numpy > > module = raw_input("Enter module name: ") replace this line with: module_name = raw_input("Enter module name: ") module = __i

Changing Lutz's mydir from Edition 2, Learning Python

2010-01-17 Thread W. eWatson
See Subject. The code is below with a few changes I made at the bottom by inserting import string import numpy module = raw_input("Enter module name: ") listing(module) I thought I'd see if I could convert this to a program instead, which asks the user for the module. As prom

Re: Unicode and dictionaries

2010-01-17 Thread Ben Finney
gizli writes: > >>> test_dict = {u'öğe':1} > >>> u'öğe' in test_dict.keys() > True > >>> 'öğe' in test_dict.keys() > True I would call this a bug. The two objects are different, so the latter expression should return ‘False’. FYI, ‘foo in bar.keys()’ is easier to spell as ‘foo in bar’. -- \

Re: BeautifulSoup

2010-01-17 Thread Phlip
John Nagle wrote: It's just somebody pirating movies. Ineptly. Ignore. Anyone who leaves their movies hanging out in tags, without a daily download limit or a daily hashtag, deserves to be taught a lesson! -- Phlip -- http://mail.python.org/mailman/listinfo/python-list

MySQLdb Confusion

2010-01-17 Thread Sam
To the powers that be, I am running Apache 2 on Mac OSX 10.6.2. I have, after many hours, managed to install MySQLdb, however I'm not sure if I installed it correctly as I had to fudge it a little. I can import and use the module fine in IDLE or in python from Terminal (which would suggest

Re: Confusing, desparate MySQLdb problems...

2010-01-17 Thread Ned Deily
In article <109c960c-656b-4ea7-b69f-100e30804...@m16g2000yqc.googlegroups.com>, stopchuckingstuff wrote: > On Jan 17, 5:52 pm, Ned Deily wrote: > > In article > > <94e8cfd8-d299-4c23-9e9e-d3f17d4c9...@e16g2000yqc.googlegroups.com>, > > > What I don't understand is if the path is there, why does

Re: Unicode and dictionaries

2010-01-17 Thread Martin v. Loewis
>>> This ought to be a bug; objects that compare equal and are hashable >>> must have the same hash code. >> It's not a bug. Changing the default encoding is not really supported, >> let alone changing it to anything but latin-1, precisely for the reasons >> you discuss. >> >> If you do change the

Re: Confusing, desparate MySQLdb problems...

2010-01-17 Thread stopchuckingstuff
On Jan 17, 5:52 pm, Ned Deily wrote: > In article > <94e8cfd8-d299-4c23-9e9e-d3f17d4c9...@e16g2000yqc.googlegroups.com>, > > > > > >  stopchuckingstuff wrote: > > I'm not using either mod_wsgi or mod_python, I just edited httpd.conf. > > > You're right about setuptools - imports in terminal, not

py2exe and pydocs. Downloads?

2010-01-17 Thread W. eWatson
I'm using Python 2.5 under windows, and IDLE. Do py2exe and pydocs come with the package, or do I have to download them? -- http://mail.python.org/mailman/listinfo/python-list

Re: Something More Elegant

2010-01-17 Thread Victor Subervi
On Sat, Jan 9, 2010 at 1:00 PM, Dennis Lee Bieber wrote: >After the table design is complete you can move to business logic > operations (SQL for standard/fixed actions), along with criteria to > maintain the integrity of the data (foreign key constraints, etc.). This > should result in a

Re: Inheriting methods but over-riding docstrings

2010-01-17 Thread Gabriel Genellina
En Sat, 16 Jan 2010 14:55:11 -0300, Steven D'Aprano escribió: I have a series of subclasses that inherit methods from a base class, but I'd like them to have their own individual docstrings. The obvious solution (other than copy-and-paste) is this: class Base(object): colour = "Blue"

Re: Confusing, desparate MySQLdb problems...

2010-01-17 Thread Ned Deily
In article <94e8cfd8-d299-4c23-9e9e-d3f17d4c9...@e16g2000yqc.googlegroups.com>, stopchuckingstuff wrote: > I'm not using either mod_wsgi or mod_python, I just edited httpd.conf. > > You're right about setuptools - imports in terminal, not in cgi. > however, the path to it (/Library/Frameworks/P

Re: maintain 2 versions of python on my computer

2010-01-17 Thread Sridhar Ratnakumar
On 1/14/2010 3:23 PM, Lie Ryan wrote: On 01/14/10 22:21, luis wrote: > > Hi > > I am not an expert in programming and using Python for its simplicity > > I have 2 versions of python installed on my computer (windos xp) to > begin the transition from version 2.4 to 2.6 or 3. maintaining the >

Re: dict's as dict's key.

2010-01-17 Thread Lie Ryan
On 01/17/10 12:29, Ethan Furman wrote: > Lie Ryan wrote: >> On 01/14/10 05:33, Albert van der Horst wrote: >> >>> (I encountered this before. A dictionary is a natural for a >>> boardgame position, i.e. chess. Now we want to look up chess >>> positions.) >> >> >> or use collections.namedtuple > >

Re: maintain 2 versions of python on my computer

2010-01-17 Thread Gabriel Genellina
En Sat, 16 Jan 2010 05:16:14 -0300, Gertjan Klein escribió: Gabriel Genellina wrote: En Thu, 14 Jan 2010 08:21:28 -0300, luis escribió: Is there any way to indicate the version of the python interpreter must use a script? See http://www.effbot.org/zone/exemaker.htm It uses the #! line

[ANN] Spyder v1.0.3 released

2010-01-17 Thread Pierre Raybaut
Hi all, I'm pleased to announce here that Spyder version 1.0.3 has been released: http://packages.python.org/spyder __Important__ Spyder v1.0.3 is a *critical* bugfix release (bonus: new "Apply" button in matplotlib's figure options editor). Previously known as Pydee, Spyder (Scientific PYth

Re: Problems with collision response

2010-01-17 Thread MRAB
Joabos wrote: I'm doing a project, and I need to insert collision detection and response on it. Here's the code. What am I doing wrong? #Update all sprites, map self.player.update(dt) #Collide other sprites collisions = rabbyt.collisions.aabb_collide_single(

Re: Problem with wsgiref.headers.Headers

2010-01-17 Thread Gabriel Genellina
En Fri, 15 Jan 2010 18:41:29 -0300, Phil escribió: I am having an issue with wsgiref.headers.Headers. For example, if I do this... from wsgiref.headers import Headers list = [] wrapper = Headers(list) wrapper['content-type'] = "text/html" print(list) print(wrapper) I get an empty list printe

Re: Problem with wsgiref.headers.Headers

2010-01-17 Thread Gabriel Genellina
En Fri, 15 Jan 2010 18:41:29 -0300, Phil escribió: I am having an issue with wsgiref.headers.Headers. For example, if I do this... from wsgiref.headers import Headers list = [] wrapper = Headers(list) wrapper['content-type'] = "text/html" print(list) print(wrapper) I get an empty list printe

Re: Problem with wsgiref.headers.Headers

2010-01-17 Thread Gabriel Genellina
En Fri, 15 Jan 2010 18:41:29 -0300, Phil escribió: I am having an issue with wsgiref.headers.Headers. For example, if I do this... from wsgiref.headers import Headers list = [] wrapper = Headers(list) wrapper['content-type'] = "text/html" print(list) print(wrapper) I get an empty list printe

Re: Is python not good enough?

2010-01-17 Thread Blog
On 1/12/2010 9:09 PM, ikuta liu wrote: I'm a little confused. Is python not good enough? for google, enhance python performance is the good way better then choose build Go language? Go language try to merge low level, hight level and browser language. Those I'd like to see it on python.. Have y

Re: r"string" vs R"string

2010-01-17 Thread Aahz
In article , Colin W. wrote: >On 17-Jan-10 02:16 AM, Terry Reedy wrote: >> On 1/17/2010 1:55 AM, Brendan Miller wrote: >>> >>> Is there any difference whatsoever between a raw string beginning with >>> the captical R or one with the lower case r e.g. r"string" vs >>> R"string"? >> >> No. Nor is th

Re: r"string" vs R"string

2010-01-17 Thread Roy Smith
In article , "Colin W." wrote: > On 17-Jan-10 02:16 AM, Terry Reedy wrote: > > On 1/17/2010 1:55 AM, Brendan Miller wrote: > >> Is there any difference whatsoever between a raw string beginning with > >> the captical R or one with the lower case r e.g. r"string" vs > >> R"string"? > > > > No. No

Re: Is python not good enough?

2010-01-17 Thread Stefan Behnel
Paul Rubin, 17.01.2010 05:06: > David Cournapeau writes: > >> And certainly, one of the big reason for >> the python success is easy interface with C. Maybe interfacing with C >> is the real reason for holding back python implementations ? > > The CPython/C API is not terrible but it's not all th

Re: A simple-to-use sound file writer

2010-01-17 Thread Alf P. Steinbach
* Alf P. Steinbach: Just as a contribution, ... The original code I posted was only written for Python 3.1.1 (because the code was for my writings which assumes 3.x). In the simple_sound module this caused a deprecation warning with 2.x. And the example program didn't work with 2.x. I've no

Re: simple cgi program

2010-01-17 Thread superpollo
D'Arcy J.M. Cain ha scritto: On Sun, 17 Jan 2010 15:15:12 +0100 superpollo wrote: hi clp. i would like to submit the following code for review. it is a simple common gateway interface program, which uses the least possible libraries for the sake of mechanism undertanding. Why not just use

Re: chr(12) Form Feed in Notepad

2010-01-17 Thread bartc
"Dennis Lee Bieber" wrote in message news:mailman.1021.1263702437.28905.python-l...@python.org... On Sat, 16 Jan 2010 23:59:52 GMT, "bartc" declaimed the following in gmane.comp.python.general: My point was these other control codes from over 30 years ago are still in use today, so why no

Re: Problems with collision response

2010-01-17 Thread Joabos
Diez B. Roggisch-2 wrote: > > Am 17.01.10 15:14, schrieb Joabos: >> >> I'm doing a project, and I need to insert collision detection and >> response on >> it. Here's the code. What am I doing wrong? > > Not telling us what's happening, and what *should* happen, for starters. > > What do you e

Re: simple cgi program

2010-01-17 Thread D'Arcy J.M. Cain
On Sun, 17 Jan 2010 15:15:12 +0100 superpollo wrote: > hi clp. > > i would like to submit the following code for review. it is a simple > common gateway interface program, which uses the least possible > libraries for the sake of mechanism undertanding. Why not just use the cgi module? It doe

Re: Problems with collision response

2010-01-17 Thread Diez B. Roggisch
Am 17.01.10 15:14, schrieb Joabos: I'm doing a project, and I need to insert collision detection and response on it. Here's the code. What am I doing wrong? Not telling us what's happening, and what *should* happen, for starters. What do you expect? The code you gave us isn't stand-alone, you

Re: Problems with collision response

2010-01-17 Thread Diez B. Roggisch
Am 17.01.10 15:14, schrieb Joabos: I'm doing a project, and I need to insert collision detection and response on it. Here's the code. What am I doing wrong? Not telling us what's happening, and what *should* happen, for starters. What do you expect? The code you gave us isn't stand-alone, you

Re: Adding a cookie

2010-01-17 Thread Jens Müller
Hi, I am creating a webscraper for a specific web site for an application. Now, that website has a specific cookie which needs to be set in the request. Otherwise, the website is redirected. I have been trying for the last 6 hours to add a cookie to the HTTP request, but to no avail.

simple cgi program

2010-01-17 Thread superpollo
hi clp. i would like to submit the following code for review. it is a simple common gateway interface program, which uses the least possible libraries for the sake of mechanism undertanding. the third option in the firts conditional is for commandline testing. bye. code follows as: #

  1   2   >