Re: Subprocess Startup Error

2016-08-09 Thread Lawrence D’Oliveiro
On Wednesday, August 10, 2016 at 8:12:10 AM UTC+12, xlarged...@aol.com wrote: > "Either IDLE can't start a subprocess or personal firewall software is > blocking the connection." Q: Why does Windows print such explanatory error messages? A: To give you a hint as to the cause of the problem. -- h

Re: ctypes And The WACAH Principle

2016-08-09 Thread Gregory Ewing
Lawrence D’Oliveiro wrote: When using array objects from code written in C or C++ (the only way to effectively make use of this information), it makes more sense to use the buffer interface supported by array objects. Ah, I wish... I had a look at the documentation for the buffer interface and

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Gregory Ewing
Juan Pablo Romero Méndez wrote: This is interesting. You are Ok having runtime errors? You're going to have runtime errors in any case, whether they come from code you've put there yourself to check types, or from somewhere deeper down. The only difference is that checks you make yourself *mi

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Selik
On Wed, Aug 10, 2016 at 1:22 AM Juan Pablo Romero Méndez < jpablo.rom...@gmail.com> wrote: > 1) catching exceptions at the point where you care, 2) > preemptively check for certain runtime conditions to avoid exceptions 3) > write as many tests as possible 4) learn to live with runtime errors. >

Re: Python slang

2016-08-09 Thread Lawrence D’Oliveiro
On Monday, August 8, 2016 at 9:02:15 PM UTC+12, Anders J. Munch wrote: > It was only later that language designers fell into the notion that it > was crucial for a new language's success to look as much like C++ as > possible. Nevertheless, Python copied the C misfeature of using “=” for assignme

Re: How do I make a video animation with transparent background?

2016-08-09 Thread Dale Marvin via Python-list
On 8/9/16 6:50 PM, Lawrence D’Oliveiro wrote: On Wednesday, August 10, 2016 at 12:44:30 AM UTC+12, Martin Schöön wrote: What I have failed to achieve is a graph with a transparent background. While it is possible to render image frames with alpha transparency channels, as far as I know none

Individuals and groups (was Specify the database for a Django)

2016-08-09 Thread Rustom Mody
On Wednesday, August 10, 2016 at 6:39:31 AM UTC+5:30, Ben Finney wrote: > -- > \ “I love and treasure individuals as I meet them, I loathe and | > `\ despise the groups they identify with and belong to.” —George | > _o__) Carlin, 200

free python course materials for high school students available

2016-08-09 Thread Kent Tong
Hi, I've taught a python course with some positive results to high school students with zero experience in programming. Now I am making these course materials (slides in English and lecture videos in Cantonese) freely available as a contribution back to the community (http://www.istudycenter.o

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 18:28 GMT-07:00 Steven D'Aprano : > On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote: > > > Hello, > > > > In online forums sometimes people complain that they end up having to > test > > constantly for None, > > Then don't return None to indicate an error. If you write this

Re: Make sure you removed all debugging print statements error

2016-08-09 Thread Steven D'Aprano
On Wednesday 10 August 2016 12:53, Lawrence D’Oliveiro wrote: > On Tuesday, August 9, 2016 at 4:20:37 AM UTC+12, Chris Angelico wrote: >> Firstly, the bare "except:" clause should basically never be used; >> instead, catch a very specific exception and figure out what you want to >> do here > > Y

Re: How do I make a video animation with transparent background?

2016-08-09 Thread Steven D'Aprano
On Wednesday 10 August 2016 12:49, Lawrence D’Oliveiro wrote: > On Wednesday, August 10, 2016 at 2:04:39 PM UTC+12, Chris Angelico wrote: > >> Animated GIFs support transparency. > > But they don’t do full colour. Define "full colour". GIFs don't directly support 16-bit or 32-bit colours in a

Round-Trip Object Correspondence, Weakrefs And __new__

2016-08-09 Thread Lawrence D’Oliveiro
Qahirah is a Pythonic API binding for the Cairo 2D graphics library. When designing it, I tried to imagine how the graphics API would look if had been created for Python in the first place, rather than for C. One of the important decisions I made was to implemen

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Torrie
On 08/09/2016 02:51 PM, Juan Pablo Romero Méndez wrote: > 2016-08-09 13:18 GMT-07:00 Rob Gaddi : >> It's not a style, it's the absence of one. >> >> def add2list(lst, elem): >> lst.extend([elem, elem]) >> return lst >> >> I did all the type checking I needed to there; none whatsoever. If >

cmd prompt does not recognizes python command on Windows 7

2016-08-09 Thread sh . ajay12
Hi Everyone i have installed python 3.5 , but the python command is not recognized C:\Users\sharmaaj>python 'python' is not recognized as an internal or external command, operable program or batch file. what should i do to run python commands. thanks everyone for reading my post. >From Aja

Re: Make sure you removed all debugging print statements error

2016-08-09 Thread Lawrence D’Oliveiro
On Tuesday, August 9, 2016 at 4:20:37 AM UTC+12, Chris Angelico wrote: > Firstly, the bare "except:" clause should basically never be used; > instead, catch a very specific exception and figure out what you want to > do here Yes. > - but secondly, don't force people's names to be subdivided. I l

Re: How do I make a video animation with transparent background?

2016-08-09 Thread Lawrence D’Oliveiro
On Wednesday, August 10, 2016 at 2:04:39 PM UTC+12, Chris Angelico wrote: > Animated GIFs support transparency. But they don’t do full colour. -- https://mail.python.org/mailman/listinfo/python-list

Re: ctypes And The WACAH Principle

2016-08-09 Thread Steven D'Aprano
On Wed, 10 Aug 2016 11:45 am, Lawrence D’Oliveiro wrote: > GvR has said “we’re all consenting adults here”. He was referring to the > “public/private/protected” access-control business that most > object-oriented languages require you to go through. But there is another > area where I think this p

Re: How do I make a video animation with transparent background?

2016-08-09 Thread Chris Angelico
On Wed, Aug 10, 2016 at 11:50 AM, Lawrence D’Oliveiro wrote: > On Wednesday, August 10, 2016 at 12:44:30 AM UTC+12, Martin Schöön wrote: > >> What I have failed to achieve is a graph with a transparent >> background. > > While it is possible to render image frames with alpha transparency channels,

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Chris Angelico
On Wed, Aug 10, 2016 at 11:47 AM, Steven D'Aprano wrote: > On Wed, 10 Aug 2016 11:02 am, Chris Angelico wrote: > >> On Wed, Aug 10, 2016 at 10:58 AM, Juan Pablo Romero Méndez >> wrote: > >>> This is interesting. You are Ok having runtime errors? >> >> Absolutely. In real terms, there's no differe

Re: How do I make a video animation with transparent background?

2016-08-09 Thread Lawrence D’Oliveiro
On Wednesday, August 10, 2016 at 12:44:30 AM UTC+12, Martin Schöön wrote: > What I have failed to achieve is a graph with a transparent > background. While it is possible to render image frames with alpha transparency channels, as far as I know none of the motion-video image formats supports tra

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Steven D'Aprano
On Wed, 10 Aug 2016 11:02 am, Chris Angelico wrote: > On Wed, Aug 10, 2016 at 10:58 AM, Juan Pablo Romero Méndez > wrote: >> This is interesting. You are Ok having runtime errors? > > Absolutely. In real terms, there's no difference between "compile-time > error" and "run-time error that you tr

ctypes And The WACAH Principle

2016-08-09 Thread Lawrence D’Oliveiro
GvR has said “we’re all consenting adults here”. He was referring to the “public/private/protected” access-control business that most object-oriented languages require you to go through. But there is another area where I think this principle applies to Python, at least in part: low-level access

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Steven D'Aprano
On Wed, 10 Aug 2016 06:51 am, Juan Pablo Romero Méndez wrote: > 2016-08-09 13:18 GMT-07:00 Rob Gaddi : >> It's not a style, it's the absence of one. >> >> def add2list(lst, elem): >> lst.extend([elem, elem]) >> return lst >> >> I did all the type checking I needed to there; none whatsoeve

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Steven D'Aprano
On Wed, 10 Aug 2016 04:29 am, Juan Pablo Romero Méndez wrote: > Hello, > > In online forums sometimes people complain that they end up having to test > constantly for None, Then don't return None to indicate an error. If you write this: def create_spam(arg): if condition: return Sp

Re: Specify the database for a Django ModelForm instance

2016-08-09 Thread Ben Finney
Phil Boutros writes: > Ben Finney wrote: > > How can I specify which database (by its alias name) a Django > > ModelForm should use > > > What is the equivalent for using='foo' when instantiating a ModelForm > > for the model, or calling its methods (ModelForm.clean, ModelForm.save, > > etc.)?

Re: Call for Assistance

2016-08-09 Thread Charles Ross
Well, I’ve been convinced. The license for the book is now Creative Commons Attribution-ShareAlike. https://github.com/chivalry/meta-python/blob/master/LICENSE.md Thanks, Chuck > On Aug 9, 2016, at 3:00 PM, Charles Ross wrote: > >> CC-BY-NC-SA is not a license for free (as in speech) content.

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Chris Angelico
On Wed, Aug 10, 2016 at 10:58 AM, Juan Pablo Romero Méndez wrote: >> I don't check for file-likeness in the application code. If somehow a >> non-file-like (file-unlike?) object makes its way into my function, I >> expect (and hope) my program will immediately stop and print a nice >> traceback fo

Re: Invalid Syntax

2016-08-09 Thread Steven D'Aprano
On Wed, 10 Aug 2016 06:20 am, Ltc Hotspot wrote: > Hi, Everyone: > > What is the source of the following, > 'error message: SyntaxError: invalid syntax (, line 2)' > > v. Python 3.3 > > Code reads: > > x=1 > if x==1 > # indent 4 spaces > print "x = 1" > > Hal The error message tells

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 14:01 GMT-07:00 Michael Selik : > On Tue, Aug 9, 2016 at 3:22 PM Juan Pablo Romero Méndez < > jpablo.rom...@gmail.com> wrote: > >> I'm actually looking for ways to minimize run time errors, so that would >> include TypeError and AttributeError. >> >> In your "File-like" example having t

Re: Invalid Syntax

2016-08-09 Thread cs
On 09Aug2016 20:22, Rob Gaddi wrote: Ltc Hotspot wrote: What is the source of the following, 'error message: SyntaxError: invalid syntax (, line 2)' v. Python 3.3 Code reads: x=1 if x==1 # indent 4 spaces print "x = 1" A missing colon, the appropriate location of which is left as an

Re: Call for Assistance

2016-08-09 Thread Charles Ross
> CC-BY-NC-SA is not a license for free (as in speech) content. Is that > what you want? I really appreciate all the conversation about the license. Perhaps I made a mistake with requiring noncommercial in the license, I don’t know, but I’ll look at the links provided about free documentation an

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Rob Gaddi
Juan Pablo Romero Méndez wrote: > 2016-08-09 13:18 GMT-07:00 Rob Gaddi : > >> Juan Pablo Romero Méndez wrote: >> >> > 2016-08-09 12:06 GMT-07:00 Paul Rubin : >> > >> >> Juan Pablo Romero Méndez writes: >> >> > In online forums sometimes people complain that they end up having to >> >> > test cons

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 3:22 PM Juan Pablo Romero Méndez < jpablo.rom...@gmail.com> wrote: > I'm actually looking for ways to minimize run time errors, so that would > include TypeError and AttributeError. > > In your "File-like" example having type information would prevent me from > even passing

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Random832
On Tue, Aug 9, 2016, at 16:51, Juan Pablo Romero Méndez wrote: > So as the writer of the function you expect the user to read the function > body to determine what is safe to pass or not? How about expecting them to read the docstring? -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 13:18 GMT-07:00 Rob Gaddi : > Juan Pablo Romero Méndez wrote: > > > 2016-08-09 12:06 GMT-07:00 Paul Rubin : > > > >> Juan Pablo Romero Méndez writes: > >> > In online forums sometimes people complain that they end up having to > >> > test constantly for None > >> > >> That's something

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 2:59 PM Chris Angelico wrote: > On Wed, Aug 10, 2016 at 4:51 AM, Michael Selik > wrote: > > "File-like" is a good example. Rather than go through the frustration of > a > > formal definition for what is file-like, stay productive and flexible > with > > duck typing. Object

Re: cropping a random part of an image

2016-08-09 Thread Robin Koch
Am 09.08.2016 um 14:40 schrieb drewes@gmail.com: I'm new to python and I have 30.000 pictures. I need to crop, let's say 100, parts of 256x256, randomly out of every picture. Interessting task. May I ask for the purose of this? I cant find an answer in the net, would be nice if someone c

Re: Invalid Syntax

2016-08-09 Thread Rob Gaddi
Ltc Hotspot wrote: > Hi, Everyone: > > What is the source of the following, > 'error message: SyntaxError: invalid syntax (, line 2)' > > v. Python 3.3 > > Code reads: > > x=1 > if x==1 > # indent 4 spaces > print "x = 1" > > Hal A missing colon, the appropriate location of which is left

Invalid Syntax

2016-08-09 Thread Ltc Hotspot
Hi, Everyone: What is the source of the following, 'error message: SyntaxError: invalid syntax (, line 2)' v. Python 3.3 Code reads: x=1 if x==1 # indent 4 spaces print "x = 1" Hal -- https://mail.python.org/mailman/listinfo/python-list

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Rob Gaddi
Juan Pablo Romero Méndez wrote: > 2016-08-09 12:06 GMT-07:00 Paul Rubin : > >> Juan Pablo Romero Méndez writes: >> > In online forums sometimes people complain that they end up having to >> > test constantly for None >> >> That's something of a style issue. You can code in a way that avoids a >>

Subprocess Startup Error

2016-08-09 Thread Sean via Python-list
Does anyone have advice on how to resolve this message when I attempt to open IDLE? "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." I am running Windows 10 Home on a 64bit machine. I am running Pytho

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
On 8/9/16 1:42 PM, Terry Reedy wrote: > On 8/9/2016 9:22 AM, Joseph Bane wrote: >> Hello. >> >> It recently came to my attention that the strtobool function in the >> standard library doesn't return Python native boolean values, but >> rather returns integer 0 or 1: >> >> https://hg.python.org/cpyt

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
What static checking can actually guarantee varies depending on the specific type system at hand (C# vs Haskell vs Idris for example). But most of them can guarantee simple stuff like: "I'm I allowed to invoke this function at this point?" If you don't have that, well you can rely on tests to show

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
2016-08-09 12:06 GMT-07:00 Paul Rubin : > Juan Pablo Romero Méndez writes: > > In online forums sometimes people complain that they end up having to > > test constantly for None > > That's something of a style issue. You can code in a way that avoids a > lot of those tests (not all of them). >

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread MRAB
On 2016-08-09 19:57, Chris Angelico wrote: On Wed, Aug 10, 2016 at 4:51 AM, Michael Selik wrote: "File-like" is a good example. Rather than go through the frustration of a formal definition for what is file-like, stay productive and flexible with duck typing. Objects that don't have the appropr

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Paul Rubin
Juan Pablo Romero Méndez writes: > In online forums sometimes people complain that they end up having to > test constantly for None That's something of a style issue. You can code in a way that avoids a lot of those tests (not all of them). > Do you guys have any resources you like that address

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Chris Angelico
On Wed, Aug 10, 2016 at 4:51 AM, Michael Selik wrote: > "File-like" is a good example. Rather than go through the frustration of a > formal definition for what is file-like, stay productive and flexible with > duck typing. Objects that don't have the appropriate methods or attributes > will cause

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 2:31 PM Juan Pablo Romero Méndez < jpablo.rom...@gmail.com> wrote: > Hello, > > In online forums sometimes people complain that they end up having to test > constantly for None, or that a function's argument has a specific type / > shape (which immediately brings the followi

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Chris Angelico
On Wed, Aug 10, 2016 at 4:29 AM, Juan Pablo Romero Méndez wrote: > What is the best way to use the dynamic features of Python to avoid having > to write a poor's man type system? > Step 1: Don't even care about it. Take whatever comes, and assume that it's what you expect. Step 2: When step 1 st

What's the best way to minimize the need of run time checks?

2016-08-09 Thread Juan Pablo Romero Méndez
Hello, In online forums sometimes people complain that they end up having to test constantly for None, or that a function's argument has a specific type / shape (which immediately brings the following aphorism to mind: "Any sufficiently large test suite contains an ad hoc, bug-ridden, slow impleme

Re: Specify the database for a Django ModelForm instance

2016-08-09 Thread Phil Boutros
Ben Finney wrote: > Howdy all, > > How can I specify which database (by its alias name) a Django ModelForm > should use > What is the equivalent for using='foo' when instantiating a ModelForm > for the model, or calling its methods (ModelForm.clean, ModelForm.save, > etc.)? You would specify

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Terry Reedy
On 8/9/2016 9:22 AM, Joseph Bane wrote: Hello. It recently came to my attention that the strtobool function in the standard library doesn't return Python native boolean values, but rather returns integer 0 or 1: https://hg.python.org/cpython/file/3.5/Lib/distutils/util.py#l304 I am curious why

Re: Call for Assistance

2016-08-09 Thread Lutz Horn
Regarding the CC-BY-NC-SA license: Am 09.08.16 um 17:42 schrieb Reto Brunner: > What on earth isn't "free" enough about [...] > It is even a viral (copy left) licence, so even a fsf member should > be happy The FSF considers the CC-BY-NC to *not* be a license for free documentation[1]: > This l

Re: Call for Assistance

2016-08-09 Thread Jussi Piitulainen
Reto Brunner writes: > On Tue, Aug 9, 2016, 16:59 Lutz Horn wrote: > >> Am 08/09/2016 um 03:52 AM schrieb Charles Ross: >> > The book is being hosted at https://github.com/chivalry/meta-python >> >> CC-BY-NC-SA is not a license for free (as in speech) content. Is that >> what you want? > > What

Re: Call for Assistance

2016-08-09 Thread Chris Angelico
On Wed, Aug 10, 2016 at 1:42 AM, Reto Brunner wrote: > What on earth isn't "free" enough about > > You are free to: > Share — copy and redistribute the material in any medium or format > > Adapt — remix, transform, and build upon the material > > The licensor cannot revoke these freedoms as long a

Re: Running Python from the source repo

2016-08-09 Thread Zachary Ware
On Tue, Aug 9, 2016 at 2:55 AM, Terry Reedy wrote: > This works great. Might there be any way to collect together > the warning messages? There were perhaps 100 for the changes in > the last few weeks. (People on non-windows seems to routinely write code > that msc does not like.) Glad it work

Re: Call for Assistance

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 3:23 AM Charles Ross wrote: > I’ve begun a new book called Meta Python that I’m looking for assistance > with. The book is one I wish was out there, and so am writing. The book is > targeted at experienced programmers who are novice Python users and want to > move from that

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 9:50 AM Joseph Bane wrote: > Thank you for your note. I was thinking it might be just a historical > artifact. > That was just my guess. You can search the mailing list archives and the bug tracker to find out if there's been any past discussion. > Do you think this is t

Re: Call for Assistance

2016-08-09 Thread Reto Brunner
What on earth isn't "free" enough about You are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material The licensor cannot revoke these freedoms as long as you follow the license terms. It is even a viral (copy left) lic

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
Thank you for your note. I was thinking it might be just a historical artifact. Do you think this is the type of thing we could propose be changed in the next version of Python? It seems it would be more consistent with the principle of least surprise from the perspective of outsider Python calling

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Lutz Horn
Am 08/09/2016 um 03:22 PM schrieb Joseph Bane: It recently came to my attention that the strtobool function in the standard library doesn't return Python native boolean values, but rather returns integer 0 or 1: In boolean context, 1 is True and 0 is False. So you should be able to use the res

Re: Call for Assistance

2016-08-09 Thread Lutz Horn
Am 08/09/2016 um 03:52 AM schrieb Charles Ross: The book is being hosted at https://github.com/chivalry/meta-python CC-BY-NC-SA is not a license for free (as in speech) content. Is that what you want? Lutz -- https://emailselfdefense.fsf.org/ -- https://mail.python.org/mailman/listinfo/python

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
On Tuesday, August 9, 2016 at 9:34:44 AM UTC-4, Michael Selik wrote: > On Tue, Aug 9, 2016 at 9:26 AM Joseph Bane wrote: > > > Hello. > > > > It recently came to my attention that the strtobool function in the > > standard library doesn't return Python native boolean values, but rather > > returns

Re: cropping a random part of an image

2016-08-09 Thread Peter Otten
drewes@gmail.com wrote: > I'm new to python and I have 30.000 pictures. > I need to crop, let's say 100, parts of 256x256, randomly out of every > picture. > > I cant find an answer in the net, would be nice if someone could help me > out! You can walk over the files with https://docs.pytho

Re: Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 9:26 AM Joseph Bane wrote: > Hello. > > It recently came to my attention that the strtobool function in the > standard library doesn't return Python native boolean values, but rather > returns integer 0 or 1: > > https://hg.python.org/cpython/file/3.5/Lib/distutils/util.py#

Re: cross-platform logging.config: how to set cross platform log (handlers) file location?

2016-08-09 Thread Peter Otten
ber...@gmail.com wrote: > Hello. > > My python script should run on Linux, Win and MacOS, but I can't find a > way to have logging.conf configuration that works out of the box accross > all these OSes. > > I don't want my users to have to edit configuration files manually. > > > If I use a "li

Question regarding stdlib distutils strtobool behavior

2016-08-09 Thread Joseph Bane
Hello. It recently came to my attention that the strtobool function in the standard library doesn't return Python native boolean values, but rather returns integer 0 or 1: https://hg.python.org/cpython/file/3.5/Lib/distutils/util.py#l304 I am curious why this is the defined behavior and whethe

How do I make a video animation with transparent background?

2016-08-09 Thread Martin Schöön
Here is what I want to do: I want to create an animated graph and store it as a video file, mp4 say. This file will then be used as an overlay on another video. Using this example: http://matplotlib.org/examples/animation/moviewriter.html and this tutorial: https://www.youtube.com/watch?v=h0F5X4b7

cropping a random part of an image

2016-08-09 Thread drewes . mil
Hi, I'm new to python and I have 30.000 pictures. I need to crop, let's say 100, parts of 256x256, randomly out of every picture. I cant find an answer in the net, would be nice if someone could help me out! Thanks! Steffen -- https://mail.python.org/mailman/listinfo/python-list

Re: cross-platform logging.config: how to set cross platform log (handlers) file location?

2016-08-09 Thread Steven D'Aprano
On Tue, 9 Aug 2016 08:56 pm, ber...@gmail.com wrote: > Hello. > > My python script should run on Linux, Win and MacOS, but I can't find a > way to have logging.conf configuration that works out of the box accross > all these OSes. > > I don't want my users to have to edit configuration files man

Re: cross-platform logging.config: how to set cross platform log (handlers) file location?

2016-08-09 Thread Steven D'Aprano
On Tue, 9 Aug 2016 08:56 pm, ber...@gmail.com wrote: > Hello. > > My python script should run on Linux, Win and MacOS, but I can't find a > way to have logging.conf configuration that works out of the box accross > all these OSes. Oh! Wait, I didn't pick up on the logging.conf part! D'oh! > [ha

EuroPython 2016: Thank you to all our organizers and volunteers

2016-08-09 Thread M.-A. Lemburg
EuroPython 2016 is now over and was an overwhelming success thanks to everyone who helped make it happen. Since EuroPython would not be possible without the help of our volunteers and organizers, we’d like to say Thank You !!! to all the individuals who invested time

EuroPython 2017 On-site Teams: Call for Interest results

2016-08-09 Thread M.-A. Lemburg
We are happy to announce the results of our EuroPython 2017 On-site Teams: Call for Interest (CFI). The CFI finished with exciting new locations and on-site teams willing to make EuroPython 2017 possible. The CFI proposals we received were for: * Milan or Como Lake, Italy, from the Python Ita

cross-platform logging.config: how to set cross platform log (handlers) file location?

2016-08-09 Thread berteh
Hello. My python script should run on Linux, Win and MacOS, but I can't find a way to have logging.conf configuration that works out of the box accross all these OSes. I don't want my users to have to edit configuration files manually. If I use a "linux-like" handler configuration such as bel

Re: Call for Assistance

2016-08-09 Thread Charles Ross
You’re right. I should have mentioned that this is a volunteer effort on my part and anyone else who becomes involved. It’s being released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-nc-sa/4.0/

Re: Call for Assistance

2016-08-09 Thread Steven D'Aprano
On Tuesday 09 August 2016 11:52, Charles Ross wrote: > I’ve begun a new book called Meta Python that I’m looking for assistance > with. Are you looking for people to be co-authors? Are you offering payment, or credit? A free copy of the book? A kick to the head? Or just looking for volunteers t

Re: Awful code of the week

2016-08-09 Thread Steven D'Aprano
On Tuesday 09 August 2016 15:37, Chris Angelico wrote: [...] >> You can't be too careful with memory management. > > Right. Of course, it gets very onerous, so we tend to use a context > manager instead. > > def process(self, stuff): > with deallocate() as cleanup: > clea

Re: Running Python from the source repo

2016-08-09 Thread Terry Reedy
On 8/8/2016 5:25 PM, Random832 wrote: On Mon, Aug 8, 2016, at 15:25, Terry Reedy wrote: Last January, I wrote a batch file to build all three versions with the 'optional' extensions. I started rebuilding more often after this. 36\pcbuild\build.bat -e -d 35\pcbuild\build.bat -e -d 27\pcbuild\bu

Re: Running Python from the source repo

2016-08-09 Thread Terry Reedy
On 8/8/2016 5:16 PM, Zachary Ware wrote: On Mon, Aug 8, 2016 at 2:25 PM, Terry Reedy wrote: Last January, I wrote a batch file to build all three versions with the 'optional' extensions. I started rebuilding more often after this. 36\pcbuild\build.bat -e -d 35\pcbuild\build.bat -e -d 27\pcbui

Call for Assistance

2016-08-09 Thread Charles Ross
I’ve begun a new book called Meta Python that I’m looking for assistance with. The book is one I wish was out there, and so am writing. The book is targeted at experienced programmers who are novice Python users and want to move from that point to one where they have published to PyPI. I’m spec