Re: wxStyledTextCtrl - Dead?

2006-04-10 Thread Dave Mandelin
I don't know the answers to 1 and 2, but from the demo I know that the answer to 3 is wx.stc.StyledTextControl. As for 4, I guess it depends on what you want to do. StyledTextControl looked pretty scary to me, and for my application I mainly needed to display styled text, not edit it, so I embedde

Re: GridBagSizer

2006-04-10 Thread Dave Mandelin
Probably just that GridBagSizer is complicated and confusing, and you can usually get what you want more easily and maintainably by nesting simpler sizers like Box and FlexGrid. -- Want to play tabletop RPGs with your friends online? Try RPZen: http://koboldsoft.com -- ht

Re: Problem embedding Python...

2006-04-10 Thread Dave Mandelin
> C:\DOCUME~1\ANDY~1.MCC\LOCALS~1\Temp/cckhbaaa.o(.text+0x2b):main.cpp: > undefined reference to `_imp__Py_Initialize' These errors indicate that the linker can't find the Python library (python24.lib). > -L"C:\Python24\Lib" I think you want to say -L"C:\Python24\Libs" instead. 'libs' contains

Re: Dice probability problem

2006-04-04 Thread Dave Mandelin
That looks reasonable. The operation you are implementing is known as 'convolution' and is equivalent to multiplying polynomials. It would be a little more general if you had the input 'die' be a sequence of the count for each outcome, so d6 would be [1]*6 (or [0]+[1]*6 if you prefer). That would a

Re: COM Server & wxPython

2006-04-03 Thread Dave Mandelin
nelson wrote: > Hi all, > i'm doing a COM server that have to expose some graphics (panels and > configuration controls), that would be embedded in an application through > OLE. I was wondering if I can do this using wxPython. Another question is > if my COM server would inherits from one of the w

Re: Registration Code

2006-04-03 Thread Dave Mandelin
Ken Seehart wrote: > Math wrote: > > Hello, > I encypted the bytecode of a few important functions with a key based on > information required from the user. Without the key, these functions > can't be decrypted. This is somewhat more secure than just testing the > key with an "if" statement since

Re: how to comment lot of lines in python

2006-03-31 Thread Dave Mandelin
I often use if 0: bunch of lines of code That way, it's very easy to reenable the code, or to add an else, etc. I can even put things like 'if 0 and USE_FOO_FEATURE' to document what is being commented out. It's much more flexible than commenting out. -- Want to play tabletop RPGs over the i

Re: GUI in python

2006-03-30 Thread Dave Mandelin
A friend of mine recently used PythonCard and he found it pretty good. I use wxPython, which is what PythonCard is based on, and I think it's very good, but it's more work to get started with than PythonCard. -- Want to play tabletop RPGs over the internet? Check out Koboldsoft RPZen:http:

Re: Updated: python ctype question about "access violation reading location 0x5a5a5a5a"

2006-03-30 Thread Dave Mandelin
First guess is that you are passing a Python function to something that expects a C function. Try looking at gencb.py in DynWin. -- Want to play tabletop RPGs over the internet? Check out Koboldsoft RPZen:http://www.koboldsoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Quick Question regarding Frames

2006-03-30 Thread Dave Mandelin
I'm glad to have helped. Good luck with your project. -- Want to play tabletop RPGs over the internet? Check out Koboldsoft RPZen:http://www.koboldsoft.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Quick Question regarding Frames

2006-03-29 Thread Dave Mandelin
Hi again. frameA in the __init__ is a parameter that is required to be the FrameA object that is creating the FrameB. In my example, I was assuming that the FrameB is created in a method of FrameA, so I created it passing self as frameA: w2 = FrameB(self, None, -1,"") w2.Show() --

Re: dir_util.copy_tree call

2006-03-28 Thread Dave Mandelin
In IDLE, by default the working directory for the interactive prompt is the working directory for IDLE itself. The working directory for running a module is the directory the module is stored in. In your script, use absolute paths or set the -- Want to play tabletop RPGs over the internet? Che

Re: Quick Question regarding Frames

2006-03-28 Thread Dave Mandelin
Chris S wrote: > Hello All, > Just starting out with Python and wxPython. I have two Frames, FrameA > and FrameB. FrameA opens FrameB when a button on FrameA is clicked. I > can get this. Now I want a button on FrameB to update a control on > FrameA. I am having an issue with this. Can anyone

Re: Python C wrapper question

2006-03-27 Thread Dave Mandelin
Shi, Jue wrote: > Hello, Gurus, > > I have a question on wrapping C function in Python. > > > My C code is like this: > > typedef void (WINAPI *myCallBack) (unsigned int myarg1, unsigned int myarg2) > > bool myfunc(myCallBack callfunc) > > > Now I want to call myfunc in Python, what should I do?

Re: Please help me to resolve this issue

2006-03-27 Thread Dave Mandelin
Yanping Zhang wrote: > Hello everyone, > > I am pretty new in python. Please give me any idea about > this issue: > > There is a function like this in my c dll: > > typedef void (WINAPI *myCallBack) (unsigned int myarg1, unsigned int myarg2) > > bool myfunc(myCallBack mycall) > > > In my python co