medicafe 0.250725.6__py3-none-any.whl → 0.250725.7__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 medicafe might be problematic. Click here for more details.

MediBot/MediBot_UI.py CHANGED
@@ -27,15 +27,38 @@ def flush_console_input_buffer():
27
27
  if sys.platform != "win32":
28
28
  return # no-op on non-Windows
29
29
 
30
+ print("DEBUG: Starting flush_console_input_buffer()")
31
+
32
+ # Check what's in the buffer before flushing
33
+ chars_in_buffer = []
34
+ while msvcrt.kbhit():
35
+ ch = msvcrt.getch()
36
+ chars_in_buffer.append(ch)
37
+
38
+ if chars_in_buffer:
39
+ print("DEBUG: Found {} chars in buffer before flush: {}".format(len(chars_in_buffer), chars_in_buffer))
40
+ else:
41
+ print("DEBUG: No chars found in buffer before flush")
42
+
30
43
  try:
31
44
  kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
32
45
  STD_INPUT_HANDLE = -10
33
46
  h_stdin = kernel32.GetStdHandle(STD_INPUT_HANDLE)
34
- kernel32.FlushConsoleInputBuffer(h_stdin)
35
- except Exception:
47
+ result = kernel32.FlushConsoleInputBuffer(h_stdin)
48
+ print("DEBUG: FlushConsoleInputBuffer API call result: {}".format(result))
49
+ except Exception as e:
50
+ print("DEBUG: FlushConsoleInputBuffer API failed: {}".format(e))
36
51
  # Fallback: drain any leading newlines manually
52
+ fallback_chars = []
37
53
  while msvcrt.kbhit():
38
- msvcrt.getch()
54
+ ch = msvcrt.getch()
55
+ fallback_chars.append(ch)
56
+ if fallback_chars:
57
+ print("DEBUG: Fallback removed {} chars: {}".format(len(fallback_chars), fallback_chars))
58
+ else:
59
+ print("DEBUG: Fallback found no chars to remove")
60
+
61
+ print("DEBUG: flush_console_input_buffer() completed")
39
62
 
40
63
  def discard_leading_blank():
41
64
  """
@@ -328,11 +351,23 @@ def user_interaction(csv_data, interaction_mode, error_message, reverse_mapping)
328
351
  sys.stdout.flush()
329
352
  time.sleep(0.2) # Increased delay for Windows XP
330
353
 
354
+ print("DEBUG: About to call input() - waiting for user...")
331
355
  # Use input() for more reliable input on Windows XP
332
356
  response = input().lower().strip()
333
357
 
334
358
  # Debug: Print what we actually got
335
359
  print("DEBUG: Got response: '{}' (length: {})".format(response, len(response)))
360
+ print("DEBUG: Response type: {}, repr: {}".format(type(response), repr(response)))
361
+
362
+ # If we got an empty response, it means there was a stray newline
363
+ # Let's try one more time after clearing the buffer again
364
+ if not response:
365
+ print("Empty response detected - clearing buffer and trying again...")
366
+ print("DEBUG: About to flush buffer again...")
367
+ flush_console_input_buffer()
368
+ print("DEBUG: About to call input() for second attempt...")
369
+ response = input().lower().strip()
370
+ print("DEBUG: Second attempt got: '{}' (length: {})".format(response, len(response)))
336
371
 
337
372
  if response:
338
373
  if response in ['yes', 'y']:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250725.6
3
+ Version: 0.250725.7
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2
6
6
  Author: Daniel Vidaud
@@ -5,7 +5,7 @@ MediBot/MediBot_Crosswalk_Library.py,sha256=Ix4QlAcg3O9Y6n6ZeSUtbmtV-_n-t0-jnefX
5
5
  MediBot/MediBot_Post.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  MediBot/MediBot_Preprocessor.py,sha256=Lc9uQnE5SAa0dQTOREdPV1QUB2cywXTHJ1h2w-fyeeQ,13331
7
7
  MediBot/MediBot_Preprocessor_lib.py,sha256=LXzV85uq7YoAWbZi88HzAs_GObl7vP8mhFbWZQbd0M8,45687
8
- MediBot/MediBot_UI.py,sha256=T6z2fS0_EF18THjqMOqwQGWAw4OjFH9Z5wvyb3uNnRo,15798
8
+ MediBot/MediBot_UI.py,sha256=v0Eidxyslz8cldXzYQ4LoL4YSUrJwUX0dsFGjjuN03E,17612
9
9
  MediBot/MediBot_dataformat_library.py,sha256=XNyeiOC6uJUp15UXP_rhtB3rMTPus9ZXDnz5zHNoRYM,8586
10
10
  MediBot/MediBot_docx_decoder.py,sha256=GbhX58pMAsWNhBF7B8AtWiNpUOB4bU0zAM81moXYkkE,27370
11
11
  MediBot/MediPost.py,sha256=C1hZJFr65rN6F_dckjdBxFC0vL2CoqY9W3YFqU5HXtE,336
@@ -49,8 +49,8 @@ MediLink/test.py,sha256=kSvvJRL_3fWuNS3_x4hToOnUljGLoeEw6SUTHQWQRJk,3108
49
49
  MediLink/test_cob_library.py,sha256=wUMv0-Y6fNsKcAs8Z9LwfmEBRO7oBzBAfWmmzwoNd1g,13841
50
50
  MediLink/test_validation.py,sha256=FJrfdUFK--xRScIzrHCg1JeGdm0uJEoRnq6CgkP2lwM,4154
51
51
  MediLink/webapp.html,sha256=JPKT559aFVBi1r42Hz7C77Jj0teZZRumPhBev8eSOLk,19806
52
- medicafe-0.250725.6.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
53
- medicafe-0.250725.6.dist-info/METADATA,sha256=FNwK4aAjiDxPQEhKAXkv9RK9W5FoYH0016VdnndATJs,5501
54
- medicafe-0.250725.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
55
- medicafe-0.250725.6.dist-info/top_level.txt,sha256=3uOwR4q_SP8Gufk2uCHoKngAgbtdOwQC6Qjl7ViBa_c,17
56
- medicafe-0.250725.6.dist-info/RECORD,,
52
+ medicafe-0.250725.7.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
53
+ medicafe-0.250725.7.dist-info/METADATA,sha256=nhpZh9hV_fM_Qx-r4PGkmjYcVUmewMBAkd1dsNfgMt4,5501
54
+ medicafe-0.250725.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
55
+ medicafe-0.250725.7.dist-info/top_level.txt,sha256=3uOwR4q_SP8Gufk2uCHoKngAgbtdOwQC6Qjl7ViBa_c,17
56
+ medicafe-0.250725.7.dist-info/RECORD,,