Random ...
 
December 2017
S M T W T F S
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Tags ...
Links



Linux++:::: Bits and Pieces: stuff for ref later
Posted at 28.Jan,2010 13:03  Comments 0 / Trackbacks 0 / Like this post!
Technorati tag(s):

Installing new paravirtualize guest on xen host:

  virt-install -p --accelerate --name x --ram 1000 --file /home/x/x.img --file-size 80 --nographics --location http://192.168.1.10/iso

Reading excel files:

  from xlrd import open_workbook
  wb = open_workbook('nyxls.xls')
  sheets = wb.sheets()
  sheet1 = sheets[0]
  sheet1.nrows #number of rows avail
  sheet1.ncols    #number of columns

  #and lots more methods that will help in reading xls
  #for writing xls, get xlwr

Gammu works with Huawei E220.

Here's my .gammurc:

  [gammu]
  port =/dev/ttyUSB0
  connection = at
  #connection = fbus
  #synchronizetime = yes
  logfile = 
  logformat = nothing
  #use_locking = yes
  gammuloc = 

Now we can do stuff with E220; e.g gammu --identify

But more fun to script things in python, so get python-gammu

Here's how to send sms:

  import gammu, time
  sm=gammu.StateMachine ()
  sm.ReadConfig ()
  sm.Init()
  smsc=sm.GetSMSC()
  msg='msg in a bottle'

  d={}
  d['Text'] = msg
  d['SMSC'] = smsc

  f=open('/tmp/numbers').read().split('\n')
  for i in f:
      d['Number']=i
      time.sleep(1)


Bookmark and Share

Is this entry helpful? Comments/Donate/Click some google ads.  
Trackback is http://myzope.kedai.com.my/blogs/kedai/244/tbping 

Comments
Post a comment