Re: searching and storing large quantities of xml!

2010-01-16 Thread Stefan Behnel
dads, 16.01.2010 19:10: > I work in as 1st line support and python is one of my hobbies. We get > quite a few requests for xml from our website and its a long strung > out process. So I thought I'd try and create a system that deals with > it for fun. > > I've been tidying up the archived xml and

Re: r"string" vs R"string

2010-01-16 Thread Terry Reedy
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 raw literals and cooked literals. -- h

Re: r"string" vs R"string

2010-01-16 Thread Ben Finney
Brendan Miller writes: > 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"? For answering questions like this, the Python language reference is your friend: String literals may optionally be pre

r"string" vs R"string

2010-01-16 Thread Brendan Miller
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"? -- http://mail.python.org/mailman/listinfo/python-list

Re: chr(12) Form Feed in Notepad

2010-01-16 Thread Ben Finney
Grant Edwards writes: > FF still works with a lot of things. Most ASCII printers still > honor it, as do pagers and programs like a2ps. I still use it > in ASCII text files... Yes. It's especially useful for making large sectional structure in a text file — for example, program source code — t

Re: chr(12) Form Feed in Notepad

2010-01-16 Thread Grant Edwards
On 2010-01-16, Nobody wrote: > On Fri, 15 Jan 2010 10:42:43 -0800, W. eWatson wrote: > >> I thought I'd put a page break, chr(12), character in a txt file I wrote >> to skip to the top of the page. It doesn't work. Comments? > > The 1970's are over, and neither Notepad nor your printer attempts t

Re: Is python not good enough?

2010-01-16 Thread Terry Reedy
On 1/16/2010 10:08 PM, David Cournapeau wrote: Compilation with global type inference may be a good way to speed up python, but it is not the only way. Your claim about lookups does seem to contradict how the various efficient implementations of dynamic languages work. For example, the V8 engine

Re: Unicode and dictionaries

2010-01-16 Thread Carl Banks
On Jan 16, 7:06 pm, Ben Finney wrote: > Carl Banks writes: > > On Jan 16, 3:56 pm, Ben Finney wrote: > > > 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

Re: Is python not good enough?

2010-01-16 Thread Paul Rubin
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 that easy to use. For example, it's very e

Re: Confusing, desparate MySQLdb problems...

2010-01-16 Thread Ned Deily
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 > > which i got from which python in terminal, and

Re: Unicode and dictionaries

2010-01-16 Thread Ben Finney
Carl Banks writes: > On Jan 16, 3:56 pm, Ben Finney wrote: > > 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 > > expressi

Re: Is python not good enough?

2010-01-16 Thread David Cournapeau
On Sun, Jan 17, 2010 at 11:43 AM, John Nagle wrote: > David Cournapeau wrote: >> >> On Sun, Jan 17, 2010 at 4:17 AM, John Nagle wrote: >>> >>> Nobody wrote: On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote: >   Actually, no.  It's quite possible to make a Python implementat

Re: Confusing, desparate MySQLdb problems...

2010-01-16 Thread stopchuckingstuff
On Jan 17, 1:54 am, Ned Deily wrote: > In article > <8647768b-944c-4025-8389-768a9cae5...@u41g2000yqe.googlegroups.com>, > > > > > >  stopchuckingstuff wrote: > > On Jan 17, 12:14 am, Ned Deily wrote: > > > In article > > > <0ba7faf8-f816-4100-ba5b-b138d3008...@c3g2000yqd.googlegroups.com>, > >

Re: Confusing, desparate MySQLdb problems...

2010-01-16 Thread stopchuckingstuff
On Jan 17, 1:54 am, Ned Deily wrote: > In article > <8647768b-944c-4025-8389-768a9cae5...@u41g2000yqe.googlegroups.com>, > > > > > >  stopchuckingstuff wrote: > > On Jan 17, 12:14 am, Ned Deily wrote: > > > In article > > > <0ba7faf8-f816-4100-ba5b-b138d3008...@c3g2000yqd.googlegroups.com>, > >

Re: Unicode and dictionaries

2010-01-16 Thread Carl Banks
On Jan 16, 5:38 pm, Carl Banks wrote: > On Jan 16, 3:58 pm, Steven D'Aprano cybersource.com.au> wrote: > > On Sat, 16 Jan 2010 15:35:05 -0800, gizli wrote: > > > Hi all, > > > > I am using Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41). I ran > > > into this issue yesterday and wanted to

Re: BaseHTTPServer get_request not called till first request

2010-01-16 Thread yousay
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 accept() ever X seconds > to check some other work.  This seems

Re: Is python not good enough?

2010-01-16 Thread John Nagle
David Cournapeau wrote: On Sun, Jan 17, 2010 at 4:17 AM, John Nagle wrote: Nobody wrote: On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote: Actually, no. It's quite possible to make a Python implementation that runs fast. It's just that CPython, a naive interpreter, is too primitive

Re: Unicode and dictionaries

2010-01-16 Thread Carl Banks
On Jan 16, 3:56 pm, Ben Finney wrote: > 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’. Except the two

Re: Confusing, desparate MySQLdb problems...

2010-01-16 Thread Ned Deily
In article <8647768b-944c-4025-8389-768a9cae5...@u41g2000yqe.googlegroups.com>, stopchuckingstuff wrote: > On Jan 17, 12:14 am, Ned Deily wrote: > > In article > > <0ba7faf8-f816-4100-ba5b-b138d3008...@c3g2000yqd.googlegroups.com>, > >  stopchuckingstuff wrote: > > > I have installed MySQLdb o

Re: Unicode and dictionaries

2010-01-16 Thread Carl Banks
On Jan 16, 3:58 pm, Steven D'Aprano wrote: > On Sat, 16 Jan 2010 15:35:05 -0800, gizli wrote: > > Hi all, > > > I am using Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41). I ran > > into this issue yesterday and wanted  to check to see if this is a > > python bug. It seems that there is an i

Re: dict's as dict's key.

2010-01-16 Thread Ethan Furman
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 Which is great until you want to make a move. ;) ~Ethan~ -- ht

Re: Confusing, desparate MySQLdb problems...

2010-01-16 Thread stopchuckingstuff
On Jan 17, 12:14 am, Ned Deily wrote: > In article > <0ba7faf8-f816-4100-ba5b-b138d3008...@c3g2000yqd.googlegroups.com>, > > > > > >  stopchuckingstuff wrote: > > I have installed MySQLdb on Mac OSX 10.6.2, and have it working when > > running on my system in IDLE and in terminal, however encount

Re: Confusing, desparate MySQLdb problems...

2010-01-16 Thread stopchuckingstuff
On Jan 17, 12:14 am, Ned Deily wrote: > In article > <0ba7faf8-f816-4100-ba5b-b138d3008...@c3g2000yqd.googlegroups.com>, > > > > > >  stopchuckingstuff wrote: > > I have installed MySQLdb on Mac OSX 10.6.2, and have it working when > > running on my system in IDLE and in terminal, however encount

Re: searching and storing large quantities of xml!

2010-01-16 Thread Paul Rubin
dads writes: > I've been tidying up the archived xml and have been thinking what's > the best way to approach this issue as it took a long time to deal > with big quantities of xml. If you have 5/6 years worth of 26000+ > 5-20k xml files per year. The archived stuff is zipped but what is > better,

Re: Is python not good enough?

2010-01-16 Thread David Cournapeau
On Sun, Jan 17, 2010 at 4:17 AM, John Nagle wrote: > Nobody wrote: >> >> On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote: >> >>>    Actually, no.  It's quite possible to make a Python implementation >>> that >>> runs fast.  It's just that CPython, a naive interpreter, is too primitive >>> to

Re: Confusing, desparate MySQLdb problems...

2010-01-16 Thread Ned Deily
In article <0ba7faf8-f816-4100-ba5b-b138d3008...@c3g2000yqd.googlegroups.com>, stopchuckingstuff wrote: > I have installed MySQLdb on Mac OSX 10.6.2, and have it working when > running on my system in IDLE and in terminal, however encounter > continual problems when running it through Apache. >

Re: chr(12) Form Feed in Notepad

2010-01-16 Thread bartc
"Steve Holden" wrote in message news:mailman.1007.1263682208.28905.python-l...@python.org... bartc wrote: "Nobody" wrote in message news:pan.2010.01.16.04.24.18.437...@nowhere.com... On Fri, 15 Jan 2010 10:42:43 -0800, W. eWatson wrote: I thought I'd put a page break, chr(12), character i

Re: Unicode and dictionaries

2010-01-16 Thread Steven D'Aprano
On Sat, 16 Jan 2010 15:35:05 -0800, gizli wrote: > Hi all, > > I am using Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41). I ran > into this issue yesterday and wanted to check to see if this is a > python bug. It seems that there is an inconsistency between lists and > dictionaries in the

Re: A simple-to-use sound file writer

2010-01-16 Thread 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 "pulse train"), as I

Re: remote evaluation of Python code typed in html webpage frame

2010-01-16 Thread André
On Jan 15, 11:47 am, dmitrey wrote: > Thank you for the link, but I meant what is appropriate soft to be > installed on my server to do things like that. > Also, for my purposes it's better to have some text with possibility > of reexecuting after some minor code changes than python interpreter >

Unicode and dictionaries

2010-01-16 Thread gizli
Hi all, I am using Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41). I ran into this issue yesterday and wanted to check to see if this is a python bug. It seems that there is an inconsistency between lists and dictionaries in the way that unicode objects are handled. Take a look at the foll

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Alf P. Steinbach
* Gertjan Klein: Alf P. Steinbach wrote: * Gertjan Klein: Alf P. Steinbach wrote: Thinking about it some more, perhaps that way I can't get at return codes a python script might provide. I haven't used those, but they may be useful at some point. Return codes work OK no matter what. Ok, I

Re: searching and storing large quantities of xml!

2010-01-16 Thread Steve Holden
dads wrote: > I work in as 1st line support and python is one of my hobbies. We get > quite a few requests for xml from our website and its a long strung > out process. So I thought I'd try and create a system that deals with > it for fun. > > I've been tidying up the archived xml and have been th

Re: Is python not good enough?

2010-01-16 Thread Steve Holden
John Nagle wrote: > Nobody wrote: >> On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote: >> >>> Actually, no. It's quite possible to make a Python >>> implementation that >>> runs fast. It's just that CPython, a naive interpreter, is too >>> primitive >>> to do it. I was really hoping that

Re: A simple-to-use sound file writer

2010-01-16 Thread 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 > "

Re: chr(12) Form Feed in Notepad

2010-01-16 Thread Steve Holden
bartc wrote: > > "Nobody" wrote in message > news:pan.2010.01.16.04.24.18.437...@nowhere.com... >> On Fri, 15 Jan 2010 10:42:43 -0800, W. eWatson wrote: >> >>> I thought I'd put a page break, chr(12), character in a txt file I wrote >>> to skip to the top of the page. It doesn't work. Comments? >

Re: chr(12) Form Feed in Notepad (Windows)

2010-01-16 Thread Steve Holden
Lie Ryan wrote: > On 01/17/10 02:37, W. eWatson wrote: >> D'Arcy J.M. Cain wrote: >>> On Fri, 15 Jan 2010 20:17:35 -0800 >>> "W. eWatson" wrote: Could be, but I have no way of easily knowing. In any case, I was trying to write a simple report that could be printed with titles at the

Re: chr(12) Form Feed in Notepad (Windows)

2010-01-16 Thread Tim Chase
John Yeung wrote: In another response, Tim Chase suggested creating an RTF file instead of plain text. I think this is your best bet if your goal is to get page breaks with the least amount of additional effort. The package he's probably referring to is PyRTF. I took a quick look at it and in

Confusing, desparate MySQLdb problems...

2010-01-16 Thread stopchuckingstuff
I have installed MySQLdb on Mac OSX 10.6.2, and have it working when running on my system in IDLE and in terminal, however encounter continual problems when running it through Apache. When trying to import the module, it gives me this error: : /Library/WebServer/.python-eggs/ MySQL_python-1.2.3c1

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Duncan Booth
Mike wrote: >> That seems overkill. This does pretty much the same thing: >> >>         @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF >>         import sys >>         print sys.version >>         # raise RuntimeError # uncomment to trigger the 'pause' >> > > Indeed! Must be as close to a

Re: chr(12) Form Feed in Notepad

2010-01-16 Thread bartc
"Nobody" wrote in message news:pan.2010.01.16.04.24.18.437...@nowhere.com... On Fri, 15 Jan 2010 10:42:43 -0800, W. eWatson wrote: I thought I'd put a page break, chr(12), character in a txt file I wrote to skip to the top of the page. It doesn't work. Comments? The 1970's are over, and ne

Re: Long integers and ways around xrange

2010-01-16 Thread Martin Manns
On 16 Jan 2010 20:25:44 GMT Steven D'Aprano wrote: > On Sat, 16 Jan 2010 20:04:09 +0100, Martin Manns wrote: > >> islice(count(start, step), (stop-start+step-1)//step). > > > > However, count only accepts one parameter, so that this solution > > does not work. Furthermore, islice only accepts po

Re: I really need webbrowser.open('file://') to open a web browser

2010-01-16 Thread Paul Boddie
On 15 Jan, 21:14, Timur Tabi wrote: > After reading several web pages and mailing list threads, I've learned > that the webbrowser module does not really support opening local > files, even if I use a file:// URL designator.  In most cases, > webbrowser.open() will indeed open the default web brow

Re: Long integers and ways around xrange

2010-01-16 Thread Steven D'Aprano
On Sat, 16 Jan 2010 20:04:09 +0100, Martin Manns wrote: > Hi > > As stated in the manual, xrange raises an OverflowError for long integer > parameters. Looking for a xrange like generator for long integers, I > found this in the manual > (http://docs.python.org/library/functions.html): > >> CPyt

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Mike
> That seems overkill. This does pretty much the same thing: > >         @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF >         import sys >         print sys.version >         # raise RuntimeError # uncomment to trigger the 'pause' > Indeed! Must be as close to a "Windows shebang line" a

Re: chr(12) Form Feed in Notepad (Windows)

2010-01-16 Thread John Yeung
On Jan 15, 7:40 pm, "W. eWatson" wrote: > I am writing a txt file. It's up to the user to print > it using Notepad or some other tool. In another response, Tim Chase suggested creating an RTF file instead of plain text. I think this is your best bet if your goal is to get page breaks with the le

Long integers and ways around xrange

2010-01-16 Thread Martin Manns
Hi As stated in the manual, xrange raises an OverflowError for long integer parameters. Looking for a xrange like generator for long integers, I found this in the manual (http://docs.python.org/library/functions.html): > CPython implementation detail: xrange() is intended to be simple and > fa

Re: Is python not good enough?

2010-01-16 Thread John Nagle
Nobody wrote: On Fri, 15 Jan 2010 12:34:17 -0800, John Nagle wrote: Actually, no. It's quite possible to make a Python implementation that runs fast. It's just that CPython, a naive interpreter, is too primitive to do it. I was really hoping that Google would put somebody good at compile

Re: Inheriting methods but over-riding docstrings

2010-01-16 Thread Gerard Flanagan
Steven D'Aprano wrote: 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" def parrot(self): """docstring

searching and storing large quantities of xml!

2010-01-16 Thread dads
I work in as 1st line support and python is one of my hobbies. We get quite a few requests for xml from our website and its a long strung out process. So I thought I'd try and create a system that deals with it for fun. I've been tidying up the archived xml and have been thinking what's the best w

Inheriting methods but over-riding docstrings

2010-01-16 Thread Steven D'Aprano
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" def parrot(self): """docstring for Base""" retur

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Duncan Booth
Mike wrote: > t does not; Windows associates applications with file extensions. > However, I have used something like this to get something like the > Unix shebang behavior: > > @echo off > rem = """ ver26.bat: Python 2.6 > C:\Python26\python -x %~f0 %* > goto END > rem """ > # ver26.py wrapped

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Mike
> On unix you would start the file with a "hashbang" e.g. > > #!/usr/bin/python3 > > Fraid I don't know if that works on XP though. > > Roger. It does not; Windows associates applications with file extensions. However, I have used something like this to get something like the Unix shebang behavior

Re: I really need webbrowser.open('file://') to open a web browser

2010-01-16 Thread Jon Clements
On Jan 16, 5:08 pm, Jonathan Temple wrote: > On Jan 15, 8:14 pm, Timur Tabi wrote: > > > > > After reading several web pages and mailing list threads, I've learned > > that the webbrowser module does not really support opening local > > files, even if I use a file:// URL designator.  In most case

Re: I really need webbrowser.open('file://') to open a web browser

2010-01-16 Thread Jonathan Temple
On Jan 15, 8:14 pm, Timur Tabi wrote: > After reading several web pages and mailing list threads, I've learned > that the webbrowser module does not really support opening local > files, even if I use a file:// URL designator.  In most cases, > webbrowser.open() will indeed open the default web br

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Gertjan Klein
Alf P. Steinbach wrote: >* Gertjan Klein: >> Alf P. Steinbach wrote: >> >> Thinking about it some more, perhaps that way I can't get at return >> codes a python script might provide. I haven't used those, but they may >> be useful at some point. > >Return codes work OK no matter what. Ok, I won'

Re: remote evaluation of Python code typed in html webpage frame

2010-01-16 Thread r0g
Anand Vaidya wrote: > On Jan 16, 12:26 am, r0g wrote: Diez >> The Web2py framework works a bit like that, although it's not quite as >> simplistic as what you describe. May be worth a look though. >> >> Roger. > > > Hi r0g, > > web2py is a web-app framework (very similar to django, pylons

Re: chr(12) Form Feed in Notepad (Windows)

2010-01-16 Thread Lie Ryan
On 01/17/10 02:37, W. eWatson wrote: > D'Arcy J.M. Cain wrote: >> On Fri, 15 Jan 2010 20:17:35 -0800 >> "W. eWatson" wrote: >>> Could be, but I have no way of easily knowing. In any case, I was >>> trying to write a simple report that could be printed with titles at >>> the top of each page. If th

Re: chr(12) Form Feed in Notepad (Windows)

2010-01-16 Thread Tim Chase
W. eWatson wrote: I am writing a txt file. It's up to the user to print it using Notepad or some other tool. I have no idea how to send it directly to the printer, but I really don't want to furnish that capability in the program. From Google, The Graphics Device Interface (GDI). If you're wri

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

2010-01-16 Thread Peter Otten
Dotan Barak wrote: > Hi. > > I would like to use the logging module and print the following levels to > the mentioned streams: > > CRITICAL-> stderr > ERROR -> stderr > WARNING -> stderr > INFO -> stdout > DEBUG -> stdout > > I would like that every message wil

Re: chr(12) Form Feed in Notepad (Windows)

2010-01-16 Thread W. eWatson
D'Arcy J.M. Cain wrote: On Fri, 15 Jan 2010 20:17:35 -0800 "W. eWatson" wrote: Could be, but I have no way of easily knowing. In any case, I was trying to write a simple report that could be printed with titles at the top of each page. If there's another "common" format that I can write in to

Re: Using invalid.com email addresses

2010-01-16 Thread D'Arcy J.M. Cain
On Fri, 15 Jan 2010 23:04:57 -0800 Stephen Hansen wrote: > It may or may not be in violation of the RFCs, but the modern reality of the > internet makes certain "rules" of the RFC's meaningless. They aren't meaningless. They also aren't "rules", a term that I did not use. The Internet is an ana

Re: Changing var names

2010-01-16 Thread Victor Subervi
On Fri, Jan 15, 2010 at 3:47 PM, Phlip wrote: > Victor Subervi wrote: > > > Should I re-write it in classes before testing units? Right now it's > > very monolithic. > > The "Unit" in unit tests is a misnomer. It refers to an old QA concept, for > high-end projects, that the failure of any test s

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

2010-01-16 Thread Dotan Barak
Hi. I would like to use the logging module and print the following levels to the mentioned streams: CRITICAL-> stderr ERROR -> stderr WARNING -> stderr INFO -> stdout DEBUG -> stdout I would like that every message will be printed only once, and for the stre

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Alf P. Steinbach
* Gertjan Klein: Alf P. Steinbach wrote: * Gertjan Klein: What I've been thinking about is to write a single [Windows] executable that gets associated with .py and .pyw (instead of python.exe itself). Well, you need two: one for console subsystem, and one for GUI subsystem. Why? I'd have im

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Gertjan Klein
Alf P. Steinbach wrote: >* Gertjan Klein: >> >> What I've been thinking about is to write a single [Windows] executable that >> gets associated with .py and .pyw (instead of python.exe itself). > >Well, you need two: one for console subsystem, and one for GUI subsystem. Why? I'd have imagined wr

Re: A simple-to-use sound file writer

2010-01-16 Thread Alf P. Steinbach
* Alf P. Steinbach: * Steve Holden: Though for what it's worth I wasn't impressed by the results of running the posted program, since it yielded an AIFF file of mostly zeroes that produced no audible sound. $ od -bc sinewave.aiff 000 106 117 122 115 000 002 261 076 101 111 106 106 103 117

Re: A simple-to-use sound file writer

2010-01-16 Thread Alf P. Steinbach
* 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 "pulse train"), as I envisage a square wave as a waveform havi

Re: A simple-to-use sound file writer

2010-01-16 Thread 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 "pulse >>> train"), as I envisage a square wave as a waveform having

Re: Using invalid.com email addresses

2010-01-16 Thread Steve Holden
Lie Ryan wrote: > On 01/16/10 19:56, Ben Finney wrote: >> Paul Rubin writes: >> >>> I'd think whoever registered that domain would have known what they >>> were getting into when they registered it. Same with "example.com" and >>> so forth. >> Which doesn't make it any more appropriate to act as t

Integrate JpegEnhancer in PSPX on XP

2010-01-16 Thread Heinrich Wolf
Hi all, I've read somewhere that any suitable program - exe file - could be run by a script in Paint Shop Pro on Windows XP/SP3. JpegEnhancer from www.vicman.net/jpegenhancer/ is a well known stand alone app. requiring to juggle an image between PSP and JpegEnhancer via HD - a extremely undesirab

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Alf P. Steinbach
* Gertjan Klein: What I've been thinking about is to write a single [Windows] executable that gets associated with .py and .pyw (instead of python.exe itself). Well, you need two: one for console subsystem, and one for GUI subsystem. Happily you can use the same source code. :-) This execu

Re: remote evaluation of Python code typed in html webpage frame

2010-01-16 Thread Anand Vaidya
On Jan 16, 12:26 am, r0g wrote: > >> Diez > > The Web2py framework works a bit like that, although it's not quite as > simplistic as what you describe. May be worth a look though. > > Roger. Hi r0g, web2py is a web-app framework (very similar to django, pylons etc) and it does not execute user

Re: Using invalid.com email addresses

2010-01-16 Thread Lie Ryan
On 01/16/10 19:56, Ben Finney wrote: > Paul Rubin writes: > >> I'd think whoever registered that domain would have known what they >> were getting into when they registered it. Same with "example.com" and >> so forth. > > Which doesn't make it any more appropriate to act as though you have > fre

Re: Using invalid.com email addresses

2010-01-16 Thread Ben Finney
Ben Finney writes: > Paul Rubin writes: > > > I'd think whoever registered that domain would have known what they > > were getting into when they registered it. Same with "example.com" and > > so forth. > > Which doesn't make it any more appropriate to act as though you have > free rein in a dom

Re: Using invalid.com email addresses

2010-01-16 Thread Ben Finney
Paul Rubin writes: > I'd think whoever registered that domain would have known what they > were getting into when they registered it. Same with "example.com" and > so forth. Which doesn't make it any more appropriate to act as though you have free rein in a domain registered to someone else. Es

Re: setattr() oddness

2010-01-16 Thread Lie Ryan
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. mostly for people (ab)using attributes instead of dictionary.

Re: Using invalid.com email addresses

2010-01-16 Thread Paul Rubin
Ben Finney writes: >> Does anyone else think that that behaviour is just rude, not to >> mention in violation of the RFCs? > > Yes, it violates RFCs. It also ignores the fact that the domain is > currently registered until 2010-08-03, and is therefore not available > for anyone else's use, unless

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Gertjan Klein
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 to determine which version to load, resembling the >Unix