Giter Site home page Giter Site logo

pywebio-battery's Introduction

pywebio-battery's People

Contributors

amks1 avatar hakunamatataleo avatar wang0618 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pywebio-battery's Issues

popup_input cancel but return result dict

Hey, I'm Oliver.

Want to drop a bug issue.

Case:
use pop_input to create widget. I set the validate function and cancelable is True.
On the page, If I submit once but banned by the validate function and click cancel. The cancel will return value dict instead of None.
The code bellows might help to reproduce this situation.
my_list = ['1'] def insert_value_to_list(): def validate(res): if res['value'] in my_list: raise "value","value exist in list" form_result = popup_input('list value' [ put_input('value') ] ,cacelable=True,validate=validate ) print(form)
input "1" and submit then cancel.

在Windows简中系统里使用pywebio_battery.run_shell会报错

output_func(out.decode('utf8'))

在Windows简中系统里使用pywebio_battery.run_shell会报错:

File "xxxxxx\venv\lib\site-packages\pywebio_battery\interaction.py", line 93, in run_shell
output_func(out.decode('utf8'))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc7 in position 1: invalid continuation byte

需要将pywebio_battery/interaction.py#L117的output_func(out.decode('utf8')) 改为 output_func(out)
然后下面的代码就可以正常运行了

def myFunc(input):
    put_text(input.decode('GBK'))

def main():
    pywebio_battery.run_shell('dir',output_func=myFunc)

pywebio_battery login persistent wrong localstorage

BUG Description

The function login in pywebio_battery has a wrong localstorage:

Once logged in, the function: set_localstorage("token", signed)
But when it wants to check if logged in: get_localstorage("webio-token")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.