Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'wrote:': 0.15; 'a.py': 0.16; 'modules?': 0.16; 'cc:addr:python-list': 0.16; 'pm,': 0.16; 'received:74.125.82.174': 0.19; 'received:mail- wy0-f174.google.com': 0.19; 'variable': 0.21; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'message-id:@mail.gmail.com': 0.28; 'thu,': 0.28; 'import': 0.29; 'cc:addr:python.org': 0.30; 'example': 0.30; 'there': 0.34; 'certain': 0.36; 'received:google.com': 0.37; 'subject:: ': 0.38; 'should': 0.39; 'received:74.125.82': 0.39; 'received:74.125': 0.40; 'jun': 0.67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=ldW3JpmucOhT1KeITvzL0gLZe5EpPAACe7keGoHMqNo=; b=yBdJBPx7/6ItmQzdoW81CTN9iNgSTbHgQV2ytJesHuGBTFCpOD5+8s+WPvrEbnBlBJ emleFSG94UIIGMc0qHoh4i6CRLufzcgMbTOkFwrbTpLOHrgsMZ2Acr/CnXhc4JvHm/f8 nE/QS8i1NoDW18jwJJnqD4PAbbMKHpfcGxulI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=jEdL1z+42DZ6YOljUmW/F432KDPEs8JtQ71UP/2rIV66wcHLXK93LpLBxQgsFQR/TN UPAFzwROiGDEU3IEWeXQHNimtKpYJ8QZmJI+IW/OscvbKSV0RYCkFflvl/nOfYPD5/iL nS2A+Msl09JQF6x2ZGYZCBlDI1TM5T1jOWCoU= MIME-Version: 1.0 In-Reply-To: <7c6cf5e3-8ba0-45c8-86f8-bf3fc5fa2422@v11g2000prn.googlegroups.com> References: <7c6cf5e3-8ba0-45c8-86f8-bf3fc5fa2422@v11g2000prn.googlegroups.com> From: Noah Hall Date: Thu, 23 Jun 2011 14:59:23 +0100 Subject: Re: Project-wide variable... To: Gnarlodious Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org 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: 15 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1308837591 news.xs4all.nl 14148 [::ffff:82.94.164.166]:38186 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8298 On Thu, Jun 23, 2011 at 2:41 PM, Gnarlodious wrote: > Is there a way to declare a project-wide variable and use that in all > downstream modules? Well, the standard way you should do it is to use import to import a certain variable - for example - a.py - x = 3 >>>from a import x >>>x 3