From: Scott on
I'm looking for suggestions on what to do (and how to do it) if I want
to share a program that I wrote in Python. There seem to be quite a
few places to post code and I don't know how to choose.

I wrote a program (script?) that takes a text file containing the
output of the "show access-list" command on a Cisco PIX/ASA/FWSM
firewall and any number of text files containing syslog output from
the same firewall and creates a report showing which access-list rules
allowed which actual connections. It is written in Python 2.6 and runs
on Windows.

Since this is obviously something mankind has long been waiting for I
am thinking about sharing it - but since I am new to Python and
programming in general I am not at all familiar with dealing with
source code.

I'm sure that improvements and additions could be made if it was
reviewed by "actual programmers" but I wouldn't exactly call it a
"project" either. Of course I'd love to add a gui interface...

I've seen pypi. It seems to index code that is posted on all sorts of
sites - including pypi itself? And what is a "package" anyway? I've
seen sourceforge. It looks like a good home for big applications or
multi-developer projects. Freshmeat? Google code? My own website? Your
blog?

Another detail is that my program uses a library that was written by
someone else. It is the most excellent netaddr written by David P. D.
Moss and it lives at code.google.com. It uses the New BSD License.
Since this library is required would I simply provide a link to it?
Would I post the actual library? Do I have to post a copy of his
copyright info anywhere? Please don't tell me I have to write some
kind of installer that takes care of providing that.

I really just want anyone who might need a little networking/security
tool like this to be able to find it. Any advice?

Thanks,
Scott
From: James Harris on
On 4 May, 22:40, Scott <scott.freem...(a)gmail.com> wrote:
> I'm looking for suggestions on what to do (and how to do it) if I want
> to share a program that I wrote in Python. There seem to be quite a
> few places to post code and I don't know how to choose.

Perhaps look at the options and then select whichever suits your needs
best.

> I wrote a program (script?) that takes a text file containing the
> output of  the "show access-list" command on a Cisco PIX/ASA/FWSM
> firewall and any number of text files containing syslog output from
> the same firewall and creates a report showing which access-list rules
> allowed which actual connections. It is written in Python 2.6 and runs
> on Windows.
>
> Since this is obviously something mankind has long been waiting for I
> am thinking about sharing it - but since I am new to Python and
> programming in general I am not at all familiar with dealing with
> source code.
>
> I'm sure that improvements and additions could be made if it was
> reviewed by "actual programmers" but I wouldn't exactly call it a
> "project" either. Of course I'd love to add a gui interface...

An option if you want reviews - and your code is short - is to post it
here to comp.lang.python.

> I've seen pypi. It seems to index code that is posted on all sorts of
> sites - including pypi itself? And what is a "package" anyway? I've
> seen sourceforge. It looks like a good home for big applications or
> multi-developer projects. Freshmeat? Google code? My own website? Your
> blog?

Yes, many of these are well suited for significant projects. I set up

http://codewiki.wikispaces.com/

Its focus is not on code size per se but on promoting sharing and
updates. However, *smaller* pieces of code are preferred, i.e. code
that can be viewed online and learned from. For example, see the
Python programs at

http://codewiki.wikispaces.com/index_by_language#x-Portable%20Python

>
> Another detail is that my program uses a library that was written by
> someone else. It is the most excellent netaddr written by David P. D.
> Moss and it lives at code.google.com. It uses the New BSD License.
> Since this library is required would I simply provide a link to it?
> Would I post the actual library? Do I have to post a copy of his
> copyright info anywhere? Please don't tell me I have to write some
> kind of installer that takes care of providing that.

Unless you are worried that the original copy of the library may be
deleted or lost it should be enough to post a link. Then the web site
that contains the code would be responsible for explaining its licence
and will include other relevant documentation.

For my own code on codewiki I include installation instructions as
text, where necessary.

> I really just want anyone who might need a little networking/security
> tool like this to be able to find it. Any advice?

That was similar to my motive. Interestingly the highest number of
page hits on the site is for a networking utility.

James
From: Scott on
James,

Thanks for the comprehensive reply. I would like to post it to
comp.lang.python but the main file is 169 lines long and the file for
functions is 316 lines long. I'm thinking that is a little long for
this format. Maybe I can put them up on a basic web page or file
sharing site and just post a link. Is that well received on this
forum?

Thanks,
Scott
From: Lie Ryan on
On 05/05/10 13:25, Scott wrote:
> James,
>
> Thanks for the comprehensive reply. I would like to post it to
> comp.lang.python but the main file is 169 lines long and the file for
> functions is 316 lines long. I'm thinking that is a little long for
> this format. Maybe I can put them up on a basic web page or file
> sharing site and just post a link. Is that well received on this
> forum?
>
> Thanks,
> Scott

Make it as easy as possible for people to get to your code; file sharing
site isn't very good for this (especially those that have wait time and
download limits and if you have to zip your file). If you're setting up
a webpage you need to take care not to mess up special characters. Using
pastebin is fairly well-received as people won't have to save the file
to their harddrive to see the content and their page is specifically set
up for displaying code (syntax highlighting and stuffs).

If your code is specifically reusable or if it illustrates a certain
concept, posting it as Activestate recipe is great as well.
From: Chris Rebert on
On Tue, May 4, 2010 at 9:16 PM, Lie Ryan <lie.1296(a)gmail.com> wrote:
> On 05/05/10 13:25, Scott wrote:
>> I would like to post it to
>> comp.lang.python but the main file is 169 lines long and the file for
>> functions is 316 lines long. I'm thinking that is a little long for
>> this format. Maybe I can put them up on a basic web page or file
>> sharing site and just post a link. Is that well received on this
>> forum?
>>
> Make it as easy as possible for people to get to your code; file sharing
> site isn't very good for this (especially those that have wait time and
> download limits and if you have to zip your file). If you're setting up
> a webpage you need to take care not to mess up special characters. Using
> pastebin is fairly well-received as people won't have to save the file
> to their harddrive to see the content and their page is specifically set
> up for displaying code (syntax highlighting and stuffs).
>
> If your code is specifically reusable or if it illustrates a certain
> concept, posting it as Activestate recipe is great as well.

In case Scott's not familiar, obligatory link:
http://code.activestate.com/recipes/langs/python/

Cheers,
Chris
--
http://blog.rebertia.com