Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70813
| 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:02:42 -0500 |
| Organization | Aioe.org NNTP Server |
| Lines | 41 |
| Message-ID | <53627022.9020504@gmail.com> (permalink) |
| References | <9fa954ea-e341-42ac-a91d-fb25598ccba7@googlegroups.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:70813 |
Show key headers only | View raw
On 5/1/14 10:34 AM, s71murfy wrote:
>
> I am trying to run the simple helloworld script from the IDLE shell. I want to pass it arguments. Please can you give me the syntax to do it?
>
There are several ways to do this, depending on your preferences and
goals. Is the helloworld script the tk version? In which case have the
script put up input dialog boxes...
The python docs pages are very clear about input parameter i/o and may
give you some help, if you're building a script that you want to launch
from a terminal, or startup...
What I do with my IDLE scripts is embed to embed a Main function (or
call it Hello(). So, I import hello, then call hello.Main(parms). or,
hello.Hello(parms)
example
====file hello.py===
def Hello(parms list):
whatever
whatever
====================
From IDLE:
import hello
hello.Hello([1, 2, 3, 4])
marcus
Back to comp.lang.python | Previous | Next — Previous in thread | Next 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