Similar to #426 , I am trying to redirect pages while keeping python running
So i have just ran a loading screen on python and i am trying to switch from index.html to home.html once python is done loading.
I have tried the solution on #426 too
import eel
import time
eel.init('web')
@eel.expose
def load_modules():
import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
import yfinance as yf
from datetime import datetime, timedelta
print('load done')
done = "1"
eel.go_to('home.html')
return done
eel.start('index.html')
eel.expose(go_to)
function go_to(url) {window.location.replace(url);};
function callback(done){
if (done === done) {
//window.location.href = "home.html";
//go_to('home.html')
}
}
function load_modules(){
eel.load_modules()(callback)
};
so once its done loading, it should be redirected to another page called
home.html
Problem is:
Once everything is done and index.html is redirected to home.html, my python code stops. I think I know why..? (probably because index.html is closed to the program stops) is there a way to keep the python code running despite changing to another page?
Similar to #426 , I am trying to redirect pages while keeping python running So i have just ran a loading screen on python and i am trying to switch from index.html to home.html once python is done loading. I have tried the solution on #426 too
so once its done loading, it should be redirected to another page called
Problem is: Once everything is done and index.html is redirected to home.html, my python code stops. I think I know why..? (probably because index.html is closed to the program stops) is there a way to keep the python code running despite changing to another page?
Many thanks