Py_Finalize ERROR!
Py_Finalize ERROR! In my C++ program ,python is embeded . I create one win thread to run embedded Python code . So at the begin of thread function I call "Py_Initialize" and at the end of thread function call "Py_Finalize" . But after I began thread several times,the program crashed in function "Py_Finalize". I can see the error occured at function "PyObject_ClearWeakRefs" when "Py_Finalize" called "type_dealloc"; Note: the python25.dll(lib) is builded by VC6(SP6) -- http://mail.python.org/mailman/listinfo/python-list
Why the result same as before modifing py files
In my C++ program ,python is embeded . I import One module(py file) and execute some functions .Then I modify py files in order to modify func parameters when process is still running .I import the module and execute functions again.But I find the result is same as before -- http://mail.python.org/mailman/listinfo/python-list
Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
Is there a open souce IDE writen by C( C++) or partly writen by C( C+ +)? -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
My project need a simple scripts debugger . I hope I can find something instructive Stefan Behnel 写道: > zaley wrote: > > Is there a open souce IDE writen by C( C++) or partly writen by C( C+ > > +)? > > Tons of them. What do you want to do with it? > > Stefan -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
Of course, python scripts debugger On 2月22日, 下午3时22分, zaley <[EMAIL PROTECTED]> wrote: > My project need a simple scripts debugger . I hope I can find > something instructive > > Stefan Behnel 写道: > > > zaley wrote: > > > Is there a open souce IDE writen by C( C++) or partly writen by C( C+ > > > +)? > > > Tons of them. What do you want to do with it? > > > Stefan -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
On Feb 22, 11:06 pm, "Jesper" wrote: > Give PyScripter fromhttp://www.mmm-experts.com/a try > > It is for Windows, though it is written in Delphi and not in C/C++ > > /Jesper > > "zaley" <[EMAIL PROTECTED]> skrev i en meddelelsenews:[EMAIL PROTECTED] > Of course, python scripts debugger > > On 2ÔÂ22ÈÕ, ÏÂÎç3ʱ22·Ö, zaley <[EMAIL PROTECTED]> wrote: > > > > > My project need a simple scripts debugger . I hope I can find > > something instructive > > > Stefan Behnel дµÀ£º > > > > zaley wrote: > > > > Is there a open souce IDE writen by C( C++) or partly writen by C( C+ > > > > +)? > > > > Tons of them. What do you want to do with it? > > > > Stefan- Hide quoted text - > > - Show quoted text - But PyScripter is not a open source project -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
On Feb 23, 5:02 pm, zaley <[EMAIL PROTECTED]> wrote: > On Feb 22, 11:06 pm, "Jesper" wrote: > > > > > > > Give PyScripter fromhttp://www.mmm-experts.com/atry > > > It is for Windows, though it is written in Delphi and not in C/C++ > > > /Jesper > > > "zaley" <[EMAIL PROTECTED]> skrev i en meddelelsenews:[EMAIL PROTECTED] > > Of course, python scripts debugger > > > On 2ÔÂ22ÈÕ, ÏÂÎç3ʱ22·Ö, zaley <[EMAIL PROTECTED]> wrote: > > > > My project need a simple scripts debugger . I hope I can find > > > something instructive > > > > Stefan Behnel дµÀ£º > > > > > zaley wrote: > > > > > Is there a open souce IDE writen by C( C++) or partly writen by C( C+ > > > > > +)? > > > > > Tons of them. What do you want to do with it? > > > > > Stefan- Hide quoted text - > > > - Show quoted text - > > But PyScripter is not a open source project- Hide quoted text - > > - Show quoted text - But PyScripter is not a open source project- Hide quoted text -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
On Feb 24, 6:48 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Lie wrote: > > On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: > >> On Feb 22, 11:06 pm, "Jesper" wrote: > > >>> Give PyScripter fromhttp://www.mmm-experts.com/atry > >>> It is for Windows, though it is written in Delphi and not in C/C++ > >>> /Jesper > >>> "zaley" <[EMAIL PROTECTED]> skrev i en meddelelsenews:[EMAIL PROTECTED] > >>> Of course, python scripts debugger > >>> On 2ÔÂ22ÈÕ, ÏÂÎç3ʱ22·Ö, zaley <[EMAIL PROTECTED]> wrote: > >>>> My project need a simple scripts debugger . I hope I can find > >>>> something instructive > >>>> Stefan Behnel дµÀ£º > >>>>> zaley wrote: > >>>>>> Is there a open souce IDE writen by C( C++) or partly writen by C( C+ > >>>>>> +)? > >>>>> Tons of them. What do you want to do with it? > >>>>> Stefan- Hide quoted text - > >>> - Show quoted text - > >> But PyScripter is not a open source project > > > Am I correct to say that the reason why you wanted an open source C++ > > IDE is because you wanted the freedom to modify your own programming > > environment? > >From the "About" window in PyScripter : > > """ > A freeware, open source Python scripter integrated > development environment created with the ambition to bring to > the Python community the quality and functionality available in > commercial IDEs available for other languages. > """ > > So I think we could say PyScripter IS an open source project.- Hide quoted > text - > > - Show quoted text - Really, what I want to do is that scripts can be executed step by step . I know By "Py_Runstring" clauses in main function can executed by step . But I can't know how to step into a function and how to step in a function. So I hope I can find something helpful in open source IDE for python. -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
On 2月25日, 上午6时34分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > zaley wrote: > > On Feb 24, 6:48 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > >> Lie wrote: > >>> On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: > >>>> On Feb 22, 11:06 pm, "Jesper" wrote: > >>>>> Give PyScripter fromhttp://www.mmm-experts.com/atry > >>>>> It is for Windows, though it is written in Delphi and not in C/C++ > >>>>> /Jesper > >>>>> "zaley" <[EMAIL PROTECTED]> skrev i en meddelelsenews:[EMAIL PROTECTED] > >>>>> Of course, python scripts debugger > >>>>> On 2ÔÂ22ÈÕ, ÏÂÎç3ʱ22·Ö, zaley <[EMAIL PROTECTED]> wrote: > >>>>>> My project need a simple scripts debugger . I hope I can find > >>>>>> something instructive > >>>>>> Stefan Behnel дµÀ£º > >>>>>>> zaley wrote: > >>>>>>>> Is there a open souce IDE writen by C( C++) or partly writen by C( C+ > >>>>>>>> +)? > >>>>>>> Tons of them. What do you want to do with it? > >>>>>>> Stefan- Hide quoted text - > >>>>> - Show quoted text - > >>>> But PyScripter is not a open source project > >>> Am I correct to say that the reason why you wanted an open source C++ > >>> IDE is because you wanted the freedom to modify your own programming > >>> environment? > >> >From the "About" window in PyScripter : > > >> """ > >> A freeware, open source Python scripter integrated > >> development environment created with the ambition to bring to > >> the Python community the quality and functionality available in > >> commercial IDEs available for other languages. > >> """ > > >> So I think we could say PyScripter IS an open source project.- Hide quoted > >> text - > > >> - Show quoted text - > > > Really, what I want to do is that scripts can be executed step by > > step . > > I know By "Py_Runstring" clauses in main function can executed by > > step . > > But I can't know how to step into a function and how to step in a > > function. > > So I hope I can find something helpful in open source IDE for python. > > Exactly so. PyScripter does it easy, besides you can have in different > tabs all the modules of your application. You just hit the run button > and your program runs, you hit the debug button and you start going step > by step. It's free, easy to install, just give it a try and if you don't > like it just trash it. I just want to know how to do it!! -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
On 2月25日, 上午6时34分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > zaley wrote: > > On Feb 24, 6:48 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > >> Lie wrote: > >>> On Feb 23, 4:02 pm, zaley <[EMAIL PROTECTED]> wrote: > >>>> On Feb 22, 11:06 pm, "Jesper" wrote: > >>>>> Give PyScripter fromhttp://www.mmm-experts.com/atry > >>>>> It is for Windows, though it is written in Delphi and not in C/C++ > >>>>> /Jesper > >>>>> "zaley" <[EMAIL PROTECTED]> skrev i en meddelelsenews:[EMAIL PROTECTED] > >>>>> Of course, python scripts debugger > >>>>> On 2ÔÂ22ÈÕ, ÏÂÎç3ʱ22·Ö, zaley <[EMAIL PROTECTED]> wrote: > >>>>>> My project need a simple scripts debugger . I hope I can find > >>>>>> something instructive > >>>>>> Stefan Behnel дµÀ£º > >>>>>>> zaley wrote: > >>>>>>>> Is there a open souce IDE writen by C( C++) or partly writen by C( C+ > >>>>>>>> +)? > >>>>>>> Tons of them. What do you want to do with it? > >>>>>>> Stefan- Hide quoted text - > >>>>> - Show quoted text - > >>>> But PyScripter is not a open source project > >>> Am I correct to say that the reason why you wanted an open source C++ > >>> IDE is because you wanted the freedom to modify your own programming > >>> environment? > >> >From the "About" window in PyScripter : > > >> """ > >> A freeware, open source Python scripter integrated > >> development environment created with the ambition to bring to > >> the Python community the quality and functionality available in > >> commercial IDEs available for other languages. > >> """ > > >> So I think we could say PyScripter IS an open source project.- Hide quoted > >> text - > > >> - Show quoted text - > > > Really, what I want to do is that scripts can be executed step by > > step . > > I know By "Py_Runstring" clauses in main function can executed by > > step . > > But I can't know how to step into a function and how to step in a > > function. > > So I hope I can find something helpful in open source IDE for python. > > Exactly so. PyScripter does it easy, besides you can have in different > tabs all the modules of your application. You just hit the run button > and your program runs, you hit the debug button and you start going step > by step. It's free, easy to install, just give it a try and if you don't > like it just trash it. I just want to know how to realize it in my program !! -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
On 2月25日, 上午10时35分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > zaley wrote: > >>> So I hope I can find something helpful in open source IDE for python. > >> Exactly so. PyScripter does it easy, besides you can have in different > >> tabs all the modules of your application. You just hit the run button > >> and your program runs, you hit the debug button and you start going step > >> by step. It's free, easy to install, just give it a try and if you don't > >> like it just trash it. > > > I just want to know how to do it!! > > Ok, I hope I'm not misunderstanding you. > You go tohttp://www.mmm-experts.com/Downloads.aspx > and you download PyScripter (windows installer). Then you run the > downloaded file (that would be PyScripter-setup.exe) and that will > install PyScripter in your machine. You run PyScripter, click the "open" > button or menu File/Open... and choose the program you want to debug. > It will be opened in an edit window in your PyScripter main window. > Then you click on "Step into subroutine" button or just press and > you'll be in the first line of your program. From then on you keep > clicking "Step into subroutine" () or "Step over next function call" > () or "Step out of the current subroutine" or "Run to cursor" as you > see fit. You can add breakpoints just by clicking to the left of the > line numbers or the appropriate button. You can watch what's going on in > your program in the lower partition of your main window where you have a > "Call Stack" tab and also "Variables", "Watches", "Breakpoints", > "Output" and "Messages" tabs. > > >From then on you are on your own. > > HTH Hehe. You misunderstand me really. I know what you say I just want to know how to realize it using C language or other language. I need such source code to study -- http://mail.python.org/mailman/listinfo/python-list
Re: Is there a open souce IDE writen by C( C++) or partly writen by C( C++)?
On 2月25日, 下午12时02分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > zaley wrote: > > On 2月25日, 上午10时35分, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > >> zaley wrote: > >>>>> So I hope I can find something helpful in open source IDE for python. > >>>> Exactly so. PyScripter does it easy, besides you can have in different > > ... > .. > > > > >> >From then on you are on your own. > > >> HTH > > > Hehe. You misunderstand me really. I know what you say > > I just want to know how to realize it using C language or other > > language. > > I need such source code to study > > Ooops! Sorry. My fault. OK. I have found PyScripter's source code in "http:// pyscripter.googlecode.com/svn/trunk" by svn. Although It is writen with delphi,I think I can greatly profit from it. Thinks a lot -- http://mail.python.org/mailman/listinfo/python-list
boost and ctypes
I am a newbie to python .I know it is easy to access Windows API and DLL using ctypes in python .And it is easy to access python class and function using boost libs in C. Can boost and ctypes work together? -- http://mail.python.org/mailman/listinfo/python-list
pass float array(list) parameter to C
In my program, python is communicated with C use ctypes . I can't find a better way to pass float array(list) parameter to C function. Can someone give me a help? -- http://mail.python.org/mailman/listinfo/python-list
Re: pass float array(list) parameter to C
On Mar 17, 10:59 pm, [EMAIL PROTECTED] wrote:
> You can also do it with ctypes only; too bad it's not really well
> documented. c_float is a type of a floating point number and it has *
> operator defined, so that c_float*4 is a type of a 4-element array of
> those numbers. So if you want to construct an array of floats from a
> list of floats, you can do it like this:
>
> from ctypes import c_float
>
> x = [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]
> float_array_type = c_float*len(x)
> float_array = float_array_type(*x)
> print float_array
Is there has any difference between the following arrays ?
Buf0=(c_float* 9)(57,57,57,57,57,5,5,5,5)
Buf0=array('f', [57,57,57,57,57,5,5,5,5])
function called like this in python:
ret= SetAnalog(9,Buf0)
function prototype in C like this
int SetAnalog(UINT uChannel,float* pBuf)
{
...
}
--
http://mail.python.org/mailman/listinfo/python-list
