sonolus.py 0.10.5__py3-none-any.whl → 0.10.6__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.

Potentially problematic release.


This version of sonolus.py might be problematic. Click here for more details.

@@ -205,8 +205,16 @@ def parse_dev_command(command_line: str) -> Command | None:
205
205
  return HelpCommand()
206
206
  elif args.cmd in {"quit", "q"}:
207
207
  return ExitCommand()
208
+ else:
209
+ # Really, we should not reach here, since argparse would have errored out earlier
210
+ print("Unknown command.\n")
211
+ return None
212
+ except (argparse.ArgumentError, argparse.ArgumentTypeError) as e:
213
+ print(f"Error parsing command: {e}\n")
208
214
  return None
209
- except argparse.ArgumentError:
215
+ except SystemExit:
216
+ # argparse throws this on some errors, and will print out help automatically
217
+ print()
210
218
  return None
211
219
 
212
220
 
@@ -227,7 +235,7 @@ def command_input_thread(command_queue: queue.Queue, prompt_event: threading.Eve
227
235
  if isinstance(cmd, ExitCommand):
228
236
  break
229
237
  else:
230
- print(f"Unknown command. Available commands:\n{HELP_TEXT}")
238
+ print(f"Available commands:\n{HELP_TEXT}")
231
239
  # Show prompt again
232
240
  prompt_event.set()
233
241
  else:
@@ -236,6 +244,7 @@ def command_input_thread(command_queue: queue.Queue, prompt_event: threading.Eve
236
244
  break
237
245
  except Exception as e:
238
246
  print(f"Error reading command: {e}\n")
247
+ prompt_event.set()
239
248
 
240
249
 
241
250
  def get_local_ips():
@@ -283,7 +292,7 @@ def run_server(
283
292
 
284
293
  def log_message(self, fmt, *args):
285
294
  sys.stdout.write("\r\033[K") # Clear line
286
- sys.stdout.write(f"{self.address_string()} - - [{self.log_date_time_string()}] {fmt % args}\n")
295
+ sys.stdout.write(f"{self.address_string()} [{self.log_date_time_string()}] {fmt % args}\n")
287
296
  if interactive:
288
297
  sys.stdout.write("> ")
289
298
  sys.stdout.flush()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sonolus.py
3
- Version: 0.10.5
3
+ Version: 0.10.6
4
4
  Summary: Sonolus engine development in Python
5
5
  Project-URL: Documentation, https://sonolus.py.qwewqa.xyz/
6
6
  Project-URL: Repository, https://github.com/qwewqa/sonolus.py
@@ -29,7 +29,7 @@ sonolus/build/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  sonolus/build/cli.py,sha256=t6oK0SGU6fkxXVbGu6OuRIHDKD6u4SqXAShdPtatZ-8,10060
30
30
  sonolus/build/collection.py,sha256=6hniAzriPWBKUeGDkXabNXpbdHiHnqiK9shs6U1OExM,12748
31
31
  sonolus/build/compile.py,sha256=KOmncDKmGfgzC_FWB_LTxAl0s9w4wnaDe-luACMlCVs,8397
32
- sonolus/build/dev_server.py,sha256=N2MaBaChiVnAPZJzlXRFGEIAHhELj4vDBAtuvgAF1qo,10172
32
+ sonolus/build/dev_server.py,sha256=xe6C2_dpODk51inL02F3xFMjDueCSay7-XzkR56lapY,10560
33
33
  sonolus/build/engine.py,sha256=jMymxbBXu-ekv71uU8TF2KbFaHs3yGjyJAztd1SoRDs,14808
34
34
  sonolus/build/level.py,sha256=KLqUAtxIuIqrzeFURJA97rdqjA5pcvYSmwNZQhElaMQ,702
35
35
  sonolus/build/node.py,sha256=gnX71RYDUOK_gYMpinQi-bLWO4csqcfiG5gFmhxzSec,1330
@@ -87,8 +87,8 @@ sonolus/script/internal/simulation_context.py,sha256=LGxLTvxbqBIhoe1R-SfwGajNIDw
87
87
  sonolus/script/internal/transient.py,sha256=y2AWABqF1aoaP6H4_2u4MMpNioC4OsZQCtPyNI0txqo,1634
88
88
  sonolus/script/internal/tuple_impl.py,sha256=DPNdmmRmupU8Ah4_XKq6-PdT336l4nt15_uCJKQGkkk,3587
89
89
  sonolus/script/internal/value.py,sha256=OngrCdmY_h6mV2Zgwqhuo4eYFad0kTk6263UAxctZcY,6963
90
- sonolus_py-0.10.5.dist-info/METADATA,sha256=OQvnIBSfASxlv-XRLl2RWz4OyYvvO_4wRda1yDmh8h0,554
91
- sonolus_py-0.10.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
92
- sonolus_py-0.10.5.dist-info/entry_points.txt,sha256=oTYspY_b7SA8TptEMTDxh4-Aj-ZVPnYC9f1lqH6s9G4,54
93
- sonolus_py-0.10.5.dist-info/licenses/LICENSE,sha256=JEKpqVhQYfEc7zg3Mj462sKbKYmO1K7WmvX1qvg9IJk,1067
94
- sonolus_py-0.10.5.dist-info/RECORD,,
90
+ sonolus_py-0.10.6.dist-info/METADATA,sha256=eg4Gb5x3XZxZZ3IV4bjs1p0ZXGUxHdiMaJlRG1_bAS8,554
91
+ sonolus_py-0.10.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
92
+ sonolus_py-0.10.6.dist-info/entry_points.txt,sha256=oTYspY_b7SA8TptEMTDxh4-Aj-ZVPnYC9f1lqH6s9G4,54
93
+ sonolus_py-0.10.6.dist-info/licenses/LICENSE,sha256=JEKpqVhQYfEc7zg3Mj462sKbKYmO1K7WmvX1qvg9IJk,1067
94
+ sonolus_py-0.10.6.dist-info/RECORD,,