python join paths
import os
# Join paths using OS import. Takes any amount of arguments
path = os.path.join('/var/www/public_html', './app/', ".\my_file.json")
print(path) # /var/www/public_html/app/myfile.json
python join paths
import os
# Join paths using OS import. Takes any amount of arguments
path = os.path.join('/var/www/public_html', './app/', ".\my_file.json")
print(path) # /var/www/public_html/app/myfile.json
time.ctime(os.path.getmtime phyton in datetime
x = time.strftime("%d.%m.%Y", time.gmtime(os.path.getmtime("{}".format("file.txt"))))
# getctime can be used instead of getmtime
# getctime = file creation date
# getmtime = last modified file date
#"file.txt" can also be a filepath if it is in a different directory
# time.strftime("%d.%m.%Y")
# changes the output date from time.gmtime(...) in a more readable form.
# %d = day , %m = month, %y = year
# . in in my case the seperator but it can be anything, like /
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us