streamdown 0.30.0__py3-none-any.whl → 0.31.0__py3-none-any.whl

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.
streamdown/sd.py CHANGED
@@ -20,8 +20,10 @@ fi
20
20
  import appdirs, toml
21
21
  import logging, tempfile
22
22
  import os, sys
23
- import pty, select
24
- import termios, tty
23
+ import select
24
+
25
+ if os.name != 'nt':
26
+ import pty, termios, tty
25
27
 
26
28
  import math
27
29
  import re
@@ -128,7 +130,7 @@ def debug_write(text):
128
130
  state.Logging.write(text)
129
131
 
130
132
  def savebrace():
131
- if state.Savebrace and state.code_buffer_raw:
133
+ if state.Savebrace and state.code_buffer_raw and os.name != 'nt':
132
134
  path = os.path.join(gettmpdir(), 'savebrace')
133
135
  with open(path, "a") as f:
134
136
  f.write(state.code_buffer_raw + "\x00")
@@ -1134,10 +1136,11 @@ def main():
1134
1136
  Style.Link = f"{FG}{Style.Symbol}{UNDERLINE[0]}"
1135
1137
 
1136
1138
  logging.basicConfig(stream=sys.stdout, level=args.loglevel.upper(), format=f'%(message)s')
1137
- state.exec_master, state.exec_slave = pty.openpty()
1139
+ if os.name != 'nt':
1140
+ state.exec_master, state.exec_slave = pty.openpty()
1138
1141
  try:
1139
1142
  inp = sys.stdin
1140
- if args.exec:
1143
+ if args.exec and os.name != 'nt':
1141
1144
  state.terminal = termios.tcgetattr(sys.stdin)
1142
1145
  state.is_exec = True
1143
1146
  state.exec_sub = subprocess.Popen(args.exec.split(' '), stdin=state.exec_slave, stdout=state.exec_slave, stderr=state.exec_slave, close_fds=True)
@@ -1168,7 +1171,7 @@ def main():
1168
1171
  state.exit = 130
1169
1172
 
1170
1173
  except Exception as ex:
1171
- if state.terminal:
1174
+ if state.terminal and os.name != 'nt':
1172
1175
  termios.tcsetattr(sys.stdin, termios.TCSADRAIN, state.terminal)
1173
1176
  logging.warning(f"Exception thrown: {type(ex)} {ex}")
1174
1177
  traceback.print_exc()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: streamdown
3
- Version: 0.30.0
3
+ Version: 0.31.0
4
4
  Summary: A streaming markdown renderer for modern terminals with syntax highlighting
5
5
  Project-URL: Homepage, https://github.com/day50-dev/Streamdown
6
6
  Project-URL: Bug Tracker, https://github.com/day50-dev/Streamdown/issues
@@ -0,0 +1,9 @@
1
+ streamdown/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ streamdown/sd.py,sha256=HE5ajd-afganv6xGuZv6RsCpYgaxY7qk9qB-BAM7nxQ,44599
3
+ streamdown/plugins/README.md,sha256=KWqYELs9WkKJmuDzYv3cvPlZMkArsNCBUe4XDoTLjLA,1143
4
+ streamdown/plugins/latex.py,sha256=xZMGMdx_Sw4X1piZejXFHfEG9qazU4fGeceiMI0h13Y,648
5
+ streamdown-0.31.0.dist-info/METADATA,sha256=tIowHrsBcZyoMCExO0OW61iTEQmQTKEt_FSn6FrMEZQ,9892
6
+ streamdown-0.31.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ streamdown-0.31.0.dist-info/entry_points.txt,sha256=HroKFsFMGf_h9PRTE96NjvjJQWupMW5TGP5RGUr1O_Q,74
8
+ streamdown-0.31.0.dist-info/licenses/LICENSE.MIT,sha256=SnY46EPirUsF20dZDR8HpyVgS2_4Tjxuc6f-4OdqO7U,1070
9
+ streamdown-0.31.0.dist-info/RECORD,,
streamdown/dd.mv DELETED
@@ -1,3 +0,0 @@
1
- ```bash
2
- curl -X PUT http://localhost:5002/api/v0/machine_up/set_info/ -H "Content-Type: application/json" -d '{"mach_api_key":"af57a33de9876daf46bc28c522968281598438fa35ee8525b799764b2d0afc0d","contact_address":"203.0.113.42",
3
- ```
@@ -1,10 +0,0 @@
1
- streamdown/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- streamdown/dd.mv,sha256=6IQPirmr8K6_vsGc6NZ8n0WK8cHWbNBpVk9l2REFIKk,235
3
- streamdown/sd.py,sha256=dBg3BMpltxu0Y1IDVeS6IPHfqlNJTDwWXuWbdU47MP0,44490
4
- streamdown/plugins/README.md,sha256=KWqYELs9WkKJmuDzYv3cvPlZMkArsNCBUe4XDoTLjLA,1143
5
- streamdown/plugins/latex.py,sha256=xZMGMdx_Sw4X1piZejXFHfEG9qazU4fGeceiMI0h13Y,648
6
- streamdown-0.30.0.dist-info/METADATA,sha256=P7M1o9yKEtJKoiwnRknqUw9gXBsscPd1jZb9LpFWang,9892
7
- streamdown-0.30.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- streamdown-0.30.0.dist-info/entry_points.txt,sha256=HroKFsFMGf_h9PRTE96NjvjJQWupMW5TGP5RGUr1O_Q,74
9
- streamdown-0.30.0.dist-info/licenses/LICENSE.MIT,sha256=SnY46EPirUsF20dZDR8HpyVgS2_4Tjxuc6f-4OdqO7U,1070
10
- streamdown-0.30.0.dist-info/RECORD,,