Hello alltogether,
I hope somebody can help me in that case. I bet I have overseen s.th..
I have a VC++ IDispatch Com-Server (ATL) and include for error handling
issues a enumeration in the IDL-File.
[...]
enum PROG_ERROR {
P_OK = 0,
P_ERR_01 = 1,
P_ERR_02 = 2,
.
Thanks, thats it.
Konstantin Veretennicov schrieb:
import myserver
print myserver.constants. P_OK
> 0
>
> Maybe you can access constants without makepy, I don't know.
>
> - kv
--
http://mail.python.org/mailman/listinfo/python-list
Hello together,
My system:
ActivePython 2.4.1
Windows XP
I write a COM Server in VC++ 6.0 using ATL. So far so good. While I
develop I got sometimes strange behaviour with makepy utility. Today
again. :-(
What I do on the python (COM client) side.
1) Register COM server
2) Use COM makepy utili
James Kew schrieb:
> "Alexander Eisenhuth" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>>ActivePython 2.4.1
>>Windows XP
>>
>>I write a COM Server in VC++ 6.0 using ATL. So far so good. While I
>>develop I got sometimes s
Hello everybody,
i wonder how the win32 COM extension handles different C-int types
(short, int, long). Another question for me is weather the
"out-direction" of parameter is supported "out of the box" ?
To clarify look at the methode "FunWithTwoInts"
Hi alltogether,
I found a nice and useful article for extenting python with C++ using
SWIG. It describe from the scratch especially for Windows. Maybe this
can be included somewhere on www.python.org. Here is the link:
http://www.geocities.com/foetsch/python/extending_python.htm
Alexander
Hi alltogether,
I use ActivePython 2.4.1 , also the debug part from
http://ftp.activestate.com/ActivePython/etc/ and VC 6.0 unter Windows XP.
I can't figure out howto debug my c++ extension. If i compile it as
release version, I've of course no chance to set a breakpoint. If I
compile as debug
Miki Tebeka schrieb:
Hello Alexander,
I can't figure out howto debug my c++ extension. If i compile it as
release version, I've of course no chance to set a breakpoint.
This is not true. You *can* set breakpoints in release mode, make sure to
add debug information to your release build so you'll b
Hello alltogether,
I've a little problem in creating a new identifier in the global namespace. The
following code creates a as local var in the namespace of init()
class A:
def __init__(self, v):
print "ctr of", self.__class__, "with", v
self._v = v
def i
Hello,
is there a assignement operator, that i can overwrite?
class MyInt:
def __init__(self, val):
assert(isinstance(val, int))
self._val = val
a = MyInt(10)
# Here i need to overwrite the assignement operator
a = 12
Thanks
Alexander
--
http://mail.py
Wow, thanks a lot for your quick answers.
That assignement is no operator, but a statemant is a pity, but indeed I came
foward with overwritten methods for numeric types
Regards
Alexander
--
http://mail.python.org/mailman/listinfo/python-list
Hello Together,
Shortly what I'm doing:
- Extending python with boost.pthon extension
- Using python C-Api for datatypes in the extension
- extension has a thread (that can be stopped/started)
- thread started: extension updates a dict (given as parameter to the
extension)
every 20 ms
- the dic
Hello alltogether,
My System:
Python 2.5.1
Boost.Python
Qt 4.2.2
SIP 4.6
PyQt 4.2
WinXp
I've a memory leak in a PyQt application and no idea how to find it. What
happens in the application ?
From QWindow a QDialog is called on a button "pressed()" signal, that
instantiate a QThread and waits
Hello pyqt users,
i tried to use signal / slot across threads. With the following example I want
to emit a signal when the thread loop is entered. The connected slot is never
called. Why?
Any help is very welcome ...
Alexander
import time
import sys
import PyQt4
from PyQt4.QtCore import (QOb
Ok, thanks.
Phil Thompson schrieb:
> On Tuesday 29 May 2007 11:58 am, Alexander Eisenhuth wrote:
>> Hello pyqt users,
>>
>> i tried to use signal / slot across threads. With the following example I
>> want to emit a signal when the thread loop is entered. The connec
Hello,
Ctrl+C is not passed to the interpreter (i guess it) while I'm executing a
script. Instead i get:
forrtl: error (200): program aborting due to control-C event
If I start python in interactive mode Ctrl+C is passed:
bash-3.2$ python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.131
Jason schrieb:
> Forrtl indicates that your script is running a Fortran library or
> program. Remember that Python exceptions only apply during Python.
> If a Fortran DLL performs a divide-by-zero error, or accesses invalid
> memory, it will kill the interpreter instead of throwing a Python
> exce
[EMAIL PROTECTED] schrieb:
> Some recent posts about Python programming style got me thinking.
> Since we have the PEP 8 which gives some guidelines about the style to
> be used, do we have any program that can check for violations of these
> guidelines within the source code? I understand that the
... as you can find in os.py at line 1 ?
Regards Alexander
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers schrieb:
> Nope. It's either 'interface' (no leading underscore), 'implementation'
> (single leading underscore), 'implementation with some protection
> against accidental overriding' (two leading underscores).
What do you mean with 'implementation'? What does it express?
-
Hi all,
I'm wodering how the information hiding in python is ment. As I understand
there
doesn't exist public / protected / private mechanism, but a '_' and '__'
naming convention.
As I figured out there is only public and private possible as speakin in "C++
manner". Are you all happy with
Hallo Alltogether,
I've searched in this mailing list, but it seems to me that there is no general
approach to pass exceptions from one thread to another.
I think most application do a unique way of handling "unhandled exceptions", at
least they (should) try to log them.
The following discussi
John Nagle schrieb:
> Alexander Eisenhuth wrote:
>> Hallo Alltogether,
>>
>> I've searched in this mailing list, but it seems to me that there is
>> no general approach to pass exceptions from one thread to another.
>
>Very few languages have that.
>
Hello,
what algo do you use, when you want to find the dict values from d, with
members
of l. Following example:
>>> d = {1:2,2:3,3:4,4:5,5:6,6:7,7:8,8:9,9:10}
>>> l = [7,8]
>>> found_dic_members =
>>> print found_dict_members
[8,9]
Thanks
Alexander
--
http://mail.python.org/mailman/list
Yes it was the silly on-liner ... it was a bit ago I used it last time ...
thanks
Gabriel Genellina schrieb:
> En Thu, 08 Mar 2007 05:37:48 -0300, Steven D'Aprano
> <[EMAIL PROTECTED]> escribió:
>
>> On Thu, 08 Mar 2007 05:26:22 -0300, Gabriel Genellina wrote:
>>
>>> found_dic_members = [d[key]
Hello alltogether,
is it possible to format stings with fixed width of let's say 7 character. T
need a floating point with 3 chars before dot, padded with ' ' and 3 chars
after
dot, padded with '0'.
Followingh is my approach
>>> f = 21.1
>>> s = "%.03f" % f
>>> s
'21.100'
But there are mis
Hello alltogether,
is it possible to format stings with fixed width of let's say 7 character. T
need a floating point with 3 chars before dot, padded with ' ' and 3 chars
after
dot, padded with '0'.
Followingh is my approach
>>> f = 21.1
>>> s = "%.03f" % f
>>> s
'21.100'
But there are mis
Thanks for your fast reply. I'm fine with your "%7.03f" solution. (negatives
are
not significant)
Alexander Eisenhuth schrieb:
> Hello alltogether,
>
> is it possible to format stings with fixed width of let's say 7
> character. T need a floating point with
Hello PyQt experts,
do i have to disconnect all signal/slots, after the emitting object is deleted,
or does it the QObject destructor?
Thanks
Alexander
--
http://mail.python.org/mailman/listinfo/python-list
Phil, thanks for that quick reply
Phil Thompson schrieb:
> On Tuesday 25 September 2007, Alexander Eisenhuth wrote:
>> Hello PyQt experts,
>>
>> do i have to disconnect all signal/slots, after the emitting object is
>> deleted, or does it the QObject destructor?
>
Hi,
I'm near the ground and need help.
I'm building a multithreaded extension with boost.python.
python extension
-
import extension
extension.init() ->PyEval_InitThreads();
setup 3 threads (pthrea
ok, once more my "scheme"
python extension
-
import extension
extension.init() ->PyEval_InitThreads();
setup 3 threads (pthreads) and do a lot
of things, but no python api c
Hi everybody,
does somebody have experience in building with VC6.0. On my first try there
where missing C-Modules. Is that true. VC6.0 is not supported?
Thanks a lot.
Regards
Alexander
PC: What Python version supports VC6.0?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
PyLint says that "Relative imports" ... are worth to be warned .
And I ask myself why?
- Example directory structure -
Sound/ Top-level package
__init__.py Initialize the sound package
Utils/ Subpac
Hello,
In my mixed C++ / Python Application there are situations where a
PyGILState_STATE gil_state = PyGILState_Ensure() produces a deadlock.
The background is that a call fro python to cpp is directed to another
subsystem
that tries to access the GIL (through my C++ wrapper) from another thr
Hello everybody,
I Use a C++ thread that is called from the python sides to provoke some
activities. The calls set some booleans in the thread object and return. To
synchrThreadClassonize the execution in the thread, the idea of me is, to give
a
Python Event() object as bp::object to the C++ t
Hello list,
I'm having a problem with a python COM Excel client that rarely gets the
exception pywintypes.com_error with the error code -2147417846. (means Excel is
busy) Here the python code of the exception handling:
[...]
try:
# write a excel cell
[...]
except pywintypes.com_error, ex:
I don't think so, because it happens very rarely
Michel Claveau - MVP schrieb:
Hi!
Your computer is too slow, for launch Excel.
Configure the machine for more speed...
@+
--
http://mail.python.org/mailman/listinfo/python-list
Hello out there,
- what is the reason, that __slots__ are introduced in python?
- I want to use slots to define a class where no attributes are added at
runtime. Is that a good idea to use slots for that?
Regards
Alexander
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
- I've to write a XML document including comments
- the document should be formatted that it could be viewed with a text editor
What is the fastest (time for realization) approach doing it in python 2.5?
Any help or hints are very welcome
Thanks
Alexander
--
http://mail.python.org/mailm
Stefan Behnel schrieb:
Alexander Eisenhuth, 08.07.2010 11:08:
- I've to write a XML document including comments
"write" in the sense of typing in a text editor? Or constructing one
programmatically in memory? Or ... ?
write means write to a file
And what kind of data fr
Sorry for my little riddle, but you solved it quite good with:
- http://effbot.org/zone/element-lib.htm#prettyprint
and comments are also in ElementTree (xml.etree.ElementTree.Comment)
Thanks
Stefan Behnel schrieb:
Alexander Eisenhuth, 08.07.2010 12:07:
Stefan Behnel schrieb:
Alexander
Hello together,
python: 2.5.1
palttform: winXP
I'm using pickle.dump and pickle.load with data that is created in a wrapped
(boost.python) piece of C++ code. pickle.dump works fine. pickle.load creates
the following exception:
[...]
data = pickle.load(input)
File "C:\Python25\lib\pickl
Mark Dickinson schrieb:
BTW: I'm tied to version 2.5 of python
Have you tried using pickle protocol 1 or 2, instead of pickle
protocol 0? That may well solve your problem. (Those
protocols write out the binary form of a float directly, instead
of reading and writing a string representatio
44 matches
Mail list logo