Beginner Ping program

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Sat Apr 28 08:14:47 CEST 2007


In <1177739647.737759.32610 at u30g2000hsc.googlegroups.com>, Linus Cohen
wrote:

> I'm a newbie to python and programming in general, so I wanted a
> simple project to start off. What I'm trying to do here is write a
> python command-line ping program, much like the Unix and Windows ping
> programs. I've got this much worked out already:
> 
> class ping
>     def PING(IP, pings, size):

Why is it a class?  I would have expected a `ping()` function.

And you might have a look at `PEP 8 -- Style Guide for Python Code`_ for
spelling conventions for class and function names.

.. _PEP 8 -- Style Guide for Python Code:
   http://www.python.org/dev/peps/pep-0008/

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list