First time here? Check out the FAQ!

hongyi-zhao's profile - activity

2025-03-09 13:43:41 -0500 received badge Nice Question (source)
2024-07-21 09:39:36 -0500 received badge Notable Question (source)
2024-07-19 10:53:34 -0500 received badge Famous Question (source)
2024-07-18 13:46:03 -0500 received badge Notable Question (source)
2024-07-18 13:46:03 -0500 received badge Popular Question (source)
2024-07-14 07:51:44 -0500 marked best answer Can I integrate jupyterlab in wingide to facilitate the cell-by-cell debugging?

Can I integrate jupyterlab in wingide to facilitate the cell-by-cell debugging?

Regards, Zhao

2024-07-11 09:58:20 -0500 asked a question Can I integrate jupyterlab in wingide to facilitate the cell-by-cell debugging?

Can I integrate jupyterlab in wingide to facilitate the cell-by-cell debugging? Can I integrate jupyterlab in wingide to

2024-07-03 08:51:06 -0500 marked best answer How to Handle ANSI Escape Sequences in Stack Data display?

Hi everyone,

I'm currently using Wing Pro IDE for my Python development, and I've encountered an issue while debugging. When I inspect variables or print output in the Stack Data panel, I see a lot of ANSI escape sequences (e.g., ?[4m, ?[1m, ?[0;0m). These sequences are used for text formatting, like colors and styles, but they clutter the output and make it hard to read.

Is there a way to configure Wing Pro IDE to either interpret these sequences correctly or strip them out so that the output is clean and readable?

Here is an example of the output I'm seeing:

image description

The testing code is as follows:

# Now import pymatgen and other modules
from mp_api.client import MPRester
from pymatgen.io.vasp.sets import MPRelaxSet


# Use MPRester to fetch data
with MPRester() as mpr:
    # Search for materials with chemical system "Au" and space group number 225 (Fm-3m)
    #results = mpr.materials.search(formula="Au", spacegroup_number=225)
    results = mpr.materials.search(chemsys="Au", num_elements=(1, 1), spacegroup_number=225)
    #https://next-gen.materialsproject.org/materials/mp-568430?formula=BaRh2
    # results = mpr.materials.search(formula="BaRh2", spacegroup_number=227)

    # Print results
    for result in results:
        material_id = result.material_id
        print(f"Material ID: {material_id}, Formula: {result.formula_pretty}")

        # Get material structure
        structure = mpr.materials.get_structure_by_material_id(material_id)

        # Generate VASP input files using MPRelaxSet
        vasp_input_set = MPRelaxSet(structure)
        incar = vasp_input_set.incar

        # Print INCAR file content
        print(incar)

Any suggestions or guidance on how to handle this within Wing Pro would be greatly appreciated!

Thanks in advance for your help!

Best regards, Zhao

2024-07-03 08:50:54 -0500 received badge Notable Question (source)
2024-07-03 08:50:54 -0500 received badge Popular Question (source)
2024-07-03 08:50:54 -0500 received badge Famous Question (source)
2024-07-03 08:49:49 -0500 marked best answer The editable mode installed package by pip cannot be completed by default.

It seems that the editable mode installed package by pip cannot be completed by default. In order to enable the completion for them, I must add the package directory into wing's python path, as shown below:

image description

However, this method becomes very inconvenient if I have many such installed packages. I wonder if there is a better solution to this problem.

Regards, Zhao

2024-07-03 08:49:40 -0500 received badge Popular Question (source)
2024-07-03 08:49:40 -0500 received badge Notable Question (source)
2024-07-03 08:49:40 -0500 received badge Famous Question (source)
2024-06-24 19:05:15 -0500 commented answer The editable mode installed package by pip cannot be completed by default.

Yes. It does the trick. See https://stackoverflow.com/questions/76301782/why-are-pycharm-and-pylance-not-detecting-packa

2024-06-24 01:07:40 -0500 asked a question The editable mode installed package by pip cannot be completed by default.

The editable mode installed package by pip cannot be completed by default. It seems that the editable mode installed pac

2024-06-04 05:26:17 -0500 answered a question How to Handle ANSI Escape Sequences in Stack Data display?

I tried with the following code, but failed to do the trick: import os import re from typing import Any def strip_ansi

2024-06-04 05:26:17 -0500 received badge Rapid Responder ( source )
2024-06-03 10:23:42 -0500 edited question How to Handle ANSI Escape Sequences in Stack Data display?

How to Handle ANSI Escape Sequences in Stack Data display? Hi everyone, I'm currently using Wing Pro IDE for my Python

2024-06-03 10:21:51 -0500 asked a question How to Handle ANSI Escape Sequences in Stack Data display?

How to Handle ANSI Escape Sequences in Stack Data display? Hi everyone, I'm currently using Wing Pro IDE for my Python

2024-05-25 07:16:32 -0500 marked best answer How to disable writing main.update-history information to ~/.wingpro10/preferences?

Currently, I have the following ~/.wingpro10/preferences file:

werner@x13dai-t:~$ cat ~/.wingpro10/preferences 
[user-preferences]
debug.resolve-properties = True
debug.show-private-variables = False
debug.show-protected-variables = False
debug.show-special-variables = False
edit.qt-display-font = 'display-font-size'
edit.show-line-numbers = True
gui.auto-save-before-action = True
gui.block-comment-style = 'block-indented-pep8'
gui.display-mode = 'light'
gui.qt-display-font = 'DejaVuSansMono Nerd Font Mono,12'
gui.startup-show-wingtips = 0
guimgr.last-wingtips-size = (500,
                             425)
main.last-prefs-page = (4,
                        5)
main.last-properties-pages = {'CProjectPropertiesDialog': 0,
                              'CStartDebugProperties': 0}
main.monitor-support-upgrades = False
main.update-history = [((10,
                         0,
                         4,
                         1),
                        'https://wingware.com/pub/updates/10.0.4.1/linux-x64/cc9fb3349ce9e34663d4bd613a3be8e75a27f6a2.tar.bz2',
                        '2024-05-10 11:27:33'),
                       ((10,
                         0,
                         4,
                         2),
                        'https://wingware.com/pub/updates/10.0.4.2/linux-x64/2f572c3e86aabf36b1b46e27f9eecdda36d62d07.tar.bz2',
                        '2024-05-24 20:26:26')]

But I don't want the main.update-history info appeared there. Is this possible?

Regards, Zhao

2024-05-24 19:47:35 -0500 edited question How to disable writing main.update-history information to ~/.wingpro10/preferences?

How to disable writing main.update-history information to ~/.wingpro10/preferences? Currently, I have the following ~/.w

2024-05-24 19:47:16 -0500 edited question How to disable writing main.update-history information to ~/.wingpro10/preferences?

How to disable writing main.update-history information to ~/.wingpro10/preferences? Currently, I have the following ~/.w

2024-05-24 09:00:15 -0500 asked a question How to disable writing main.update-history information to ~/.wingpro10/preferences?

How to disable writing main.update-history information to ~/.wingpro10/preferences? Currently, I have the following ~/.w

2024-05-24 07:16:42 -0500 marked best answer Use a 3-party openai provider.

It seems that the latest Wingpro version still doesn't let me use a 3-party openai provider, say, this one.

2024-05-11 05:26:22 -0500 received badge Famous Question (source)
2024-05-11 05:20:32 -0500 received badge Popular Question (source)
2024-05-11 05:20:32 -0500 received badge Notable Question (source)
2024-05-07 08:36:07 -0500 received badge Notable Question (source)
2024-05-07 08:36:07 -0500 received badge Famous Question (source)
2024-05-07 08:36:06 -0500 received badge Famous Question (source)
2024-04-12 20:44:54 -0500 received badge Popular Question (source)
2024-04-12 20:44:54 -0500 received badge Notable Question (source)
2024-04-11 21:19:16 -0500 commented answer Use a 3-party openai provider.

See https://docs.qq.com/sheet/DUlRsc3VaZEtnUWJh?tab=BB08J2

2024-04-09 04:40:56 -0500 asked a question Use a 3-party openai provider.

Use a 3-party openai provider. It seems that the latest Wingpro version still doesn't let me use a 3-party openai provid

2024-04-05 00:30:34 -0500 received badge Notable Question (source)
2024-04-05 00:30:34 -0500 received badge Popular Question (source)
2024-03-19 08:51:50 -0500 received badge Famous Question (source)
2024-03-19 08:51:50 -0500 received badge Notable Question (source)
2024-03-19 08:51:50 -0500 received badge Popular Question (source)
2024-03-08 22:28:54 -0500 commented answer General: Unavailable Commands: debug-hide-value-tips

Very Strange. After I reboot the computer, Shift + Space can work now. I don't know why. P.S. I removed the Shift-F7 bin

2024-03-08 18:35:47 -0500 commented answer General: Unavailable Commands: debug-hide-value-tips

I have sent the bug report again.