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\python25\\Lib\\site-packages\\')
#from scipy import linalg
class Fop:
_public_methods_ = [ 'SqVal' ]
def SqVal(self,*val):
import sys
sys.path.append('D:\\soft\python25\\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.UseCommandLine(Fop)
if __name__=='__main__':
print "Registering COM server..."
Register()
the vb 6 code is
Private Sub Form_Load()
Set obj = CreateObject("Python.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 3117
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\python25\\Lib\\site-packages\\')
#from scipy import linalg
class Fop:
_public_methods_ = [ 'SqVal' ]
def SqVal(self,*val):
import sys
sys.path.append('D:\\soft\python25\\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.UseCommandLine(Fop)
if __name__=='__main__':
print "Registering COM server..."
Register()
the vb 6 code is
Private Sub Form_Load()
Set obj = CreateObject("Python.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.eduwrote:
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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....
...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| | |