MiniM. Saving time.


| About | Download | Tools | Knowledge Base | How to Buy |

MiniM Overview

Getting Started

Download

Documentation

Tools

Cache Tools

GT.M Tools

Knowledge Base

FAQ

Contacts

Copyrights

MiniM Additional Tools | Jan 6, 2012

Python to MiniM Connection Example

I would Like to know if it is possible to do a connection to the database of the mini-m with Language Python and made connection Example in Python with Minim.

#========================================================================
#--- Teste Conectando o MiniM com Python usando Api do MiniM
#     Voce deve ter o Python e o MiniM Instalado
#     Carlos Abreu - 05/01/2012
#========================================================================
import win32com.client
M=win32com.client.Dispatch('MiniM.ServerConnect')
M.CreateConnect("localhost",5000,"user")
M.Open()
VER=M.ReadStr("$ZV")
ZNSPACE=M.ReadStr("$ZNSPACE")
print "A versao do sistema eh: " + VER
print "Voce esta no Namespace: " + ZNSPACE
print "Rodando no Terminal: " + M.ReadStr("$IO")
M.ExecuteStr("k ^a,^b")
M.ExecuteStr("s ^a(1)=123")
M.ExecuteStr("s ^a(2)=345")
M.ExecuteStr("s ^a(2,1)=115999")
M.ExecuteStr("s ^a(2,2)=225999")
M.ExecuteStr("s ^a(2,4)=445999")
M.ExecuteStr("s ^a(2,5)=555999")
#VAR=M.ExecuteStr("w ^a(2,5)")
#print VAR
M.Close()
M.DestroyConnect
raw_input("\n\nFim do Programa!   Pressione uma Tecla para Sair >> ")

Carlos Abreu
carlosrabreu@hotmail.com
Brasil


Copyright (C) Eugene Karataev
Info Support