-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52abaa4
commit 19e0a1f
Showing
2 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ requires = ["hatchling"] | |
build-backend = "hatchling.build" | ||
[project] | ||
name = "snail_sdk" | ||
version = "0.7.5" | ||
version = "0.11.2" | ||
authors = [ | ||
{ name="Joel Einbinder", email="[email protected]" }, | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import json | ||
def display(filePath): | ||
print('\x1b\x1aL' + str(filePath) + '\x00', end='') | ||
print('\x1b\x1aL' + str(filePath) + '\x00', end='', flush=True) | ||
|
||
def set_progress(progress, left_text=None, right_text=None): | ||
print('\x1b\x1a\x4e' + json.dumps({ | ||
'progress': progress, | ||
'leftText': left_text, | ||
'rightText': right_text | ||
}) + '\x00', end='') | ||
}) + '\x00', end='', flush=True) | ||
|
||
def chart(data): | ||
print('\x1b\x1aC' + json.dumps(data) + '\x00', end='') | ||
print('\x1b\x1aC' + json.dumps(data) + '\x00', end='', flush=True) | ||
|
||
def send(data, dont_cache=False): | ||
str = json.dumps(data) | ||
print('\x1b\x1a' + ('Q' if dont_cache else 'M') + str + '\x00', end='') | ||
print('\x1b\x1a' + ('Q' if dont_cache else 'M') + str + '\x00', end='', flush=True) |