Pillow installation failed for python with my custom opcode

2015-03-12 Thread Wesley
Hi guys, I don't know if here is right place for asking this question, if not, please help me route to the right place. I do some simple tests on custom opcode for python. 1. change opcode.h: for example: #define PRINT_EXPR 70 #define PRINT_ITEM 71 #define PRINT_NEWLINE 72 #defin

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Mario Figueiredo
On Thu, 12 Mar 2015 16:31:12 +1100, Steven D'Aprano wrote: >Mario Figueiredo wrote: > > >If this is supposed to be a singleton, you can't create more instances. The >point of a singleton that there is only one instance (or perhaps a small >number, two or three say). Why do you need two differen

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Mario Figueiredo
On Wed, 11 Mar 2015 16:47:32 -0700, Ethan Furman wrote: > >You're code is good. Thanks for taking a weight off my shoulder. > > The only question is if you /really/ need a singleton -- and only > you can answer that (although plenty of folks will tell you you > don't ;) . Yeah. I debated that

I want to get involved with Python!

2015-03-12 Thread bink...@mweb.co.za
Hi, I am currently a "Progress Programmer" and looking for new challenges! It seems that Python is a good language to get familiar with and I would like some advice. I am on the look-out for a new job anyway and I thought it well to look for a job as Python developer in my field. I have been wo

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Gregory Ewing
Mario Figueiredo wrote: It's just a cheap global, since is ubiquitous throughout the entire application, does behave like a singleton, and is a bit too expensive to create. A full map in the main application takes 3 or 4 seconds to instantiate and occupies around 2 Mb of memory. There's nothin

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Gregory Ewing
Mario Figueiredo wrote: A different application, a map editor, needs to also instantiate an object of the class Map. But in this case the map needs to either be empty (if the user wants to create a new map), or loaded from the saved map file (if the user wants to edit an existing map). Then yo

python-wheel distribution, add a local dependency which is not available in PyPi

2015-03-12 Thread remisharoon
Hi I have a dependency of a local .whl file, which is not in Pypi. How can I bundle that (local .whl file) inside the wheel file, so that inner .whl will get installed as a dependency. In simple terms a wheel file inside another wheel file. Can I add it as a package_data ? , if so how can get it

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Gregory Ewing
Mario Figueiredo wrote: But PyCharm flags the assignment with a warning telling me that generate() does not return anything and the I lose code completion on the mmap variable. My guess is that there is a syntax error somewhere in your code that's confusing the IDE. -- Greg -- https://mail.pyt

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Mario Figueiredo
On Thu, 12 Mar 2015 21:38:00 +1300, Gregory Ewing wrote: > >I would just provide a function: > >_map = None > >def get_map(): >global _map >if _map is None: > _map = Map() >return _map > >and document the fact that you shouldn't call Map() >directly. Oh, you are so right! Been

RE: Re: I want to get involved with Python!

2015-03-12 Thread bink...@mweb.co.za
>https://en.wikipedia.org/wiki/OpenEdge_Advanced_Business_Language Yip, that's the one I am referring to, Terry. From: tjre...@udel.edu Sent: 2015/03/11 08:43:42 PM To: python-list@python.org Cc: Subject: RE: Re: I want to get involved with Python! On 3/11/2015 5:19 AM, bink...@mweb.co.za wrote:

EuroPython 2015: Early-Bird tickets sold out!

2015-03-12 Thread M.-A. Lemburg
We are very happy to announce that early-bird tickets are sold out! The tickets were sold in less than a week! We’d like to thank everyone for the fantastic feedback. Given the rush to the early-bird tickets (we sold 100 tickets in the first 4 hours), we recommend to not wait too lon

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Mario Figueiredo
On Thu, 12 Mar 2015 21:40:03 +1300, Gregory Ewing wrote: >Mario Figueiredo wrote: > >> A different application, a map editor, needs to also instantiate an >> object of the class Map. But in this case the map needs to either be >> empty (if the user wants to create a new map), or loaded from the >

Re: when may sys.executable be empty

2015-03-12 Thread Terry Reedy
On 3/11/2015 10:41 AM, Wolfgang Maier wrote: From the documentation of sys.executable: A string giving the absolute path of the executable binary for the Python interpreter, on systems where this makes sense. If Python is unable to retrieve the real path to its executable, sys.executable w

Re: Use à Python 2 module with Python 3

2015-03-12 Thread Ian Kelly
On Wed, Mar 11, 2015 at 11:30 AM, Michael Parchet wrote: > Hello, > > Only one file of pyside project has update at 10 fob, > > What's your opinion > > Pyside is ded ? This thread has some discussion that would be useful in determining the current state of the project: https://groups.google.com/f

Re: Use à Python 2 module with Python 3

2015-03-12 Thread Michael Torrie
On 03/11/2015 11:30 AM, Michael Parchet wrote: > Hello, > > Only one file of pyside project has update at 10 fob, > > What's your opinion > > Pyside is ded ? Qt 4 is very stable, with no new features. PySide works very well for me, and the few bugs/limitations that I know of can be worked arou

Re: Python3: Reading a text/binary mixed file

2015-03-12 Thread Paulo da Silva
On 11-03-2015 01:09, Cameron Simpson wrote: > On 10Mar2015 22:38, Paulo da Silva wrote: >> On 10-03-2015 04:14, Cameron Simpson wrote: ... > > Since binary files (returning bytes from reads) also have a convenient > readline method looking for byte 10 ('\n') this makes you current task > tractab

Callbacks with concurrent.futures

2015-03-12 Thread Joseph L. Casale
I have a ProcessPoolExecutor for which I am attaching multiple callbacks. As this must be process based and not thread based, I don't have the luxury communication between threads. Without a queue, does something inherent exist in concurrent futures that allows me to accumulate some data from the f

Re: Callbacks with concurrent.futures

2015-03-12 Thread Ian Kelly
On Wed, Mar 11, 2015 at 1:32 PM, Joseph L. Casale wrote: > I have a ProcessPoolExecutor for which I am attaching multiple callbacks. > As this must be process based and not thread based, I don't have the > luxury communication between threads. Without a queue, does something > inherent exist in co

Re: Callbacks with concurrent.futures

2015-03-12 Thread Joseph L. Casale
> ProcessPoolExecutor is built on the multiprocessing module, so I > expect you should be able to use multiprocessing.Queue or > multiprocessing.Pipe in place of threading.Queue. Hi Ian, Yeah I am using a Manager.Queue as the method polling the queue is itself in a process. I just wondered if the

ANN: eGenix mxODBC 3.3.2 - Python ODBC Database Interface

2015-03-12 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Python ODBC Database Interface Version 3.3.2 mxODBC is our commercially supported Python extension providing

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Steven D'Aprano
Mario Figueiredo wrote: > It's just a cheap global, since is ubiquitous throughout the entire > application, does behave like a singleton, and is a bit too expensive > to create. A full map in the main application takes 3 or 4 seconds to > instantiate and occupies around 2 Mb of memory. 2MB is no

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Steven D'Aprano
Mario Figueiredo wrote: > On Thu, 12 Mar 2015 16:31:12 +1100, Steven D'Aprano > wrote: > >>Mario Figueiredo wrote: >> >> >>If this is supposed to be a singleton, you can't create more instances. >>The point of a singleton that there is only one instance (or perhaps a >>small number, two or three

EuroPython 2015: Call for proposal dates available

2015-03-12 Thread M.-A. Lemburg
The Program work group (WG) has decided on the dates for the Call for Proposal (CFP) dates: Monday, 2015-03-16 Tuesday, 2015-04-14 You will be able to submit your proposals through the EuroPython website during these 4 weeks. We have these types of presentations available for su

generator/coroutine terminology

2015-03-12 Thread Rustom Mody
This is more a question about standard terminology/conventions than about semantics - of course assuming I understand :-) Say I have a simple yielding function: def foo(x): yield x+1 yield x+2 And I have g = foo(2) If I look at type, g's type is 'generator' whereas foo is just plain-ol

Re: generator/coroutine terminology

2015-03-12 Thread Chris Angelico
On Fri, Mar 13, 2015 at 12:35 AM, Rustom Mody wrote: > If I look at type, g's type is 'generator' whereas foo is just plain-ol > 'function.' > > Whereas in informal usage we say foo is a generator. > > So the question: > What should we call foo and what should we call g? g is a generator object;

Re: generator/coroutine terminology

2015-03-12 Thread breamoreboy
On Thursday, March 12, 2015 at 1:35:48 PM UTC, Rustom Mody wrote: > This is more a question about standard terminology/conventions than about > semantics - of course assuming I understand :-) > > Say I have a simple yielding function: > > def foo(x): >yield x+1 >yield x+2 > > And I have

Re: generator/coroutine terminology

2015-03-12 Thread Steven D'Aprano
Rustom Mody wrote: > This is more a question about standard terminology/conventions than about > semantics - of course assuming I understand :-) > > Say I have a simple yielding function: > > def foo(x): >yield x+1 >yield x+2 > > And I have > > g = foo(2) > > If I look at type, g's ty

Re: generator/coroutine terminology

2015-03-12 Thread Rustom Mody
Guess I should be pleased that I am doing as good as you (and Chris) describe. For some reason or not I am not... On Thursday, March 12, 2015 at 9:58:07 PM UTC+5:30, Steven D'Aprano wrote: > Rustom Mody wrote: > > > This is more a question about standard terminology/conventions than about > > sem

Re: when may sys.executable be empty

2015-03-12 Thread Robin Becker
On 11/03/2015 18:15, Dave Angel wrote: . Just speculating, but how about when the main executable is not python at all, but it uses a DLL or .so file with Python interpreter. when I run a django wsgi.py using uwsgi sys.executable points at the uwsgi executable. To run subprocess etc I

Re: generator/coroutine terminology

2015-03-12 Thread Marko Rauhamaa
Rustom Mody : > I guess we need > 1. A clear ontology of the base concepts (which is a buzzword for > nailed-down terminology) According to the documentation, a function whose definition contains a yield statement is a generator: Using a yield expression in a function’s body causes that funct

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Mario Figueiredo
On Thu, 12 Mar 2015 22:29:24 +1100, Steven D'Aprano wrote: > >I would have a loadfile() method which takes a filename on disk, opens the >file and passes the contents (or the open file object) to another method, >load() to do the actual work: > > >class Map: >def __new__(cls, width, height, f

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Mario Figueiredo
On Thu, 12 Mar 2015 21:41:16 +1300, Gregory Ewing wrote: >Mario Figueiredo wrote: >> But PyCharm flags the assignment >> with a warning telling me that generate() does not return anything and >> the I lose code completion on the mmap variable. > >My guess is that there is a syntax error somewhere

Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread John Nagle
I have working code from Python 2 which uses "pickle" to talk to a subprocess via stdin/stdio. I'm trying to make that work in Python 3. First, the subprocess Python is invoked with the "-d' option, so stdin and stdio are supposed to be unbuffered binary streams. That was enough in Python 2,

Re: generator/coroutine terminology

2015-03-12 Thread Terry Reedy
On 3/12/2015 9:35 AM, Rustom Mody wrote: This is more a question about standard terminology/conventions than about semantics - of course assuming I understand :-) Say I have a simple yielding function: def foo(x): yield x+1 yield x+2 This is a generator function And I have g = foo

Re: __new__() does not return anything, on singletong pattern

2015-03-12 Thread Mario Figueiredo
On Thu, 12 Mar 2015 22:04:30 +1100, Steven D'Aprano wrote: > >3-4 seconds to instantiate is a bit worrying, but you should look at >improving the efficiency of loading a map rather than insisting that there >should be only one map instance. Particularly in the map editor, what if >the user wants

Re: generator/coroutine terminology

2015-03-12 Thread Marko Rauhamaa
Terry Reedy : > On 3/12/2015 9:35 AM, Rustom Mody wrote: >> This is more a question about standard terminology/conventions than >> about semantics - of course assuming I understand :-) >> >> Say I have a simple yielding function: >> >> def foo(x): >> yield x+1 >> yield x+2 > > This is a ge

PSF news - BBC launches MicroBit

2015-03-12 Thread Mark Lawrence
http://pyfound.blogspot.co.uk/2015/03/bbc-launches-microbit.html may be of interest to some of you. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

My emails are getting bounced?

2015-03-12 Thread Ryan Gonzalez
I'm posting this here because I have no clue who the heck the mailing list manager is. I got this message: Your membership in the mailing list Python-ideas has been disabled due to excessive bounces The last bounce received from you was dated 12-Mar-2015. You will not get any more messages from

Re: Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread Cameron Simpson
On 12Mar2015 12:55, John Nagle wrote: I have working code from Python 2 which uses "pickle" to talk to a subprocess via stdin/stdio. I'm trying to make that work in Python 3. First, the subprocess Python is invoked with the "-d' option, so stdin and stdio are supposed to be unbuffered binary

Re: Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread Peter Otten
John Nagle wrote: > I have working code from Python 2 which uses "pickle" > to talk to a subprocess via stdin/stdio. I'm trying to > make that work in Python 3. > > First, the subprocess Python is invoked with the "-d' option, > so stdin and stdio are supposed to be unbuffered binary streams

Re: My emails are getting bounced?

2015-03-12 Thread Tim Golden
On 12/03/2015 21:56, Ryan Gonzalez wrote: I'm posting this here because I have no clue who the heck the mailing list manager is. If you look at the bottom of this page: https://mail.python.org/mailman/listinfo/python-ideas you can see the list maintainers which is also a mailto: link which wi

Re: My emails are getting bounced?

2015-03-12 Thread Chris Angelico
On Fri, Mar 13, 2015 at 8:56 AM, Ryan Gonzalez wrote: > > Your membership in the mailing list Python-ideas has been disabled due > to excessive bounces The last bounce received from you was dated > 12-Mar-2015. You will not get any more messages from this list until > you re-enable your membershi

Re: My emails are getting bounced?

2015-03-12 Thread rymg19
On Thursday, March 12, 2015 at 5:01:46 PM UTC-5, Tim Golden wrote: > On 12/03/2015 21:56, Ryan Gonzalez wrote: > > I'm posting this here because I have no clue who the heck the mailing > > list manager is. > > If you look at the bottom of this page: > > https://mail.python.org/mailman/listinfo/py

Google Code Shutting Down

2015-03-12 Thread Josh English
I've been hosting Python projects on Google Code, and they're shutting down. Damn. What is the recommended replacement for Code Hosting that works reliably with PyPi and pip? -- https://mail.python.org/mailman/listinfo/python-list

Re: My emails are getting bounced?

2015-03-12 Thread rymg19
On Thursday, March 12, 2015 at 5:09:16 PM UTC-5, Chris Angelico wrote: > On Fri, Mar 13, 2015 at 8:56 AM, Ryan Gonzalez wrote: > > > > Your membership in the mailing list Python-ideas has been disabled due > > to excessive bounces The last bounce received from you was dated > > 12-Mar-2015. You w

Re: Google Code Shutting Down

2015-03-12 Thread Mario Figueiredo
On Thu, 12 Mar 2015 15:26:08 -0700 (PDT), Josh English wrote: >I've been hosting Python projects on Google Code, and they're shutting down. > >Damn. > >What is the recommended replacement for Code Hosting that works reliably with >PyPi and pip? Essentially anywhere where either Git, Bazaar, Mer

Re: Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread John Nagle
On 3/12/2015 2:56 PM, Cameron Simpson wrote: > On 12Mar2015 12:55, John Nagle wrote: >> I have working code from Python 2 which uses "pickle" to talk to a >> subprocess via stdin/stdio. I'm trying to make that work in Python >> 3. First, the subprocess Python is invoked with the "-d' option, so >

Re: My emails are getting bounced?

2015-03-12 Thread Skip Montanaro
On Thu, Mar 12, 2015 at 4:56 PM, Ryan Gonzalez wrote: > Your membership in the mailing list Python-ideas has been disabled due > to excessive bounces I got the same treatment. Probably a mail loop involving Gmail. Skip -- https://mail.python.org/mailman/listinfo/python-list

Code hosting providers (was: Google Code Shutting Down)

2015-03-12 Thread Ben Finney
Mario Figueiredo writes: > On Thu, 12 Mar 2015 15:26:08 -0700 (PDT), Josh English > wrote: > > > What is the recommended replacement for Code Hosting that works > > reliably with PyPi and pip? > > Essentially anywhere where either Git, Bazaar, Mercurial or Subversion > are supported. Installing

Re: generator/coroutine terminology

2015-03-12 Thread Rustom Mody
On Thursday, March 12, 2015 at 11:25:32 PM UTC+5:30, Marko Rauhamaa wrote: > Rustom Mody : > > > I guess we need > > 1. A clear ontology of the base concepts (which is a buzzword for > > nailed-down terminology) > > According to the documentation, a function whose definition contains a > yield st

Re: My emails are getting bounced?

2015-03-12 Thread Steven D'Aprano
rym...@gmail.com wrote: > I didn't even get this message. I had to go to the Google Groups interface > to check for replies. Have you checked your junk mail folder? Unfortunately, the three of the Big Four mail providers -- Yahoo, Gmail, and AOL[1] -- have collectively decided that mailing lis

Re: Code hosting providers (was: Google Code Shutting Down)

2015-03-12 Thread Steven D'Aprano
Ben Finney wrote: > Also worth watching is Kallithea, a new federated code hosting service > https://kallithea-scm.org/>. It supports Mercurial and Git for VCS, > code review, and integrates with existing issue trackers. Because it's > federated, you won't suffer from vendor lock-in. What do you

Re: Code hosting providers

2015-03-12 Thread Michael Torrie
On 03/12/2015 09:17 PM, Steven D'Aprano wrote: > Ben Finney wrote: >> Also worth watching is Kallithea, a new federated code hosting service >> https://kallithea-scm.org/>. It supports Mercurial and Git for VCS, >> code review, and integrates with existing issue trackers. Because it's >> federated,

KB 2670838 - The EVIL UPDATE

2015-03-12 Thread Skybuck Flying
KB 2670838 - The EVIL UPDATE This Windows 7 update wasted a lot of my time today. I could not find my own postings in the past... maybe I was unsure in the past... I am still unsure today.. but much more sure than previously. When installing IE11 I suspect this patch also gets installed. This

Re: generator/coroutine terminology

2015-03-12 Thread Steven D'Aprano
Rustom Mody wrote: > On Thursday, March 12, 2015 at 11:25:32 PM UTC+5:30, Marko Rauhamaa wrote: >> Rustom Mody : >> >> > I guess we need >> > 1. A clear ontology of the base concepts (which is a buzzword for >> > nailed-down terminology) >> >> According to the documentation, a function whose def

Re: Code hosting providers

2015-03-12 Thread Ben Finney
Steven D'Aprano writes: > Ben Finney wrote: > > > Also worth watching is Kallithea, a new federated code hosting service > > https://kallithea-scm.org/>. It supports Mercurial and Git for VCS, > > code review, and integrates with existing issue trackers. Because it's > > federated, you won't suff

Re: Code hosting providers

2015-03-12 Thread Ben Finney
Michael Torrie writes: > On 03/12/2015 09:17 PM, Steven D'Aprano wrote: > > What do you mean by "federated"? > > I think it's a fancy way of saying you can run your own instance of the > full web system on your own server under your own domain name. With the corollary that *any* vendor motivated

Re: Google Code Shutting Down

2015-03-12 Thread Ian Kelly
On Thu, Mar 12, 2015 at 4:26 PM, Josh English wrote: > I've been hosting Python projects on Google Code, and they're shutting down. > > Damn. > > What is the recommended replacement for Code Hosting that works reliably with > PyPi and pip? Google has been migrating most of its own open source pr

Re: Code hosting providers

2015-03-12 Thread Paul Rubin
Ben Finney writes: > Any service which doesn't run their service on free software is one to > avoid http://mako.cc/writing/hill-free_tools.html>; free software > projects need free tools to remain that way. > > GitLab https://about.gitlab.com/> is a good option: they provide > VCS, file hosting, w

Re: generator/coroutine terminology

2015-03-12 Thread Rustom Mody
On Friday, March 13, 2015 at 9:00:17 AM UTC+5:30, Steven D'Aprano wrote: > Rustom Mody wrote: > > > On Thursday, March 12, 2015 at 11:25:32 PM UTC+5:30, Marko Rauhamaa wrote: > >> Rustom Mody : > >> > >> > I guess we need > >> > 1. A clear ontology of the base concepts (which is a buzzword for >

Re: Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread John Nagle
On 3/12/2015 5:18 PM, John Nagle wrote: > On 3/12/2015 2:56 PM, Cameron Simpson wrote: >> On 12Mar2015 12:55, John Nagle wrote: >>> I have working code from Python 2 which uses "pickle" to talk to a >>> subprocess via stdin/stdio. I'm trying to make that work in Python >>> 3. I'm starting to