0

Example :

Filename: date_new.py

import time

CURRENT_TIME=time.time()

Filename2:test1.py

import date_new

date_new.CURRENT_TIME #### 2020/04/15 05:46:14

..

..

..

date_new.CURRENT_TIME #### 2020/04/15 05:46:14 same answer both places

I want the latest time stamp

Sree
  • 1
  • 1
  • Create a small function CURRENT_TIME in date_new.py file and return time.time() and call the same from your test1.py file. In your case once time is generated it is assigned to CURRENT_TIME. Go through this file you can use time in multiple ways. https://stackoverflow.com/questions/415511/how-to-get-the-current-time-in-python – ibrahim Apr 15 '20 at 00:59
  • I have multiple variables other than CURRENT_TIME, for my test execution we call date, gmt time, month,etc. Nearly 200 such variables are defined in first file – Sree Apr 15 '20 at 22:42

0 Answers0