File mymodule.py has the following strings:
import sage_salvus as salvus # this in for sagemathcloud
import os
cur_path = os.getcwd() + '/'
salvus.load(cur_path + 'mystyles.css')
I added path to mylib folder in sys.path. When I try to import my module I get error that file mystyles.css not found. And I see that sage try to find this file in directory of current file (in which I import mymodule).
How can I fix my error?
Thanks, Andrei.
cur_path = os.path.realpath(__file__) + "/"
salvus.load(cur_path + 'mystyles.css')
cur_path = "/".join(os.path.realpath(__file__).split('/')[:-1]) + "/"
salvus.load(cur_path + 'mystyles.css')