[issue43263] threading module unable to run

2021-02-25 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

That's a pity. I'm going to send the Python source code to my project to 
compile it, and see if it can solve the problem. Of course, I can also try 
compiling it into a static library

--

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-25 Thread twoone3


Change by twoone3 <3197653...@qq.com>:


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
resolution: works for me -> wont fix
type:  -> behavior

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-25 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

After adding GIL, the problem still exists. If you think this problem is 
incomprehensible, it may be because I used Google Translation ..

--
Added file: https://bugs.python.org/file49835/Screenshot_20210225_224118.jpg

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-25 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

Run Project1\x64\Release\Project2.exe

--

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-23 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

After my test, when the exe calls the dll, the dll calls Python. If the Python 
code involves multiple threads, the process will be stuck.

--
Added file: https://bugs.python.org/file49831/test.zip

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-23 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

Have you been studying this problem?

--

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-19 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

Sorry, I didn't make the question clear yesterday.
My operating system is Windows and the compiler used is VS2019. My project 
address: https://github.com/twoone-3/BDSpyrunner
When I use Python.dll to import Python files, the program is stuck. After 
checking, I found that as long as I use multi-threading, the program will be 
stuck. Of course, this Python file can be directly run by Python.exe, but from  
My program cannot run normally when calling Python.dll

The file:
import threading
import time
 
def worker():
 print "worker"
 time.sleep( 1 )
 return
 
for i in xrange ( 5 ):
 t = threading.Thread(target = worker)
 t.start()

--
status: pending -> open

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-19 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

I use cpython to running .py file,the file created a new thread,but the exe 
can't continue to run

--

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43263] threading module unable to run

2021-02-19 Thread twoone3


New submission from twoone3 <3197653...@qq.com>:

When I use embedded Python to import and use threading module,The program will 
hang,I tested it in versions 3.6.5 and 3.9.1.

--
components: C API
messages: 387293
nosy: twoone3
priority: normal
severity: normal
status: open
title: threading module unable to run
versions: Python 3.6, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

Thank you for solving my problem

--

___
Python tracker 
<https://bugs.python.org/issue43091>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

when i use python 3.6.5
There won't be this problem

--

___
Python tracker 
<https://bugs.python.org/issue43091>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

Look it!
It's really Python's problem

--
Added file: https://bugs.python.org/file49785/389e661314157b8f.jpg

___
Python tracker 
<https://bugs.python.org/issue43091>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

This is out put

--
Added file: https://bugs.python.org/file49784/Screenshot_2021_0201_225300.png

___
Python tracker 
<https://bugs.python.org/issue43091>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3

twoone3 <3197653...@qq.com> added the comment:

After I changed it to 1, the console code remained unchanged.
I use' chcp 65001' first.
then i use PyPreConfig and Py_initialize
then i 'cout << u8"Chinese中文" << endl;
It is not utf-8.

--

___
Python tracker 
<https://bugs.python.org/issue43091>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

PyPreConfig cfg;
PyPreConfig_InitPythonConfig(&cfg);
cfg.utf8_mode = -1;
PyStatus status = Py_PreInitialize(&cfg);
if (PyStatus_Exception(status)) {
Py_ExitStatusException(status);
}

I use this to test,there are no exceptions

--

___
Python tracker 
<https://bugs.python.org/issue43091>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43091] console encode is not utf-8!!

2021-02-01 Thread twoone3


New submission from twoone3 <3197653...@qq.com>:

https://docs.python.org/3/c-api/init_config.html?highlight=pypreconfig_initpythonconfig#c.PyPreConfig
When I use this api,The coding of the console has not changed,utf8_mode is 1.
This is my code.
PyPreConfig_InitPythonConfig(&cfg);
cfg.utf8_mode = -1;
Py_PreInitialize(&cfg);

--
messages: 386069
nosy: twoone3
priority: normal
severity: normal
status: open
title: console encode is not utf-8!!
type: behavior
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue43091>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41941] Py_Initialize affects the console

2020-10-05 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

That's it

--

___
Python tracker 
<https://bugs.python.org/issue41941>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41941] Py_Initialize affects the console

2020-10-05 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

I used the link you gave me 
https://docs.python.org/dev/c-api/init_config.html#c.PyConfig.PyConfig_InitIsolatedConfig
 Click to open and turn up to see the box, I follow that box  The example 
inside is done, and the coding problem of the console is solved, but I hope 
that cpython can provide a more concise API, remove useless functions or 
variables, so that it is convenient for you to maintain and easy for users to 
read.

--

___
Python tracker 
<https://bugs.python.org/issue41941>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41941] Py_Initialize affects the console

2020-10-05 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

This problem has bothered me for a month, thank you for helping me solve this 
problem, you can close it

--

___
Python tracker 
<https://bugs.python.org/issue41941>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41941] Py_Initialize affects the console

2020-10-05 Thread twoone3


twoone3 <3197653...@qq.com> added the comment:

So how does this explain

--
Added file: https://bugs.python.org/file49495/Screenshots.zip

___
Python tracker 
<https://bugs.python.org/issue41941>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41941] Py_Initialize affects the console

2020-10-05 Thread twoone3


New submission from twoone3 <3197653...@qq.com>:

When I set Py_LegacyWindowsStdioFlag to 0, after Py_Initialize, the console 
will forcibly change what encoding is displayed. At this time, my standard 
stream output is utf-8, py's print is utf-8, chcp 65001 is useless, and still 
garbled.  When I set Py_LegacyWindowsStdioFlag to 1, the console encoding is 
mbcs, the standard stream output is UTF-8 and not garbled, but the print of py 
is gbk encoding, and my system is Windows server 2016. I hope that 
Py_Initialize will not affect the console in subsequent versions.  Do any 
behavior, I suggest you test the coding problem in Chinese

--
components: C API
messages: 378004
nosy: twoone3
priority: normal
severity: normal
status: open
title: Py_Initialize affects the console
type: behavior
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue41941>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



python-bugs-list@python.org

2020-10-04 Thread twoone3


New submission from twoone3 <3197653...@qq.com>:

When I use'O&' to parse the parameters, I have never succeeded, I hope I can 
give a demo

--
files: Screenshot_2020_1005_070639.png
messages: 377983
nosy: twoone3
priority: normal
severity: normal
status: open
title: how to use cpython O&
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49494/Screenshot_2020_1005_070639.png

___
Python tracker 
<https://bugs.python.org/issue41937>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41653] About the use of cpython console mode problem

2020-08-27 Thread twoone3


New submission from twoone3 <3197653...@qq.com>:

When I use the Py_Initialize function in cpython, the console is forced to 
become gbk encoding, hoping to be compatible with UTF-8

--
components: C API
files: Screenshot_2020_0828_104656.png
messages: 376019
nosy: twoone3
priority: normal
severity: normal
status: open
title: About the use of cpython console mode problem
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49430/Screenshot_2020_0828_104656.png

___
Python tracker 
<https://bugs.python.org/issue41653>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com