On Jun 16, 7:30 am, Gaudha wrote:
> Is there any built-in function to stop execution of a function similar
> to stop the program execution by sys.exit?
> In the example below, I want to skip statement 2... if the 'if'
> condition is satisfied.
> Don't advice me to put statement 2 in 'else' block.
On May 4, 4:54 pm, "Gabriel Genellina" wrote:
> En Mon, 04 May 2009 15:12:41 -0300, mzdude escribió:
>
> > substring isn't limited to 0..255
> >>>> substring = "\0x%d\0x%d" % (257,257)
> >>>> 'acaccgac'.replace("
On May 4, 9:01 am, Matthias Gallé wrote:
> bearophileh...@lycos.com wrote:
> > John O'Hagan:
> >> li=['a', 'c', 'a', 'c', 'c', 'g', 'a', 'c']
> >> for i in range(len(li)):
> >> if li[i:i + 2] == ['a', 'c']:
> >> li[i:i + 2] = ['6']
>
> > Oh well, I have done a mistake, it seems.
> > A
On Jul 23, 6:30 pm, Samir <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
>
> def findSumOfDivisor(n):
> return sum(divisor) # fine using function sum()
>
> sum = findSumOfDivisor(i) # then find the sum of its divisors
oops redefine what sum is.
>>> x = [1,2]
>>> sum
On Jul 10, 6:15 am, Andrew MacIntyre <[EMAIL PROTECTED]>
wrote:
> This likely indicates that the DLL is using the C calling convention
> and not the stdcall calling convention. Use CDLL rather than WinDLL
> to load the DLL.
using cdll got me over the calling hurdle. However, I'm not seeing the
r
I need to interface with a windows DLL that has the following
signature
extern "C" void Foo( BSTR in, BSTR *out )
Code so far
>>> from ctypes import *
>>> import comtypes
>>> LPBSTR = POINTER(comtypes.BSTR)
>>>
>>> hdl = windll.MyDll.Foo
>>> hdl.rettype = None
>>> hdl.argtypes = [comtypes.BSTR,
Fredrik Lundh wrote:
> mzdude wrote:
>
> >> works for me. are you perhaps running this under some kind of IDE that
> >> keeps the process running even after the program has terminated?
> >>
> > It works the same way if I run from IDLE or from the DOS
Fredrik Lundh wrote:
[snip]
> works for me. are you perhaps running this under some kind of IDE that
> keeps the process running even after the program has terminated?
>
It works the same way if I run from IDLE or from the DOS command prompt.
--
http://mail.python.org/mailman/listinfo/python-li
I've just started playing with Python. Installed 2.5 on Windows XP
system. I'm working through some of the examples in Programming Python
3ed by Mark Lutz. Given the following example when the Quit All button
action is assigned to root.quit the windows aren't dismissed or
destroyed. The application