adamerose / adamerose/PandasGUI

Executing code only if the gui is open

オープン
#217 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
3.3k
フォーク
239
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm trying to make a basic script that could open a dataframe in the gui and then update this dataframe every 'x' seconds. However, my best attempt just results in the show() command being executed infinitely with no delay until I kill the script. Here's an example:

```
updateTimer = 5
if __name__ == '__main__':
gui = show(df, settings = {'block': False})

trackTime = time.time()

while gui:
if (time.time() - trackTime >= updateTimer):
df = pymongo.DataFrame(RedBoard.find())
df = df[df['Date_Time'].notnull()]
gui.store.remove_dataframe('df')
gui.store.add_dataframe(df, 'df')
```
is there something in the library that would allow me to directly check if the window is open? If not, what would be my best course of action to only execute the code in the `while` loop when the gui is open?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。