Re: [Windows 7, Python 2.6] Can't write to a directory made w/ os.makedirs

2012-01-01 Thread Tim Golden
On 31/12/2011 22:13, OlyDLG wrote: > Hi! I'm working on a script utilizing os.makedirs to make directories > to which I'm then trying to write files created by exe's spawned w/ > subprocess.call; I'm developing in Stani's Python Editor, debugging > using Winpdb. I've gotten to the point where >

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

2012-01-01 Thread David Goldsmith
On Jan 1, 1:37 am, Tim Golden wrote: > On 31/12/2011 22:13, OlyDLG wrote: >  > Hi!  I'm working on a script utilizing os.makedirs to make directories >  > to which I'm then trying to write files created by exe's spawned w/ >  > subprocess.call; I'm developing in Stani's Python Editor, debugging >

Creating a binary only python distribution of a C extension module and including some additional python and c files in it

2012-01-01 Thread akhilesh singhania
Hi, I have a extension module in C which I want to distribute in binary format, ideally an rpm. Additionally, I want to include some python files (examples on how to use the extension module) and source for a library the module dynamically links to (c,h, and make files). How do I specify the exam

Re: pickling instances of metaclass generated classes

2012-01-01 Thread Peter Otten
lars van gemerden wrote: >> import pickle >> import sys >> >> class MetaClass(type): >> pass >> >> class M(object): >> def __init__(self, module): >> self.__module = module >> def __getattr__(self, name): >> print "creating class", name >> class_ = MetaC

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

2012-01-01 Thread Tim Golden
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

Re: .format vs. %

2012-01-01 Thread Miki Tebeka
> >>> 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 -- http://mail.python.org/mailman/listinfo/python-list

Spamming PyPI with stupid packages

2012-01-01 Thread Matt Chaput
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

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Robert Kern
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 w

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Alexander Kapps
Uh oh, should I really send this? ... Yes. Yes, I should! Sorry, I cannot resists. allow everyone to do "import girlfriend" I'm betting on a joke, like antigravity only significantly less funny and more sexist. Absolutely not funny. I hope that someday people will understand that sexism i

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Devin Jeanpierre
> Absolutely not funny. I hope that someday people will understand that sexism > is just another form of racism. One can understand that sexism is a terrible thing, and at the same time make sexist jokes. > Felinx Lee: Do apologize and rename your package/module or I'm going to make > a racist co

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Lie Ryan
On 01/02/2012 09:33 AM, Robert Kern wrote: 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 c

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Devin Jeanpierre
Sorry, I lied. It's been a while and I misremembered. The package mentioned in the blog post was removed of the author's free will, and PyPI doesn't police submissions. -- Devin On Sun, Jan 1, 2012 at 7:05 PM, Devin Jeanpierre wrote: >> Absolutely not funny. I hope that someday people will under

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

2012-01-01 Thread K Richard Pixley
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-fra

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Ben Finney
Alexander Kapps writes: > Absolutely not funny. I hope that someday people will understand that > sexism is just another form of racism. That's not right. Racism and sexism are not forms of each other. Instead, racism and sexism are both forms of bigotry. And yes, I agree that the packages at

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Ben Finney
Ben Finney writes: > Alexander Kapps writes: > > > Absolutely not funny. I hope that someday people will understand > > that sexism is just another form of racism. > > That's not right. Racism and sexism are not forms of each other. > > Instead, racism and sexism are both forms of bigotry. Hmm,

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

2012-01-01 Thread K Richard Pixley
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 ou

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

2012-01-01 Thread David Goldsmith
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

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

2012-01-01 Thread MRAB
On 02/01/2012 03:14, 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. > >> D

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

2012-01-01 Thread Tim Chase
I'm looking at developing some tools that involve pygame+pyopenal and would like to make cross-platform distribution as painless as possible. Is there a "best practice" for doing this without forcing the user to install Python, install (say) pip, pull down pygame & pyopenal and install those,

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Steven D'Aprano
On Mon, 02 Jan 2012 00:24:48 +0100, Alexander Kapps wrote: > Uh oh, should I really send this? ... Yes. Yes, I should! Sorry, I > cannot resists. > allow everyone to do "import girlfriend" > >> I'm betting on a joke, like antigravity only significantly less funny >> and more sexist. > > Ab

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Steven D'Aprano
On Mon, 02 Jan 2012 11:12:28 +1100, Lie Ryan wrote: > Legitimate python programmer or not, that does not legitimize spamming > PyPI. I don't see that half a dozen trivial (pointless) modules should be classified as spam. Personally, I've looked at the modules, and if I were the author, I'd be

Re: Generating sin/square waves sound

2012-01-01 Thread Paulo da Silva
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

Re: Generating sin/square waves sound

2012-01-01 Thread Paulo da Silva
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. > As mu

Re: Generating sin/square waves sound

2012-01-01 Thread Paulo da Silva
Em 31-12-2011 01:19, K Richard Pixley escreveu: > On 12/29/11 23:17 , 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 sou

Re: Spamming PyPI with stupid packages

2012-01-01 Thread Devin Jeanpierre
> 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. If it's just about naming a package "girlfriend",