import os
from datetime import datetime

def exists(file, path=os.path.dirname(os.path.realpath(__file__))):
    if os.path.isabs(file):
        return os.path.exists(file)
    return os.path.exists(f'{path}\\{file}')

def create_folder(folder):
    # if not exists(folder):
    #     os.mkdir(folder)
    os.mkdir(folder)

def default_filename():
    return datetime.now().strftime('%Y%m%d-%H%M%S')

if __name__ == '__main__':
    path=os.path.dirname(os.path.realpath(__file__))
    print(os.path.isabs(path))

    file = 'test.xlsx'
    print(os.path.isabs(file))

    fullpath = f'{path}\\{file}'
    print(os.path.isabs(fullpath))
import os
from datetime import datetime

def exists(file, path=os.path.dirname(os.path.realpath(__file__))):
    if os.path.isabs(file):
        return os.path.exists(file)
    return os.path.exists(f'{path}\\{file}')

def create_folder(folder):
    # if not exists(folder):
    #     os.mkdir(folder)
    os.mkdir(folder)

def default_filename():
    return datetime.now().strftime('%Y%m%d-%H%M%S')

if __name__ == '__main__':
    path=os.path.dirname(os.path.realpath(__file__))
    print(os.path.isabs(path))

    file = 'test.xlsx'
    print(os.path.isabs(file))

    fullpath = f'{path}\\{file}'
    print(os.path.isabs(fullpath))
# if not exists(folder): #     os.mkdir(folder)