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


Groups > comp.lang.python > #72019

Re: How to pass variable through scipts

References <ad229845-3b2d-4238-ad68-db9c8493801c@googlegroups.com>
Date 2014-05-26 03:07 +1000
Subject Re: How to pass variable through scipts
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.10304.1401037640.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, May 26, 2014 at 2:01 AM,  <dimmaim@gmail.com> wrote:
> i want to pass the variables xx and yy to a different script called application. This script by calling it with import, automatically  pop up a window. I need by clicking the button that is linked with OnB definition to pop up the window from the other script as it does when i am running it alone and display lets say for example the variables xx and yy, how can i do it
>

When you import another script, you gain access to its functions and
classes and such. All you need to do is write your function to take a
couple of arguments, and then pass xx and yy as those arguments.

I recommend you read and work through the Python tutorial - one of
these, depending on which version of Python you use:

https://docs.python.org/2/tutorial/
https://docs.python.org/3/tutorial/

It'll explain a lot of these sorts of things.

Chris Angelico

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


Thread

How to pass variable through scipts dimmaim@gmail.com - 2014-05-25 09:01 -0700
  Re: How to pass variable through scipts Chris Angelico <rosuav@gmail.com> - 2014-05-26 03:07 +1000

csiph-web