Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80450

Re: Python modules

Path csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From Deepfriedice <Deepfriedice@openmailbox.org>
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 <m3pgfu$daj$2@speranza.aioe.org> (permalink)
References <i0h06a9pj8h3olo5rnrgc64i7ckpvtvti6@4ax.com>
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

Show key headers only | View raw


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.

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Python modules Steve Hayes <hayesstw@telkomsa.net> - 2014-11-10 06:55 +0200
  Re: Python modules Deepfriedice <Deepfriedice@openmailbox.org> - 2014-11-10 14:55 +1000
  Re: Python modules Ben Finney <ben+python@benfinney.id.au> - 2014-11-10 16:12 +1100
    Re: Python modules Steve Hayes <hayesstw@telkomsa.net> - 2014-11-10 08:58 +0200
      Re: Python modules Ben Finney <ben+python@benfinney.id.au> - 2014-11-10 18:48 +1100
  Re: Python modules Roy Smith <roy@panix.com> - 2014-11-10 08:36 -0500
    Re: Python modules Chris Angelico <rosuav@gmail.com> - 2014-11-11 00:49 +1100
  Re: Python modules Will Acheson <willyach07@gmail.com> - 2014-11-11 12:06 -0800
    Re: Python modules Ben Finney <ben+python@benfinney.id.au> - 2014-11-12 09:18 +1100

csiph-web