Re: Using invalid.com email addresses

2010-01-15 Thread Ben Finney
"D'Arcy J.M. Cain" 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: dict's as dict's key.

2010-01-15 Thread Lie Ryan
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 -- http://mail.python.org/mailman/listinfo/python-list

Re: Using invalid.com email addresses

2010-01-15 Thread Stephen Hansen
On Fri, Jan 15, 2010 at 10:13 PM, D'Arcy J.M. Cain wrote: > Damn! I missed the @invalid.com in the address. I'm not sure why I > just didn't do this before but @invalid.com just went into my > blacklist. > > Does anyone else think that that behaviour is just rude, not to mention > in violation

Re: Is python not good enough?

2010-01-15 Thread hackingKK
On Saturday 16 January 2010 08:01 AM, 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 tha

Re: Using invalid.com email addresses

2010-01-15 Thread Alf P. Steinbach
* D'Arcy J.M. Cain: Damn! I missed the @invalid.com in the address. I'm not sure why I just didn't do this before but @invalid.com just went into my blacklist. Does anyone else think that that behaviour is just rude, not to mention in violation of the RFCs? In RFC violation yes. To saf

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* 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 a 50% duty cycle, as in ___ ___ |

Using invalid.com email addresses

2010-01-15 Thread D'Arcy J.M. Cain
Damn! I missed the @invalid.com in the address. I'm not sure why I just didn't do this before but @invalid.com just went into my blacklist. Does anyone else think that that behaviour is just rude, not to mention in violation of the RFCs? -- D'Arcy J.M. Cain | Democracy is three wolve

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

2010-01-15 Thread D'Arcy J.M. Cain
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 > produce the file,

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

2010-01-15 Thread W. eWatson
Neil Hodgson wrote: W. eWatson wrote: I am writing a txt file. It's up to the user to print it using Notepad or some other tool. WordPad will interpret chr(12) as you want. Neil That may be the solution. Just tell the end user to copy the file into it, and print it there. I just

Re: chr(12) Form Feed in Notepad

2010-01-15 Thread Nobody
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 to maintain compatibility with a Telety

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

2010-01-15 Thread W. eWatson
Mensanator wrote: On Jan 15, 6:40 pm, "W. eWatson" wrote: Tim Chase wrote: W. eWatson wrote: Tim Chase wrote: ... program. From Google, The Graphics Device Interface (GDI). Have you considered the possibility that your printer can't print raw text files? I had one that would ONLY print Po

Re: setattr() oddness

2010-01-15 Thread Terry Reedy
On 1/15/2010 6:10 PM, Sean DiZazzo wrote: On Jan 15, 2:22 pm, Terry Reedy wrote: On 1/15/2010 3:37 PM, Sean DiZazzo wrote: Should the following be legal? class TEST(object): pass ... t = TEST() setattr(t, "", "123") getattr(t, "") '123' Different people have different opinions as to w

Re: Is python not good enough?

2010-01-15 Thread Nobody
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 > compilers in cha

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

2010-01-15 Thread Neil Hodgson
W. eWatson wrote: > I am writing a txt file. It's up to the user to print it using Notepad > or some other tool. WordPad will interpret chr(12) as you want. Neil -- http://mail.python.org/mailman/listinfo/python-list

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

2010-01-15 Thread Mensanator
On Jan 15, 6:40 pm, "W. eWatson" wrote: > Tim Chase wrote: > > W. eWatson wrote: > >> Tim Chase wrote: > >>> The pseudo-pipeline comparison would be > > >>>   type file.txt > lpt1: > > >>> which would send the raw text file to the printer (assuming it's set > >>> up on LPT1, otherwise, use whateve

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Steve Holden: For the record, yes, summing any waveforms that can be represented as Fourier Series will necessarily result in another Fourier series, since any linear combination of Fourier series must itself, be a Fourier series, and therefore the representation of the sum of the summed wavef

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

2010-01-15 Thread W. eWatson
Tim Chase wrote: W. eWatson wrote: Tim Chase wrote: The pseudo-pipeline comparison would be type file.txt > lpt1: which would send the raw text file to the printer (assuming it's set up on LPT1, otherwise, use whatever port it's attached to in your printer control panel); or are you using

Re: ctypes error

2010-01-15 Thread Gib Bogle
Gib Bogle wrote: It has occurred to me that the error may have nothing to do with ctypes. The DLL was built on one machine and copied to the other (which doesn't have the compiler installed). Although both machines are running Windows XP, there might be some subtle differences. I see that t

Re: BeautifulSoup

2010-01-15 Thread Phlip
John Bokma wrote: John Nagle writes: It's just somebody pirating movies. Ineptly. Ignore. Wow, what a childish reply. You should've followed your own advice and ignored the OP instead of replying with a top post + full quote (!). Mr Manners reminds the Gentle Poster(s) that... A> as

Re: import data structure

2010-01-15 Thread Gary Herron
monkeys paw wrote: I want to store data in a file like show below. Then i want to import the data in, but am having trouble. I'm trying: import sfdata for x in author_list: print x Either import sfdata for x in sfdata.author_list: # Access list as an attribute of the module

Re: Writing a string.ishex function

2010-01-15 Thread Steven D'Aprano
On Fri, 15 Jan 2010 00:53:51 +, Steven D'Aprano wrote: > On Thu, 14 Jan 2010 18:36:12 +, MRAB wrote: >> BTW, ishex('') should return False. > > > Only if you want to be inconsistent with other isFoo string functions: > ''.isalpha() > False I said what??? Sorry MRAB, what I wrote

import data structure

2010-01-15 Thread monkeys paw
I want to store data in a file like show below. Then i want to import the data in, but am having trouble. I'm trying: import sfdata for x in author_list: print x FILE: sfdata.py (i'm trying to import it) == author_list = { '829337' : {

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

2010-01-15 Thread Tim Chase
W. eWatson wrote: Tim Chase wrote: The pseudo-pipeline comparison would be type file.txt > lpt1: which would send the raw text file to the printer (assuming it's set up on LPT1, otherwise, use whatever port it's attached to in your printer control panel); or are you using something like

Re: setattr() oddness

2010-01-15 Thread Sean DiZazzo
On Jan 15, 2:22 pm, Terry Reedy wrote: > On 1/15/2010 3:37 PM, Sean DiZazzo wrote: > > > Should the following be legal? > > class TEST(object): pass > > ... > t = TEST() > setattr(t, "", "123") > getattr(t, "") > > '123' > > Different people have different opinions as to whethe

Re: setattr() oddness

2010-01-15 Thread Steve Holden
Terry Reedy wrote: > On 1/15/2010 3:37 PM, Sean DiZazzo wrote: >> Should the following be legal? >> > class TEST(object): pass >> ... > t = TEST() > setattr(t, "", "123") > getattr(t, "") >> '123' > > Different people have different opinions as to whether setattr (and > correspondi

Re: which data structure should I use?

2010-01-15 Thread Gabriel Genellina
En Fri, 15 Jan 2010 01:56:24 -0300, Eknath Venkataramani escribió: I have a txt file in the following format: [code] "confident" => { count => 4, trans => { "ashahvasahta" => 0.74918568, "atahmavaishahvaasa" => 0.09095465, "pahraaram\.nbha" => 0.06990729, "mailata

Re: setattr() oddness

2010-01-15 Thread Terry Reedy
On 1/15/2010 3:37 PM, Sean DiZazzo wrote: Should the following be legal? class TEST(object): pass ... t = TEST() setattr(t, "", "123") getattr(t, "") '123' Different people have different opinions as to whether setattr (and correspondingly getattr) should be strict or permissive as to whe

Re: BeautifulSoup

2010-01-15 Thread John Bokma
John Bokma writes: > yamamoto writes: > >> Hi, >> I am new to Python. I'd like to extract "a" tag from a website by >> using "beautifulsoup" module. >> but it doesnt work! > > [..] > >> check_for_whole_start_tag >> self.error("malformed start tag") >> File "C:\Python26\lib\HTMLParser.py",

Re: BeautifulSoup

2010-01-15 Thread John Bokma
John Nagle writes: >It's just somebody pirating movies. Ineptly. Ignore. Wow, what a childish reply. You should've followed your own advice and ignored the OP instead of replying with a top post + full quote (!). -- John Bokma

Re: BeautifulSoup

2010-01-15 Thread John Bokma
yamamoto writes: > Hi, > I am new to Python. I'd like to extract "a" tag from a website by > using "beautifulsoup" module. > but it doesnt work! [..] > check_for_whole_start_tag > self.error("malformed start tag") > File "C:\Python26\lib\HTMLParser.py", line 115, in error > raise HTML

Re: Problem with wsgiref.headers.Headers

2010-01-15 Thread Phil
I left one crucial detail out. My concern was the fact that the original headers list being wrapped ('list' in my example) is not being updated. -- http://mail.python.org/mailman/listinfo/python-list

Problem with wsgiref.headers.Headers

2010-01-15 Thread Phil
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 printed, and then the correct result for wrapper printed. Am

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

2010-01-15 Thread W. eWatson
Tim Chase wrote: W. eWatson wrote: Grant Edwards wrote: On 2010-01-15, 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? Yes, it does work. Apparently not with with my Brother 1440 laser pri

Re: BeautifulSoup

2010-01-15 Thread Brian J Mingus
On Wed, Jan 13, 2010 at 5:46 AM, yamamoto wrote: > Hi, > I am new to Python. I'd like to extract "a" tag from a website by > using "beautifulsoup" module. > but it doesnt work! > > //sample.py > > from BeautifulSoup import BeautifulSoup as bs > import urllib > url="http://www.d-addicts.com/forum/t

Re: Changing var names

2010-01-15 Thread Phlip
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 should implicate only one unit. We only need "developer t

setattr() oddness

2010-01-15 Thread Sean DiZazzo
Should the following be legal? >>> class TEST(object): pass ... >>> t = TEST() >>> setattr(t, "", "123") >>> getattr(t, "") '123' ~Sean -- http://mail.python.org/mailman/listinfo/python-list

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

2010-01-15 Thread Timur Tabi
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 browser, but with Python 2.6 on my Fedora 10 syst

Re: Is python not good enough?

2010-01-15 Thread John Nagle
Terry Reedy wrote: On 1/12/2010 10:17 AM, Krister Svanlund wrote: Their goal of making Go very fast to compile by machines somewhat conflicts with Python's goal of being fast to read by humans. Actually, no. It's quite possible to make a Python implementation that runs fast. It's just th

Re: BeautifulSoup

2010-01-15 Thread John Nagle
It's just somebody pirating movies. Ineptly. Ignore. John Nagle yamamoto wrote: Hi, I am new to Python. I'd like to extract "a" tag from a website by using "beautifulsoup" module. but it doesnt work! //sample.py from BeautifulSoup import BeautifulSoup as b

Re: chr(12) Form Feed in Notepad

2010-01-15 Thread Tim Chase
W. eWatson wrote: Grant Edwards wrote: On 2010-01-15, 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? Yes, it does work. Apparently not with with my Brother 1440 laser printer. The characte

Re: Changing var names

2010-01-15 Thread Victor Subervi
On Fri, Jan 15, 2010 at 3:45 PM, Phlip wrote: > Adam Tauno Williams wrote: > > This process is called 'refactoring' [a good term to Google], and every >> decent IDE provides some support [if it doesn't, it isn't a "decent" >> IDE] >> > > Way more important than IDE support is developers writing

Re: Changing var names

2010-01-15 Thread Victor Subervi
On Fri, Jan 15, 2010 at 3:15 PM, Adam Tauno Williams < awill...@opengroupware.us> wrote: > On Fri, 2010-01-15 at 13:27 -0400, Victor Subervi wrote: > > Hi; > > Well it took me *less than a day* to fix the following problems: > > -- bare excepts (accidentally left a couple I think) > > -- sql injec

Re: pyserial: Unexpected Local Echo

2010-01-15 Thread 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 you get the echo if you disconnect the serial

Re: chr(12) Form Feed in Notepad

2010-01-15 Thread W. eWatson
Grant Edwards wrote: On 2010-01-15, 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? Yes, it does work. Apparently not with with my Brother 1440 laser printer. The character in NotePad.txt

Re: Changing var names

2010-01-15 Thread Phlip
Adam Tauno Williams wrote: This process is called 'refactoring' [a good term to Google], and every decent IDE provides some support [if it doesn't, it isn't a "decent" IDE] Way more important than IDE support is developers writing wall-to-wall unit tests as they write their features, _before_

Re: xml.sax parsing elements with the same name

2010-01-15 Thread Adam Tauno Williams
On Mon, 2010-01-11 at 13:24 -0800, amadain wrote: > On Jan 11, 9:03 pm, John Bokma wrote: > > amadain writes: > > I was thinking about something like: > > self.filterIndex = 0 > > in startElement: > > if name == 'filter': > >self.filterIndex += 1 > >return > > if name == '

Re: chr(12) Form Feed in Notepad

2010-01-15 Thread Grant Edwards
On 2010-01-15, 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? Yes, it does work. -- Grant Edwards grante Yow! ... bleakness

Efficient Running Median

2010-01-15 Thread Raymond Hettinger
I've updated the running median recipe to use a new algorithm with O (log n) updates for a large sliding window traversing a data stream. See http://code.activestate.com/recipes/576930/ The engine is a new collection class called IndexableSkiplist. It is like a regular skiplist as detailed at htt

Re: Changing var names

2010-01-15 Thread Adam Tauno Williams
On Fri, 2010-01-15 at 13:27 -0400, Victor Subervi wrote: > Hi; > Well it took me *less than a day* to fix the following problems: > -- bare excepts (accidentally left a couple I think) > -- sql injection attacks > -- recreating tables to make them more reasonable > Now, I believe someone once menti

Re: Blocking code

2010-01-15 Thread Peter Otten
eric.frederich wrote: > I am trying to write something that will watch directories without > poling them. > This is what FAM is fore. Gamin is a re-implementation of FAM and it > has python bindings. > > The problem is that when I call handle_one_event() it blocks until > there is an event to ha

Re: Blocking code

2010-01-15 Thread Adam Tauno Williams
On Fri, 2010-01-15 at 10:12 -0800, eric.frederich wrote: > I am trying to write something that will watch directories without > poling them. > This is what FAM is fore. Gamin is a re-implementation of FAM and it > has python bindings. > The problem is that when I call handle_one_event() it blocks

Re: chr(12) Form Feed in Notepad

2010-01-15 Thread Duncan Booth
"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? > Did you intend to ask a question? If so you might like to read http://catb.org/~esr/faqs/smart-questions.html first. -- http://mail.pyt

Re: "Bad file descriptor" in HTTPServer using Multiprocessing.

2010-01-15 Thread Adam Tauno Williams
On Sun, 2010-01-10 at 14:45 -0500, Adam Tauno Williams wrote: > I have a Python multiprocessing application where a master process > starts server sub-processes and communicates with them via Pipes; that > works very well. But one of the subprocesses, in turn, starts a > collection of HTTPServer

Re: Changing var names

2010-01-15 Thread Victor Subervi
On Fri, Jan 15, 2010 at 2:26 PM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > Victor Subervi wrote: > >> Hi; >> Well it took me *less than a day* to fix the following problems: >> -- bare excepts (accidentally left a couple I think) >> -- sql injection attacks >> -- recreating tables t

chr(12) Form Feed in Notepad

2010-01-15 Thread W. eWatson
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? -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing var names

2010-01-15 Thread Jean-Michel Pichavant
Victor Subervi wrote: Hi; Well it took me *less than a day* to fix the following problems: -- bare excepts (accidentally left a couple I think) -- sql injection attacks -- recreating tables to make them more reasonable ** "Programming is an ITERATIVE proce

Blocking code

2010-01-15 Thread eric.frederich
I am trying to write something that will watch directories without poling them. This is what FAM is fore. Gamin is a re-implementation of FAM and it has python bindings. The problem is that when I call handle_one_event() it blocks until there is an event to handle. Pressing Ctrl-C does nothing he

Re: Writing a string.ishex function

2010-01-15 Thread MRAB
Duncan Booth wrote: MRAB wrote: Duncan Booth wrote: MRAB wrote: I raise you one character: ishex2 = lambda s: not(set(s)-set(string.hexdigits)) # Yours ishex3 = lambda s: not set(s)-set(string.hexdigits) # Mine I could actually go three better: ishex3=lambda s:not set(s)-set(st

Re: Writing a string.ishex function

2010-01-15 Thread Vlastimil Brom
2010/1/15 Duncan Booth : > MRAB wrote: > >> Duncan Booth wrote: >>> MRAB wrote: >>> I raise you one character: ishex2 = lambda s: not(set(s)-set(string.hexdigits))     # Yours ishex3 = lambda s: not set(s)-set(string.hexdigits)      # Mine I could actually go three b

Changing var names

2010-01-15 Thread Victor Subervi
Hi; Well it took me *less than a day* to fix the following problems: -- bare excepts (accidentally left a couple I think) -- sql injection attacks -- recreating tables to make them more reasonable ** "Programming is an ITERATIVE process." ***

Re: force URLencoding script

2010-01-15 Thread r0g
João wrote: > On Jan 15, 2:38 pm, r0g wrote: >> João wrote: >>> On Jan 14, 5:58 pm, r0g wrote: João wrote: > On Jan 12, 10:07 pm, r0g wrote: >> João wrote: > for the following data, > authentication = "UID=somestring&" > message = 'PROBLEM severity High: OperatorX Plat1(

Re: Simple distributed example for learning purposes?

2010-01-15 Thread r0g
Tim Golden wrote: > On 15/01/2010 15:43, r0g wrote: >> Distributed password cracking? It's really simple yet potentially >> engaging and could be a good segway into teaching them about >> computability and security. All you need is a bunch of password hashes >> and a wordlist. > > At the moment, t

Re: A simple-to-use sound file writer

2010-01-15 Thread r0g
Steve Holden wrote: > r0g wrote: >> I think those guys owe you an apology really, but I wouldn't hold your >> breath! >> > Well as you can now see at least one of "those guys" doesn't mind > admitting (and apologizing) when he is wrong. > > regards > Steve I stand corrected, fair play sir :)

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

2010-01-15 Thread r0g
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 > command prompt. > Rega

Re: a problem with writing a generator

2010-01-15 Thread Paweł Banyś
I would like to thank you for help. With the advice you provided I managed to complete my program and now it is working as it should. Regards, Paweł -- http://mail.python.org/mailman/listinfo/python-list

Re: force URLencoding script

2010-01-15 Thread João
EDIT: About the proxy. That's why I'm using the '-P' in the POST call. /usr/bin/POST -P -- http://mail.python.org/mailman/listinfo/python-list

Re: webscrapping ringcentral.com using mechanize

2010-01-15 Thread shrini
Hi, > You wouldn't be trying to crack their customers account logins would > you? Coz it would be highly illegal if you were. I am a valid customer of ringcentral.com We have multiple accounts and need to automate some actions in ringcentral site. still no clue on how to scrap ringcentral site.

Re: A simple-to-use sound file writer

2010-01-15 Thread Ben Finney
"Alf P. Steinbach" writes: > You did lie, that's established. In addition as I recall in the same > post you went on about my motivations for doing the Terrible Deed that > you invented. None of that matches my (largely disinterested) observations. This is pure fantasy, as best I can tell. I've

Re: webscrapping ringcentral.com using mechanize

2010-01-15 Thread r0g
shrini wrote: > Hi, > >> You wouldn't be trying to crack their customers account logins would >> you? Coz it would be highly illegal if you were. > > I am a valid customer of ringcentral.com > > We have multiple accounts and need to automate some actions in > ringcentral site. > > still no clue

Re: force URLencoding script

2010-01-15 Thread João
On Jan 15, 2:38 pm, r0g wrote: > João wrote: > > On Jan 14, 5:58 pm, r0g wrote: > >> João wrote: > >>> On Jan 12, 10:07 pm, r0g wrote: > João wrote: > >>> for the following data, > >>> authentication = "UID=somestring&" > >>> message = 'PROBLEM severity High: OperatorX Plat1(locationY) glob

Re: Simple distributed example for learning purposes?

2010-01-15 Thread Tim Golden
On 15/01/2010 15:43, r0g wrote: Distributed password cracking? It's really simple yet potentially engaging and could be a good segway into teaching them about computability and security. All you need is a bunch of password hashes and a wordlist. At the moment, that's pretty much what my example

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

2010-01-15 Thread dmitrey
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 command prompt. Regards, D. On 15 янв, 16:41,

Re: Simple distributed example for learning purposes?

2010-01-15 Thread r0g
Tim Golden wrote: > Nobody wrote: >> On Sat, 26 Dec 2009 20:06:02 +, Tim Golden wrote: >> >>> I'm trying to come up with something which will illustrate >>> the usefulness of a distributed processing model. Since I >>> may not be using the term "distributed" exactly, my >>> criteria are: >>> >>

Re: A simple-to-use sound file writer

2010-01-15 Thread 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 a 50% duty > cycle, as in > > ___ ___ > | |

Re: Ignore leading '>>>' and ellipsis?

2010-01-15 Thread r0g
Javier Collado wrote: > Hello, > > I think that's exactly what the cpaste magic function does. Type > 'cpaste?' in your IPython session for more information. > > Best regards, > Javier > > 2010/1/14 Reckoner : >> Hi, >> >> I am studying some examples in a tutorial where there are a lot of >>

Re: Executable standalone *.pyc after inserting "#!/usr/bin/python" or other options

2010-01-15 Thread epsilon
On Jan 15, 8:32 am, schmeii wrote: > On Jan 14, 10:55 pm, epsilon wrote: > > > All: > > > I've been playing with "Lua" and found something really cool that I'm > > unable to do in "Python". With "Lua", a script can be compiled to byte > > code using "luac" and by adding "#!/usr/bin/lua" at the to

Re: A simple-to-use sound file writer

2010-01-15 Thread Steve Holden
r0g wrote: > Alf P. Steinbach wrote: >> But maybe you're simply not able to understand the algorithm, trivial as >> it is. >> >> So, a Python implementation (note, this program takes some time to run!): >> >> >> >> # Generating a sine wave as a sum of square waves of various amplitudes > > > Pwn

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

2010-01-15 Thread Diez B. Roggisch
Am 15.01.10 15:16, schrieb dmitrey: hi all, what's the simplest way to create a webpage with a frame for Python code to be typed in (as a plain text, or, better, as a highlighted text or something like scite or any other easy python IDE, capable of automatic indentations), and then pressing a but

Re: A simple-to-use sound file writer

2010-01-15 Thread Steve Holden
Alf P. Steinbach wrote: > * Steve Holden: >> Alf P. Steinbach wrote: >>> * Ben Finney: "Alf P. Steinbach" writes: > You did lie, that's established. In addition as I recall in the same > post you went on about my motivations for doing the Terrible Deed that > you invented. >>

Re: force URLencoding script

2010-01-15 Thread r0g
João wrote: > On Jan 14, 5:58 pm, r0g wrote: >> João wrote: >>> On Jan 12, 10:07 pm, r0g wrote: João wrote: >>> for the following data, >>> authentication = "UID=somestring&" >>> message = 'PROBLEM severity High: OperatorX Plat1(locationY) global >>> Succ. : 94.47%' >>> dest_number = 'XX

remote evaluation of Python code typed in html webpage frame

2010-01-15 Thread dmitrey
hi all, what's the simplest way to create a webpage with a frame for Python code to be typed in (as a plain text, or, better, as a highlighted text or something like scite or any other easy python IDE, capable of automatic indentations), and then pressing a button to evaluate it using a remote serv

Re: Executable standalone *.pyc after inserting "#!/usr/bin/python" or other options

2010-01-15 Thread schmeii
On Jan 14, 10:55 pm, epsilon wrote: > All: > > I've been playing with "Lua" and found something really cool that I'm > unable to do in "Python". With "Lua", a script can be compiled to byte > code using "luac" and by adding "#!/usr/bin/lua" at the top of the > binary, the byte code becomes a singl

Re: A simple-to-use sound file writer

2010-01-15 Thread r0g
Alf P. Steinbach wrote: > But maybe you're simply not able to understand the algorithm, trivial as > it is. > > So, a Python implementation (note, this program takes some time to run!): > > > > # Generating a sine wave as a sum of square waves of various amplitudes Pwned! Good one Alf :) I t

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Ben Finney: "Alf P. Steinbach" writes: You did lie, that's established. In addition as I recall in the same post you went on about my motivations for doing the Terrible Deed that you invented. None of that matches my (largely disinterested) observat

Re: Windows drag & drop with win32com and IDropTarget

2010-01-15 Thread Greg K
> It looks as though you're returning an OK *and* the effect > which isn't how the thing is implemented via the pywin32 > wrappers. Thanks for the reply, however even after I change the return value to just the effect code, I still have the same problem. There must still be something else I'm doin

Re: force URLencoding script

2010-01-15 Thread João
On Jan 14, 5:58 pm, r0g wrote: > João wrote: > > On Jan 12, 10:07 pm, r0g wrote: > >> João wrote: > > > for the following data, > > authentication = "UID=somestring&" > > message = 'PROBLEM severity High: OperatorX Plat1(locationY) global > > Succ. : 94.47%' > > dest_number = 'XXX' >

Re: A simple-to-use sound file writer

2010-01-15 Thread Steve Holden
Alf P. Steinbach wrote: > * Ben Finney: >> "Alf P. Steinbach" writes: >> >>> You did lie, that's established. In addition as I recall in the same >>> post you went on about my motivations for doing the Terrible Deed that >>> you invented. >> >> None of that matches my (largely disinterested) obser

Re: Author of a Python Success Story Needs a Job!

2010-01-15 Thread Simon Brunning
2010/1/14 Novocastrian_Nomad : > Why is it so many, so called high tech companies, insist on the 19th > century practice of demanding an employee's physical presence in a > specific geographic location. Pair programming and co-location with your end users both hugely increase real productivity, in

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Ben Finney: "Alf P. Steinbach" writes: You did lie, that's established. In addition as I recall in the same post you went on about my motivations for doing the Terrible Deed that you invented. None of that matches my (largely disinterested) observations. This is pure fantasy, as best I can

ANN: Shed Skin 0.3

2010-01-15 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.3, an experimental (restricted) Python-to-C++ compiler. Please see my blog for more details about the release: http://shed-skin.blogspot.com/ Thanks, Mark Dufour. -- "Overdesigning is a SIN. It's the archetypal example of what I call 'bad taste'" - Linu

Re: Writing a string.ishex function

2010-01-15 Thread Duncan Booth
MRAB wrote: > Duncan Booth wrote: >> MRAB wrote: >> >>> I raise you one character: >>> >>> ishex2 = lambda s: not(set(s)-set(string.hexdigits)) # Yours >>> ishex3 = lambda s: not set(s)-set(string.hexdigits) # Mine >>> >>> I could actually go three better: >>> >>> ishex3=lambda s:not s

Re: ctypes error

2010-01-15 Thread Terry Reedy
On 1/15/2010 2:00 AM, Gib Bogle wrote: It has occurred to me that the error may have nothing to do with ctypes. The DLL was built on one machine and copied to the other (which doesn't have the compiler installed). Although both machines are running Windows XP, there might be some subtle differe

Re: Windows drag & drop with win32com and IDropTarget

2010-01-15 Thread Tim Golden
On 15/01/2010 07:20, Greg K wrote: I'm trying to create a program that will process files dragged into its window, however I can't seem to get the cursor to change correctly when something is dragged over the window. I've created an object that implements the IDropTarget interface, but it seems t

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Steven D'Aprano: On Fri, 15 Jan 2010 05:23:48 +0100, Alf P. Steinbach wrote: You're again into innuendo, misleading statements and so forth. [...] [Steve Holden] prefers to spout innuendu, personal attacks and misleading statements. Your constant and repeated accusations that any question

Re: Simple distributed example for learning purposes?

2010-01-15 Thread Tim Golden
On 14/01/2010 18:16, Mike Driscoll wrote: I think distributed transcoding of hi-def videos would be cool, but I haven't found much with Google. Still, you might find this useful for your project: http://pypi.python.org/pypi/AsynCluster/0.3 Thanks. I suspect that that would be overkill for what

Re: TypeError: __name__ must be set to a string object

2010-01-15 Thread Frank Millman
"Frank Millman" wrote in message news:hieoq6$4i...@ger.gmane.org... > Hi all > > This problem is similar to one I posted recently regarding the > multiprocessing module and unicode. > > However, although this one manifests itself while using the > multiprocessing module, is caused by Python it

Re: ctypes error

2010-01-15 Thread Dave Angel
>Gib Bogle wrote: >>I have a simple demo program (on Windows XP) that uses the ctypes module to load a DLL. >>This program works as expected with Python 2.5.4, but fails with Python 2.6.4 (on a different >> machine, each machine has only one Python version installed), with these messages: >>

Re: A simple-to-use sound file writer

2010-01-15 Thread Steven D'Aprano
On Fri, 15 Jan 2010 05:23:48 +0100, Alf P. Steinbach wrote: > You're again into innuendo, misleading statements and so forth. [...] > [Steve Holden] prefers to spout innuendu, personal attacks and > misleading statements. Your constant and repeated accusations that any questioning of you is deli