[nylug-talk] Send a set really fast
Gary Mort
gmlug at saplings.us
Sun May 6 13:06:31 EDT 2007
Michael Bacarella wrote:
> Comma delimited list of integers.
>
> http://m.bacarella.com/aset.txt.gz
> http://m.bacarella.com/bset.txt.gz
>
>
Isn't Python an interpreted language?
Just curious, are you actually running a program in the background and
it periodically checks for new files, or are you running a program
periodically to compare the sets?
Seems to me that you integers are already in the format Python would
need to determine that their arrays, so if instead of trying to have
your Python program do the import with your own code, you could just use
python's code on loading:
you have a file with a list of numbers:
1,2,3,4
The format to declare them as an array would be:
a=[1,2,3,4]
So if you use a fast text editor to concat a=[ to the beginning of the
file and ] to the end of the file
Than invoke your python script to include those 2 files as python
programs, python will do all the work for you and automatically knows
it's setting up an array.
More information about the nylug-talk
mailing list