Skip to content

Commit

Permalink
Merge pull request #3 from beeware/pyscript-update
Browse files Browse the repository at this point in the history
Update handling of the Python console.
  • Loading branch information
freakboy3742 authored Dec 14, 2022
2 parents cedb81b + f5931c8 commit 3f77cf0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
8 changes: 2 additions & 6 deletions {{ cookiecutter.formal_name }}/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
</head>
<body>
<div id="app-placeholder"></div>

<code id="pyconsole"></code>

{% if cookiecutter.style_framework == "Bootstrap v4.6" %}
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
Expand All @@ -31,11 +28,10 @@
integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
crossorigin="anonymous"></script>
{% endif %}

<py-config src="/pyscript.toml"></py-config>
<py-script output="pyconsole">
<py-script>
import runpy
result = runpy.run_module("{{ cookiecutter.module_name }}", run_name="__main__", alter_sys=True)
</py-script>
</body>
</html>
</html>
5 changes: 0 additions & 5 deletions {{ cookiecutter.formal_name }}/www/static/css/briefcase.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@

/* Hide the Python console */
#pyconsole {
display: None;
}

/* Unset the overly generic pyscript .label style */
#app-placeholder .label {
margin-top: inherit;
Expand Down

0 comments on commit 3f77cf0

Please sign in to comment.