472,328 Members | 1,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

python,win32com,scipy and vb 6 : no module named scipy

vml
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 !

May 2 '07 #1
3 3059
vml
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

May 3 '07 #2
scipy is a 3rd party package which I believe you get from the same place,
more or less, as numpy.

May 3 '07 #3
vml
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....;)
May 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
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...
4
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;...
0
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...
3
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...
0
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...
25
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...
2
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...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.