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


Groups > comp.lang.python > #40029

Re: Small program ideas

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'lines,': 0.05; 'conversions': 0.07; 'exist,': 0.07; 'sized': 0.07; 'docs.': 0.09; 'friday,': 0.09; 'suggestions.': 0.09; 'files.': 0.13; '"by': 0.16; 'between.': 0.16; 'csv': 0.16; 'csv,': 0.16; 'dig': 0.16; 'program?': 0.16; 'subject:ideas': 0.16; 'subject:program': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'thanks.': 0.21; 'do.': 0.21; 'algorithms.': 0.22; 'ones.': 0.22; 'stick': 0.22; 'work,': 0.22; "i'd": 0.22; 'work.': 0.23; '15,': 0.23; 'mention': 0.23; 'monday,': 0.23; 'somewhere': 0.24; 'command': 0.24; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'first,': 0.27; 'dos': 0.27; 'library.': 0.27; 'lines': 0.28; '>>>>': 0.29; 'convert': 0.29; 'probably': 0.29; 'code': 0.31; '(and': 0.32; 'file': 0.32; 'could': 0.32; 'utility': 0.33; 'to:addr:python- list': 0.33; '(with': 0.33; 'excel': 0.33; 'guys': 0.33; 'another': 0.33; 'text': 0.34; 'pm,': 0.35; 'something': 0.35; 'there': 0.35; 'really': 0.36; 'but': 0.36; 'depends': 0.36; 'modules': 0.36; 'useful': 0.36; 'test': 0.36; 'thank': 0.36; 'two': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'things': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'your': 0.60; 'kind': 0.61; 'experience.': 0.65; 'useful.': 0.65; 'received:74.208': 0.71; '2013': 0.84; 'compression,': 0.84; 'spreadsheet': 0.84; 'tree,': 0.84; 'dozen': 0.91; 'more?': 0.91; 'angel': 0.93; 'eli': 0.93
Date Tue, 26 Feb 2013 22:27:11 -0500
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version 1.0
To python-list@python.org
Subject Re: Small program ideas
References <b785a583-a10d-4203-882f-c09c5610ce75@googlegroups.com> <1cff6513-4d67-4fdc-a86d-945635859683@googlegroups.com> <mailman.2534.1361859347.2939.python-list@python.org> <c136f09a-f5a1-4c21-9c75-45a98ae291a7@googlegroups.com>
In-Reply-To <c136f09a-f5a1-4c21-9c75-45a98ae291a7@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:U93EN2CDBDlnTs2shMtcufQW8ixUs1PXaQee4zgHENM fTtrH467g5q0XsCRmfHloMSpHyJrsrIyMvOdGUrDT5Nq68K/su +9/8hFe9g6LzlyvAvmeF0l0IgBwfVW1MQYHk0mVA6fETZ/kboK MndWAlibmXmXLsrn9j0h0aTT/aMzGepanu61qb0sO0X6bhWtFs HZr4xRptTkk3k8NG+XlMP8hpeqocMhVC9RWQfhBGhSmcgmeGUw UzpU76WZNlYinhhlvQkF4Gv+uOoNKx8S/9Oyl44E0UsWqlJkXK kAq1TmoyudQgPOn/s1mma+PaKhtoQlL67twsj8ijOTGifwBXQ= =
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2592.1361935656.2939.python-list@python.org> (permalink)
Lines 58
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361935656 news.xs4all.nl 6923 [2001:888:2000:d::a6]:52304
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:40029

Show key headers only | View raw


On 02/26/2013 05:47 PM, eli m wrote:
> On Monday, February 25, 2013 10:15:24 PM UTC-8, Dave Angel wrote:
>> On 02/25/2013 10:48 PM, eli m wrote:
>>
>>> On Friday, February 15, 2013 7:22:41 PM UTC-8, eli m wrote:
>>
>>>> Any small program ideas? I would prefer to stick to command line ones. Thanks.
>>
>>>
>>
>>> Thank you guys for the suggestions. Any more?
>>
>>>
>>
>>
>>
>> There are all kinds of things you could do.  First, consider something
>>
>> that might be useful.
>>
>>
>>
>> 1) checksum all the files in a directory tree, using various checksum
>>
>> algorithms.
>>
>>
>>
>> 2) Convert one kind of file to another.
>>
>>   <snip>
>>
>
> How hard would it be to change one file to another and would it be a small-medium sized program?
>

Depends on the kinds of the two files.  To convert an Excel spreadsheet 
file to a csv file might be a lot of work, thousands of lines, not to 
mention having to dig up the docs.  But to convert a DOS text file (with 
lines ending cr/lf) into a Unix text file (with lines ending lf)  would 
be a dozen lines, shrinkable to 3 with lots of experience.  (And I'd 
probably prefer the dozen line version)

Other conversions might be somewhere in between.  You could do data 
compression, like bzip, using the modules in the standard library.

Note that utility commands may exist, but it can be instructive to do it 
"by hand" anyway, to learn how.

Look at the following libraries, and see how you could write the glue to 
make them into useful file conversion utilities.  Then test them against 
the standard equivalents, to make sure your code really work.
alib, gzip, bz2, zipfile, tarfile, csv, ConfigParser, robotparser, ...



-- 
DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Small program ideas eli m <techgeek201@gmail.com> - 2013-02-15 19:22 -0800
  Re: Small program ideas Mitya Sirenef <msirenef@lightbird.net> - 2013-02-15 22:52 -0500
    Re: Small program ideas eli m <techgeek201@gmail.com> - 2013-02-15 19:57 -0800
      Re: Small program ideas Mitya Sirenef <msirenef@lightbird.net> - 2013-02-15 23:19 -0500
      Re: Small program ideas Mark R Rivet <markrrivet@aol.com> - 2013-02-16 12:42 -0500
    Re: Small program ideas eli m <techgeek201@gmail.com> - 2013-02-15 19:57 -0800
    Re: Small program ideas Mark R Rivet <markrrivet@aol.com> - 2013-02-16 12:40 -0500
  Re: Small program ideas eli m <techgeek201@gmail.com> - 2013-02-25 19:48 -0800
    Re: Small program ideas Dave Angel <davea@davea.name> - 2013-02-26 01:15 -0500
      Re: Small program ideas eli m <techgeek201@gmail.com> - 2013-02-26 14:47 -0800
        Re: Small program ideas Joshua Landau <joshua.landau.ws@gmail.com> - 2013-02-27 00:22 +0000
          Re: Small program ideas eli m <techgeek201@gmail.com> - 2013-02-26 16:47 -0800
          Re: Small program ideas eli m <techgeek201@gmail.com> - 2013-02-26 16:47 -0800
        Re: Small program ideas Dave Angel <davea@davea.name> - 2013-02-26 22:27 -0500
        Re: Small program ideas Chris Angelico <rosuav@gmail.com> - 2013-02-27 17:18 +1100
      Re: Small program ideas eli m <techgeek201@gmail.com> - 2013-02-26 14:47 -0800
    Re: Small program ideas "Vytas D." <vytasd2013@gmail.com> - 2013-02-26 13:21 +0000
      Re: Small program ideas Neil Cerutti <neilc@norwich.edu> - 2013-02-26 14:32 +0000
    Re: Small program ideas Matej Cepl <mcepl@redhat.com> - 2013-02-26 14:21 +0100
  Re: Small program ideas eli m <techgeek201@gmail.com> - 2013-03-18 16:51 -0700
    Re: Small program ideas Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-19 00:56 +0000
  Re: Small program ideas PMT <d12123176@mydit.ie> - 2013-03-28 11:46 -0700
    Re: Small program ideas Neil Cerutti <neilc@norwich.edu> - 2013-03-29 13:43 +0000

csiph-web