Re: Promiscuous ports under Linux

2017-05-03 Thread Marko Rauhamaa
Peter Pearson : > Cobbling together a minimalist ethernet-sniffing program, I was hoping > to use this simple mechanism for setting the socket to "promiscuous > mode" (to see all traffic going past, instead of just traffic > addressed to my machine): > > s.ioctl(socket.SIO_RCVALL, socket.RCVAL

Re: getting memory usage of varaibles

2017-05-03 Thread Ben Finney
Erik writes: > The thing about functions or classes is that you can't (at the literal > source level) define them *without* giving them a name: Even a function is commonly defined without giving it a name. >>> strategies = [ ... (lambda x: x + 2), ... (lambda x: x ** 3),

Re: getting memory usage of varaibles

2017-05-03 Thread Ben Finney
Larry Martell writes: > On Wed, May 3, 2017 at 12:57 AM, Chris Angelico wrote: > > Coming right back to the beginning here: What do you expect the name > > of an object to be? > > The name of the variable in the program, e.g. sql, db_conn, rows, etc. That assumes that the object has exactly one

Re: Promiscuous ports under Linux

2017-05-03 Thread Peter Pearson
On Wed, 3 May 2017 18:09:08 -0700, Rob Gaddi wrote: > On 05/03/2017 04:57 PM, Peter Pearson wrote: >> Cobbling together a minimalist ethernet-sniffing program, I was hoping >> to use this simple mechanism for setting the socket to "promiscuous >> mode" (to see all traffic going past, instead of jus

Re: getting memory usage of varaibles

2017-05-03 Thread Terry Reedy
On 5/3/2017 6:21 PM, Larry Martell wrote: On Wed, May 3, 2017 at 6:15 PM, Terry Reedy wrote: Python already uses this trick for functions, classes, and modules by giving them .__name__ attribute. Code objects have a .co_name attribute. These are used for tracing and tracebacks. I left out

Re: Promiscuous ports under Linux

2017-05-03 Thread Rob Gaddi
On 05/03/2017 04:57 PM, Peter Pearson wrote: Cobbling together a minimalist ethernet-sniffing program, I was hoping to use this simple mechanism for setting the socket to "promiscuous mode" (to see all traffic going past, instead of just traffic addressed to my machine): s.ioctl(socket.SIO_R

Re: getting memory usage of varaibles

2017-05-03 Thread Chris Angelico
On Thu, May 4, 2017 at 10:32 AM, Ned Batchelder wrote: > On Wednesday, May 3, 2017 at 8:09:59 PM UTC-4, Steve D'Aprano wrote: >> On Thu, 4 May 2017 09:30 am, Ned Batchelder wrote: >> >> > Functions, classes, and modules can also be referred to by a number of >> > variables: >> > >> > def foo()

Re: getting memory usage of varaibles

2017-05-03 Thread Ned Batchelder
On Wednesday, May 3, 2017 at 8:09:59 PM UTC-4, Steve D'Aprano wrote: > On Thu, 4 May 2017 09:30 am, Ned Batchelder wrote: > > > Functions, classes, and modules can also be referred to by a number of > > variables: > > > > def foo(): pass > > bar = baz = foo > > > > But functions (by virt

Re: getting memory usage of varaibles

2017-05-03 Thread Steve D'Aprano
On Thu, 4 May 2017 09:30 am, Ned Batchelder wrote: > Functions, classes, and modules can also be referred to by a number of > variables: > > def foo(): pass > bar = baz = foo > > But functions (by virtue of the name in the def statement) have an > inherent name, Indeed; but we also hav

Promiscuous ports under Linux

2017-05-03 Thread Peter Pearson
Cobbling together a minimalist ethernet-sniffing program, I was hoping to use this simple mechanism for setting the socket to "promiscuous mode" (to see all traffic going past, instead of just traffic addressed to my machine): s.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON) Unfortunately, it see

Re: getting memory usage of varaibles

2017-05-03 Thread Ned Batchelder
On Wednesday, May 3, 2017 at 6:22:28 PM UTC-4, larry@gmail.com wrote: > On Wed, May 3, 2017 at 6:15 PM, Terry Reedy wrote: > > On 5/3/2017 8:40 AM, Larry Martell wrote: > >> > >> On Wed, May 3, 2017 at 8:29 AM, Chris Angelico wrote: > >>> > >>> On Wed, May 3, 2017 at 10:12 PM, Larry Martell

Re: getting memory usage of varaibles

2017-05-03 Thread Erik
On 03/05/17 23:21, Larry Martell wrote: But not for a variable like a list or dict? What name should "[1, 2, 3]", or "{1, 'a': 2: 'b'}" be given? The thing about functions or classes is that you can't (at the literal source level) define them *without* giving them a name: def func(): pass c

Re: Python package to accept payments in Internet

2017-05-03 Thread Victor Porton
On Wed, 2017-05-03 at 17:02 +0200, Chris Warrick wrote: > On 3 May 2017 at 16:45, Victor Porton wrote: > > Steve D'Aprano wrote: > >  > > > On Wed, 3 May 2017 02:19 am, Victor Porton wrote: > > >  > > > > I have created a full featured package to accept payments in > > > > Internet > > > > (curren

Re: EXTERNAL: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread breamoreboy
On Wednesday, May 3, 2017 at 3:50:01 PM UTC+1, Joaquin Henriquez wrote: > >Hi, I am using Python 3.5.2 on Linux Mint (X64) at the moment, and > >wondering how to update it to 3.5.3. Are there some simple commands to do > >that? > > If available on the Mint repository you should be able to upgrade

Re: Python package to accept payments in Internet

2017-05-03 Thread Gregory Ewing
Victor Porton wrote: You carp with words, finding a problem where there is no real problem, just words (I mean the word "hack") which sound like a problem. Words are important. The very fact that it sounds like a problem *is* a problem if you're trying to persuade people to use your software, e

Re: Python package to accept payments in Internet

2017-05-03 Thread Gregory Ewing
Chris Warrick wrote: Also, this line looks unconvincing: # This is a quick hack. For serious work use https://github.com/paypal/PayPal-Python-SDK instead. Surely there's no such thing as non-serious work when you're handling other people's money? -- Greg -- https://mail.python.org/mailman/li

Re: TypeVar single constraint not allowed, why?

2017-05-03 Thread Gregory Ewing
Ned Batchelder wrote: Couldn't you simply annotate it as ": type", without using a TypeVar? Not if you want to constrain two types to be the same type. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Chris Angelico
On Thu, May 4, 2017 at 2:43 AM, Thomas Nyberg wrote: > Interesting...learn something new every day! I knew that they would > backport security updates, but I never realized they would actually use > a newer (micro) version of the interpreter while retaining the original > number on the package. (O

Re: getting memory usage of varaibles

2017-05-03 Thread Larry Martell
On Wed, May 3, 2017 at 6:15 PM, Terry Reedy wrote: > On 5/3/2017 8:40 AM, Larry Martell wrote: >> >> On Wed, May 3, 2017 at 8:29 AM, Chris Angelico wrote: >>> >>> On Wed, May 3, 2017 at 10:12 PM, Larry Martell >>> wrote: On Wed, May 3, 2017 at 12:57 AM, Chris Angelico wrote:

Re: getting memory usage of varaibles

2017-05-03 Thread Terry Reedy
On 5/3/2017 8:40 AM, Larry Martell wrote: On Wed, May 3, 2017 at 8:29 AM, Chris Angelico wrote: On Wed, May 3, 2017 at 10:12 PM, Larry Martell wrote: On Wed, May 3, 2017 at 12:57 AM, Chris Angelico wrote: On Wed, May 3, 2017 at 5:53 AM, Larry Martell wrote: And I can see it getting larger

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
On 3 May 2017 at 17:58, Victor Porton wrote: > Chris Warrick wrote: > >> On 3 May 2017 at 17:19, Victor Porton wrote: >>> What do you mean by "banned"? Does this mean that Google does not use >>> software of this license? >> >> https://opensource.google.com/docs/using/agpl-policy/ >> https://www.

Re: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Thomas Nyberg
On 05/03/2017 01:14 PM, Matt Ruffalo wrote: > This isn't quite true -- Ubuntu 14.04 shipped with Python 3.4.0, but was > updated at some point to 3.4.3 (which will be installed automatically > through normal update mechanisms). > > MMR... > Well I'm less worried about whether it is _always_ true

Re: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Matt Ruffalo
On 2017-05-03 12:43, Thomas Nyberg wrote: > On 05/03/2017 11:47 AM, Wolfgang Maier wrote: >> On 03.05.2017 17:11, Thomas Nyberg wrote: >>> On 05/03/2017 11:04 AM, Daiyue Weng wrote: nope, I was thinking it might be good to update to 3.5.3 for security reasons? >>> (CCing back in pyth

Re: Python package to accept payments in Internet

2017-05-03 Thread alister
On Wed, 03 May 2017 18:58:50 +0300, Victor Porton wrote: > Chris Warrick wrote: > >> On 3 May 2017 at 17:19, Victor Porton wrote: >>> What do you mean by "banned"? Does this mean that Google does not use >>> software of this license? >> >> https://opensource.google.com/docs/using/agpl-policy/ >

Re: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Thomas Nyberg
On 05/03/2017 11:47 AM, Wolfgang Maier wrote: > On 03.05.2017 17:11, Thomas Nyberg wrote: >> On 05/03/2017 11:04 AM, Daiyue Weng wrote: >>> nope, I was thinking it might be good to update to 3.5.3 for security >>> reasons? >>> >> >> (CCing back in python-list since I accidentally dropped it.) >> >>

Re: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Chris Angelico
On Thu, May 4, 2017 at 1:47 AM, Wolfgang Maier wrote: >> I wouldn't worry about it. Package managers tend to usually take care of >> security updates. (Of course there is criticism of Linux Mint saying >> they're not as great at this...) Looking at Ubuntu 16.04, they are still >> on 3.5.1 (plus Ub

Re: Python package to accept payments in Internet

2017-05-03 Thread Victor Porton
Chris Warrick wrote: > On 3 May 2017 at 17:19, Victor Porton wrote: >> What do you mean by "banned"? Does this mean that Google does not use >> software of this license? > > https://opensource.google.com/docs/using/agpl-policy/ > https://www.theregister.co.uk/2011/03/31/google_on_open_source_lic

Re: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Wolfgang Maier
On 03.05.2017 17:11, Thomas Nyberg wrote: On 05/03/2017 11:04 AM, Daiyue Weng wrote: nope, I was thinking it might be good to update to 3.5.3 for security reasons? (CCing back in python-list since I accidentally dropped it.) I wouldn't worry about it. Package managers tend to usually take ca

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
On 3 May 2017 at 17:19, Victor Porton wrote: > What do you mean by "banned"? Does this mean that Google does not use > software of this license? https://opensource.google.com/docs/using/agpl-policy/ https://www.theregister.co.uk/2011/03/31/google_on_open_source_licenses/ > My package is a profes

Re: Python package to accept payments in Internet

2017-05-03 Thread Victor Porton
On Wed, 2017-05-03 at 17:02 +0200, Chris Warrick wrote: > On 3 May 2017 at 16:45, Victor Porton wrote: > > Steve D'Aprano wrote: > > > > > On Wed, 3 May 2017 02:19 am, Victor Porton wrote: > > > > > > > I have created a full featured package to accept payments in > > > > Internet > > > > (curren

Re: EXTERNAL: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Chris Angelico
On Thu, May 4, 2017 at 1:03 AM, Daiyue Weng wrote: > not too urgent, just thinking it might be better to update python to the > latest version for security reasons? Let your upstream worry about that. It's their responsibility to balance security against the potential to break things. Once they'r

Re: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Thomas Nyberg
On 05/03/2017 11:04 AM, Daiyue Weng wrote: > nope, I was thinking it might be good to update to 3.5.3 for security > reasons? > (CCing back in python-list since I accidentally dropped it.) I wouldn't worry about it. Package managers tend to usually take care of security updates. (Of course there

Re: Python package to accept payments in Internet

2017-05-03 Thread Chris Warrick
On 3 May 2017 at 16:45, Victor Porton wrote: > Steve D'Aprano wrote: > >> On Wed, 3 May 2017 02:19 am, Victor Porton wrote: >> >>> I have created a full featured package to accept payments in Internet >>> (currently supports PayPal). >> [...] >>> Buy the commercial version and support scientific r

Re: EXTERNAL: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Chris Angelico
On Thu, May 4, 2017 at 12:55 AM, Daiyue Weng wrote: > tried apt-get upgrade, but didn't get python updated, maybe 3.5.3 isn't in > the repository. Might have to download it and install? How urgently do you need 3.5.3? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: EXTERNAL: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Daiyue Weng
not too urgent, just thinking it might be better to update python to the latest version for security reasons? On 3 May 2017 at 15:58, Chris Angelico wrote: > On Thu, May 4, 2017 at 12:55 AM, Daiyue Weng wrote: > > tried apt-get upgrade, but didn't get python updated, maybe 3.5.3 isn't > in > >

Re: how to share/access variables from multiprocessing target function

2017-05-03 Thread Iranna Mathapati
Can you please elaborate in my case(means above code)i tried with manager still hitting issue. Thanks, On Wed, May 3, 2017 at 8:14 PM, eryk sun wrote: > On Wed, May 3, 2017 at 2:04 PM, Iranna Mathapati > wrote: > > how to share/access the " global returndict_st_FP,returndict_st_RP" > tar

Fwd: EXTERNAL: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Daiyue Weng
tried apt-get upgrade, but didn't get python updated, maybe 3.5.3 isn't in the repository. Might have to download it and install? On 3 May 2017 at 15:42, Joaquin Henriquez wrote: > >Hi, I am using Python 3.5.2 on Linux Mint (X64) at the moment, and > >wondering how to update it to 3.5.3. Are the

Re: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Thomas Nyberg
On 05/03/2017 10:34 AM, Daiyue Weng wrote: > Hi, I am using Python 3.5.2 on Linux Mint (X64) at the moment, and > wondering how to update it to 3.5.3. Are there some simple commands to do > that? > > cheers > I wouldn't mess with the system python if I were you. That could clash with Linux Mint's

Re: Python package to accept payments in Internet

2017-05-03 Thread Victor Porton
Steve D'Aprano wrote: > On Wed, 3 May 2017 02:19 am, Victor Porton wrote: > >> I have created a full featured package to accept payments in Internet >> (currently supports PayPal). > [...] >> Buy the commercial version and support scientific research and a new >> principle of the Web I am working

RE: EXTERNAL: How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Joaquin Henriquez
>Hi, I am using Python 3.5.2 on Linux Mint (X64) at the moment, and >wondering how to update it to 3.5.3. Are there some simple commands to do >that? If available on the Mint repository you should be able to upgrade it manyally. Centos: yum upgrade Debian: apt-get upgrade Then for Mint you shoul

Re: how to share/access variables from multiprocessing target function

2017-05-03 Thread eryk sun
On Wed, May 3, 2017 at 2:04 PM, Iranna Mathapati wrote: > how to share/access the " global returndict_st_FP,returndict_st_RP" target > function variables acors the main program.. You can share a dict using a Manager. https://docs.python.org/3/library/multiprocessing.html#managers -- https://ma

How to update python from 3.5.2 to 3.5.3 on Linux

2017-05-03 Thread Daiyue Weng
Hi, I am using Python 3.5.2 on Linux Mint (X64) at the moment, and wondering how to update it to 3.5.3. Are there some simple commands to do that? cheers -- https://mail.python.org/mailman/listinfo/python-list

Re: getting memory usage of varaibles

2017-05-03 Thread Ned Batchelder
On Wednesday, May 3, 2017 at 8:40:09 AM UTC-4, larry@gmail.com wrote: > On Wed, May 3, 2017 at 8:29 AM, Ned Batchelder wrote: > > On Tuesday, May 2, 2017 at 11:49:37 PM UTC-4, larry@gmail.com wrote: > >> On Tue, May 2, 2017 at 7:01 PM, Erik wrote: > >> > On 02/05/17 23:28, Larry Martell w

how to share/access variables from multiprocessing target function

2017-05-03 Thread Iranna Mathapati
*Hi team,* *How to access the multiprocessing target function variables across the main program. * *def sending_static_traffic(FT_item_st,RT_item_st,pkt_st)*: log.info('Starting Static NAT forward Traffic Test...') global returndict_st_FP,returndict_st_RP <

Re: getting memory usage of varaibles

2017-05-03 Thread Larry Martell
On Wed, May 3, 2017 at 8:29 AM, Chris Angelico wrote: > On Wed, May 3, 2017 at 10:12 PM, Larry Martell > wrote: >> On Wed, May 3, 2017 at 12:57 AM, Chris Angelico wrote: >>> On Wed, May 3, 2017 at 5:53 AM, Larry Martell >>> wrote: And I can see it getting larger and larger. But I want to

Re: getting memory usage of varaibles

2017-05-03 Thread Larry Martell
On Wed, May 3, 2017 at 8:29 AM, Ned Batchelder wrote: > On Tuesday, May 2, 2017 at 11:49:37 PM UTC-4, larry@gmail.com wrote: >> On Tue, May 2, 2017 at 7:01 PM, Erik wrote: >> > On 02/05/17 23:28, Larry Martell wrote: >> >> Anyone have any thoughts on how I can monitor the variables'

Re: TypeVar single constraint not allowed, why?

2017-05-03 Thread Ned Batchelder
On Tuesday, May 2, 2017 at 11:45:39 AM UTC-4, oliver wrote: > The documentation for typing.TypeVar gives these two examples: > > T = TypeVar('T') # Can be anything > A = TypeVar('A', str, bytes) # Must be str or bytes > > I was suprised to find out that the following does not work, exce

Re: getting memory usage of varaibles

2017-05-03 Thread Chris Angelico
On Wed, May 3, 2017 at 10:12 PM, Larry Martell wrote: > On Wed, May 3, 2017 at 12:57 AM, Chris Angelico wrote: >> On Wed, May 3, 2017 at 5:53 AM, Larry Martell >> wrote: >>> And I can see it getting larger and larger. But I want to see what it >>> is that is causing this. My thought was to put

Re: getting memory usage of varaibles

2017-05-03 Thread Ned Batchelder
On Tuesday, May 2, 2017 at 11:49:37 PM UTC-4, larry@gmail.com wrote: > On Tue, May 2, 2017 at 7:01 PM, Erik wrote: > > On 02/05/17 23:28, Larry Martell wrote: > > Anyone have any thoughts on how I can monitor the variables' memory > usage as the script runs? > >>> > >>> > >>> Th

Re: getting memory usage of varaibles

2017-05-03 Thread Larry Martell
On Wed, May 3, 2017 at 12:57 AM, Chris Angelico wrote: > On Wed, May 3, 2017 at 5:53 AM, Larry Martell wrote: >> And I can see it getting larger and larger. But I want to see what it >> is that is causing this. My thought was to put all the objects in a >> dict with their sizes and compare them a

EuroPython 2017 Keynote: Tracy Osborn

2017-05-03 Thread M.-A. Lemburg
We are pleased to announce our first keynote speaker for EuroPython 2017: * Tracy Osborn * About Tracy --- Tracy Osborn is a designer, developer, and entrepreneur living in Toronto, Canada. Tracy holds a Bachelors degree in Art & Design. She taught herself how

Re: Help Please ! Undocumented ERROR message so dont know how to fix the problem

2017-05-03 Thread Stephen Tucker
To murdock: What Rhodri wrote is correct. I sense that it might be helpful for you if I were to tell you that there is a difference between a function and a function call. If your function were named MyFunction then print (MyFunction) would print a user-friendly-ish message about the function.