Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70814
| Path | csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Mark H Harris <harrismh777@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Running scripts from shell / IDLE in windows |
| Date | Thu, 01 May 2014 11:18:28 -0500 |
| Organization | Aioe.org NNTP Server |
| Lines | 40 |
| Message-ID | <ljts4h$bpt$1@speranza.aioe.org> (permalink) |
| References | <9fa954ea-e341-42ac-a91d-fb25598ccba7@googlegroups.com> <53627022.9020504@gmail.com> |
| NNTP-Posting-Host | eSF12mcVRIwL+eMIMJ03mA.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.lang.python:70814 |
Show key headers only | View raw
On 5/1/14 11:02 AM, Mark H Harris wrote:
> ====file hello.py===
>
> def Hello(parms list):
> whatever
> whatever
>
> ====================
>
>
> From IDLE:
>
> import hello
>
> hello.Hello([1, 2, 3, 4])
Sorry, almost forgot, if you 'run' the module hello.py (with the IDLE
run dropdown) then the 'hello' name will not be in the namespace... just
enter:
Hello(parms)
Here is another example:
===hello.py===
def Hello(myname):
out = "hello, " + str(myname)
print(out)
==============
import hello
hello.Hello("mark")
hello, mark
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Running scripts from shell / IDLE in windows s71murfy <sam.murthy@gmail.com> - 2014-05-01 08:34 -0700
Re: Running scripts from shell / IDLE in windows Mark H Harris <harrismh777@gmail.com> - 2014-05-01 11:02 -0500
Re: Running scripts from shell / IDLE in windows Mark H Harris <harrismh777@gmail.com> - 2014-05-01 11:18 -0500
csiph-web