Re: Is it possible to print different levels to different streams using the logging module?

2010-01-17 Thread Vinay Sajip
On Jan 16, 2:32 pm, Dotan Barak wrote: > Hi. > > I would like to use theloggingmodule and print the following levels to > the mentioned streams: > > CRITICAL    -> stderr > ERROR         -> stderr > WARNING   -> stderr > INFO             -> stdout > DEBUG         -> stdout > > I would like that ev

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 default encoding,

Re: Unicode and dictionaries

2010-01-17 Thread Martin v. Loewis
> Thanks to all of you. This once again proves how deep you can get > yourself into a mess if you mix unicode and string objects in your > code! The specific issue is that you apparently changed the default encoding. Don't do that, Python will break if you do. Regards, Martin -- http://mail.pyth

Re: Unicode and dictionaries

2010-01-17 Thread Steven D'Aprano
On Sun, 17 Jan 2010 10:49:44 +0100, Martin v. Loewis wrote: >> 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

Adding a cookie

2010-01-17 Thread koranthala
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.

Re: Confusing, desparate MySQLdb problems...

2010-01-17 Thread stopchuckingstuff
On Jan 17, 4:01 am, Ned Deily wrote: > In article > <5bc2641f-44fc-4324-b299-400ccbc79...@p8g2000yqb.googlegroups.com>, stopchuckingstuff > wrote: > > [...] > > > This just gets even more confusing! > > > I used a shebang line: > > > #!/Library/Frameworks/Python.framework/Versions/2.6/bin/python

Re: pyserial: Unexpected Local Echo

2010-01-17 Thread Steven Woody
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 the serial port?  Do y

Re: BaseHTTPServer get_request not called till first request

2010-01-17 Thread Adam Tauno Williams
On Sat, 2010-01-16 at 18:35 -0800, yousay wrote: > On Jan 13, 1:38 am, Adam Tauno Williams > wrote: > > Looking at and > > as examples I've attempted > > to create a BaseHTTPServer class that times-out acce

C-API: Get scope in function

2010-01-17 Thread moerchendiser2k3
Hi, 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 case I know there is a variable in the scope where this function i

Re: r"string" vs R"string

2010-01-17 Thread Colin W.
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 there and difference between the strings created with

Problems with collision response

2010-01-17 Thread 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? #Update all sprites, map self.player.update(dt) #Collide other sprites collisions = rabbyt.collisions.aabb_collide_single(self.player, sel

Re: A simple-to-use sound file writer

2010-01-17 Thread Alf P. Steinbach
* Alf P. Steinbach: * Steve Holden: Alf P. Steinbach wrote: * Steve Holden: Alf P. Steinbach wrote: * Grant Edwards: On 2010-01-15, Steve Holden wrote: I will, however, observe that your definition of a square wave is what I would have to call a "'square' wave" (and would prefer to call a

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: #

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.

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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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(

[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: 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

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 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: 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: 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: 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

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: 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

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 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

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: 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

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’. -- \

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: 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

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: 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: 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: 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: 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

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

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

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

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

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 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

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 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 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: 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 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: 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 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: 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: 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

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: 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

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 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 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: 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 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: 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: 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: 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: 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
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: 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
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

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: 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

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: 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: 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 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

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: 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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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

  1   2   >