Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #111340 > unrolled thread

How do you guys tackle a package with poorish documentation?

Started by"Veek. M" <vek.m1234@gmail.com>
First post2016-07-12 20:01 +0530
Last post2016-07-13 00:49 -0400
Articles 3 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  How do you guys tackle a package with poorish documentation? "Veek. M" <vek.m1234@gmail.com> - 2016-07-12 20:01 +0530
    Re: How do you guys tackle a package with poorish documentation? Ben Finney <ben+python@benfinney.id.au> - 2016-07-13 09:25 +1000
    Re: How do you guys tackle a package with poorish documentation? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-07-13 00:49 -0400

#111340 — How do you guys tackle a package with poorish documentation?

From"Veek. M" <vek.m1234@gmail.com>
Date2016-07-12 20:01 +0530
SubjectHow do you guys tackle a package with poorish documentation?
Message-ID<nm2v01$jqo$1@dont-email.me>
I've been messing with QQ (a Chinese chat app) and started receiving a 
lot of shady traffic partly because I was stupid enough to install the 
insecure QQ=international version. 

Anyway, so I decided to write something to provide me with a diff for 
networks. Basically track my current n/w with marginal shady traffic and 
then try to track what happens when I connect.

scapy seems like the internet approved version for python but I 
installed: pypcap https://github.com/dugsong/pypcap

import pcap
for ts, pkt in pcap.pcap():
    print ts, `pkt`

which prints a timestamp and a pkt reference. Works great. Unfortunately 
I want what's in the packet and took a look at: pydoc pcap

 class pcap(__builtin__.object)
     |  pcap(name=None, snaplen=65535, promisc=True, timeout_ms=None, 
immediate=False)  -> packet capture object

So, what's a 'packet capture object'? It's not in pydoc and I then 
wasted a lot of time looking for better docs hoping it'll be in a book 
or in an on-line tutorial, and that's when I encountered scapy.
pypcap is and egg with a .so so how do you even do anything with it?

My question is: how do you guys deal with a situation like this? Do you 
look through the source code? Do you switch to scapy? Do you now look 
for books on scapy - there are quite a few, with chapters covering it.

A lot of my time goes to the dogs browsing for stuff so I was wondering 
if that's the norm? 

[toc] | [next] | [standalone]


#111361

FromBen Finney <ben+python@benfinney.id.au>
Date2016-07-13 09:25 +1000
Message-ID<mailman.24.1468365914.21009.python-list@python.org>
In reply to#111340
"Veek. M" <vek.m1234@gmail.com> writes:

> My question is: how do you guys deal with a situation like this? Do you 
> look through the source code? Do you switch to scapy? Do you now look 
> for books on scapy - there are quite a few, with chapters covering it.

Once you realise that there is significantly less incentive *for the
software maintainer* to spend the effort required in producing and
maintaining and distributing high-quality documentation, you necessarily
realise that someone must apply such an an incentive — otherwise the job
simply is not done.

With that realisation, it becomes immediately clear who has such an
incentive: newcomers to the library. Such as you and me.


So, when working through an unfamiliar library, make it a habit to
record the questions that are not immediately answered. Try to answer
them and record those answers in the same place.

Once you have enough understanding to know what works and what doesn't,
you will inevitably have a set of questions that were raised by trying
to learn the library, and were not answered in any obvious place.

Take those, file bug reports, make suggested patches to improve the
documentation.

All this assumes the project is community-maintained. If you come across
a library that is not community-maintained, walk away as soon as you
realise it; the hope of improvement is much lower.

> A lot of my time goes to the dogs browsing for stuff so I was
> wondering if that's the norm?

Until we make it the norm to *demand* better standards from each other,
and provide the example of doing that work with and for each other: yes.

-- 
 \        “A free press is one where it's okay to state the conclusion |
  `\                      you're led to by the evidence.” —Bill Moyers |
_o__)                                                                  |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#111374

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2016-07-13 00:49 -0400
Message-ID<mailman.29.1468385351.21009.python-list@python.org>
In reply to#111340
On Tue, 12 Jul 2016 20:01:25 +0530, "Veek. M" <vek.m1234@gmail.com>
declaimed the following:


>My question is: how do you guys deal with a situation like this? Do you 
>look through the source code? Do you switch to scapy? Do you now look 
>for books on scapy - there are quite a few, with chapters covering it.
>

	Me? For your application I'd likely just run Wireshark into a capture
file, and then post process the capture...

	Though that WAS a painful process in a way. Capture in Wireshark pcapng
format (a few GB of data) in the lab... transfer the capture to my desk
machine... Use Wireshark to load the capture, filter it, then save it in an
XML format (10x the GB)... Python program to read the XML and load the
parts I needed into an SQLite3 database (0.5x the original GB). Then
extract from database to Excel for plotting <G>

	Wireshark did have capture formats that would normally have been easier
-- but I needed the full precision time-stamp (my post processing was
reading two capture files -- what was sent from one NIC to an external
device, and what was received from that device on a separate NIC of the
same computer, so the time-stamps were on the same basis -- matching up
serial numbered data packets, and computing the time-delta latency).
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web