Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70814
| From | Mark H Harris <harrismh777@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Running scripts from shell / IDLE in windows |
| Date | 2014-05-01 11:18 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ljts4h$bpt$1@speranza.aioe.org> (permalink) |
| References | <9fa954ea-e341-42ac-a91d-fb25598ccba7@googlegroups.com> <53627022.9020504@gmail.com> |
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