Re: tail

2022-05-19 Thread Cameron Simpson
On 19May2022 19:50, Marco Sulla wrote: >On Wed, 18 May 2022 at 23:32, Cameron Simpson wrote: >> You're measuring different things. timeit() tries hard to measure >> just >> the code snippet you provide. It doesn't measure the startup cost of the >> whole python interpreter. Try: >> >> time p

Re: Python & nmap

2022-05-19 Thread MRAB
On 2022-05-19 20:28, ^Bart wrote: You forgot the second line (after 'import nmap' and before 'nm.scan()'): nm = nmap.PortScanner() import nmap nm = nmap.PortScanner() nm.scan(hosts='192.168.205.0/24', arguments='-n -sP -PE -PA21,23,80,3389') hosts_list = [(x, nm[x]['status']['state']) for

Re: Python & nmap

2022-05-19 Thread ^Bart
Opbservations worth considering 1) could possibly be handled by a simple bash script (My bash skills are not great So i would probably still go python myself anyway) Like what I wrote in my last reply to another user now I need to start this work asap so maybe I'll start to write a rough bash s

Re: Python & nmap

2022-05-19 Thread ^Bart
You forgot the second line (after 'import nmap' and before 'nm.scan()'): nm = nmap.PortScanner() import nmap nm = nmap.PortScanner() nm.scan(hosts='192.168.205.0/24', arguments='-n -sP -PE -PA21,23,80,3389') hosts_list = [(x, nm[x]['status']['state']) for x in nm.all_hosts()] for host, sta

Re: Python & nmap

2022-05-19 Thread ^Bart
Maybe it could be a good idea to look at Ansible for copying the Files to all the hosts, because that is one thing ansible is made for. I didn't know it... thanks to share it but... I should start to study it and I don't have not enought free time... but maybe in the future I'll do it! :) Fo

Re: Issue sending data from C++ to Python

2022-05-19 Thread Dieter Maurer
Pablo Martinez Ulloa wrote at 2022-5-18 15:08 +0100: >I have been using your C++ Python API, in order to establish a bridge from >C++ to Python. Do you know `cython`? It can help very much in the implementation of bridges between Python and C/C++. -- https://mail.python.org/mailman/listinfo/pytho

Re: tail

2022-05-19 Thread Marco Sulla
On Wed, 18 May 2022 at 23:32, Cameron Simpson wrote: > > On 17May2022 22:45, Marco Sulla wrote: > >Well, I've done a benchmark. > timeit.timeit("tail('/home/marco/small.txt')", globals={"tail":tail}, > number=10) > >1.5963431186974049 > timeit.timeit("tail('/home/marco/lorem.t

Invoice

2022-05-19 Thread Poppy Thomas
[image: Invoice.jpg] .. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python & nmap

2022-05-19 Thread Lars Liedtke
# scp "my_file" root@192.168.205.x/my_directory Maybe it could be a good idea to look at Ansible for copying the Files to all the hosts, because that is one thing ansible is made for. For the nmap part: Ansible does not have a module for that (sadly) but is very extensible, so if you start d

Re: Python & nmap

2022-05-19 Thread alister via Python-list
On Wed, 18 May 2022 23:52:05 +0200, ^Bart wrote: > Hi guys, > > i need to copy some files from a Debian client to all linux embedded > clients. > > I know the linux commands like: > > # scp "my_file" root@192.168.205.x/my_directory > > But... I have to upload 100 devices, I have a lan and a dh