Help requested -- importing stuff from a .COM DLL into python

2006-05-31 Thread John D Salt
I wonder if some kind soul can help me in my struggle with DLLs?

I am trying -- not because I want to, but because I have been told to -- 
to import things from an API that exists as a bunch of .COM DLLs.  

I had originally hoped to get them into a Python 2.4 program by a simple 
import statement.  This does not appear to work, so I secured a copy of 
win32com, and have proven that it works to the extent of opening a M$ 
Word application.

The same approach with the DLLS I actually need to use consistently fails 
with the message "Invalid class string" (full traceback included below, I 
doubt that it helps).  After a couple of afternoons of vigorous easter-
egging, I have not hit upon a valid class string, and my childish 
assumption that it would be one of the names listed in the API 
ocumentation is obviously wrong.  Staring at the DLL contents with 
PEBrowse tells me nothing useful.

Does anyone with experience of getting .COM stuff from DLLs know where I 
am going wrong?

(Alternatively, can anyone who has got Python to use the MooD API tell me 
how?)

I have no experience of .COM up to this point, and am hoping to keep it 
that way once this nonsense is done with.

Thanks for any assistance, and all the best,

John.

- - - - - - - -  cut here  - - - - - - - - 

Traceback (most recent call last):
  File "D:\Program Files\MooD\2006\MooDAPI\APIstrangler0_1.py", line 470, 
in ?
thing = win32com.client.Dispatch("MooDAPI.Object.Info") # Fails, 
"Invalid class string
  File "D:\Python24\Lib\site-packages\win32com\client\__init__.py", line 
95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName
(dispatch,userName,clsctx)
  File "D:\Python24\Lib\site-packages\win32com\client\dynamic.py", line 
98, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "D:\Python24\Lib\site-packages\win32com\client\dynamic.py", line 
78, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, 
pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: network simulator in Python ?

2007-02-22 Thread John D Salt
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in 
news:[EMAIL PROTECTED]:

> On Feb 21, 12:26 pm, "DanielJohnson" <[EMAIL PROTECTED]> wrote:
>> I was wondering if anyblody can suggest me a network simulator 
[Snips]
>> I am looking for a simulator 
[Snips]
> Google for Scapy

I don't think Scapy is a simulator, is it?

I second the recommendation for SimPy for writing simulation programs.  If 
you require a simulator specifically, I don't know of one in Python.

All the best,

John. 

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [silly] Does the python mascot have a name ?

2006-05-16 Thread John D Salt
Steve <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> umm, was just wondering, does the python mascot have a name ? 

I always assumed it was Monty, but I confess to not having the slightest 
factual basis for this belief.

All the best,

John. 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [silly] Does the python mascot have a name ?

2006-05-17 Thread John D Salt
Andy Sy <[EMAIL PROTECTED]> wrote in 
news:[EMAIL PROTECTED]:

> http://mail.python.org/pipermail/python-list/2003-September/185612.html

"Odi" must be the Dutch for "Monty".

All the best,

John.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [silly] Does the python mascot have a name ?

2006-05-18 Thread John D Salt
John Bokma <[EMAIL PROTECTED]> wrote in news:Xns97C6ADE23FCAcastleamber@
130.133.1.4:

> John D Salt  wrote:
> 
>> Andy Sy <[EMAIL PROTECTED]> wrote in 
>> news:[EMAIL PROTECTED]:
>> 
>>> http://mail.python.org/pipermail/python-list/2003-September/185612.html
>> 
>> "Odi" must be the Dutch for "Monty".
> 
> Nope. If it was Dutch it would probably be Odie

Damn.

All the best,

John.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [silly] Does the python mascot have a name ?

2006-05-19 Thread John D Salt
Mel Wilson <[EMAIL PROTECTED]> wrote in news:_s2bg.8867$aa4.296233
@news20.bellglobal.com:

[Snips]
> Just reinforces the central truth.  The mascot doesn't 
> *have* a name.  Most things don't. 

Most things don't have names?

I'll believe you if you can give me a list of ten things that don't have 
names.

;-)

All the best,

John.  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Software Needs Philosophers

2006-05-23 Thread John D Salt
<[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:

[Snips]
> Wrong. We live in a paradise of ideas and possibilities well beyond the
> wildest dreams of only 20 years ago.

What exciting new ideas exist in software that are both important and 
cannot be traced back to 1986 or earlier?

I'd like to believe that there are some, but I can't think of any at the 
moment.

All the best,

John.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Software Needs Philosophers

2006-05-23 Thread John D Salt
"John A. Bailo" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

[Snips]
> What exciting new ideas exist in software that are both important and 
> cannot be traced back to Doug Engbart's 1968 presentation at Xerox
> Parc? 

The only two I would think worth mentioning are Nygaard et al's ideas on 
patterns as embodied in Mjolner Beta, and Colmerauer's on logic programming 
as embodied in Prolog.  And maybe pi calculus, if only for sticking the 
formal foundation in where it was missing from under O-O.

But Prolog and pi calculus are regarded as marginal activities, and most 
software people have stil contrived never to have heard of Nygaard, despite 
his being the inventor (with Ole-Johan Dahl) of O-O in 1967.

All the best,

John.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Software Needs Philosophers

2006-05-23 Thread John D Salt
Eli Gottlieb <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

[Snips]
> I correct: We live in a paradise where we finally have to processing 
> power to realize all those ideas that were too inefficient 20 years
> ago. 

That sounds more reasonable.

In my more jaundiced moments, I think that progress in software will not 
resume until we stop the annual doubling of resources for bloatware to 
consume.

All the best,

John.
-- 
http://mail.python.org/mailman/listinfo/python-list