Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Deepfriedice Newsgroups: comp.lang.python Subject: Re: Python modules Date: Mon, 10 Nov 2014 14:55:27 +1000 Organization: Aioe.org NNTP Server Lines: 16 Message-ID: References: NNTP-Posting-Host: mvotIFr1QC+Lj4vpBsY8eA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.python:80450 On 10/11/14 14:55, Steve Hayes wrote: > I have a book on Python that advocates dividing programs into modules, and > importing them when needed. > > I have a question about this. > > I can understand doing that in a compiled language, where different modules > can be imported from all sorts of places when the program is compiled. > > But I understand that Python is an interpreted language, and If I wrote a > program in Python like that, and wanted to run it on another computer, how > would it find all the modules to import at run-time, unless I copied the whole > directory structure over to the other computer? You copy over the directory structure, or wrap it in a compressed archive.