dshellInterpreter 1.2.8.0__tar.gz → 1.2.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_ui.py +2 -1
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/dshell_interpreter.py +7 -1
- {dshellinterpreter-1.2.8.0/dshellInterpreter.egg-info → dshellinterpreter-1.2.8.1}/PKG-INFO +1 -1
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1/dshellInterpreter.egg-info}/PKG-INFO +1 -1
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/setup.py +1 -1
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_channel.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_embed.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_file.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_interaction.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_message.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_embed.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_file.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_global.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_list.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_member.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_numbers.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_permissions.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_string.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_type_validation.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/__init__.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/cached_messages.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/dshell_arguments.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/dshell_global_variables.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/dshell_iterators.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/dshell_scope.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/errors.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/utils_interpreter.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellParser/__init__.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellParser/ast_nodes.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellParser/dshell_parser.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellParser/errors.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellPreProcess/__init__.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellPreProcess/dshell_preprocess.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellTokenizer/__init__.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellTokenizer/dshell_keywords.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellTokenizer/dshell_token_type.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellTokenizer/dshell_tokenizer.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/__init__.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/full_import.py +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/LICENSE +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/README.md +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/dshellInterpreter.egg-info/requires.txt +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/dshellInterpreter.egg-info/top_level.txt +0 -0
- {dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/setup.cfg +0 -0
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_ui.py
RENAMED
|
@@ -78,6 +78,7 @@ def build_ui_scope(env: Scope, code_node: CodeNode):
|
|
|
78
78
|
for token in code_node.global_env_vars.env_variables:
|
|
79
79
|
|
|
80
80
|
new_ui_scope.set(token.value, deepcopy(env.get(token.value, None)))
|
|
81
|
+
print(new_ui_scope.vars)
|
|
81
82
|
|
|
82
83
|
return new_ui_scope
|
|
83
84
|
|
|
@@ -334,7 +335,7 @@ async def ui_button_callback(button: ui.Button, interaction: Interaction, data:
|
|
|
334
335
|
:return:
|
|
335
336
|
"""
|
|
336
337
|
code = data.get('code', None)
|
|
337
|
-
scope:
|
|
338
|
+
scope: Scope = data.get("scope", Scope())
|
|
338
339
|
|
|
339
340
|
if code is not None:
|
|
340
341
|
message = interaction
|
|
@@ -28,7 +28,7 @@ class DshellInterpreteur:
|
|
|
28
28
|
def __init__(self, code: Union[str, CodeNode], ctx: context,
|
|
29
29
|
debug: bool = False,
|
|
30
30
|
vars: Optional[str] = None,
|
|
31
|
-
vars_env: Optional[dict[str, Any] |
|
|
31
|
+
vars_env: Optional[dict[str, Any] | Scope] = None):
|
|
32
32
|
"""
|
|
33
33
|
Interpreter Dshell code
|
|
34
34
|
:param code: The code to interpret. Each line must end with a newline character, except SEPARATOR and SUB_SEPARATOR tokens.
|
|
@@ -51,6 +51,12 @@ class DshellInterpreteur:
|
|
|
51
51
|
|
|
52
52
|
# scope creation
|
|
53
53
|
self.env: Scope = Scope()
|
|
54
|
+
if isinstance(vars_env, Scope):
|
|
55
|
+
self.env = vars_env
|
|
56
|
+
elif isinstance(vars_env, dict):
|
|
57
|
+
self.env = Scope()
|
|
58
|
+
self.env.update(vars_env)
|
|
59
|
+
|
|
54
60
|
|
|
55
61
|
self.env.update({
|
|
56
62
|
'__ret__': None, # environment variables, '__ret__' is used to store the return value of commands
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="dshellInterpreter",
|
|
8
|
-
version="1.2.8.
|
|
8
|
+
version="1.2.8.1",
|
|
9
9
|
author="Chronos",
|
|
10
10
|
author_email="vagabonwalybi@gmail.com",
|
|
11
11
|
description="A Discord bot interpreter for creating custom commands and automations.",
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_channel.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_embed.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_member.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_message.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/dshell_role.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_embed.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DISCORD_COMMANDS/utils/utils_list.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/cached_messages.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellInterpreteur/dshell_scope.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellParser/dshell_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellPreProcess/dshell_preprocess.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellTokenizer/dshell_keywords.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellTokenizer/dshell_token_type.py
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/Dshell/DshellTokenizer/dshell_tokenizer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/dshellInterpreter.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/dshellInterpreter.egg-info/requires.txt
RENAMED
|
File without changes
|
{dshellinterpreter-1.2.8.0 → dshellinterpreter-1.2.8.1}/dshellInterpreter.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|