[Gelistirici] servislerdeki comar config.get() ve notify fonksiyonlari

Emre Erenoglu erenoglu at gmail.com
18 Şub 2009 Çar 23:23:58 EET


Oncelikle yanit icin tesekkurler.

2009/2/18 Bahadır Kandemir <bahadir at pardus.org.tr>

>
> /etc/conf.d/<servis_adı> dosyası okunduktan sonra config adlı bir dict
> nesnesine aktarılıyor.
>
> dict.get() metodu şu işi yapıyor:
>
>  d = {"a": 1, "c": 3}
>  print d.get("b", "x") => "x"
>  print d.get("b", "") => ""
>

Peki bu durumda tirnak icinde verilen deger, config icindeki degeri override
ediyor mu diyoruz, bir nevi "default" deger mi bu? Ayni yerde
   print d.get("a", "") => 1 sonucu mu uretecekti?

> notify fonksiyonunda ise iki cesit kullanim var, birinde 2 parametre
> > varken, digerinde 3 parametre isteniyor gibi.
>
> notify() metodu sinyal göndermek için kullanılıyor:
>
>  notify("Model", "Sinyal", (arg1, arg2, arg3))
>
> Şu kullanım yanlış:
>
>  notify("System.Service.changed", "started")
>

Anladim. Sanirim google'daki eski sayfalari buldum ben.

System.Service modeli ile ilgili dökümantasyon uludag/branches/comar-3.0
> altında.


Tesekkurler,

Emre
-------------- sonraki bölüm --------------
Bir HTML eklentisi temizlendi...
URL: <http://liste.pardus.org.tr/gelistirici/attachments/20090218/3018f0d3/attachment-0002.htm>


Gelistirici mesaj listesiyle ilgili daha fazla bilgi