import os
import shutil
path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'Test2.py')
print(path)
i = str(path)
print(i)
#здесь должна быть функция которая поможет мне подняться вверх по каталогу(но я её ещё не написал)
upload = vk_api.VkUpload(vk)
photo = upload.photo_messages('вашфайл')
owner_id = photo[0]['owner_id']
photo_id = photo[0]['id']
access_key = photo[0]['access_key']
attachment = f'photo{owner_id}_{photo_id}_{access_key}'
vk.messages.send(peer_id=event.object.peer_id, random_id=0, attachment=attachment)
photo = upload.photo_messages('вашфайл')
pg.screenshot("screenshotacran.png")
upload = vk_api.VkUpload(vk)
photo = upload.photo_messages('screenshotacran.png')
owner_id = photo[0]['owner_id']
photo_id = photo[0]['id']
access_key = photo[0]['access_key']
attachment = f'photo{owner_id}_{photo_id}_{access_key}'
vk.messages.send(peer_id=event.object.peer_id, random_id=0, attachment=attachment)