Hello,
I am really new in python scipy win32com and scipy I tried to setup a
COM server to interact with vb 6 the pythom COM server is :
from win32com.server import exception, register
import pythoncom, win32pdhutil, winerror
import math
import numpy
import sys
sys.path.append ('D:\\soft\pyth on25\\Lib\\site-packages\\')
#from scipy import linalg
class Fop:
_public_methods _ = [ 'SqVal' ]
def SqVal(self,*val ):
import sys
sys.path.append ('D:\\soft\pyth on25\\Lib\\site-packages\\')
import scipy
#print sys.path
#mat=numpy.bmat (val)
#linalg.inv(mat )
return sys.path
_reg_verprogid_ = "Python.Fop .3"
_reg_progid_ = "Python.Fop "
_reg_desc_ = "Python Fop"
_reg_clsid_ = "{30BD3490-2632-11cf-AD5B-524153480001}"
def Register():
import win32com.server .register
return win32com.server .register.UseCo mmandLine(Fop)
if __name__=='__ma in__':
print "Registerin g COM server..."
Register()
the vb 6 code is
Private Sub Form_Load()
Set obj = CreateObject("P ython.Fop")
Dim ty(1, 1) As Variant
ty(0, 0) = 1
ty(1, 1) = 2
ty(1, 0) = 3
ty(0, 1) = 4
toto = obj.SqVal(ty)
End Sub
I have a problem when I launch the vb 6 code : no module named
scipy .... it is quite strange and I do not understand that Do you
have any ideas ?
thank you very much ! 3 3141
On 2 mai, 23:37, vml <victor.leb...@ gmail.comwrote:
Hello,
I am really new in python scipy win32com and scipy I tried to setup a
COM server to interact with vb 6 the pythom COM server is :
from win32com.server import exception, register
import pythoncom, win32pdhutil, winerror
import math
import numpy
import sys
sys.path.append ('D:\\soft\pyth on25\\Lib\\site-packages\\')
#from scipy import linalg
class Fop:
_public_methods _ = [ 'SqVal' ]
def SqVal(self,*val ):
import sys
sys.path.append ('D:\\soft\pyth on25\\Lib\\site-packages\\')
import scipy
#print sys.path
#mat=numpy.bmat (val)
#linalg.inv(mat )
return sys.path
_reg_verprogid_ = "Python.Fop .3"
_reg_progid_ = "Python.Fop "
_reg_desc_ = "Python Fop"
_reg_clsid_ = "{30BD3490-2632-11cf-AD5B-524153480001}"
def Register():
import win32com.server .register
return win32com.server .register.UseCo mmandLine(Fop)
if __name__=='__ma in__':
print "Registerin g COM server..."
Register()
the vb 6 code is
Private Sub Form_Load()
Set obj = CreateObject("P ython.Fop")
Dim ty(1, 1) As Variant
ty(0, 0) = 1
ty(1, 1) = 2
ty(1, 0) = 3
ty(0, 1) = 4
toto = obj.SqVal(ty)
End Sub
I have a problem when I launch the vb 6 code : no module named
scipy .... it is quite strange and I do not understand that Do you
have any ideas ?
thank you very much !
solved ... problem in the installation
scipy is a 3rd party package which I believe you get from the same place,
more or less, as numpy.
On 3 mai, 03:30, "Terry Reedy" <tjre...@udel.e duwrote:
scipy is a 3rd party package which I believe you get from the same place,
more or less, as numpy.
the bug was between the chair and the keyboard....;) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mikko Ohtamaa |
last post by:
Hi,
I am quite new to Python, PythonCom and COM generally. As a former
Java programmer, I have found Python's flexible ability to access
native Win32, especially COM, very comfortable. However, there is
quite little on-line documentation and examples available about
PythonCOM. The only good sources I have found were the sample chapter
from Mark Hammond's book and some decades old PowerPoint show.
I have a following problem:
|
by: MK |
last post by:
I'm working with IIS on W2K server. I'm trying to
use module "wmi" in a CGI script but with no success.
The following works:
import cgitb; cgitb.enable()
cgi.test()
.... but the following isn't working:
|
by: Dave |
last post by:
I have been trying an example from the Python Programming on Win32 book on the lastest versions of python (2.3.3) and win32all (build 163). I create the COM object and try to call it from VB but i can't seem to create the child.
debugging = 1
if debugging:
from win32com.server.dispatcher import DefaultDebugDispatcher
useDispatcher = DefaultDebugDispatcher
else:
useDispatcher = None
class Parent:
|
by: hawkesed |
last post by:
Hi All,
has anyone out there recently set up scipy on Windows? Cause I am
trying to do so know and I am not having much luck. I have ActiveState
and Plone. When I try to import scipy in ActiveState it says
>>> import scipy
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
ImportError: No module named scipy
>>> from scipy import *
Traceback (most recent call last):
|
by: jantod |
last post by:
I am trying to package my application with py2exe. Unfortunately it
uses both scipy/numpy and numarray so I'm having to jump through a lot
of hoops to get it going. I'm getting problems packaging an app that
uses only scipy. See below.
Thanks!
Janto
===setup.py===
from distutils.core import setup
| |
by: Eric |
last post by:
Hello, after reading some of the book Programming Python it seems that
python is something I would like to delve deeper into. The only thing
is, I have no idea what I should try and write. So I was hoping that
someone here could help point me to a group/project that would be a
good starting place for a person with limited python knowledge, but
that is willing to learn whatever is necessary. I'm hoping that with a
goal I can start to learn...
|
by: vml |
last post by:
I have an application that I want to automatised trough a COM layer or
(DCOM)...
I can access to all the method of the COM objects with python and
win32com when this application is running....
If the application is not running, I can not access to all the method
of the object.
Usually to overcome this problem , One can use an activeX control
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |