Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Python's import situation has driven me to the brink of imsanity Date: Sun, 7 Feb 2016 13:52:21 +1100 Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de MgCkHpmd8FrmcT99YjznSAmANO8ePGECUt/HrK+1d4Ng== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.05; 'cc:addr:python-list': 0.09; 'imports': 0.09; 'python': 0.10; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'macro': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:import': 0.16; 'usable)': 0.16; 'wrote:': 0.16; '(not': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'file.': 0.22; 'feb': 0.23; 'header :In-Reply-To:1': 0.24; 'script': 0.25; 'least': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'package.': 0.27; 'actual': 0.28; 'usable': 0.29; 'allows': 0.30; 'creating': 0.30; "i'd": 0.31; 'though.': 0.33; 'running': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'stuff': 0.38; 'anything': 0.38; 'files': 0.38; 'subject:the': 0.39; 'easy': 0.60; 'more.': 0.63; 'hear': 0.64; 'it!': 0.64; 'chrisa': 0.84; 'to:none': 0.91; '1:47': 0.91; 'luck': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=3bzpXOD0fEuRqYlXcNlt9OVQIYFwDkQ2DSQduMT9SDM=; b=S5qjXYkJrbnkla/JRrszDU2oqpq4MSLt/EkqzJZg5GLz1rUk5wJF784hmnO86ZWrb5 rVLAXbYgBhhz4sK7D/GqK/3ZNPNRDEj5u1/MON9fn8wtIFHO+2mh+ymxGxF8/gDdLZnk anKELKu3nU1NKJ88vxxKJ9N9YH908oHi6T6SaAHkiaf9Z7BvknawtZ7pN3VDbHgi3p10 yAkXJJW68xgiq7oOD5bvloPHpGY8MWBvKLaOP3G8FTofBgSuFamArg7jaZKgsP/JNPQ+ 41IESSo5BADRdfkvppBQHbnbIC4rxMHI7EJmENj8h8E47FQcwa1Am1uqJiEJ+Y7/NMuu uuBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type:content-transfer-encoding; bh=3bzpXOD0fEuRqYlXcNlt9OVQIYFwDkQ2DSQduMT9SDM=; b=dD5O/rcNNMGZTfkfMHZsUPEKh4BODNlW7jzRFK1gEo3VmYs0yhoNIK/i0JN8HZdhK6 aW2lyR9JXPcyxTksq5tqZPqplhOeKlINTmQ885DpsrbQr+lbY3YJE9AqIXmjUTH9kYHs 9y7AZCUscVNA0RPcivGbdIwzRwisYmw62eSkZtgc70W6ZQoINVY9cL2z4yL3UsjSYIAW 2iaqDPULunCLa/n8BUvr5nP0b9bgoIwlpZ+wvMe4bekMIolTd+/gyp5/a0gGsfeEYSue 0JwSjHEPShPsZDKw++uqs82/C9ivD72wreY6tOPd800fX6/91YiNSl3W8fpDUWEJ2CDZ euZQ== X-Gm-Message-State: AG10YOSyJM5c4N7PEspLxdhP4k9IkAsMDFbJcNzoDI8mF5JCfHZTabpmAa8w1dkBQTAIZqqvHda5n5Hj62rljA== X-Received: by 10.50.28.105 with SMTP id a9mr18377805igh.94.1454813541940; Sat, 06 Feb 2016 18:52:21 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102604 On Sun, Feb 7, 2016 at 1:47 PM, wrote: > Imsanity allows you to make imports usable (not ideal, but at least usabl= e) for python projects without having to manage PYTHONPATHs or do whacky st= uff like running files with python -m or put even whackier boilerplate at t= he top of every file. And all it requires is 'import imsanity' at the top o= f every file. You can put it in a macro or even just type it because it's s= hort and easy to remember. > > My question is: is this crazy? Please tell me there's a better way and I = just wasted my time creating this package. There's nothing I'd like to hear= more. Well, anything that makes you type "import imsanity" at the top of every script MUST be crazy. :) I don't know about the actual content/purpose though. Good luck with it! ChrisA