pyCloudy  0.9.6
manage Cloudy photoionization code
MdB_subproc Class Reference

Inherits object.

Public Member Functions

def __init__
 
def connect_dB (self)
 
def close_dB (self)
 
def exec_dB
 
def select_dB
 

Public Attributes

 log_
 
 calling
 
 base_name
 
 tmp_base_name
 
 user_name
 
 user_passwd
 
 port
 
 host
 
 unix_socket
 
 table
 
 connected
 

Static Public Attributes

tuple MdBlog_ = my_logging()
 

Detailed Description

Alternative way, when MySQLdb not available. Still in development.

Constructor & Destructor Documentation

def __init__ (   self,
  OVN_dic = None,
  base_name = 'OVN',
  tmp_base_name = 'OVN_tmp',
  user_name = 'OVN_user',
  user_passwd = 'getenv',
  host = 'localhost',
  unix_socket = '/var/mysql/mysql.sock',
  port = 3306,
  connect = True,
  master_table = None 
)

Member Function Documentation

def close_dB (   self)
def connect_dB (   self)
def exec_dB (   self,
  command,
  outfile = None 
)
def select_dB (   self,
  select_ = '*',
  from_ = None,
  where_ = None,
  order_ = None,
  group_ = None,
  limit_ = 1,
  format_ = 'dict2',
  dtype_ = None,
  outfile = None 
)
Usage:
    dd, n = mdb.select_dB(select_ = 'L_1, L_26, L_21', from_='tab,'
        where_ = 'ref like "DIG12HR_"', 
        limit_ = 100000, 
        format_='numpy')
    loglog(dd['L_26']/dd['L_1'], dd['L_21']/dd['L_1'], 'r+')            

Member Data Documentation

base_name
calling
connected
host
log_
tuple MdBlog_ = my_logging()
static
port
table
tmp_base_name
unix_socket
user_name
user_passwd