Path: csiph.com!usenet.pasdenom.info!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; '16,': 0.03; 'python': 0.11; '05:42,': 0.16; 'drag': 0.16; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'golden': 0.16; 'message- id:@timgolden.me.uk': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject:Converting': 0.16; 'subject:folder': 0.16; 'temp': 0.16; 'textfile': 0.16; 'tjg': 0.16; 'thursday,': 0.16; 'wrote:': 0.18; 'creating': 0.23; 'header :User-Agent:1': 0.23; 'directory.': 0.24; 'example.': 0.24; 'received:192.168.100': 0.24; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; 'code': 0.31; 'lines': 0.31; 'directory,': 0.31; 'helpful.': 0.31; 'python).': 0.31; 'subject:per': 0.31; 'file': 0.32; 'weeks': 0.32; 'run': 0.32; 'text': 0.33; 'worked': 0.33; 'created': 0.35; 'useful': 0.36; 'thanks': 0.36; 'should': 0.36; 'january': 0.37; 'to:addr:python-list': 0.38; 'files': 0.38; 'pdf': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'easy': 0.60; 'future': 0.60; 'back': 0.62; 'email addr:gmail.com': 0.63; 'great': 0.65; 'sample': 0.67; 'useful.': 0.68; 'walk': 0.74; '250': 0.78; '100': 0.79; 'from:addr:mail': 0.83; 'glad': 0.83 Date: Fri, 17 Jan 2014 08:53:21 +0000 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Converting folders of jpegs to single pdf per folder References: <0c648d2d-d8b3-4848-8b37-1e5e1ae40327@googlegroups.com> <96cfad0d-143f-4084-827f-a67006bf6db2@googlegroups.com> In-Reply-To: <96cfad0d-143f-4084-827f-a67006bf6db2@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389948805 news.xs4all.nl 2970 [2001:888:2000:d::a6]:57410 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64144 On 17/01/2014 05:42, vasishtha.spier@gmail.com wrote: > On Thursday, January 16, 2014 12:07:59 PM UTC-8, Tim Golden wrote: >> >> Here's a quick example. This should walk down the Python directory, >> creating a text file for each directory. The textfile will contain >> the names of all the files in the directory. (NB this might create >> a lot of text files so run it inside some temp directory). [.. snip sample code ...] > > Thanks Tim. It worked like a charm and saved me weeks of work using > a drag and drop utility. About 250 pdf files created of 50 to 100 > pages each. Heres the code in case any one else can use it. [snip] Glad it was helpful. And thanks for coming back with the solution: hopefully future searchers will find it useful. (And it's a great advert for how easy it is to do useful things in just a few lines of Python). TJG