Comments (4)
I am not aware of a way of killing all threads in Python. If you know such a
way
please let me know and I will try to incorporate it. (So I won't implement this
until I can find a good way of doing it).
What you can do instead is reinitialize the remote interpreter.
Original comment by pyscripter
on 23 Mar 2007 at 2:00
- Changed state: Wont-do
from pyscripter.
use ToolHelp32 API
---
interface
uses
Windows, tlhelp32;
type
TIntArray = array of DWord;
Function GetThreads(ProcessID : DWord): TIntArray;
implementation
Function GetThreads(ProcessID : DWord): TIntArray;
var
ThreadEntry32 : TThreadEntry32; {Defined in TlHelp32}
TLHandle : THandle;
begin
SetLength(Result, 0);
TLHandle := CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
if Thread32First(TLHandle,ThreadEntry32) then
begin
if ThreadEntry32.th32OwnerProcessID = ProcessID then
Begin
SetLength(Result, Length(Result)+1);
Result[Length(Result)] = ThreadEntry32.th32ThreadID;
end;
while Thread32Next(TLHandle,ThreadEntry32) do
begin
if ThreadEntry32.th32OwnerProcessID = ProcessID then
begin
SetLength(Result, Length(Result)+1);
Result[Length(Result)] = ThreadEntry32.th32ThreadID;
end;
end;
end;
CloseHandle(TLHandle);
end;
Original comment by [email protected]
on 9 Apr 2007 at 11:08
from pyscripter.
Thanks for the code snippet.
Was this issue about killing thread created by your Python code or killing
Pyscripter
threads (which should be killed anyway)?
If you are referring to your Python threads aren't those killed when you
reinitialize
the interpreter?
Please provide a bit more info.
Original comment by pyscripter
on 12 Apr 2007 at 10:22
from pyscripter.
When the bad-manner-script is repeatedly executed,
I must end by force the PyScripter.
My solution is to do reinitialize,
every time before the script running on remote engine.
When PyScripter is the state as it is
I cannot recommend PyScripter to be used for the beginner.
solution1:
PyScripter manages threads that target-script started.
If those threads remain when debugging ends,
they are killed by PyScripter.
solution2:
When you use a remote engine,
PyScripter add a option setting:
"Reinitialize does a remote engine before execute"
Original comment by [email protected]
on 17 Apr 2007 at 8:49
from pyscripter.
Related Issues (20)
- python 3.4 not compatable HOT 2
- Please add a zip file for registry-free installation for the 64-bit version HOT 1
- Is there a way to replace particular characters in a text file with a user input? HOT 1
- Support HOT 1
- Python version support HOT 1
- Not able to run PyScripter HOT 3
- UI and editor stuttering HOT 6
- Pyscripter becomes "Not responding" during running of a script HOT 1
- Evertime you run PyScripter, a new shortuct is created and the version increases by 1 HOT 1
- single # comment (the green font comments) OR user editor macro ability HOT 1
- Access Violation HOT 2
- Google Code is dying HOT 1
- PyScripter 2.5.3.0 DLL Hijacking HOT 5
- Code Explorer shows incorrect globals
- ImportError: No module named Tkinter
- Google Code is dying
- Please add support to a diff utility
- PyScripter 2.5.3 (64bit) not working with Python 3.4.3 (64bit) on Win10 Preview HOT 1
- Doesn't work with Python 3.4
- set $[SelectedDir] as working directory of external tool,does not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyscripter.