Re: Generating sin/square waves sound

2012-01-02 Thread Peter Billam
On 2012-01-02, Paulo da Silva  wrote:
> Em 30-12-2011 11:23, mblume escreveu:
>> Am Fri, 30 Dec 2011 07:17:13 + schrieb Paulo da Silva:
>> Alternatively you might just generate (t,signal) samples, write
>> them to a file and convert them using "sox" (under Linux, might
>> also be available under Windows) to another format.

That's how I'd do it.
 
Sox can cope with raw samples, provided you tell it stuff like
the sample-rate, sample-size, channels etc.  E.g. from "man sox"
  sox -r 16k -e signed -b 8 -c 1 voice-memo.raw voice-memo.wav
(Once it's in wav form the wav header contains that information.)

> As much as I could understand at a 1st look you are
> writing to a wav file and then play the file.
> It would be nice if I could play directly the samples.

"-d" as an output-file means the "default" output,
which means it plays to your sound card. E.g.:

  sox -r 48k -e float -b 32 -c 2 input.raw -d

The input file can be "-" so you can pipe directly to it:

  sox -r 44100 -e float -b 32 -c 2 - -d

It should also run under windows and macos, and can generate lots
of formats, see "man soxformat".  It also has a "synth" effect
which can generate simple waveforms easily. Sox is useful.

Regards,  Peter

-- 
Peter Billamwww.pjb.com.auwww.pjb.com.au/comp/contact.html
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: .format vs. %

2012-01-02 Thread Terry Reedy

On 1/1/2012 4:11 PM, Miki Tebeka wrote:

s = "{0} {1} {2} {3}"
s.format(1, 2, 3, 4)

'1 2 3 4'

Or even
 In [4]: fmt = '{0} {1} {2} {3}'.format
 In [5]: print(fmt(1, 2, 3, 4))
 1 2 3 4


I have done this, except for using a more informative name, like 'emsg' 
for error message.

  except XError as e:
print(emsg(a,b,c,e))
makes for pretty clear code.

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Felinx Lee
Hi guys,

I am the author of girlfriend module, a serious Python programmer.
This project is nothing about sexist or racism,
it is just a joke, a famous joke in China, please be cool down.

And now, I have removed money, car, house packages from PyPi,
and remove their dependences in girlfriend module, the website is also
updated.
The girlfriend module just depends on workhard module now.
I will remove girlfriend module forever if you still think it is a spam or
illegal.

I'm sorry for that I abused the PyPi, but I should say again that it is
nothing about sexist or racism as you assumption.

Felinx Lee


On 1/1/12 10:18 PM, Matt Chaput wrote:

> Someone seems to be spamming PyPI by uploading multiple stupid packages.
> Not sure if it's some form of advertising spam or just idiocy.
>
> Don't know if we should care though... maybe policing uploads is worse
> than cluttering PyPI's disk space and RSS feed with dumb 1 KB packages.
>
> girlfriend 1.0.110  A really simple module that allow everyone
>> to do "import girlfriend"
>> girlfriends 1.0 4   Girl Friends
>> car 1.0 2   Car, a depended simple module that allow everyone to do
>> "import girlfriend"
>> house 1.0   2   House, a depended simple module that allow
>> everyone to do "import girlfriend"
>> money 1.0   2   Money, a depended simple module that allow
>> everyone to do "import girlfriend"
>> workhard 1.02   Keep working hard, a depended simple module that
>> allow everyone to do "import girlfriend"
>>
>
I'm betting on a joke, like antigravity only significantly less funny and
more sexist. The author is a legitimate Python programmer, and the links go
to his blog where he talks about Python stuff.

 https://bitbucket.org/felinx

You can tell him that you don't appreciate his abuse of PyPI here if you
like:

 
http://feilong.me/2012/01/**python-import-girlfriend

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it
had
 an underlying truth."
 -- Umberto Eco

-- 
What can change the nature of a man?(Planescape Torment)

http://feilong.meFelinx Lee's Blog (Chinese Only)
http://www.zhimaq.com IT Q&A (Chinese Only)
http://poweredsites.org  What powered your sites? PHP, Ruby or Python?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can't write to a directory made w/ os.makedirs

2012-01-02 Thread Tim Golden

On 02/01/2012 03:14, David Goldsmith wrote:

Here's my script, in case that helps:


It certainly does. A few things occur to me.

First, you
shouldn't need to double-quote the path; the subprocess.call
should do that for you as long as you're using the list
version of the param -- which you are.

Second, you almost certainly don't want to be using the
env param, at least not in the way you are. Depending on
the way in which your app runs, either pass the appropriate
directory as the cwd= param, or copy and override the
current environ dict, ie either do this:

subprocess.call (
  ['c:/program files/somewhere/app.exe', 'blah1', 'blah2'],
  cwd="c:/somewhere/else"
)

or this:

env = dict (os.environ)
env['PATH'] = "c:/somewhere/else"
# or env['PATH'] += ";c:/somewhere/else"
subprocess.call (
  ['c:/program files/somewhere/app.exe', 'blah1', 'blah2'],
  env=env
)


See if any of that helps

TJG
--
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Kai Diefenbach

Hi,

On 2012-01-02 11:03:25 +, Felinx Lee said:


I am the author of girlfriend module, a serious Python programmer.
This project is nothing about sexist or racism, 
it is just a joke, a famous joke in China, please be cool down.


Yeah, quite funny. Why not put this on an own web server?


And now, I have removed money, car, house packages from PyPi, 
and remove their dependences in girlfriend module, the website is also updated.
The girlfriend module just depends on workhard module now.
I will remove girlfriend module forever if you still think it is a spam 
or illegal.


I think it's fucking spam. Please remove this crap.

kthxbye
Kai


--
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Chris Withers

On 02/01/2012 11:03, Felinx Lee wrote:

The girlfriend module just depends on workhard module now.
I will remove girlfriend module forever if you still think it is a spam
or illegal.


What is the point of these packages? Why do they exist?

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Felinx Lee
I have removed those packages (girlfriend and others) from PyPI forever, I
apologize for that.

-- 
Felinx Lee
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Peter Otten
Felinx Lee wrote:

> I have removed those packages (girlfriend and others) from PyPI forever, I
> apologize for that.

The thought police has won :(


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Felinx Lee
Hi,

On 2012-01-02 11:03:25 +, Felinx Lee said:

> I am the author of girlfriend module, a serious Python programmer.
> This project is nothing about sexist or racism,
> it is just a joke, a famous joke in China, please be cool down.

Yeah, quite funny. Why not put this on an own web server?

> And now, I have removed money, car, house packages from PyPi,
> and remove their dependences in girlfriend module, the website is also
updated.
> The girlfriend module just depends on workhard module now.
> I will remove girlfriend module forever if you still think it is a spam
> or illegal.

I think it's fucking spam. Please remove this crap.

OK, Removed.
I apologize again.

kthxbye
Kai
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread David Monaghan
On Mon, 2 Jan 2012 02:52:06 -0500, Devin Jeanpierre 
wrote:

>> Perhaps I'm just slow, but what is sexist about this package? Do you even
>> know what the package does?
>
>The dependencies are "car", "house", and "money" (and "workhard", of
>course). The joke being that women only care about how wealthy you
>are.

That's not a joke, it's a stereotype - and a stereotype with a biological
truth in it.

DaveM
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Chris Angelico
On Mon, Jan 2, 2012 at 11:20 PM, Peter Otten <__pete...@web.de> wrote:
> Felinx Lee wrote:
>
>> I have removed those packages (girlfriend and others) from PyPI forever, I
>> apologize for that.
>
> The thought police has won :(

There's nothing wrong with cracking jokes, but sometimes a large
central repository is the wrong place for them. If I made a joke
package whose name happened to be very similar to some other package,
then no matter how funny and non-offensive the joke is, it would be a
poor submission to PyPI. But that's not "thought police"; there are
plenty of other avenues for publication. Felinx Lee still has the
freedom to think his joke, to write his joke in code, and to share his
joke with others - but other people have the freedom to get offended
when it's published in places that they think are racist, or whatever
it was. (I never did follow how sexism is somehow a subset of racism,
to be honest. Are women a different race from nerds?)

Chris Angelico
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Νικόλαος Κούρας
On 23 Δεκ 2011, 19:14, Νικόλαος Κούρας  wrote:
> On 23 Äåê, 12:41, becky_lewis  wrote:
>
> > Is there any possibility that you can tell us what the script actually
> > is or provide a code listing (use pastebin if it's big)?
>
> The script is about retrieving and storing the visitros hostnames to
> mysql database creating a log file.
>
> I dont know why this line host =
> socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] fails sometimes
> and some other times works ok retrieving the hostnames correctly.
>
> What do you understand from the traceback?!

Please i need some help. My webpage doesn't work due to this error...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Heiko Wundram

Am 02.01.2012 14:25, schrieb Νικόλαος Κούρας:

On 23 Δεκ 2011, 19:14, Νικόλαος Κούρας  wrote:

I dont know why this line host =
socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] fails sometimes
and some other times works ok retrieving the hostnames correctly.


Please i need some help. My webpage doesn't work due to this error...


The error "herror: (1, ...)" says it all: the DNS-name (i.e., the 
.in-addr.arpa name) you're trying to resolve is unknown. Not 
all hosts (or rather, IPs) on the internet have reverse lookups: try the 
IP 81.14.209.35 from which I'm posting, and dig/nslookup will tell you 
that it has no reverse resolution, which would result in gethostbyaddr() 
throwing an herror-instance.


Basically: make the reverse lookup conditional by wrapping it in a 
try:/except herror: and assigning an appropriate default for host in 
case reverse lookup fails.


--
--- Heiko.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Can't write to a directory made w/ os.makedirs

2012-01-02 Thread Dave Angel

On 01/01/2012 10:14 PM, David Goldsmith wrote:

On Jan 1, 7:05 am, Tim Golden  wrote:

On 01/01/2012 12:05, David Goldsmith wrote:
  >>  ie can the Python process creating the directories,
  >
  >  Yes.
  >
  >>  and a subprocess called from it create a simple file?
  >
  >  No.
  >
  >>  Depending on where you are in the filesystem, it may indeed
  >>  be necessary to be running as administrator. But don't try
  >>  to crack every security nut with an elevated sledgehammer.
  >
  >  If you mean running as admin., those were my sentiments exactly.  So,
  >  there isn't something specific I should be doing to assure that my
  >  subproceses can write to directories?

In the general case, no. By default, a subprocess will have
the same security context as its parent. The exception is
where the parent (the Python processing invoking subprocess.call
in this example) is already impersonating a different user;
in that case, the subprocess will inherit its grandparent's
context.

But unless you're doing something very deliberate here then
I doubt if that's biting you.

Can I ask: are you absolutely certain that the processes
you're calling are doing what you think they are and failing
where you think they're failing?

TJG

I'm a mathematician: the only thing I'm absolutely certain of is
nothing.

Here's my script, in case that helps:

import os
import sys
import stat
import os.path as op
import subprocess as sub
from os import remove
from os import listdir as ls
from os import makedirs as mkdir

def doFlac2Mp3(arg, d, fl):
 if '.flac' in [f[-5:] for f in fl]:
 newD = d.replace('FLACS', 'MP3s')
 mkdir(newD)
 for f in fl:
 if f[-5:]=='.flac':
 root = f.replace('.flac', '')
 cmd = ['"C:\\Program Files (x86)\\aTunes\\win_tools\
\flac.exe" -d ' +
'--output-prefix=' + newD + '\\', f]
 res = sub.call(cmd)#, env={'PATH': os.defpath})
 if not res:
 cmd = ['"C:\\Program Files (x86)\\aTunes\\win_tools
\\lame.exe" -h',
 newD + root + '.wav',  newD + root +
'.mp3']
 res = sub.call(cmd)#, env={'PATH': os.defpath})
 if not res:
 rf = newD + root + '.wav'
 remove(rf)

top=sys.argv[1]
op.walk(top, doFlac2Mp3, None)
The line cmd= is bogus.  You're trying to run a program with a -h after 
the filename.  The reason you're passing a list to sub.call is to 
separate the parameters from the program name, not to mention with 
quotes in its name.  So the -h has to be  a separate list item.  
(Although Windows will probably handle it correctly if you combine the 
-h with the FOLLOWING argument, it's still bad practice]


cmd = [ "c:\\program files  \\lame.exe", "-h", newD + root + ."



--

DaveA

--
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Νικόλαος Κούρας
On 2 Ιαν, 16:00, Heiko Wundram  wrote:
> Am 02.01.2012 14:25, schrieb Νικόλαος Κούρας:
>
> > On 23 Δεκ 2011, 19:14, Νικόλαος Κούρας  wrote:
> >> I dont know why this line host =
> >> socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] fails sometimes
> >> and some other times works ok retrieving the hostnames correctly.
>
> > Please i need some help. My webpage doesn't work due to this error...
>
> The error "herror: (1, ...)" says it all: the DNS-name (i.e., the
> .in-addr.arpa name) you're trying to resolve is unknown. Not
> all hosts (or rather, IPs) on the internet have reverse lookups: try the
> IP 81.14.209.35 from which I'm posting, and dig/nslookup will tell you
> that it has no reverse resolution, which would result in gethostbyaddr()
> throwing an herror-instance.

I see

> Basically: make the reverse lookup conditional by wrapping it in a
> try:/except herror: and assigning an appropriate default for host in
> case reverse lookup fails.

Can tou show me how to write this please?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Roy Smith
In article 
<6b787f23-5813-4831-a349-02883f564...@q7g2000yqn.googlegroups.com>,
 ÉΪɫɻόλαος Κούρας  wrote:

> On 2 ÉßÉΩÉΥ, 16:00, Heiko Wundram  wrote:
> > Am 02.01.2012 14:25, schrieb ÉΪɫɻόλαος Κούρας:
> >
> > > On 23 Δεκ 2011, 19:14, Νικόλαος 
> > > Κούρας  wrote:
> > >> I dont know why this line host =
> > >> socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] fails sometimes
> > >> and some other times works ok retrieving the hostnames correctly.
> >
> > > Please i need some help. My webpage doesn't work due to this error...
> >
> > The error "herror: (1, ...)" says it all: the DNS-name (i.e., the
> > .in-addr.arpa name) you're trying to resolve is unknown. Not
> > all hosts (or rather, IPs) on the internet have reverse lookups: try the
> > IP 81.14.209.35 from which I'm posting, and dig/nslookup will tell you
> > that it has no reverse resolution, which would result in gethostbyaddr()
> > throwing an herror-instance.
> 
> I see
> 
> > Basically: make the reverse lookup conditional by wrapping it in a
> > try:/except herror: and assigning an appropriate default for host in
> > case reverse lookup fails.
> 
> Can tou show me how to write this please?

try:
   host =  socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
except socket.herror:
   host = ""
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Thomas Rachel

Am 22.12.2011 15:40 schrieb Νικόλαος Κούρας:

Hello when i try to visit my webpage i get the error it displays. Iam
not posting it since you can see it by visiting my webpage at
http://superhost.gr

Please if you can tell me what might be wrong.


What is wrong on this site? Mainly the unwanted sound.

Are you trying to sell something? Then you should try not to scare your 
potential customers away.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Python education survey

2012-01-02 Thread Grant Edwards
On 2012-01-01, Alexander Kapps  wrote:
> On 01.01.2012 03:36, Grant Edwards wrote:
>> On 2011-12-31, Alexander Kapps  wrote:
>>> On 31.12.2011 19:23, Roy Smith wrote:
>>>
>> Why do I waste my time reading your pretentious self-important nonsense?
>
> http://xkcd.com/386/
>
> ;)

 Why ROFLMAO when double-plus funny works just as well?
>>>
>>> xkcd/386 has been the excuse for replying to RR for ages and I still
>>> don't understand why he gets that much advertence. Charity? Sympathy
>>> for the lone and broken?
>>
>> Sadly, RR's post are often (in the supposed words of Wolfgang Pauli)
>> "not even wrong".
>
> I'm sure, RR is now jumping up high in rapture for being compared to 
> high-profile scientist geniuses.

I'm not comparing RR to Pauli.  I'm quoting somethin Pauli said when
criticising something that was so confusing and ill conceived that "it
wasn't even wrong".

-- 
Grant

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Generating sin/square waves sound

2012-01-02 Thread Dave Angel

On 01/02/2012 02:24 AM, Paulo da Silva wrote:

Em 30-12-2011 10:05, Dave Angel escreveu:

On 12/30/2011 02:17 AM, Paulo da Silva wrote:

Hi,
Sorry if this is a FAQ, but I have googled and didn't find any
satisfatory answer.

Is there a simple way, preferably multiplataform (or linux), of
generating sinusoidal/square waves sound in python?

Thanks for any answers/suggestions.

If you're willing to be Linux-only, then I believe you can do it without
any extra libraries.

You build up a string (8 bit char, on Python 2.x)  of samples, and write
it to  "/dev/audio".  When i experimented, I was only interested in a
few seconds, so a single write was all I needed.

Note that the samples are 8 bits, and they are offset by 128.  So a zero
signal would be a string of 128 values.  A very quiet square wave might
be a bunch of 126, followed by a bunch of 130.  and so on.  And the
loudest might be a bunch of 2's followed by a bunch of 253's.

You'll have to experiment with data rate;   The data is sent out at a
constant rate from your string, but I don't know what that rate is.



This sounds nice, but then is 8 bits the limit for /dev/audio? What
about stereo? I don't need this one ... just for curiosity.
Thanks.
I don't even remember where I got the information, but it sufficed for 
my needs.  I wanted to be able to generate arbitrary tones at a high 
volume, bypassing any volume control system settings.  I assume there's 
some way (ioctl ?) to tell the device to interpret differently.  It's 
even possible that it's already stereo (left/right samples stored in 
adjacent 16bit locations -- it wouldn't change the effect I hear, except 
for the frequency being cut in half.


Interesting link from1991, it's from Guido, but doesn't mention Python
http://wiretap.area.com/Gopher/Library/Techdoc/Misc/audiofor.faq
Also, a lot has changed since then.

Now I wonder whether I should be sending u-law values, rather than 
linear ones.  I'm generating sine waves, and they don't really sound 
flutelike.


This link probably has all our answers.
http://www.faqs.org/docs/Linux-HOWTO/Sound-HOWTO.html

I suspect that my approach will simply use the latest setup values (eg. 
sampling rate) and thus runs the risk of sometimes not working.  That 
hasn't been my experience,  The only problem I see is that sometimes the 
device is "busy".  When that happens, other programs don't seem to work 
either.  I need to find the rogue process which is hogging the device, 
using fuser.


--

DaveA

--
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Lie Ryan

On 01/02/2012 11:20 PM, Peter Otten wrote:

Felinx Lee wrote:


I have removed those packages (girlfriend and others) from PyPI forever, I
apologize for that.


The thought police has won :(


I think the community has a right to defend themselves against trolls. 
If it's just bad naming, we can probably just laugh it off; but when a 
failed joke spans a half dozen module and just opens a browser to his 
website, there is no value for it to stay at PyPI. Additionally, it may 
fuel copycats: http://pypi.python.org/pypi/kimwoohyeon1/1.3.0 (do anyone 
have any idea who submitted that one?)


--
http://mail.python.org/mailman/listinfo/python-list


Re: Generating sin/square waves sound

2012-01-02 Thread Paulo da Silva
Em 30-12-2011 07:17, Paulo da Silva escreveu:
> Hi,
> Sorry if this is a FAQ, but I have googled and didn't find any
> satisfatory answer.
> 
> Is there a simple way, preferably multiplataform (or linux), of
> generating sinusoidal/square waves sound in python?
> 
> Thanks for any answers/suggestions.

Thank you very much to all who responded.
There is enough material here to spend some time searching for the best
solution for me.
In the meanwhile I also found http://www.speech.kth.se/snack.
May be it could also be useful.

Thank you.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: InvalidResponseError: headers must be str

2012-01-02 Thread Waldek M.
On Sat, 31 Dec 2011 17:40:15 -0800 (PST), Niklas Rosencrantz wrote:
> Thanks for the replies here. I will have patience but this bug
> is blocking my integration efforts. I tried logging the TCP
> packets with tcpdump and nothing special appeared.

Well, it's free software, isn't it?
You may either wait a little, fix it yourself or pay someone 
to fix it for you, if you're in a hurry. Or stay with 2.5 / try upgrading
to 3.x.

The Python community is usually very helpful and friendly, but
by *demanding& a fix ASAP you may accidentily step on people's toes :-)

Best regards,
Waldek
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Νικόλαος Κούρας
On 2 Ιαν, 17:49, Thomas Rachel  wrote:
> Am 22.12.2011 15:40 schrieb Νικόλαος Κούρας:
>
> > Hello when i try to visit my webpage i get the error it displays. Iam
> > not posting it since you can see it by visiting my webpage at
> >http://superhost.gr
>
> > Please if you can tell me what might be wrong.
>
> What is wrong on this site? Mainly the unwanted sound.
>
> Are you trying to sell something? Then you should try not to scare your
> potential customers away.

I'am trying to present myself through my webpage as computer tech.
Is the background music so bad?! :-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Νικόλαος Κούρας
On 2 Ιαν, 17:47, Roy Smith  wrote:
> In article
> <6b787f23-5813-4831-a349-02883f564...@q7g2000yqn.googlegroups.com>,
>  ÉΪɫɻόλαος Κούρας  wrote:
>
>
>
>
>
>
>
>
>
> > On 2 ÉßÉΩÉΥ, 16:00, Heiko Wundram  wrote:
> > > Am 02.01.2012 14:25, schrieb ÉΪɫɻόλαος Κούρας:
>
> > > > On 23 Δεκ 2011, 19:14, Νικόλαος Κούρας  wrote:
> > > >> I dont know why this line host =
> > > >> socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] fails sometimes
> > > >> and some other times works ok retrieving the hostnames correctly.
>
> > > > Please i need some help. My webpage doesn't work due to this error...
>
> > > The error "herror: (1, ...)" says it all: the DNS-name (i.e., the
> > > .in-addr.arpa name) you're trying to resolve is unknown. Not
> > > all hosts (or rather, IPs) on the internet have reverse lookups: try the
> > > IP 81.14.209.35 from which I'm posting, and dig/nslookup will tell you
> > > that it has no reverse resolution, which would result in gethostbyaddr()
> > > throwing an herror-instance.
>
> > I see
>
> > > Basically: make the reverse lookup conditional by wrapping it in a
> > > try:/except herror: and assigning an appropriate default for host in
> > > case reverse lookup fails.
>
> > Can tou show me how to write this please?
>
> try:
>    host =  socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
> except socket.herror:
>    host = ""

Thank you very much.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Roy Smith
In article 
,
 ÉΪɫɻόλαος Κούρας  wrote:

> I'am trying to present myself through my webpage as computer tech.
> Is the background music so bad?! :-)

Yes.  Background music on web sites is evil.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: readline for mac python? (really, reproducing mac python packages)

2012-01-02 Thread K Richard Pixley

On 1/1/12 19:04 , K Richard Pixley wrote:

On 1/1/12 16:49 , K Richard Pixley wrote:

I'm having trouble finding a reasonable python environment on mac.

The supplied binaries, (2.7.2, 3.2.2), are built with old versions of
macosx and are not capable of building any third party packages that
require gcc.

The source builds easily enough out of the box, (./configure
--enable-framework && make && sudo make install), but when I do that, I
end up with a python interpreter that lacks readline.

How do I get readline involved?

Or better... is there an instruction sheet somewhere on how to reproduce
the python.org binary packages?

--rich


Bah. I just needed to dig a little deeper into the source. All the doc I
wanted is in there.


Well, partial victory.  2.7.2 builds.  3.2 doesn't.

--rich
--
http://mail.python.org/mailman/listinfo/python-list


Python3 on MacOsX Lion?

2012-01-02 Thread K Richard Pixley
Where would I look to find the current expected status of python3 on 
MacOsX Lion?


The distributed binaries aren't capable of allowing extensions that use gcc.

I can build the source naked, but then it lacks some libraries, notably, 
readline.


Attempting to build the full Mac packages fails, even with the few tiny 
patches I used for 2.7.2.


Is anyone working on this?  Are there pre-release patches available?

Should I be asking elsewhere?

--rich
--
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Ben Finney
Peter Otten <__pete...@web.de> writes:

> Felinx Lee wrote:
>
> > I have removed those packages (girlfriend and others) from PyPI
> > forever, I apologize for that.
>
> The thought police has won :(

Nonsense. Felinx is free to make sexist jokes, and others are free to
howl him down when he does so. PyPI has no obligation to be a platform
to amplify anyone's prejudice.

-- 
 \ “I have never imputed to Nature a purpose or a goal, or |
  `\anything that could be understood as anthropomorphic.” —Albert |
_o__)Einstein, unsent letter, 1955 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Νικόλαος Κούρας
On 2 Ιαν, 20:42, Roy Smith  wrote:
> In article
> ,
>  ÉΪɫɻόλαος Κούρας  wrote:
>
> > I'am trying to present myself through my webpage as computer tech.
> > Is the background music so bad?! :-)
>
> Yes.  Background music on web sites is evil.

Evil?!?! How come? :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Νικόλαος Κούρας
On 2 Ιαν, 20:42, Roy Smith  wrote:
> In article
> ,
>  ÉΪɫɻόλαος Κούρας  wrote:
>
> > I'am trying to present myself through my webpage as computer tech.
> > Is the background music so bad?! :-)
>
> Yes.  Background music on web sites is evil.

Evil?!?! How come? :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Roy Smith
In article 
<24123dfe-b2fc-4f4c-8dfe-23bfef19b...@m10g2000vbc.googlegroups.com>,
 ÉΪɫɻόλαος Κούρας  wrote:

> On 2 ÉßÉΩÉΥ, 20:42, Roy Smith  wrote:
> > In article
> > ,
> > †ÉΪɫɻόλαος Κούρας  wrote:
> >
> > > I'am trying to present myself through my webpage as computer tech.
> > > Is the background music so bad?! :-)
> >
> > Yes.  Background music on web sites is evil.
> 
> Evil?!?! How come? :)

Because people hate going to web sites and having background music start 
to play.  But, there are better fora than here for discussions of web 
site best practices.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Devin Jeanpierre
> Nonsense. Felinx is free to make sexist jokes, and others are free to
> howl him down when he does so. PyPI has no obligation to be a platform
> to amplify anyone's prejudice.

A module named "girlfriend" won't amplify anyone's prejudice. It is,
at that point, just a joke. The punchline is "import girlfriend", and
the joke makes fun of geeky losers, not women.

But, hey, inertia. As long as we're trying to make this dude get rid
of the offensive part, might as well get rid of the rest too. Why not
make him get rid of everything he's written, too? Woo, party time!

-- Devin

On Mon, Jan 2, 2012 at 2:45 PM, Ben Finney  wrote:
> Peter Otten <__pete...@web.de> writes:
>
>> Felinx Lee wrote:
>>
>> > I have removed those packages (girlfriend and others) from PyPI
>> > forever, I apologize for that.
>>
>> The thought police has won :(
>
> Nonsense. Felinx is free to make sexist jokes, and others are free to
> howl him down when he does so. PyPI has no obligation to be a platform
> to amplify anyone's prejudice.
>
> --
>  \             “I have never imputed to Nature a purpose or a goal, or |
>  `\    anything that could be understood as anthropomorphic.” —Albert |
> _o__)                                    Einstein, unsent letter, 1955 |
> Ben Finney
> --
> http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python3 on MacOsX Lion?

2012-01-02 Thread Benjamin Kaplan
On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley  wrote:
> Where would I look to find the current expected status of python3 on MacOsX
> Lion?
>
> The distributed binaries aren't capable of allowing extensions that use gcc.
>
> I can build the source naked, but then it lacks some libraries, notably,
> readline.
>
> Attempting to build the full Mac packages fails, even with the few tiny
> patches I used for 2.7.2.
>
> Is anyone working on this?  Are there pre-release patches available?
>
> Should I be asking elsewhere?
>
> --rich
> --

Have you tried building through Macports?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python3 on MacOsX Lion?

2012-01-02 Thread K Richard Pixley

On 1/2/12 13:03 , Benjamin Kaplan wrote:

On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley  wrote:

Where would I look to find the current expected status of python3 on MacOsX
Lion?

The distributed binaries aren't capable of allowing extensions that use gcc.

I can build the source naked, but then it lacks some libraries, notably,
readline.

Attempting to build the full Mac packages fails, even with the few tiny
patches I used for 2.7.2.

Is anyone working on this?  Are there pre-release patches available?

Should I be asking elsewhere?

--rich
--


Have you tried building through Macports?


No, I haven't.  Macports scares me.  When I tried them, or fink, in the 
past, they rapidly polluted my boot disk and I didn't have any way to 
unpollute it other than reloading from scratch.


In freebsd, netbsd, or any of the linux distributions, I can trivially 
create a virtual machine in about 20 minutes, screw with it as I like, 
and toss it in seconds.  In modern linux, I can create a root file 
system with btrfs, snapshot, chroot to the snapshot and munge away. 
When I'm done, I can just toss the snapshot.  (Can do snapshots in 
vmware too).


If I screw up my boot drive in MacOsX, I'm in for hours of recovery time 
reloading from Time Machine.  While that's a lot better than it used to 
be now that Time Machine is available, (reloading can now be done 
largely unattended), it's not a price I'm willing to pay in order to 
attempt to use Macports.


--rich
--
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Ben Finney
Devin Jeanpierre  writes:

> > Nonsense. Felinx is free to make sexist jokes, and others are free
> > to howl him down when he does so. PyPI has no obligation to be a
> > platform to amplify anyone's prejudice.
>
> A module named "girlfriend" won't amplify anyone's prejudice. It is,
> at that point, just a joke.

I agree that it's a joke. It is a joke at the expense of women:
promoting the view that, like a car or a house (the other modules that
were part of the joke), a girlfriend is a possession to be acquired.

> The punchline is "import girlfriend"

Yes, exactly.

The next time someone asks why the ratio of women becoming programmers
is disproportionately low, please recall episodes where men here give
defenses of jokes that objectify women.

Instead, the more we marginalise sexism and reject normalising it
through sexist jokes, the safer this community can become for anyone of
any sex.

-- 
 \   “If trees could scream, would we be so cavalier about cutting |
  `\   them down? We might, if they screamed all the time, for no good |
_o__)reason.” —Jack Handey |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Robert Kern

On 1/2/12 8:56 PM, Devin Jeanpierre wrote:


But, hey, inertia. As long as we're trying to make this dude get rid
of the offensive part, might as well get rid of the rest too. Why not
make him get rid of everything he's written, too?


Because that's something that no one desires, nor is it the logical conclusion 
of anything that anyone has expressed here. Please don't invent strawmen.


--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

--
http://mail.python.org/mailman/listinfo/python-list


Re: .format vs. %

2012-01-02 Thread Ethan Furman

Andrew Berg wrote:

On 12/31/2011 12:19 PM, davidfx wrote:

Should we always be using .format() for formatting strings or %?

>>

%-style formatting will eventually go away, but
probably not for a long time.


%-style formatting isn't going away.

~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python3 on MacOsX Lion?

2012-01-02 Thread Tamer Higazi

Hi Rich!
Why don't you ask the maintainer who built the macport?!
Why don't you try to to figure out with "WHAT" kind of tools they have 
built the mac port and "WHERE" to get them either. And ask him also how 
to set the flags to build the 64bit edition.


Then you don't have to be afraid of any prebuild mac port editions. This 
is how I would do it.


Tamer


Am 02.01.2012 22:23, schrieb K Richard Pixley:

On 1/2/12 13:03 , Benjamin Kaplan wrote:

On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley  wrote:
Where would I look to find the current expected status of python3 on 
MacOsX

Lion?

The distributed binaries aren't capable of allowing extensions that 
use gcc.


I can build the source naked, but then it lacks some libraries, 
notably,

readline.

Attempting to build the full Mac packages fails, even with the few tiny
patches I used for 2.7.2.

Is anyone working on this?  Are there pre-release patches available?

Should I be asking elsewhere?

--rich
--


Have you tried building through Macports?


No, I haven't.  Macports scares me.  When I tried them, or fink, in 
the past, they rapidly polluted my boot disk and I didn't have any way 
to unpollute it other than reloading from scratch.


In freebsd, netbsd, or any of the linux distributions, I can trivially 
create a virtual machine in about 20 minutes, screw with it as I like, 
and toss it in seconds.  In modern linux, I can create a root file 
system with btrfs, snapshot, chroot to the snapshot and munge away. 
When I'm done, I can just toss the snapshot.  (Can do snapshots in 
vmware too).


If I screw up my boot drive in MacOsX, I'm in for hours of recovery 
time reloading from Time Machine.  While that's a lot better than it 
used to be now that Time Machine is available, (reloading can now be 
done largely unattended), it's not a price I'm willing to pay in order 
to attempt to use Macports.


--rich


--
http://mail.python.org/mailman/listinfo/python-list


Avoid race condition with Popen.send_signal

2012-01-02 Thread Jérôme
Hi all.

When a subprocess is running, it can be sent a signal with the send_signal
method :

process = Popen( args)
process.send_signal(signal.SIGINT)

If the SIGINT is sent while the process has already finished, an error is
raised : 

  File "/usr/lib/python2.7/subprocess.py", line 1457, in send_signal
os.kill(self.pid, sig)
OSError: [Errno 3] Aucun processus de ce type

To avoid this, I can check that the process is still alive :

process = Popen( args)
process.poll()
if (None == process.returncode):
process.send_signal(signal.SIGINT)

It makes safer, but there is still an issue if the process ends between
poll() and send_signal().

What is the clean way to avoid this race condition ?

Should I use try/except to catch the error or is there a more elegant way to
go ?

Thanks.

-- 
Jérôme
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Avoid race condition with Popen.send_signal

2012-01-02 Thread MRAB

On 02/01/2012 23:09, Jérôme wrote:

Hi all.

When a subprocess is running, it can be sent a signal with the send_signal
method :

process = Popen( args)
process.send_signal(signal.SIGINT)

If the SIGINT is sent while the process has already finished, an error is
raised :

   File "/usr/lib/python2.7/subprocess.py", line 1457, in send_signal
 os.kill(self.pid, sig)
OSError: [Errno 3] Aucun processus de ce type

To avoid this, I can check that the process is still alive :

process = Popen( args)
process.poll()
if (None == process.returncode):
 process.send_signal(signal.SIGINT)

It makes safer, but there is still an issue if the process ends between
poll() and send_signal().

What is the clean way to avoid this race condition ?

Should I use try/except to catch the error or is there a more elegant way to
go ?


I think that catching the exception is probably the most Pythonic way.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Spamming PyPI with stupid packages

2012-01-02 Thread Devin Jeanpierre
> Because that's something that no one desires, nor is it the logical
> conclusion of anything that anyone has expressed here. Please don't invent
> strawmen.

You're right, sorry. I let myself say something dumb. I'll try not to
do it again.

-- Devin

On Mon, Jan 2, 2012 at 5:43 PM, Robert Kern  wrote:
> On 1/2/12 8:56 PM, Devin Jeanpierre wrote:
>
>> But, hey, inertia. As long as we're trying to make this dude get rid
>> of the offensive part, might as well get rid of the rest too. Why not
>> make him get rid of everything he's written, too?
>
>
> Because that's something that no one desires, nor is it the logical
> conclusion of anything that anyone has expressed here. Please don't invent
> strawmen.
>
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
>  that is made terrible by our own mad attempt to interpret it as though it
> had
>  an underlying truth."
>  -- Umberto Eco
>
> --
> http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Avoid race condition with Popen.send_signal

2012-01-02 Thread Adam Skutt
On Jan 2, 6:09 pm, Jérôme  wrote:
> Hi all.
>
> When a subprocess is running, it can be sent a signal with the send_signal
> method :
>
> process = Popen( args)
> process.send_signal(signal.SIGINT)
>
> If the SIGINT is sent while the process has already finished, an error is
> raised :
>
>   File "/usr/lib/python2.7/subprocess.py", line 1457, in send_signal
>     os.kill(self.pid, sig)
> OSError: [Errno 3] Aucun processus de ce type
>
> To avoid this, I can check that the process is still alive :
>
> process = Popen( args)
> process.poll()
> if (None == process.returncode):
>     process.send_signal(signal.SIGINT)
>
> It makes safer, but there is still an issue if the process ends between
> poll() and send_signal().
>
> What is the clean way to avoid this race condition ?

The fundamental race condition cannot be removed nor avoided. Ideally,
avoid the need to send the subprocess a signal in the first place.  If
it cannot be avoided, then trap the exception.

Adam
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Avoid race condition with Popen.send_signal

2012-01-02 Thread Devin Jeanpierre
> I think that catching the exception is probably the most Pythonic way.

It's the only correct way.

-- Devin

On Mon, Jan 2, 2012 at 6:51 PM, MRAB  wrote:
> On 02/01/2012 23:09, Jérôme wrote:
>>
>> Hi all.
>>
>> When a subprocess is running, it can be sent a signal with the send_signal
>> method :
>>
>> process = Popen( args)
>> process.send_signal(signal.SIGINT)
>>
>> If the SIGINT is sent while the process has already finished, an error is
>> raised :
>>
>>   File "/usr/lib/python2.7/subprocess.py", line 1457, in send_signal
>>     os.kill(self.pid, sig)
>> OSError: [Errno 3] Aucun processus de ce type
>>
>> To avoid this, I can check that the process is still alive :
>>
>> process = Popen( args)
>> process.poll()
>> if (None == process.returncode):
>>     process.send_signal(signal.SIGINT)
>>
>> It makes safer, but there is still an issue if the process ends between
>> poll() and send_signal().
>>
>> What is the clean way to avoid this race condition ?
>>
>> Should I use try/except to catch the error or is there a more elegant way
>> to
>> go ?
>>
> I think that catching the exception is probably the most Pythonic way.
> --
> http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Idiot-proof installs for python+pygame+pyopenal+app

2012-01-02 Thread alex23
On Jan 2, 1:58 pm, Tim Chase  wrote:
> I'm looking at developing some tools that involve pygame+pyopenal
> and would like to make cross-platform distribution as painless as
> possible.

Hey Tim,

I don't have an answer, sorry, just two suggestions:

1. Maybe PyInstaller could be useful: http://www.pyinstaller.org/
2. Also ask on the Pygame mailing list: http://pygame.org/wiki/info

Good luck!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Avoid race condition with Popen.send_signal

2012-01-02 Thread Cameron Simpson
On 02Jan2012 20:31, Devin Jeanpierre  wrote:
| > I think that catching the exception is probably the most Pythonic way.
| 
| It's the only correct way.

Indeed, but be precise - chek that it _is_ error 3, or more portably,
errno.ESRCH. POSIX probably mandates that that is a 3, but the symbol
should track the local system if it differs. Example:

  import errno
  ...
  try:
...signal...
  except OSError, e:
if e.errno == errno.ESRCH:
  pass  # or maybe an info log message
else:
  raise # something else wrong - raise exception anyway

Cheers,
-- 
Cameron Simpson  DoD#743
http://www.cskk.ezoshosting.com/cs/

WHAT"S A ""K3WL D00D"" AND WH3R3 CAN 1 G3T S0M3!!!
- Darren Embry
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: .format vs. %

2012-01-02 Thread Rick Johnson
On Jan 2, 4:00 pm, Ethan Furman  wrote:
> %-style formatting isn't going away.

You may want to freshen up on the definition of "deprecation". If it
was NOT going away, why the need to deprecate it? hmm? It would be
more beneficial if you DO NOT encourage continued usage of this "end-
of-life" feature.

   http://en.wikipedia.org/wiki/Deprecation
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: .format vs. %

2012-01-02 Thread Rick Johnson
On Dec 31 2011, 12:19 pm, davidfx  wrote:
> Hello everyone,
> I just have a quick question about .format and %r %s %d.
>
> Should we always be using .format() for formatting strings or %?

ALWAYS use the format method over the old and dumpy string
interpolation. Why? Well because the format method is so much more
powerful, elegant, and the way of the future. Some might argue that
format is slower than interpolation (and i can't comment in favor of
either) HOWEVER, if speed is your concern than interpolation is NOT
the answer.

> If I wanted to put .format into a variable, how would I do that.

That question has been answered many times in this thread already.

You may find the format spec to be cryptic at first. Well, most find
regexes cryptic also -- but would anyone recommend NOT using regexes
just because of crypti-ness? I think not. It's a non-starter.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python3 on MacOsX Lion?

2012-01-02 Thread Benjamin Kaplan
On Mon, Jan 2, 2012 at 6:03 PM, Tamer Higazi  wrote:
> Hi Rich!
> Why don't you ask the maintainer who built the macport?!
> Why don't you try to to figure out with "WHAT" kind of tools they have built
> the mac port and "WHERE" to get them either. And ask him also how to set the
> flags to build the 64bit edition.
>
> Then you don't have to be afraid of any prebuild mac port editions. This is
> how I would do it.
>
> Tamer
>

That's not quite how Macports works. Macports is a package manager.
Each package has a port file with (among other things)
1) A location to download the source tarball
2) A list of patches to apply
3) A list of dependencies
4) Sets of config arguments and build scripts for different variants

Richard, if something goes wrong with Macports, nuking /opt/local does
a pretty good job of cleaning it up. And even if you don't want to use
Macports, you can still grab their patches. They're all here:
http://trac.macports.org/browser/trunk/dports/lang/python32. You can
dig through the portfile to see what patches and config flags they're
using to build it.
>
> Am 02.01.2012 22:23, schrieb K Richard Pixley:
>>
>> On 1/2/12 13:03 , Benjamin Kaplan wrote:
>>>
>>> On Mon, Jan 2, 2012 at 2:32 PM, K Richard Pixley  wrote:

 Where would I look to find the current expected status of python3 on
 MacOsX
 Lion?

 The distributed binaries aren't capable of allowing extensions that use
 gcc.

 I can build the source naked, but then it lacks some libraries, notably,
 readline.

 Attempting to build the full Mac packages fails, even with the few tiny
 patches I used for 2.7.2.

 Is anyone working on this?  Are there pre-release patches available?

 Should I be asking elsewhere?

 --rich
 --
>>>
>>>
>>> Have you tried building through Macports?
>>
>>
>> No, I haven't.  Macports scares me.  When I tried them, or fink, in the
>> past, they rapidly polluted my boot disk and I didn't have any way to
>> unpollute it other than reloading from scratch.
>>
>> In freebsd, netbsd, or any of the linux distributions, I can trivially
>> create a virtual machine in about 20 minutes, screw with it as I like, and
>> toss it in seconds.  In modern linux, I can create a root file system with
>> btrfs, snapshot, chroot to the snapshot and munge away. When I'm done, I can
>> just toss the snapshot.  (Can do snapshots in vmware too).
>>
>> If I screw up my boot drive in MacOsX, I'm in for hours of recovery time
>> reloading from Time Machine.  While that's a lot better than it used to be
>> now that Time Machine is available, (reloading can now be done largely
>> unattended), it's not a price I'm willing to pay in order to attempt to use
>> Macports.
>>
>> --rich
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can't write to a directory made w/ os.makedirs

2012-01-02 Thread David Goldsmith
On Jan 2, 6:09 am, Dave Angel  wrote:
> On 01/01/2012 10:14 PM, David Goldsmith wrote:
>
>
>
>
>
>
>
> > On Jan 1, 7:05 am, Tim Golden  wrote:
> >> On 01/01/2012 12:05, David Goldsmith wrote:
> >>   >>  ie can the Python process creating the directories,
>
> >>   >  Yes.
>
> >>   >>  and a subprocess called from it create a simple file?
>
> >>   >  No.
>
> >>   >>  Depending on where you are in the filesystem, it may indeed
> >>   >>  be necessary to be running as administrator. But don't try
> >>   >>  to crack every security nut with an elevated sledgehammer.
>
> >>   >  If you mean running as admin., those were my sentiments exactly.  So,
> >>   >  there isn't something specific I should be doing to assure that my
> >>   >  subproceses can write to directories?
>
> >> In the general case, no. By default, a subprocess will have
> >> the same security context as its parent. The exception is
> >> where the parent (the Python processing invoking subprocess.call
> >> in this example) is already impersonating a different user;
> >> in that case, the subprocess will inherit its grandparent's
> >> context.
>
> >> But unless you're doing something very deliberate here then
> >> I doubt if that's biting you.
>
> >> Can I ask: are you absolutely certain that the processes
> >> you're calling are doing what you think they are and failing
> >> where you think they're failing?
>
> >> TJG
> > I'm a mathematician: the only thing I'm absolutely certain of is
> > nothing.
>
> > Here's my script, in case that helps:
>
> > import os
> > import sys
> > import stat
> > import os.path as op
> > import subprocess as sub
> > from os import remove
> > from os import listdir as ls
> > from os import makedirs as mkdir
>
> > def doFlac2Mp3(arg, d, fl):
> >      if '.flac' in [f[-5:] for f in fl]:
> >          newD = d.replace('FLACS', 'MP3s')
> >          mkdir(newD)
> >          for f in fl:
> >              if f[-5:]=='.flac':
> >                  root = f.replace('.flac', '')
> >                  cmd = ['"C:\\Program Files (x86)\\aTunes\\win_tools\
> > \flac.exe" -d ' +
> >                         '--output-prefix=' + newD + '\\', f]
> >                  res = sub.call(cmd)#, env={'PATH': os.defpath})
> >                  if not res:
> >                      cmd = ['"C:\\Program Files (x86)\\aTunes\\win_tools
> > \\lame.exe" -h',
> >                              newD + root + '.wav',  newD + root +
> > '.mp3']
> >                      res = sub.call(cmd)#, env={'PATH': os.defpath})
> >                      if not res:
> >                          rf = newD + root + '.wav'
> >                          remove(rf)
>
> > top=sys.argv[1]
> > op.walk(top, doFlac2Mp3, None)
>
> The line cmd= is bogus.  You're trying to run a program with a -h after
> the filename.  The reason you're passing a list to sub.call is to
> separate the parameters from the program name, not to mention with
> quotes in its name.  So the -h has to be  a separate list item.
> (Although Windows will probably handle it correctly if you combine the
> -h with the FOLLOWING argument, it's still bad practice]
>
> cmd = [ "c:\\program files  \\lame.exe", "-h", newD + root + ."
>
> --
>
> DaveA

Thanks, this is the kind of feedback I was hoping for--the
documentation for subprocess.call is notably "sparing" to put it
politely.  However, having not yet tried it, I'm skeptical, as what
doc there is says:

"subprocess.call(args, *, stdin=None, stdout=None, stderr=None,
shell=False)

Run the command described by args. Wait for command to complete,
then return the returncode attribute.

The arguments shown above are merely the most common ones,
described below in Frequently Used Arguments (hence the slightly odd
notation in the abbreviated signature). The full function signature is
the same as that of the Popen constructor - this functions passes all
supplied arguments directly through to that interface.
:
:
"class subprocess.Popen(args, bufsize=0, executable=None, stdin=None,
stdout=None, stderr=None, preexec_fn=None, close_fds=False,
shell=False, cwd=None, env=None, universal_newlines=False,
startupinfo=None, creationflags=0)

Arguments are:

args should be a string, or a sequence of program arguments...On
Windows: the Popen class uses CreateProcess() to execute the child
child program, which operates on strings. If args is a sequence, it
will be converted to a string in a manner described in Converting an
argument sequence to a string on Windows."  Thus I didn't really see
the point of separating out the -h string--which tells lame to use
high quality encoding--into another sequence element, but as per your
advice, I'll try it (along with Tim's and MRAB's suggestions; I'll
report back what works).
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2012-01-02 Thread alex23
On Dec 27 2011, 8:01 pm, Eelco  wrote:
> But I consider it a reasonable change for a
> 'python 4', or whatever the next major version change will be called.

You do realise there were 8 years between 2 & 3? You might be waiting
for quite some time.

Conversely, you could pitch in behind Rick Johnson's Python 4000 fork,
I sure it's progressing nicely given how long Rick has been talking it
up.

> Writing a code-conversion tool to convert from *args to args::tuple
> would be quite easy indeed.

You might want to ask people maintaining libraries in both 2.x & 3.x
via 2to3 just how well that's working out for them. If the impact of
changes was trivially obvious, the programming landscape would look
very different indeed.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Avoid race condition with Popen.send_signal

2012-01-02 Thread Adam Skutt
On Jan 2, 8:44 pm, Cameron Simpson  wrote:
> On 02Jan2012 20:31, Devin Jeanpierre  wrote:
> | > I think that catching the exception is probably the most Pythonic way.
> |
> | It's the only correct way.
>
> Indeed, but be precise - chek that it _is_ error 3, or more portably,
> errno.ESRCH. POSIX probably mandates that that is a 3, but the symbol
> should track the local system if it differs. Example:
>

No. It is possible (however unlikely) for EPERM to be legitimately
returned in this case.  Anything other than EINVAL should be
interpreted as "The child process is dead".  Hence why you should
avoid sending the signal in the first place: the situations where you
don't run the risk of possibly killing an innocent bystander are
pretty narrow.  While unlikely on modern UNiX and Linux, IMO it's best
to avoid the issue altogether whenever possible.

Adam
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: .format vs. %

2012-01-02 Thread Steven D'Aprano
On Mon, 02 Jan 2012 17:51:48 -0800, Rick Johnson wrote:

> You may find the format spec to be cryptic at first. Well, most find
> regexes cryptic also -- but would anyone recommend NOT using regexes
> just because of crypti-ness? I think not. It's a non-starter.

I would.

If you have a task that doesn't *need* a regular expression solution, 
don't use a regular expression.


For what it's worth, I like the syntax of % formatting. It's nice and 
simple and compact while still being readable. format() is more powerful, 
but when I don't need that power, I stick to % formatting.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: .format vs. %

2012-01-02 Thread Steven D'Aprano
On Mon, 02 Jan 2012 17:59:43 -0800, Rick Johnson wrote:

> On Jan 2, 4:00 pm, Ethan Furman  wrote:
>> %-style formatting isn't going away.
> 
> You may want to freshen up on the definition of "deprecation".

I'm sure Ethan knows the definition of deprecation. I'm sure he also 
knows that % formatting is NOT deprecated. Please stop spreading FUD 
about Python features.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Avoid race condition with Popen.send_signal

2012-01-02 Thread Cameron Simpson
On 02Jan2012 19:16, Adam Skutt  wrote:
| On Jan 2, 8:44 pm, Cameron Simpson  wrote:
| > On 02Jan2012 20:31, Devin Jeanpierre  wrote:
| > | > I think that catching the exception is probably the most Pythonic way.
| > |
| > | It's the only correct way.
| >
| > Indeed, but be precise - chek that it _is_ error 3, or more portably,
| > errno.ESRCH. POSIX probably mandates that that is a 3, but the symbol
| > should track the local system if it differs. Example:
| 
| No. It is possible (however unlikely) for EPERM to be legitimately
| returned in this case.  Anything other than EINVAL should be
| interpreted as "The child process is dead".

Sure. I was more taking the line: catch and accept only the specific
errors you understand. Of course he can catch EPERM also. But any other
variant should at the least generate a warning to stderr or a log -
it is _unexpected_.

I take your point that reraising the exception may be overkill for
failed signal delivery (if that was your point). But I am arguing for
being very careful about what you silently pass as an ok thing.

| Hence why you should
| avoid sending the signal in the first place: the situations where you
| don't run the risk of possibly killing an innocent bystander are
| pretty narrow.  While unlikely on modern UNiX and Linux, IMO it's best
| to avoid the issue altogether whenever possible.

Fair enough too. But sometimes you need to nail a rogue child.

Cheers,
-- 
Cameron Simpson  DoD#743
http://www.cskk.ezoshosting.com/cs/

Death is life's way of telling you you've been fired.   - R. Geis
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python3 on MacOsX Lion?

2012-01-02 Thread Ned Deily
In article ,
 K Richard Pixley  wrote:
> Where would I look to find the current expected status of python3 on 
> MacOsX Lion?
> 
> The distributed binaries aren't capable of allowing extensions that use gcc.
> 
> I can build the source naked, but then it lacks some libraries, notably, 
> readline.
> 
> Attempting to build the full Mac packages fails, even with the few tiny 
> patches I used for 2.7.2.
> 
> Is anyone working on this?  Are there pre-release patches available?

The short answer is: yes, it is being worked on but it has been taking 
longer than it should.

The 64-bit/32-bit installers from python.org for Python 2.7.x and Python 
3.2.x have been being built on 10.6 with gcc-4.2.  OSX 10.7 (Lion) was 
initially released with Xcode 4.1 which still included a version of 
gcc-4.2 similar to what has been available all along in 10.6 (Snow 
Leopard).  However, more recently, Apple has released Xcode 4.2 which 
finally removed gcc-4.2 and now only includes updated versions of 
llvm-gcc-4.2 (gcc front-end with an llvm code generator backend) and 
clang (clang front-end with an llvm backend).  Apple has made it clear 
that they want developers and other users to move eventually to clang 
and that llvm-gcc is an interim step towards the migration to clang. 
While there are other reasons for that move (like the change in gcc 
licensing), I believe Apple believes that clang will provide an 
all-around better build experience (better code, better checking, better 
diagnostics, more flexibility).  But, as with any major change to a 
build compiler and environment, lots of nitty and often knotty problems 
are to be expected.  (For an idea of the breadth of them, peruse the 
MacPorts project mailing lists for all the issues they've been 
discovering in the many open source packages they support since they've 
moved to using clang by default.)  Python is no exception.   There are 
already a couple of fixes that have been applied for upcoming Python 
releases to deal with either llvm-gcc or clang issues.

To further complicate things, prior to the release of Lion, Apple made a 
preliminary version of Xcode 4 available for Snow Leopard through the 
Mac App Store but appears to have removed it for new purchases after 
Lion was released although it seems that previous purchasers and paying 
members of the Mac Developer program can get updates for it.  So, now 
some 10.6 users also no longer have gcc-4.2, although they do have the 
supported option of reverting to the most recent Xcode 3 release for 
10.6 which is free and still available through the Apple Developer 
Connection website.

The PSF (via python.org) also supplies 32-bit-only installer variants 
for OS X 10.3+ which were great for building applications to run on 
multiple versions of OS X.  But since Xcode 4 doesn't ship the necessary 
SDK (10.4u) and gcc-4.0, that installer version is also problematic on 
10.7.  We need to be careful in developing any fixes that we don't 
inadvertently break anything for older OS X releases like 10.5.  So, 
it's all a bit of mess at the moment with *a lot* of variables.

I had hoped to complete a comprehensive set of tests of the most 
important combinations of build environments with the three current 
active branches of python development (2.7.x, 3.2.x, and the future 3.3) 
for 10.7, 10.6, as well as baselines on 10.5 and 10.4 several weeks ago 
but, unfortunately, other events intervened.  Such is the downside of 
all-volunteer projects.  But I will be working on completing this over 
the next couple of weeks and, after review by the other core developers, 
will summarize the known issues and suggested fixes on the python.org 
website (with pointers posted here).  I expect that we will then need to 
push maintenance releases of 2.7.x and 3.2.x.  In the meantime, the 
safest approach is to continue to build on OS X 10.6 with Xcode 3 
installed.

-- 
 Ned Deily,
 n...@acm.org

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python education survey

2012-01-02 Thread Rick Johnson
On Dec 31 2011, 11:12 pm, Dominic Binks  wrote:

> I doubt you could validate or invalidate a word.  A word is, there is no
> validation necessary.  You could potentially try to validate it's use
> but again that's not in your power.

Usage begets validation. By using words in a manner that is improper
we validate the continued existence of stupidity.

> I think you need to go back to school to understand what a dictionary
> is. (FYI, a dictionary codifies usage, not the other way around.)

So there are no standards by which a dictionary must meet? The sheeple
should just read and accept any garage that the dictionary writers
dictate? Sadly, a dictionary has the power to give legitimacy to a
word. When we expand the definitions of words like "pretty" and reduce
those definitions to the absurd AND then include those absurd
definitions in a "dictionary" NOW we have just given lunacy the
justification it so desires.

> Perhaps you mean, because more precise words or phrases for these uses
> exist?  By your token 'work' should refer to physical activity which is
> not appropriate in this context and probably 'fine' should refer to a
> payment that is made having broken some rule or regulation thus leading
> to monetary reparation.

Yes, i used the word "work" improperly here. Just another example of
the corrupting influence of garage verbiage. Thanks for bring this to
my attention!


> > Why would you use a word like "hard" (which describes the physical
> > properties of a tangible object),
>
> Because many words have more than one meaning and their context
> describes the meaning.  For example 'Time flies like an arrow, fruit
> flies like a banana'.  I know you can parse and understand that but the
> sentences are precisely alike, yet completely different.

And that is just my point: by adopting so many meanings of a word that
are dependent on context, we obfuscate our communication.

> rr said: """Supposed to ->  required|expected"""
>
> probably 'intended' would be better here since 'supposed to' indicates
> that you should do this, but it is not required (pretty much the
> opposite for your given translation).

Actually, no. Consider this sentence: "We are supposed to-->[required
to|expected] follow the law, but sometimes i just cannot get used to
it!"

> rr said: """ Use to ->  accustomed|acquainted"""
>
> Sorry to be picky, but "use to" refers to application as in "When I say
> 'idiot', in this context 'idiot' I use to mean 'person who cannot speak
> English as it is commonly used'."

Completely wrong! Consider this: "I USED TO wear a tutu however i just
never could get USE TO the ridicule from others"

> rr said:  """Right (OOC) ->  Correct"""
>
> While I agree 'right' can be annoying it's usage as in 'you are correct'
> can be traced back to 1588, I think we're going to have to allow for
> it's usage in 2011

So just because people have been using a word out of context we should
just continue? Why?

> rr said: """Hard (OOC) ->  Difficult"""
>
> Phrases to mean 'difficult' or 'tough' come from at least 1886 so again,
> it's use in this context is hardly new.

New or not, it's wrong!

> rr said: """Pretty (OOC) ->  very"""
>
> Pretty on it's own doesn't mean very at all.  (God knows where you got
> that idea from.) When combined with another adjective, such as hard,
> pretty does enhance the adjective.  However, pretty difficult is not the
> same as very difficult.  Pretty, in this context would probably be
> better defined as 'somewhat' or 'quite'.  (Oh and it's use in this
> context can be traced back to 1565.)

Pretty is by far the most ubiquitous use of a word in a manner that is
"out of context". If you don't believe me, grep this group for all the
occurrences of the word "pretty", and see if ANY instances of this
word are used to describe "the pleasurable physical attributes of a
tangible object". I would safely say that 99% are used out of
context. :-(

Why do people use pretty when we already have words that carry more
specific meaning? Because they are lazy! And laziness begets
stupidity.

Do any of you remember the Unicode thread from way back? If so, you
will remember all the well known trolls who ranted about "how the
words you use shape the way your brain processes information".
Choosing the easy way out is detrimental to your future evolution.
Stop propagating your stupidity memes and use your F'in brain for
once!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: readline for mac python? (really, reproducing mac python packages)

2012-01-02 Thread Ned Deily
In article ,
 K Richard Pixley  wrote:
> On 1/1/12 19:04 , K Richard Pixley wrote:
> > On 1/1/12 16:49 , K Richard Pixley wrote:
> >> I'm having trouble finding a reasonable python environment on mac.
> >>
> >> The supplied binaries, (2.7.2, 3.2.2), are built with old versions of
> >> macosx and are not capable of building any third party packages that
> >> require gcc.
> >>
> >> The source builds easily enough out of the box, (./configure
> >> --enable-framework && make && sudo make install), but when I do that, I
> >> end up with a python interpreter that lacks readline.
> >>
> >> How do I get readline involved?
> >>
> >> Or better... is there an instruction sheet somewhere on how to reproduce
> >> the python.org binary packages?
> >>
> >> --rich
> >
> > Bah. I just needed to dig a little deeper into the source. All the doc I
> > wanted is in there.
> 
> Well, partial victory.  2.7.2 builds.  3.2 doesn't.

As you may have discovered, by default the python.org Python 2.7.x and 
3.2.x on OS X 10.6 and above will link with the readline compatibility 
layer supplied with BSD editline (libedit) shipped by Apple.  The 
Apple-suppled system Pythons also link with editline.  While it is 
possible to link with your own version of GNU readline, there is also a 
readline project listed on PyPI that supplies pre-compiled versions of 
the Python readline module linked with GNU readline.  I believe they are 
intended primarily for the system Pythons; I have not tried them myself 
with the python.org versions.

http://pypi.python.org/pypi/readline

-- 
 Ned Deily,
 n...@acm.org

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python3 on MacOsX Lion?

2012-01-02 Thread Ned Deily
In article ,
 K Richard Pixley  wrote:
> On 1/2/12 13:03 , Benjamin Kaplan wrote:
[...]
> > Have you tried building through Macports?
> No, I haven't.  Macports scares me.  When I tried them, or fink, in the 
> past, they rapidly polluted my boot disk and I didn't have any way to 
> unpollute it other than reloading from scratch.
> 
> In freebsd, netbsd, or any of the linux distributions, I can trivially 
> create a virtual machine in about 20 minutes, screw with it as I like, 
> and toss it in seconds.  In modern linux, I can create a root file 
> system with btrfs, snapshot, chroot to the snapshot and munge away. 
> When I'm done, I can just toss the snapshot.  (Can do snapshots in 
> vmware too).
> 
> If I screw up my boot drive in MacOsX, I'm in for hours of recovery time 
> reloading from Time Machine.  While that's a lot better than it used to 
> be now that Time Machine is available, (reloading can now be done 
> largely unattended), it's not a price I'm willing to pay in order to 
> attempt to use Macports.

Whether you use a third-party package manager like MacPorts or Fink is a 
personal decision, of course, and there pros or cons for using either.  
But both MacPorts and Fink are specifically designed *not* to pollute 
your existing system.  They both go to great lengths to install 
everything under their own unique directory subtrees, by default, 
/opt/local for MacPorts and /sw for Fink.  I don't have much recent 
experience with Fink but I do with MacPorts.  Other than a very few and 
documented exceptions, *everything* that MacPorts installs is under that 
/opt/local prefix and there are no conflicts with any Apple-installed 
files so it is really quite trivial to install and remove without fear 
of corrupting your base system.  The whole process is documented here:

http://guide.macports.org/chunked/installing.macports.uninstalling.html

-- 
 Ned Deily,
 n...@acm.org

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2012-01-02 Thread Rick Johnson
On Jan 2, 8:38 pm, alex23  wrote:

> Conversely, you could pitch in behind Rick Johnson's Python 4000 fork,
> I sure it's progressing nicely given how long Rick has been talking it
> up.

It's NOT a fork Alex. It IS in fact the next logical step in Python's
future evolution.
-- 
http://mail.python.org/mailman/listinfo/python-list


Setting an environment variable.

2012-01-02 Thread Ashton Fagg

Hi list.

A bit new to Python so please forgive my potential ignorance.

I'm working with an embedded machine, which is using a Python script to 
oversee the acquisition of some data. The supervisor script, which is 
run by crontab every 5 minutes, relies on an environment variable to be 
set. I've tried to set the environment variable inside crontab, however 
this doesn't work when the script runs.


Is there a nice way to do this inside the supervisor script itself? 
Would an os.system("export foo=/bar/foo/bar") at the very beginning of 
the script do what I want? I would just like to check before I make 
changes, as being an embedded machine it's a bit of a pain to update 
things like this...(read only file system)


Note: This is for Python 2.4. I have no ability to update to anything 
newer as this is what our codebase relies upon.


Thanks and regards,
Ashton.

--
Ashton Fagg (ash...@fagg.id.au)
Web: http://www.fagg.id.au/~ashton/

Keep calm and call Batman.
--
http://mail.python.org/mailman/listinfo/python-list


Re: .format vs. %

2012-01-02 Thread Ian Kelly
On Mon, Jan 2, 2012 at 8:52 PM, Steven D'Aprano
 wrote:
> On Mon, 02 Jan 2012 17:59:43 -0800, Rick Johnson wrote:
>
>> On Jan 2, 4:00 pm, Ethan Furman  wrote:
>>> %-style formatting isn't going away.
>>
>> You may want to freshen up on the definition of "deprecation".
>
> I'm sure Ethan knows the definition of deprecation. I'm sure he also
> knows that % formatting is NOT deprecated. Please stop spreading FUD
> about Python features.

I can't believe I'm taking Rick's side here, but the docs do say:

"Note: The formatting operations described here are obsolete and may
go away in future versions of Python. Use the new String Formatting in
new code."

http://docs.python.org/py3k/library/stdtypes.html#old-string-formatting-operations

I consider that a statement of deprecation, even if it doesn't use the
term explicitly or describe a definite timeline for removal.

Cheers,
Ian
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python education survey

2012-01-02 Thread Dominic Binks

On 1/2/2012 9:27 PM, Rick Johnson wrote:

On Dec 31 2011, 11:12 pm, Dominic Binks  wrote:


I doubt you could validate or invalidate a word.  A word is, there is no


... taken off list


--
Dominic Binks: dbi...@codeaurora.org
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
--
http://mail.python.org/mailman/listinfo/python-list


Re: .format vs. %

2012-01-02 Thread Steven D'Aprano
On Mon, 02 Jan 2012 22:58:23 -0700, Ian Kelly wrote:

> On Mon, Jan 2, 2012 at 8:52 PM, Steven D'Aprano
>  wrote:
>> On Mon, 02 Jan 2012 17:59:43 -0800, Rick Johnson wrote:
>>
>>> On Jan 2, 4:00 pm, Ethan Furman  wrote:
 %-style formatting isn't going away.
>>>
>>> You may want to freshen up on the definition of "deprecation".
>>
>> I'm sure Ethan knows the definition of deprecation. I'm sure he also
>> knows that % formatting is NOT deprecated. Please stop spreading FUD
>> about Python features.
> 
> I can't believe I'm taking Rick's side here, but the docs do say:
> 
> "Note: The formatting operations described here are obsolete and may go
> away in future versions of Python. Use the new String Formatting in new
> code."
> 
> http://docs.python.org/py3k/library/stdtypes.html#old-string-formatting-
operations
> 
> I consider that a statement of deprecation, even if it doesn't use the
> term explicitly or describe a definite timeline for removal.

Which is exactly why it is not deprecated: it doesn't say it is 
deprecated and has no timeline for removal. It may not even be removed: 
"may" go away is not "will" go away.

Going around saying that features are deprecated just because they may 
(or may not) some day in the distant future become deprecated is FUD. It 
simply isn't true that % formatting is deprecated: Python Dev has a 
formal process for deprecating code, and that process has not been 
applied to % and there are no plans to do so in the foreseeable future.

There is a huge code base using this feature, including the standard 
library, and Python does not arbitrarily deprecate features used by real 
code without good reason. Just because a number of Python devs want to 
encourage people to use format doesn't imply that % will go away any time 
before Python 4000.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python education survey

2012-01-02 Thread Evan Driscoll
On 1/3/2012 0:27, Rick Johnson wrote:
> Yes, i used the word "work" improperly here. Just another example of
> the corrupting influence of garage verbiage. Thanks for bring this to
> my attention! 

"Diction" would be a far better word than "verbiage" there.

Evan



signature.asc
Description: OpenPGP digital signature
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pythonification of the asterisk-based collection packing/unpacking syntax

2012-01-02 Thread alex23
On Jan 3, 3:39 pm, Rick Johnson  wrote:
> It's NOT a fork Alex. It IS in fact the next logical step in Python's
> future evolution.

Link to the repo please, or STFU.
-- 
http://mail.python.org/mailman/listinfo/python-list