Python Forum
Pass variable script return twice output problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pass variable script return twice output problem
#1
Hello guys. I write two python code and I can pass variable two scrpit but I have some problem. My scrpits this:

script1.py

x='a'
import script2
script2.py

import script1
import time

print "second script start"
print script1.x
print "secon script end"
When I ran script2.py result this:

Output:
second script start a second script end second script start a second script end
Why script2.py return result twice. How can i fix twice run problem? Thanks
Reply


Messages In This Thread
Pass variable script return twice output problem - by Faruk - Dec-26-2018, 09:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem in output of a snippet code akbarza 2 388 Feb-28-2024, 07:15 PM
Last Post: deanhystad
  output shape problem with np.arange alan6690 5 702 Dec-26-2023, 05:44 PM
Last Post: deanhystad
  dynamic variable name declaration in OOP style project problem jacksfrustration 3 798 Oct-22-2023, 10:05 PM
Last Post: deanhystad
  problem in output of a function akbarza 9 1,212 Sep-29-2023, 11:13 AM
Last Post: snippsat
  Receiving this error in my "response" and causes script to return wrong status cubangt 18 2,086 Aug-13-2023, 12:16 AM
Last Post: cubangt
  How to pass encrypted pass to pyodbc script tester_V 0 871 Jul-27-2023, 12:40 AM
Last Post: tester_V
  Trouble with threading and reading variable from a different script Lembas 14 3,073 Apr-26-2023, 11:21 PM
Last Post: Lembas
  Python Pandas Syntax problem? Wrong Output, any ideas? Gbuoy 2 937 Jan-18-2023, 10:02 PM
Last Post: snippsat
  Stock Return calculation problem LFin 10 2,127 Sep-26-2022, 04:28 PM
Last Post: deanhystad
  Facing problem with Pycharm - Not getting the expected output amortal03 1 865 Sep-09-2022, 05:44 PM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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