Re: How to delay until a next increment of time occurs ?

2019-11-15 Thread R.Wieser
Dietmar, > I would assume that this is not an application that needs to output a 100% > correct pulse train every time. Correct. Thats in the design of the pulses themselves (25% duticycle for one state, 75% for the other. Lots of leeway, and self synchronising) > You may just repeat the pa

Re: nonlocal fails ?

2019-11-15 Thread Chris Angelico
On Sat, Nov 16, 2019 at 5:41 PM Gregory Ewing wrote: > > On 16/11/19 8:22 am, Chris Angelico wrote: > > That's the typical sort of description you get from someone who mostly > > understands Python's semantics, but is hung up on the idea that > > everything is either call-by-value or call-by-refer

Re: nonlocal fails ?

2019-11-15 Thread Gregory Ewing
On 16/11/19 8:22 am, Chris Angelico wrote: That's the typical sort of description you get from someone who mostly understands Python's semantics, but is hung up on the idea that everything is either call-by-value or call-by-reference, and is trying to figure out which box Python fits into. Or t

Re: How to delay until a next increment of time occurs ?

2019-11-15 Thread Dietmar Schwertberger
On 14.11.2019 21:00, R.Wieser wrote: There is a small 433 MHz rf transmitter connected to the pin, and when I send the right pattern a wireless wall-wart will respond and switch a lamp on or off. Its just ment as an example of a real-world application of Python, nothing serious. I would ass

Re: What do you use for slides?

2019-11-15 Thread Dan Stromberg
I mostly use Libreoffice Impress, but I've also tried Google Slides. I don't think Impress does syntax highlighting out of the box, but there's a plugin that claims to. Also, Google Slides purportedly supports highlighting just by cut-and-pasting from a GUI editor/IDE with syntax highlighting. H

Speeding up a test process with a local pypi and/or web proxy?

2019-11-15 Thread Dan Stromberg
Hi folks. I'm looking at a test process that takes about 16 minutes for a full run. Naturally, I'd like to speed it up. We've already parallelized it - mostly. It seems like the next thing to look at is setting up a local pypi, and building some of the packages that're compiled from C/C++ every

Re: nonlocal fails ?

2019-11-15 Thread Terry Reedy
On 11/15/2019 5:48 AM, R.Wieser wrote: Closures are standard in functional languages and are less limited than you seem to think. I was talking about the "nonlocal" method of variable inheritance, not closures. You cannot really separate the two. A 'nonlocal' declaration can only be used in

ANN: Wing Python IDE 7.1.3

2019-11-15 Thread Wingware
Wing 7.1.3 has been released. This version adds improved and expanded documentation and support for matplotlib, improves the accuracy of code warnings, fixes automatically debugging child processes on Windows with Python 3.8, fixes installing the remote agent from .rpm or .deb installations, s

Re: nonlocal fails ?

2019-11-15 Thread Chris Angelico
On Sat, Nov 16, 2019 at 6:20 AM Luciano Ramalho wrote: > > Re: the whole pass by reference discussion. > > I've seen Python's argument passing described as "call by value, > except that all values are references". This makes sense, but is > confusing. That's the typical sort of description you ge

Re: nonlocal fails ?

2019-11-15 Thread Luciano Ramalho
Re: the whole pass by reference discussion. I've seen Python's argument passing described as "call by value, except that all values are references". This makes sense, but is confusing. Michael Scott, in his textbook Programming Language Pragmatics (4e) terms the Python way "call by sharing". That

Re: nonlocal fails ?

2019-11-15 Thread Bev In TX
> On Nov 15, 2019, at 11:11 AM, Python wrote: > > Richard Damon wrote: > ... >> then elsewhere you could do >> foo(j) >> and after that j is 2 >> you also could do >> foo(1) >> and after that if you did >> j = 1 >> then now j might have the value 2 as the constant 1 was changed to the >> value

Re: nonlocal fails ?

2019-11-15 Thread Richard Damon
On 11/15/19 12:21 PM, Random832 wrote: > On Fri, Nov 15, 2019, at 11:47, Richard Damon wrote: >> The issue with calling it a Reference, is that part of the meaning of a >> Reference is that it refers to a Object, and in Python, Names are >> conceptually something very much different than an Object.

Re: What do you use for slides?

2019-11-15 Thread Abdur-Rahmaan Janhangeer
Woops latex seems me programming the slides. yaps thanks for sharing. See this pycon vid for example: https://youtu.be/6uAvHOKofws It's simple and flexible ( you can add images, coloured syntax and cool text ) and that's all we need. Don't know what he used. Abdur-Rahmaan Janhangeer http://www.p

Re: What do you use for slides?

2019-11-15 Thread Grant Edwards
On 2019-11-15, Abdur-Rahmaan Janhangeer wrote: > For slides i use https://yhatt.github.io/marp/, but sometimes i want a more > stylish tool. > > What do you use for slides? (besides powerpoint + syntax highlighting > included) Last time I made slides it was four a 3-day course I was teaching. I

What do you use for slides?

2019-11-15 Thread Abdur-Rahmaan Janhangeer
Greetings all, For slides i use https://yhatt.github.io/marp/, but sometimes i want a more stylish tool. What do you use for slides? (besides powerpoint + syntax highlighting included) Thanks! Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius -

Re: nonlocal fails ?

2019-11-15 Thread Random832
On Fri, Nov 15, 2019, at 11:47, Richard Damon wrote: > The issue with calling it a Reference, is that part of the meaning of a > Reference is that it refers to a Object, and in Python, Names are > conceptually something very much different than an Object. Yes, in the > implementation details, a nam

Re: nonlocal fails ?

2019-11-15 Thread Python
Richard Damon wrote: ... then elsewhere you could do foo(j) and after that j is 2 you also could do foo(1) and after that if you did j = 1 then now j might have the value 2 as the constant 1 was changed to the value 2 (this can cause great confusion) Wow! So fubar that such a feature sho

Re: nonlocal fails ?

2019-11-15 Thread Richard Damon
On 11/15/19 11:26 AM, Dennis Lee Bieber wrote: > On Fri, 15 Nov 2019 12:56:02 +0100, "R.Wieser" > declaimed the following: > >> There are quite a number of languages where /every/ type of argument >> (including values) can be transfered "by reference". Though some default to >> "by value", wher

Re: nonlocal fails ?

2019-11-15 Thread Richard Damon
On 11/15/19 11:04 AM, Random832 wrote: > On Fri, Nov 15, 2019, at 10:48, Richard Damon wrote: >> On 11/15/19 6:56 AM, R.Wieser wrote: >>> There are quite a number of languages where /every/ type of argument >>> (including values) can be transfered "by reference". Though some default >>> to >>>

Re: nonlocal fails ?

2019-11-15 Thread Michael Torrie
On 11/15/19 5:28 AM, R.Wieser wrote: > :-) Although that is how we humans remember the effect of what we do, there > is no reason for a programming language to do it exactly like that. And > sometimes they don't. So, in effect he's saying not all languages use the classic variable model, which

Re: nonlocal fails ?

2019-11-15 Thread Random832
On Fri, Nov 15, 2019, at 10:48, Richard Damon wrote: > On 11/15/19 6:56 AM, R.Wieser wrote: > > There are quite a number of languages where /every/ type of argument > > (including values) can be transfered "by reference". Though some default > > to > > "by value", where others default to "by re

Re: nonlocal fails ?

2019-11-15 Thread Michael Torrie
On 11/15/19 4:56 AM, R.Wieser wrote: >> Well I've only seen this done in languages where other mechanisms >> for returning complex types are not present. > > :-) Than you have not seen to many languages I'm afraid. Careful there. > If I would have wanted that, why would I post here with open qu

Re: nonlocal fails ?

2019-11-15 Thread Richard Damon
On 11/15/19 6:56 AM, R.Wieser wrote: > There are quite a number of languages where /every/ type of argument > (including values) can be transfered "by reference". Though some default to > "by value", where others default to "by reference". It seems you are stuck in a programming model different

Re: nonlocal fails ?

2019-11-15 Thread R.Wieser
Pieter, > Do you mean, if Proc1() is called from Func1, it uses MyVar defined >in Func1, and if it is called from Func2, it uses MyVar from Func2? Yep. > If that is what you mean, that would be dynamic scope. Thanks for pointing that out (I've learned a new definition today! :-) ). Regards, Ru

Re: nonlocal fails ?

2019-11-15 Thread R.Wieser
Dennis, > The first thing one needs to learn is that Python does NOT follow the > common post-office mailbox concept where > > x = y > > means the /value/ stored at location identified by "y" is /copied/ to the > location identified by "x". :-) Although that is how we humans remember the effect

Re: nonlocal fails ?

2019-11-15 Thread Chris Angelico
On Fri, Nov 15, 2019 at 11:01 PM R.Wieser wrote: > > As for "complex types" ? I don't think a(n ASCII) string can be considered > any kind of a complex type, but most all languages I know of transfer them > "by reference" only (though some fake "by value" by using a copy-on-write > mechanism).

Re: nonlocal fails ?

2019-11-15 Thread Chris Angelico
On Fri, Nov 15, 2019 at 9:16 PM R.Wieser wrote: > > Chris, > > > That doesn't really answer the question. > > The problem is that you want to solve /this/ problem, while I'm looking for > replies that are applicable to similar ones too. > > To be blunt about it: I consider solutions that only solv

Re: nonlocal fails ?

2019-11-15 Thread R.Wieser
Michael, > Well I've only seen this done in languages where other mechanisms >for returning complex types are not present. :-) Than you have not seen to many languages I'm afraid. There are quite a number of languages where /every/ type of argument (including values) can be transfered "by refer

Re: How to delay until a next increment of time occurs ?

2019-11-15 Thread R.Wieser
Dennis, > No, that addition is a fixed increment on the initial starting > time, and is NOT relative to the ending of a sleep. > No, that addition is a fixed increment Yep. > on the initial starting time Nope. If pythons sleep is worth its salt it ends exactly on the time provided in "t".

Re: nonlocal fails ?

2019-11-15 Thread R.Wieser
Terry, > This is discouraged for anything very complex. Complex things do not exist. If you think you have something like it you've just not yet broken it down in its components yet. :-) > This is the standard way in Python and other OO languages. By 'excluded', > do you mean 'rejected', or

Re: nonlocal fails ?

2019-11-15 Thread R.Wieser
Chris, > That doesn't really answer the question. The problem is that you want to solve /this/ problem, while I'm looking for replies that are applicable to similar ones too. To be blunt about it: I consider solutions that only solve a single problem most always as a waste of my time (exceptio

Re: py2 vs py3: zlib.adler32/crc32

2019-11-15 Thread Karsten Hilbert
Hello MRAB, yes, like that :-) Thanks, Karsten On Thu, Nov 14, 2019 at 09:11:37PM +, MRAB wrote: > Date: Thu, 14 Nov 2019 21:11:37 + > From: MRAB > To: python-list@python.org > Subject: Re: py2 vs py3: zlib.adler32/crc32 > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/

Re: How to delay until a next increment of time occurs ?

2019-11-15 Thread R.Wieser
Rob, > On an actually practical note; ever since they started baking the > quasi-realtime stuff into the Linux kernel, you've been able to use the > whole sched_setscheduler(2) family of calls (from C) to set a process's > real-time priority. Its something worth to look into. Thanks. Regards

Re: nonlocal fails ?

2019-11-15 Thread Antoon Pardon
On 14/11/19 18:46, R.Wieser wrote: > Jan, > >> So what you want to do is dynamic scope? > No, not really.I was looking for method to let one procedure share a > variable with its caller - or callers, selectable by me. And as a "by > reference" argument does not seem to exist in Python ...

Re: How to delay until a next increment of time occurs ?

2019-11-15 Thread R.Wieser
Dave, > OK I'm old enough cancer to know what X10 is. :-) Ah, so that is the name I forgot. :-) > I wouldn't think this is too difficult to do as you're only sending. You're right, codewise it isn't. > For this application IMO there is too much going on inside python that can > interrupt the

Re: How to delay until a next increment of time occurs ?

2019-11-15 Thread Bev In TX
> On Nov 14, 2019, at 8:42 PM, MRAB wrote: > > Objective-C++? > > I knew that Objective-C is C with objects. > > I knew that C++ is C with objects. > > But C with both? Per Wikipedia... Objective-C++ is a language variant accepted by the front-end to the GNU Compiler Collection and Clang,

Re: nonlocal fails ?

2019-11-15 Thread Pieter van Oostrum
"R.Wieser" writes: > Jan, > >> So what you want to do is dynamic scope? > > No, not really.I was looking for method to let one procedure share a > variable with its caller - or callers, selectable by me. And as a "by > reference" argument does not seem to exist in Python ... > > And yes,

Re: Trouble trying to get started with pygame

2019-11-15 Thread René Dudfield
Hi, it's possible to have multiple processes running with separate pygame windows. However you need to communicate with an inter process mechanism. For example by running a web server over TCP/ip/sockets, or UDP with OSC, or shared memory with mmap, or even via clipboard copy/paste, the humble fi