예제 #1
0
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

import os

pth = os.path.dirname(__file__)
#print "pth= ", pth
if (not pth):
    pth = "."
fNameIn = pth + "/../aux/pilares.lst"
dbName = "/tmp/pilares.db"
tbName = "esfPilares"
os.system("rm -f " + dbName)
sqlite_macros.SQLTcreaDBase(dbName)
ansysToEsfBarra.ansysToEsfBarra(fNameIn, dbName, tbName)

i = 0
j = 0
e1 = 0

conn = sqlite.connect(dbName)
conn.row_factory = sqlite.Row
otra = conn.cursor()
cur = conn.cursor()
cur.execute("select distinct ACCION from " + tbName)
rows = cur.fetchall()
for r in rows:
    i += 1
    idAccion = r['ACCION']
    sqlStr = "select * from " + tbName + " where ACCION = '" + idAccion + "';"
예제 #2
0
파일: readln_test_01.py 프로젝트: lcpt/xc
__copyright__= "Copyright 2014, LCPT"
__license__= "GPL"
__version__= "3.0"
__email__= "*****@*****.**"

import os
pth= os.path.dirname(__file__)
#print "pth= ", pth
if(not pth):
  pth= "."
fNameIn= pth+"/../aux/pilares.lst"
dbName= "/tmp/pilares.db"
tbName= "esfPilares"
os.system("rm -f " + dbName)
sqlite_macros.SQLTcreaDBase(dbName)
ansysToEsfBarra.ansysToEsfBarra(fNameIn,dbName,tbName)

idElem= 0.0
nmbAccion= ""
sumN= 0.0
n= 0.0
sumM1= 0.0
m1= 0.0
sumM2= 0.0
m2= 0.0
sumT= 0.0
t= 0.0

conn= sqlite.connect(dbName)
conn.row_factory= sqlite.Row
otra= conn.cursor()