Python Forum
passing-arguments-from-one-script-to-another
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
passing-arguments-from-one-script-to-another
#4
I just did this:

page1.py
value = 'This is a test'

def echo():
    print(value)
page2.py
import page1
print(page1.value)
page1.value = 'Are you listening?'
page1.echo()
When I run the page2.py script it prints
Output:
This is a test Are you listening?
Reply


Messages In This Thread
RE: passing-arguments-from-one-script-to-another - by deanhystad - Apr-21-2020, 03:12 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems passing arguments containing spaces to bash script and then on to python kaustin 6 498 Apr-03-2024, 08:26 PM
Last Post: deanhystad
  Passing writable arguments to functions. Assembler 11 1,127 Jan-15-2024, 11:32 PM
Last Post: sgrey
  Passing string functions as arguments Clunk_Head 3 1,309 Jun-15-2022, 06:00 AM
Last Post: Gribouillis
  Passing flags to python script, through a function xbit 4 4,046 Apr-20-2021, 06:32 AM
Last Post: ndc85430
  redirect url_for passing arguments with the url Leon79 1 1,685 Jul-09-2020, 05:20 PM
Last Post: Leon79
  How to write a script to execute a program need passing additional input? larkypython 2 2,614 Nov-23-2019, 04:38 AM
Last Post: larkypython
  Still confused about how passing arguments works RedSkeleton007 3 2,998 Apr-25-2018, 11:01 AM
Last Post: snippsat
  Trouble passing arguments underoathed 2 2,984 Nov-13-2017, 04:20 PM
Last Post: underoathed
  Functions (Arguments Passing,Changing a mutable ,Assignment to Arguments Names) Adelton 2 3,915 Mar-02-2017, 10:23 PM
Last Post: zivoni
  multiprocess passing multiple arguments double asterisk pic8690 1 5,322 Oct-23-2016, 08:51 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020