First time here? Check out the FAQ!

JeffH's profile - activity

2025-06-09 12:17:10 -0500 marked best answer Debug Console not showing Unicode

I need to display some Arabic script in my Debug Console, but I can't seem to convince it to work in utf-8. Here's a test I can run while at a breakpoint in my code, which doesn't require any code in particular:

import sys
sys.stdout.encoding
'ascii'
print("مرحبا")
مرحبا
print('test')
test

After typing in those commands, my Debug Console looks much like the text above, except the Arabic in print statement is in a mono-spaced font, the ending parenthesis on that line is overlapping text next to the other one, and the line between the two print statements is completely empty.

I have tried adding PYTHONIOENCODING=utf-8 to the project properties environment, and I have confirmed that Debugger > I/O in Preferences has utf-8 for both Debug and Shell I/O Encoding.

2025-06-09 12:16:47 -0500 received badge Popular Question (source)
2025-05-21 09:22:52 -0500 received badge Commentator
2025-05-21 09:22:52 -0500 commented question Debug Console not showing Unicode

If I use print("Testing: " + converted), it prints out the whole Arabic string. If I use print(">" + converted), it p

2025-05-21 09:09:12 -0500 commented question Debug Console not showing Unicode

But check this out: print('testing: [' + converted[1] + ']') testing: [أ] It prints an individual character just fine, b

2025-05-21 09:03:09 -0500 commented question Debug Console not showing Unicode

Using Wing Pro 10.0.9.1

2025-05-21 06:59:41 -0500 asked a question Debug Console not showing Unicode

Debug Console not showing Unicode I need to display some Arabic script in my Debug Console, but I can't seem to convince

2024-07-03 08:51:22 -0500 marked best answer Is it possible to get the application icon to show when testing?

When I run my GTK3 python script in WingIDE, the window that opens shows a generic Python icon:

image description

When I build the app with Pyinstaller, I can insert the icon in the process, and the built application appears with the correct program icon. I'm wondering, is there any way to get WingIDE to display the program icon in the title bar when it is running and debugging the script?

2024-07-03 08:51:10 -0500 received badge Notable Question (source)
2024-07-03 08:51:10 -0500 received badge Popular Question (source)
2024-07-03 08:51:10 -0500 received badge Famous Question (source)
2024-05-30 06:43:59 -0500 asked a question Is it possible to get the application icon to show when testing?

Is it possible to get the application icon to show when testing? When I run my GTK3 python script in WingIDE, the window

2023-11-04 20:38:29 -0500 received badge Popular Question (source)
2023-11-01 11:46:12 -0500 received badge Famous Question (source)
2023-10-04 14:31:08 -0500 commented answer Path is duplicated, can't debug

I have now tested Wing 9.1.2, and it does indeed seem to fix the problems I was having with debugging mingw python build

2023-10-04 14:24:14 -0500 received badge Supporter ( source )
2023-10-04 07:09:37 -0500 received badge Notable Question (source)
2023-09-22 08:33:35 -0500 commented answer Path is duplicated, can't debug

Thanks so much for looking into this. Glad to know that I'm not as incompetent as I had feared... :-) Yes, it is sad th

2023-09-22 08:24:45 -0500 received badge Enthusiast
2023-09-21 17:31:55 -0500 commented answer Path is duplicated, can't debug

Still no joy... There was indeed a __pycache__ folder in the mytest directory, so I deleted that. But running the code i

2023-09-21 17:31:18 -0500 commented answer Path is duplicated, can't debug

Still no joy... There was indeed a __pycache__ folder in the mytest directory, so I deleted that. But running the code i

2023-09-21 17:02:31 -0500 commented answer Path is duplicated, can't debug

Still no joy... There was indeed a __pycache__ folder in the mytest directory, so I deleted that. But running the code i

2023-09-21 17:01:58 -0500 commented answer Path is duplicated, can't debug

Still no joy... There was indeed a __pycache__ folder in the mytest directory, so I deleted that. But running the code i

2023-09-21 17:00:59 -0500 commented answer Path is duplicated, can't debug

Still no joy... There was indeed a __pycache__ folder in the mytest directory, so I deleted that. But running the code i

2023-09-21 16:59:38 -0500 commented answer Path is duplicated, can't debug

Still no joy... There was indeed a __pycache__ folder in the mytest directory, so I deleted that. But running the code i

2023-09-20 20:30:23 -0500 commented answer Path is duplicated, can't debug

OK, I think I've made some progress. I copied my project files over to the MSYS2 environment, and can run the code there

2023-09-20 14:58:34 -0500 marked best answer Path is duplicated, can't debug

I've started a new topic for the discussion that was started around PyGTK (https://ask.wingware.com/question/8485/…). PyGTK is no longer in the picture... I'm just trying to get basic debugging working on a new installation of WingIDE 9.1.1.4.

I create a new project in a temp folder. I create the following file "test.py":

print("Hello world!")
x = 4 / 0
print("All done!")

I put a break point on the divide by zero line, and run the code. The break point does not catch, and the divide by zero gives me this error:

File "C:\Temp\Python\test/c:\Temp\Python\test\test.py", line 3, in <module>

builtins.ZeroDivisionError: division by zero

You can see that the path for test.py is messed up, sort of "doubled". I assume that's why the break points aren't working. And if I double-click on the error (what always used to take me to the offending line), it does nothing.

So what stupid, simple error am I making?!

UPDATE:

I've done a little more testing. In the New Project dialog, if I select "Use Existing Python" and under Python Executable select "Use Default" , everything works just fine, with break points and normal file paths. (That uses a Python 3.8.10 environment that I have installed on my system)

However, if as Python Executable I select "Command Line" (still under "Use Existing Python"), and I select my MSYS2 environment, "C:/msys64/mingw64/bin/python.exe", then I get this behavior of "doubled" path, and break points not working:

File "C:\Temp\Python\test4/c:\Temp\Python\test4\test4.py", line 4, in <module>

builtins.ZeroDivisionError: division by zero

The MSYS2 Python executable is 3.11.5, and seems to be working normally otherwise. But the WingIDE debugger doesn't seem to be "connected" into it somehow. Any suggestions?

2023-09-20 08:22:33 -0500 edited question Path is duplicated, can't debug

Path is duplicated, can't debug I've started a new topic for the discussion that was started around PyGTK (https://ask.w

2023-09-20 08:22:33 -0500 received badge Editor (source)
2023-09-19 20:34:36 -0500 asked a question Path is duplicated, can't debug

Path is duplicated, can't debug I've started a new topic for the discussion that was started around PyGTK (https://ask.w

2023-09-19 20:25:09 -0500 received badge Popular Question (source)
2023-09-07 19:55:47 -0500 commented answer How can I run a PyGTK program in WingIDE?

Looking a little closer, the reason it can't open the offending line in the code is that the path to the file is garbled

2023-09-07 19:44:50 -0500 commented answer How can I run a PyGTK program in WingIDE?

This might be a hint... If I put an error in the code, like divide by zero, it throws an exception, and tells me which l

2023-09-07 19:34:15 -0500 commented answer How can I run a PyGTK program in WingIDE?

I have succeeded in installing an MSYS2 environment with all of the necessary modules required to run my Python module,

2023-08-29 06:22:37 -0500 marked best answer How can I run a PyGTK program in WingIDE?

I have a Python module that I used to be able to run from within WingIDE on Windows, that has the following GTK code in the header:

from gi import require_version
require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, Pango

But since I've gotten a new computer, I can't seem to get the PyGObject modules set up in my Python 3.8.10 installation, i.e. "import gi" and related commands don't work.

At https://pygobject.readthedocs.io/en/lat… it talks about installing msys2 to use pyGObject in Windows, and if I follow those instructions, I can indeed run the gtk4-demo module in the msys2 environment.

But how do I now run my module from within WingIDE? I assume that it has something to do with setting up a custom environment in the Project Properties, but I don't think I did that on my old computer - I think I somehow managed to install PyGObject in the main Python installation? (If you do a Google search, you can see that a lot of people have struggled with this, and there have been different solutions over time.) I haven't really done anything with custom environments before, so please be specific (and gentle... :-) in your reply.