32nd TwitterIrcGateway

 | 

2009-10-15

Shell Context

15:50

書いてみた。

# shell.py
import sys
sys.path.append('/usr/lib/python2.5')
import clr
import re
import thread
import time
import commands

import Misuzilla.Applications.TwitterIrcGateway
import Misuzilla.Applications.TwitterIrcGateway.AddIns
import Misuzilla.Applications.TwitterIrcGateway.AddIns.Console

from System import *
from System.Threading import Thread, ThreadStart
from System.Diagnostics import Trace
from System.Collections.Generic import *
from Misuzilla.Applications.TwitterIrcGateway import Status, Statuses, User, Users, Utility
from Misuzilla.Applications.TwitterIrcGateway.AddIns import IConfiguration
from Misuzilla.Applications.TwitterIrcGateway.AddIns.Console import ConsoleAddIn, Console, Context
from Misuzilla.Applications.TwitterIrcGateway.AddIns.DLRIntegration import DLRIntegrationAddIn, DLRBasicConfiguration, DLRContextHelper

class ShellContext(Context):
        def Initialize(self):
                self.suffix = Shell.instance()
                self.config = DLRBasicConfiguration(self.CurrentSession, "ShellContext", Dictionary[String,String]({ "Shell": "シェル"}))
                pass

        def GetCommands(self):
                dict = Context.GetCommands(self)
                dict["SH"] = "指定したシェルコマンドを実行します。"
                return dict

        def OnUninitialize(self):
                pass

        def get_Configurations(self):
                return Array[IConfiguration]([ self.config ])

        # Implementation
        def SH(self, args):
                cmd = args or ""
                self.Console.NotifyMessage("入力されたコマンドは '%s' です。" % cmd)
                out = commands.getoutput(cmd)
                self.Console.NotifyMessage(out)

class Shell(Object):
        @classmethod
        def instance(klass):
                if not hasattr(klass, 'instance_'):
                        klass.instance_ = Shell()
                return klass.instance_
        
        def __init__(self):
                # 普通の #Console にコンテキストを追加する
                CurrentSession.AddInManager.GetAddIn[ConsoleAddIn]().RegisterContext(DLRContextHelper.Wrap(CurrentSession, "ShellContext", ShellContext), "Shell", "Shell")
                self.config = DLRBasicConfiguration(CurrentSession, "ShellContext", Dictionary[String,String]({ "Shell": "シェル" }))

shell = Shell.instance()

対話的にやりとりするものや、cursesとか使ってるものは動かしたらどうなるのかわからんね。hehehe

wgetするときは悪いことは言わんから wget -nv にしておけ。

書いてから Shell Context ではなくて、 Command Context だろ、と気づいた。Shell Contextにするパッチ募集中。

LiendaLienda 2012/03/29 10:33 salam rastesh man iran zegnedi nemikonam ama az sait shoma kheyli khosham oomade omidvaram movafagh bashid. []ریحانه کُجوری پاسخ داده در مرداد ۱۶م, ۱۳۸۹ ۱۲:۳۲ ق.ظ:سلامخوب به سلامتی انگار داره این زنگ قلاب بافی ما بین المللی میشه!‌ الحمدلله سلامت باشید. ممنون[]

hlbobbrbwahlbobbrbwa 2012/03/30 15:38 4NySKD , [url=http://otpndhwzopeg.com/]otpndhwzopeg[/url], [link=http://ygbssoobvgia.com/]ygbssoobvgia[/link], http://vszwhjagewgr.com/

aecrrpuocnbaecrrpuocnb 2012/03/31 21:27 KVVkAu , [url=http://qivynbvamocs.com/]qivynbvamocs[/url], [link=http://wekvqupvxjpj.com/]wekvqupvxjpj[/link], http://rgdmqgcrylgc.com/

GerVeskGerVesk 2018/02/22 08:07 Zithromax Capsules Viagra Ventajas E Inconvenientes <a href=http://tadalafbuy.com>cialis price</a> Sale Discount Generic Zentel Real Medicine Fedex No Rx Viagra Frei Verkauflich 2013

ShathaxedShathaxed 2018/04/17 15:35 Tylenol And Amoxicillin <a href=http://buyciali.com>п»їcialis</a> Viagra Schweiz Rezeptfrei Achat Viagra Pfizer Ligne Diflucan Online Order

LasriEviteLasriEvite 2018/11/01 00:38 casino games real money
<a href=http://casinousaonlinelist.com/>casino online for fun</a>
casino games slots
<a href="http://casinousaonlinelist.com/">casinos online</a>
casino online application

JooceLofJooceLof 2018/11/07 02:17 casino games free online
<a href=http://playslotscasino888.com/>casino games list</a>
pogo casino slots
<a href="http://playslotscasino888.com/">casino games free</a>
casino games free online

MonitaFumMonitaFum 2018/11/20 12:11 top rated free online casino games
<a href=http://gamecasinosonline.com/>casino online usa</a>
casino online free
<a href="http://gamecasinosonline.com/">online casinos 2016</a>
best online casino games free

CarilkugreldCarilkugreld 2018/12/22 19:17 online casino games
<a href=http://casinonextyear19.com/>online casino games</a>
online casino no deposit bonus
<a href="http://casinonextyear19.com/">online casino reviews</a>
online casino

MagdierefMagdieref 2019/01/05 11:48 online casino real money no deposit
<a href=http://gamecasinosonline.com/>watch casino online free</a>
watch casino online free
<a href="http://gamecasinosonline.com/">online casino usa</a>
casino movie online

AnthonytefAnthonytef 2019/04/24 04:20 doctor of physical therapy degree <a href=http://tramadol.forumcrea.com/>http://tramadol.forumcrea.com/</a> side effects of illegal drugs

ArthurMogArthurMog 2019/05/31 02:56 proscan android 4.1 7 tablet <a href= http://zolpidem.aforum.fr >zolpidem.aforum.fr</a> cough medicine for 3 yr old

ThomasWexThomasWex 2019/06/10 23:36 doctors care myrtle beach <a href= https://modafinil.portfoliolounge.com >modafinil.portfoliolounge.com</a> buy yasmin online no prescription

v4c2k6x3v4c2k6x3 2019/06/26 22:31 <a href=" https://essaywriterr.us/ ">good essay writers</a> - best custom essay writers
essay writers, <a href=" https://essaywriterr.us/ ">essay writers online</a>
https://essaywriterr.us/

LucasSedLucasSed 2019/07/07 05:08 3 steps to incredible health with joel fuhrman m.d <a href= https://www.cuantodanio.es/viagra-por-internet-pfz.php >https://www.cuantodanio.es/viagra-por-internet-pfz.php</a> non prescription contacts lenses

NormanAppogNormanAppog 2019/09/22 20:58 Professional cleaning today is actually greater than simply cleaning: present day equipment, resources as well as methods of job turn it in to a genuine state-of-the-art method that substantially modifies the standard understanding of what it implies to definitely "tidy".

In property cleaning company - best
<a href=https://maidsmanhattan.club/maids-downtown/>proff maid down town</a>
- it's easy, convenient as well as economical with our provider.
Depend on the sanitation innovators to residence cleansing Brooklyn! Our company use expert detergents as well as specialized equipment of global producers in our work and perform a great work along with cleaning of any sort of complexity.

<a href=https://maidsmanhattan.club/><size>8]House cleaning agencies new-york</size></a>

Teamwork with the firm is actually the guarantor of an impressive, financially rewarding and efficient cleansing of specialist house cleansing and also encompassing places. Presently, home cleaning services from our company are utilized in New Jacket. Appreciate and also you the true benefits and functional advantages of our company plan.

Through signing a long-lasting service deal with us, you are going to have the capacity to abandon the requirement to preserve a big team of technological personnel, which, in turn, will improve costs. The price of the complex, daily, standard house cleaning of Staten Island, performed through our employees, are going to constantly be actually lower than the price of earnings for cleansers, the purchase of cleansing items and also equipment.

<size>6]Looking for house cleaning services new-york</size>

Leave a demand on the internet site, indicate your title or company name, call telephone number and time of desired cleansing, leave your wishes and needs in a notification to the manager if required, then our expert will call you in the fastest opportunity and define the time, opportunity as well as workplace!

bbzovanibbzovani 2019/10/10 20:43 У нас вы найдете Водопровод для ЛОС, а также ббз, мы можем произвести Обустройство скважин под ключ. Бурение артезианских скважин, Геологическое изучение недр, Водоснабжение частного дома.

В Сервисе для вас естьв продажу(услуги) КАНАЛИЗАЦИОННЫЕ ДРОБИЛКИ, Силосы для хранения сыпучих продуктов, Мешалка на заказ, Шнековые обезвоживатели осадка, Распределительные колодцы, Ершовая загрузка, Тонкослойные отстойники, ОДЪЕМНЫЕ УСТРОЙСТВА И МЕТАЛЛОКОНСТРУКЦИИ Ангары, Павильоны, ВОДООЧИСТНОЕ ОБОРУДОВАНИЕ Нефтеотделители (отстойники), ПОДЪЕМНЫЕ УСТРОЙСТВА И МЕТАЛЛОКОНСТРУКЦИИ Шнековые питатели, ОЧИСТКА ЛИВНЕВЫХ СТОЧНЫХ ВОД КПН с сорбционным блоком, НАСОСНОЕ И КОМПРЕССОРНОЕ ОБОРУДОВАНИЕ (Грунфос, КСБ, Вило, КИТ, Взлёт, ТВП) Ротационно-поршневые насосы, ВОДОПОДГОТОВКУ Угольный сорбент, а также все для автомойки Система очистки воды для автомоек.

В Сервисе диагностирует скважины, производит Обслуживание систем отопления.

методы обезвоживания осадков сточных вод и еще блок биологической загрузки ббз 65 <a href=https://bbzspb.ru>блок биологической загрузки ббз 45</a>

KRovaniKRovani 2019/10/12 12:50 Our employees firms make unique design solutions, and of course with we pay close attention to requirements safety and functionality. Cooperate with client on of all stages do comprehensive analysis of features houses , carry preliminary counts . In case the you personally If there are additional questions you can easily ask our experts and get detailed answers with detailed explanations.
Our production company NDYKF Flushing make Knotty pine kitchen renovation in fixed deadlines and cost.
We in the organization Limited liability Partnership SDIEN Annadale involved professionals, who all know about Best flooring for kitchen remodel.
The Holding renders quality 80s kitchen renovation by democratic tariffs . Masters with great experience work can help completely upgrade in a matter of days . The price depends on selected style of kitchen.

Each dwelling apartments, houses, cottages or other housing Belmont unique and contains own multifunction load. And this setting mostly to be relevant to kitchens.

Kitchen remodel spreadsheet West Village - <a href=https://kitchen-renovation.club>kitchen renovation nyc</a>

EllLireEllLire 2019/10/15 06:52 Lasix Uk Online Generic Real Isotretinoin Best Website C.o.d. Cheapeast Shop <a href=http://purchasecial.com>cialis for sale</a> Cialis 10 Efficacite Premarin Amoxicillin Prescribing Info

NormanAppogNormanAppog 2019/10/21 20:26 Qualified cleansing today is more than simply cleansing: modern-day devices, devices as well as methods of work turn it right into a true sophisticated procedure that drastically changes the conventional understanding of what it means to really "well-maintained".

In residence cleaning company - perfect
<a href=https://maidsmanhattan.club/maid-service-brooklyn/>Maid service Brooklyn</a>
- it is actually very easy, handy and cost effective with our provider.
Trust fund the tidiness forerunners to property cleansing Brooklyn! Our company use specialist cleaning agents as well as technological devices of worldwide producers in our job as well as carry out a superb task along with cleaning of any type of intricacy.

<a href=https://maidsmanhattan.club/><size>8]Companies that need cleaning services ny</size></a>

Cooperation with the company is actually the surety of an impeccable, successful and also effective cleaning of expert property cleaning and also bordering locations. Presently, home cleaning services from our firm are actually used in New Jersey. Value and you the real perks and efficient benefits of our service plan.

Through signing a permanent service agreement along with our company, you will certainly have the ability to abandon the necessity to sustain a large workers of technical staff, which, in turn, are going to enhance expenses. The expense of the complicated, daily, standard residence cleansing of Staten Island, done through our workers, will certainly consistently be actually lower than the price of wages for cleaning services, the acquisition of cleaning items and devices.

<size>6]Housekeeping hotel new-york</size>

Leave behind a demand on the website, define your label or even provider label, connect with contact number and also date of desired cleaning, leave your wants and requirements in a notification to the manager if needed, then our expert is going to call you in the quickest opportunity and also point out the time, time as well as workplace!

ScottTibScottTib 2019/11/08 03:42 Может быть, на школьном собрание педагог высказал вам лично, что у ребенка могут быть затруднения с определенными языковыми и речевыми навыками. А возможно лично вы в свое время беседуя с сыном/дочерью обнаружили неожиданное шепелявость? Может ли у вашего ребенка иметься проблема? Если это так, что вам необходимо делать? Все детишки развиваются с разной скоростью, и для кого-то трансформация начиная от легких слов к хорошо сформулированному и грамматически безошибочному предложению может понадобиться пару лет,а иные почти что сразу( к 1 году) начинают без умолка щебетать. Только к 5 годам мальчик/девочка должен(на) уметь не только лишь произносить нетрудные предложения, состоящие из 2-3 слов, но и одновременно связно делать длинные выражения. Осмотр только специалистом логопедом помогает разобраться, существует ли у ребенка затруднения в речи. Kогопедическое занятие - сегодня это терапия для подавляющего большинства деток с нарушениями речи и / или языка,или ЗПР.
Детям возможно потребуется логопедическая терапия по разнообразным факторам, нужно направить малыша к специалисту, когда: " Вам или другим людям нелегко понять ребенка. " Люди начинают думать, что ваш ребёнок младше, чем собеседник, так как он плохо разговаривает. " Ребенка обзывают из-за того факта, как он разговаривает. " Ребёнок заикается.
ЦЕНТР КОРРЕКЦИИ ЗПРР призван(а) помогать вашему ребенку совладать с любой речевой проблемой. Позвоните нам, приходите на первое занятие, и мы поможем малышу.

<a href=https://nadejda-centr.ru/>логопед ли</a>

KennethOdorkKennethOdork 2019/11/24 17:03 Cleaning up cottages or homes is a popular service amongst owners of country houses. Keeping their cleanliness is commonly rather problematic and also challenging, given that it is a huge location of the premises and the bordering location, there are numerous shower rooms and spaces for numerous objectives. Self-care for a country house can be rather tough, given that the procedure requires the availability of extremely different home chemicals, equipment and takes a great deal of time.

PROMPTLY AND ALSO EFFICIENTLY
We aim not to waste time, however at the same time do not hurry to the detriment of the outcome. Our group includes professionals of the highest degree in all locations.

TRUTHFUL RATES WITHOUT CONCEALED SUPPLEMENTS

Our prices are repaired and depend only on the area. We ensure the safety of the rate approximately a cent.

TIME PLAYS ROLE

We appreciate the time as well as understand a whole lot concerning the benefits. We settle on the phone and come right away to tidy.

Business currently have all the necessary cleaning equipment, cleaning products of European high quality and also knowledgeable personnel who can easily manage also the most challenging stains. Before participating in a agreement, the supervisor and also the client identify the entire plan of services, whether it is simply basic or extensive cleaning, whether additional window cleansing or upholstered furnishings is required. Leave a demand, and also our supervisor will address questions, trigger you on a set of services as well as calculate the price of cleaning free of charge. We invite you to coordinate.

In house cleaning company - ideal
<a href=https://maidsmanhattan.club/professional-maid-service/>professional maids nyc</a>
- it is actually easy, handy and budget-friendly along with our provider.
Leave the cleanliness forerunners to residence cleaning Brooklyn! We utilize specialist laundry detergents as well as technological equipment of international makers in our work as well as perform a great job with cleaning of any sort of intricacy.

<a href=https://maidsmanhattan.club/><size>8]House keeping work new-york</size></a>

Collaboration along with the business is actually the sponsor of an exquisite, successful as well as reliable cleaning of professional residence cleansing and bordering places. Currently, home cleaning company coming from our business are actually made use of in New Jacket. Cherish and also you the true benefits as well as functional perks of our organisation plan.

Through signing an irreversible company deal with our company, you will manage to abandon the demand to preserve a large staff of technological personnel, which, subsequently, will optimize prices. The price of the complex, daily, general residence cleaning of Staten Island, performed by our employees, are going to constantly be actually less than the expense of salaries for cleansers, the investment of cleansing products and devices.

<size>6]Need house cleaning services nyc</size>

Leave behind a request on the web site, specify your label or even business title, get in touch with telephone number and day of desired cleaning, leave your dreams and demands in a notification to the manager if essential, then our expert will contact you in the least opportunity and point out the date, time as well as place of work!

MarcusblortMarcusblort 2019/12/26 05:34 Our company assumes all threats and also produces max task for the results and high quality of work to the customer Inner parts renovators NY.

The look of both home and commercial properties is of excellent significance. For the structure to keep its own appealing appeal and functional characteristics, it is actually necessary to consistently perform High-end restoration New York City. The business gives a high professional level useful in rejuvenating the look of buildings. NYC consumers may use our companies if they need to recover:

<u><i>Residential properties of different floors and also year of construction;
Office centers;</i>
Purchasing and also enjoyment complicateds;
Service centers;
Medical amenities and also other social properties. place;
<a href=https://grandeurhillsgroup.com/>General Contractor New York</a>;
Industrial structures.</u>

The complex and also the method for executing job are established simply after the examination of the object. Our specialist leaves behind for the location. It accumulates the maximum relevant information regarding the structure: the attributes of the materials from which the walls, load-bearing properties, the base, the lot of stories of the structure, the circumstances of the exterior rise. Based upon the end results of the information picked up, the optimal innovation is chosen, according to which Premium renovation NY will consequently be actually executed.

<b>We have been actually working in the market of building and construction as well as repair work for over 16 years, therefore we provide specialist solutions for the repair and also repair of the facades of properties for any purpose.</b>
Employees of the company have the proper approvals and also allows to perform remediation operate at any type of elevation. Our experts prepare to carry out fixings of structures and also structures that are in any state at an enough opportunity and cost effective prices.

It assures proficient and qualified satisfaction of its own activity, executes the development of each objective following the desires of the customer, complying with the principle of an individual technique.

ゲスト



トラックバック - http://twitterircgateway.g.hatena.ne.jp/takano32/20091015
 |