Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'question:': 0.07; 'python': 0.08; 'subject:modules': 0.09; 'am,': 0.12; 'library': 0.13; 'gui': 0.13; 'packages.': 0.13; '*very*': 0.16; '9:15': 0.16; 'clashes': 0.16; 'modules?': 0.16; 'naming': 0.16; 'package;': 0.16; 'pep8': 0.16; 'subject:Newbie': 0.16; 'cc:addr :python-list': 0.16; 'subject:question': 0.16; 'wed,': 0.17; 'wrote:': 0.18; 'cheers,': 0.20; 'cc:no real name:2**0': 0.21; 'header:In-Reply-To:1': 0.22; 'feb': 0.22; 'elements': 0.24; "python's": 0.24; 'received:209.85.220': 0.25; 'cc:2**0': 0.26; 'message-id:@mail.gmail.com': 0.29; 'avoiding': 0.29; 'cc:addr:python.org': 0.29; 'chris': 0.30; 'error': 0.30; 'quite': 0.31; 'modules': 0.32; 'there': 0.33; 'mostly': 0.34; 'things': 0.35; 'but': 0.37; 'received:google.com': 0.37; 'using': 0.37; 'received:209.85': 0.38; 'could': 0.38; 'recommended': 0.39; 'received:209': 0.39; 'subject: (': 0.40; 'put': 0.40; 'easy': 0.60; 'site': 0.60; 'results': 0.64; 'here': 0.64; 'due': 0.66; 'quality': 0.75; 'adhere': 0.84; 'excellent.': 0.84; 'sender:addr:chris': 0.84; 'to:none': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type; bh=6gZIoj2DuptbHRpSZCKMl6Lhh3oIffLd3AJw4MuISBE=; b=Svjext+WQJH7/YeEScdHs1c6qvJZz46+Bso3E68eoV5cRplzbnzdXaJDd8GVs5pi8u GM4CggDmZ6zqGw0k7dUIXlu5jOij8ObbJByE6UzyJNhJayw7YX34E3acIgtE+G1plvbR WXdnRHpMuTv5g0VdtMQSZTqjSTLahoKKWfqKA= MIME-Version: 1.0 Sender: chris@rebertia.com In-Reply-To: References: Date: Wed, 8 Feb 2012 09:49:31 -0800 X-Google-Sender-Auth: wsW3ck1xaBe6MSR_aK-mHvd5spQ Subject: Re: Naming convention for in-house modules (Newbie question) From: Chris Rebert Cc: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 1328723374 news.xs4all.nl 6989 [2001:888:2000:d::a6]:33701 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.stben.net!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20030 On Wed, Feb 8, 2012 at 9:15 AM, HoneyMonster wrote: > I am quite new to Python (2.7 on Linux), and have built a few modules > using wxPython/wxGlade for GUI elements and Psycopg2 for database access. > I adhere mostly to the PEP8 guidelines, and use Pylint to help with > quality control. > > So far I have been *very* impressed. Due to Python's straightforwardness > and the wealth of documentation, results have been excellent. > > Here is my question: I would like to start an in-house library of small > modules to import, for things like error handling/logging. That's easy > enough, but is there a recommended way of naming such modules? I am > concerned about avoiding name clashes with standard modules and site > packages. You could put all the modules under a single package; then you only need to worry about avoiding 1 name conflict. Cheers, Chris