f



RE: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)

This is a multipart message in MIME format.

--Boundary_(ID_oK5MBHtGHXoVbM6v7o3uQQ)
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: quoted-printable

Hi Terry,

Thanks for your comment.

=20

>To better help us help you, what exact version of Python?

I use Python 2.7.5

=20

>Please post plain text without html.

Sorry, I will do it.

=20

>Please post programs single spaced with just occasional blank lines.

=20

File my_program.py

=20

import wx.aui

import paramiko

import telnetlib

from LinuxHostPage import *

from WindowsHostPage import *

from AIXHostPage import *

Publisher =3D pub.Publisher()

TIMEOUT =3D 3

=20

class MainWindow(wx.Frame):

    def __init__(self, parent, title):

       =20

        self.os =3D ''

        self.connection =3D []

       =20

        wx.Frame.__init__(self, parent, title=3Dtitle)

        self.SetBackgroundColour('LightGray')

       =20

        # A Statusbar in the bottom of the window

        self.CreateStatusBar()=20

        self.SetStatusText("Please input credentials.")

       =20

        # Publisher

        Publisher().subscribe(self.change_statusbar, 'change_statusbar')

       =20

        # Input box

        self.input_panel =3D wx.Panel(self)

        self.host =3D wx.StaticText(self.input_panel, -1, 'Host')

        self.host_entry =3D wx.TextCtrl(self.input_panel)

        self.username =3D wx.StaticText(self.input_panel, -1, =
'Username')

        self.username_entry =3D wx.TextCtrl(self.input_panel)

        self.password =3D wx.StaticText(self.input_panel, -1, =
'Password')

        self.password_entry =3D wx.TextCtrl(self.input_panel, style =3D =
wx.TE_PASSWORD)

        self.connect_btn =3D wx.Button(self.input_panel, -1, 'Connect')

        ## List box

        self.os_text =3D wx.StaticText(self.input_panel, -1, 'OS')

        self.choice_list =3D wx.Choice(self.input_panel, =
choices=3D['Redhat', 'SuSE', 'Windows', 'Solaris', 'AIX'])

        self.choice_list.SetSelection(2)

       =20

        self.input_sizer =3D wx.BoxSizer(wx.HORIZONTAL)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.os_text, flag =3D wx.ALIGN_CENTER)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.choice_list, flag =3D wx.ALIGN_CENTER)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.host, flag =3D wx.ALIGN_CENTER)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.host_entry, flag =3D wx.ALIGN_CENTER)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.username, flag =3D wx.ALIGN_CENTER)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.username_entry, flag =3D =
wx.ALIGN_CENTER)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.password, flag =3D wx.ALIGN_CENTER)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.password_entry, flag =3D =
wx.ALIGN_CENTER)

        self.input_sizer.Add((7,0))

        self.input_sizer.Add(self.connect_btn, flag =3D wx.ALIGN_CENTER)

       =20

        self.input_panel.SetSizer(self.input_sizer)

                      =20

        # Function panel

        self.notebook =3D wx.aui.AuiNotebook(self)

       =20

        # Top Sizer

        self.sizer =3D wx.BoxSizer(wx.VERTICAL)

        self.sizer.Add((0,7))

        self.sizer.Add(self.input_panel, border =3D 10)

        self.sizer.Add((0,7))

        self.sizer.Add(self.notebook, 1, wx.EXPAND)

        self.sizer.Add((0,7))

       =20

        self.SetSizerAndFit(self.sizer)

       =20

        # Show Frame

        self.Show()

=20

        # Events

        self.connect_btn.Bind(wx.EVT_BUTTON, self.on_connect)

        self.Bind(wx.EVT_CLOSE, self.on_close)

       =20

    def change_statusbar(self, msg):

        self.SetStatusText(msg.data)

       =20

    def ssh(self, host, username, password):

        connection =3D paramiko.SSHClient()

        connection.set_missing_host_key_policy(paramiko.AutoAddPolicy())

        connection.connect(host, 22, username, password)

        stdin, stdout, stderr =3D connection.exec_command('ls')

        stdin.write('expected_input\n')

        stdin.flush()

        return connection

   =20

    def telnet(self, host, os, username, password):

        connection =3D telnetlib.Telnet(host)

        connection.read_until('login: ')

        connection.write(username + '\r')

        connection.read_until('assword: ')

        connection.write(password + '\r')

        if os =3D=3D 'windows':

            connection.read_until('>', timeout =3D TIMEOUT)

        elif os =3D=3D 'aix':

            connection.read_until('#', timeout =3D TIMEOUT)

        return connection

   =20

    def get_os(self):

        os =3D self.choice_list.GetLabel()

        return os.lower()

   =20

    def on_connect(self, event):

        self.os =3D self.get_os()

        self.connect_btn.Disable()

        host =3D self.host_entry.GetValue()

        username =3D self.username_entry.GetValue()

        password =3D self.password_entry.GetValue()

        self.SetStatusText('Connecting... Please wait.')

        self.connect_btn.Disable()

           =20

        if self.os =3D=3D 'redhat' or self.os =3D=3D 'suse':

            self.connection =3D self.ssh(host, username, password)

            page =3D LinuxHostPage(self, self.connection, self.os, =
Publisher)

        elif self.os =3D=3D 'windows':

            self.connection =3D self.telnet(host, self.os, username, =
password)

            page =3D WindowsHostPage(self, self.connection, self.os, =
Publisher)

        elif self.os =3D=3D 'aix':

            self.connection =3D self.telnet(host, self.os, username, =
password)

            page =3D AIXHostPage(self, self.connection, self.os, =
Publisher)

           =20

        self.SetStatusText('Connected')

        self.connect_btn.Enable()

        # Connection tab

        self.notebook.AddPage(page, host, select =3D True)

               =20

    def close_connection(self):

        self.connection.close()=20

       =20

    # Clean up and close

    def on_close(self, event):

        self.close_connection

        self.Destroy()

       =20

    def on_gen(self, event):

        # Validate inputs

        if self.src_input.GetLabel() =3D=3D '' or =
self.protocol_input.GetLabel()=3D=3D'':

            # Set status bar

            wx.MessageBox('Please input all required fields!', 'Info', =
wx.OK | wx.ICON_INFORMATION)

            return

       =20

        # Src IP

        src_ip =3D '-s ' + self.src_input.GetLabel()

=20

        # Protocol

        proto =3D '-p ' + self.protocol_input.GetLabel().lower()

       =20

        # Src port

        src_port =3D self.src_port_input.GetLabel().lower().strip()

        if  src_port =3D=3D '(optional)' or src_port =3D=3D '':

            src_port =3D ''

        else:

            src_port =3D '--sport ' + src_port=20

           =20

        # Dst port

        dst_port =3D self.dst_port_input.GetLabel().lower().strip()

        if  dst_port !=3D '':

            dst_port =3D '--dport ' + dst_port=20

           =20

        # Target

        target =3D self.target_input.GetLabel().strip()

        if target =3D=3D '(optional)' or target =3D=3D '':

            target =3D '-j ACCEPT'

        else:

            target =3D '-j ' + target.upper()

           =20

        # Rule

        if src_port =3D=3D '':

            rule =3D '{:10s}{:30s}{:10s}{:20s}{:22s}{:20s}'.format('-A =
INPUT', src_ip, proto, dst_port, '-m state --state NEW', target)

        else:

            rule =3D =
'{:10s}{:30s}{:10s}{:20s}{:20s}{:22s}{:20s}'.format('-A INPUT', src_ip, =
proto, src_port, dst_port, '-m state --state NEW', target)

       =20

        self.rule.Clear()

        self.rule.WriteText(rule)

        self.rule.Enable()

       =20

        # Set status bar

        self.set_status_bar('Generated rule successfully.')

       =20

    def set_status_bar(self, str):

        Publisher().sendMessage(('change_statusbar'), str)

           =20

app =3D wx.App(False)

frame =3D MainWindow(None, "Firewall Management Tool")

frame.Maximize()

app.MainLoop()

=20

=20

I can run the program in Eclipse and telnet successfully to a Windows =
host.

=20

But when I export to .exe file by py2exe:

=20

python gen_exe.py py2exe

=20

=20

File gen_exe.py:

=20

from distutils.core import setup

import py2exe

=20

setup(

    options =3D {

            "py2exe":{

            "packages": ['wx.lib.pubsub'],

            "dll_excludes": ["MSVCP90.dll", "HID.DLL", "w9xpopen.exe"],

        }

    },

    console =3D [{'script': =E2=80=98my_program.py'}]

)

=20

When I run my_program.exe, this error is displayed:

=20

UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: =
ordinal not in range(128)

=20

at line:

=20

       connection.write(username + '\r')

=20

--

Viet


--Boundary_(ID_oK5MBHtGHXoVbM6v7o3uQQ)
Content-type: text/html; charset=utf-8
Content-transfer-encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 14 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
	{mso-style-priority:99;
	mso-style-link:"Plain Text Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
span.PlainTextChar
	{mso-style-name:"Plain Text Char";
	mso-style-priority:99;
	mso-style-link:"Plain Text";
	font-family:"Calibri","sans-serif";}
span.EmailStyle19
	{mso-style-type:personal-compose;}
..MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoPlainText>Hi =
Terry,<o:p></o:p></p><p class=3DMsoPlainText><span =
style=3D'color:black'>Thanks for your comment.<o:p></o:p></span></p><p =
class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText>&gt;To better help us help you, what exact version =
of Python?<o:p></o:p></p><p class=3DMsoPlainText>I use Python =
2.7.5<o:p></o:p></p><p class=3DMsoPlainText><o:p>&nbsp;</o:p></p><p =
class=3DMsoPlainText>&gt;Please post plain text without =
html.<o:p></o:p></p><p class=3DMsoPlainText><span =
style=3D'color:black'>Sorry, I will do it.<o:p></o:p></span></p><p =
class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText>&gt;Please post programs single spaced with just =
occasional blank lines.<o:p></o:p></p><p =
class=3DMsoPlainText><o:p>&nbsp;</o:p></p><p class=3DMsoPlainText><span =
style=3D'color:black'>File my_program.py<o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'><o:p>&nbsp;</o=
:p></span></p><p class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>import</span><=
span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
wx.aui</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>import</span><=
span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
paramiko</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>import</span><=
span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
telnetlib</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>from</span><sp=
an style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<u>LinuxHostPage </u></span><u><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>import</span><=
/u><u><span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
*</span></u><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>from</span><sp=
an style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<u>WindowsHostPage </u></span><u><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>import</span><=
/u><u><span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
*</span></u><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>from</span><sp=
an style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<u>AIXHostPage </u></span><u><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>import</span><=
/u><u><span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
*</span></u><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>Publisher =
=3D pub.Publisher()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>TIMEOUT =3D =
</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>3</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span><=
/p><p class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>class</span><s=
pan style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>MainWindow</b>(wx.Frame):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>__init__</b>(<i>self</i>, parent, title):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<i>self</i>.os =3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>''</span></=
i><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.connection =3D []</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wx.Frame.__init__(<i>self</i>, parent, =
title=3Dtitle)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.SetBackgroundColour(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'LightGray'=
</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># A =
<u>Statusbar</u> in the bottom of the window</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.CreateStatusBar() </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<i>self</i>.SetStatusText(</span><i><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>&quot;Pleas=
e input credentials.&quot;</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
Publisher</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
Publisher().subscribe(<i>self</i>.change_statusbar, </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'change_sta=
tusbar'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># Input =
box</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_panel =3D =
wx.Panel(<i>self</i>)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.host =3D =
wx.StaticText(<i>self</i>.input_panel, -</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>1</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Host'</spa=
n></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.host_entry =3D =
wx.TextCtrl(<i>self</i>.input_panel)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.username =3D =
wx.StaticText(<i>self</i>.input_panel, -</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>1</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>Usernam=
e</u>'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.username_entry =3D =
wx.TextCtrl(<i>self</i>.input_panel)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.password =3D =
wx.StaticText(<i>self</i>.input_panel, -</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>1</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Password'<=
/span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.password_entry =3D =
wx.TextCtrl(<i>self</i>.input_panel, style =3D =
wx.TE_PASSWORD)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.connect_btn =3D =
wx.Button(<i>self</i>.input_panel, -</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>1</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Connect'</=
span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'>## List =
box</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.os_text =3D =
wx.StaticText(<i>self</i>.input_panel, -</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>1</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'OS'</span>=
</i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.choice_list =3D =
wx.Choice(<i>self</i>.input_panel, choices=3D[</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>Redhat<=
/u>'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'SuSE'</spa=
n></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Windows'</=
span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>Solaris=
</u>'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'AIX'</span=
></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>])</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.choice_list.SetSelection(</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>2</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<i>self</i>.input_sizer =3D =
wx.BoxSizer(wx.HORIZONTAL)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.os_text, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.choice_list, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.host, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.host_entry, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.username, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.username_entry, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.password, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.password_entry, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.input_sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.input_sizer.Add(<i>self</i>.connect_btn, flag =3D =
wx.ALIGN_CENTER)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<i>self</i>.input_panel.SetSizer(<i>self=
</i>.input_sizer)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 =
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># Function =
panel</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.notebook =3D =
wx.aui.AuiNotebook(<i>self</i>)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># Top =
Sizer</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.sizer =3D =
wx.BoxSizer(wx.VERTICAL)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.sizer.Add(<i>self</i>.input_panel, border =3D </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>10</span><sp=
an =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.sizer.Add(<i>self</i>.notebook, =
</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>1</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
wx.EXPAND)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.sizer.Add((</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>0</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>,</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>7</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>))</span><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<i>self</i>.SetSizerAndFit(<i>self</i>.s=
izer)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># Show =
Frame</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.Show()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span><=
/p><p class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
Events</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.connect_btn.Bind(wx.EVT_BUTTON, =
<i>self</i>.on_connect)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.Bind(wx.EVT_CLOSE, =
<i>self</i>.on_close)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>change_statusbar</b>(<i>self</i>, msg):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.SetStatusText(msg.data)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>ssh</b>(<i>self</i>, host, username, password):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 connection =3D =
paramiko.SSHClient()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
connection.set_missing_host_key_policy(paramiko.AutoAddPolicy())</span><s=
pan =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 connection.connect(host, </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:maroon'>22</span><sp=
an style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
username, password)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 stdin, <u>stdout</u>, <u>stderr</u> =3D =
connection.exec_command(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>ls</u>'=
</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 stdin.write(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'expected_i=
nput\n'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 stdin.flush()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0 =
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>return</span><=
span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
connection</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>telnet</b>(<i>self</i>, host, os, username, password):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 connection =3D =
telnetlib.Telnet(host)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 connection.read_until(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'login: =
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <span =
style=3D'background:yellow;mso-highlight:yellow'>connection.write(usernam=
e + </span></span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00;background:y=
ellow;mso-highlight:yellow'>'\r'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black;background:yel=
low;mso-highlight:yellow'>)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 connection.read_until(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>assword=
</u>: '</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 connection.write(password + </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'\r'</span>=
</i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>if</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> os =3D=3D =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'windows'</=
span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
connection.read_until(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'&gt;'</spa=
n></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, timeout =
=3D TIMEOUT)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>elif</span><sp=
an style=3D'font-size:10.0pt;font-family:Consolas;color:black'> os =
=3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>aix</u>=
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
connection.read_until(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'#'</span><=
/i><span style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
timeout =3D TIMEOUT)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>return</span><=
span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
connection</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>get_os</b>(<i>self</i>):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 os =3D =
<i>self</i>.choice_list.GetLabel()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>return</span><=
span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
os.lower()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>on_connect</b>(<i>self</i>, event):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.os =3D =
<i>self</i>.get_os()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.connect_btn.Disable()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 host =3D =
<i>self</i>.host_entry.GetValue()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 username =3D =
<i>self</i>.username_entry.GetValue()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 password =3D =
<i>self</i>.password_entry.GetValue()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.SetStatusText(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Connecting=
.... Please wait.'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.connect_btn.Disable()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>if</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<i>self</i>.os =3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>redhat<=
/u>'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>or</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<i>self</i>.os =3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>suse</u=
>'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.connection =3D <i>self</i>.ssh(host, username, =
password)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 page =3D =
LinuxHostPage(<i>self</i>, <i>self</i>.connection, <i>self</i>.os, =
Publisher)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>elif</span><sp=
an style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<i>self</i>.os =3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'windows'</=
span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.connection =3D <i>self</i>.telnet(host, <i>self</i>.os, =
username, password)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 page =3D =
WindowsHostPage(<i>self</i>, <i>self</i>.connection, <i>self</i>.os, =
Publisher)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>elif</span><sp=
an style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<i>self</i>.os =3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'<u>aix</u>=
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
<i>self</i>.connection =3D <i>self</i>.telnet(host, <i>self</i>.os, =
username, password)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 page =3D =
AIXHostPage(<i>self</i>, <i>self</i>.connection, <i>self</i>.os, =
Publisher)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<i>self</i>.SetStatusText(</span><i><spa=
n =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Connected'=
</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.connect_btn.Enable()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
Connection tab</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.notebook.AddPage(page, host, =
select =3D </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>True</span><sp=
an =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>close_connection</b>(<i>self</i>):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.connection.close() </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># Clean up =
and close</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>on_close</b>(<i>self</i>, event):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.close_connection</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.Destroy()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>on_gen</b>(<i>self</i>, event):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># Validate =
inputs</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>if</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<i>self</i>.src_input.GetLabel() =3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>''</span></=
i><span style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>or</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<i>self</i>.protocol_input.GetLabel()=3D=3D</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>''</span></=
i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># Set =
status bar</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
wx.MessageBox(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Please =
input all required fields!'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Info'</spa=
n></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, wx.OK | =
wx.ICON_INFORMATION)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>return</span><=
span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
<u>Src</u> IP</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 src_ip =3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'-s =
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'> + =
<i>self</i>.src_input.GetLabel()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p>&nbsp;</o:p></span><=
/p><p class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
Protocol</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 proto =3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'-p =
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'> + =
<i>self</i>.protocol_input.GetLabel().lower()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
<u>Src</u> port</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 src_port =3D =
<i>self</i>.src_port_input.GetLabel().lower().strip()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>if</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0 =
src_port =3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'(optional)=
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>or</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> src_port =
=3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>''</span></=
i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 src_port =3D =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>''</span></=
i><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>else</span><sp=
an =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 src_port =3D =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'--sport =
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'> + src_port =
</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
<u>Dst</u> port</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 dst_port =3D =
<i>self</i>.dst_port_input.GetLabel().lower().strip()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>if</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0 =
dst_port !=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>''</span></=
i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dst_port =3D =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'--<u>dport=
</u> '</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'> + dst_port =
</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
Target</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 target =3D =
<i>self</i>.target_input.GetLabel().strip()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>if</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> target =
=3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'(optional)=
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>or</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> target =
=3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>''</span></=
i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 target =3D =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'-j =
ACCEPT'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>else</span><sp=
an =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 target =3D =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'-j =
'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'> + =
target.upper()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># =
Rule</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>if</span><span=
 style=3D'font-size:10.0pt;font-family:Consolas;color:black'> src_port =
=3D=3D </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>''</span></=
i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rule =3D =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'{:10s}{:30=
s}{:10s}{:20s}{:22s}{:20s}'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>.format(</spa=
n><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'-A =
INPUT'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, src_ip, =
proto, dst_port, </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'-m state =
--state NEW'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
target)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>else</span><sp=
an =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>:</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 rule =3D =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'{:10s}{:30=
s}{:10s}{:20s}{:20s}{:22s}{:20s}'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>.format(</spa=
n><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'-A =
INPUT'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, src_ip, =
proto, src_port, dst_port, </span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'-m state =
--state NEW'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
target)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<i>self</i>.rule.Clear()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.rule.WriteText(rule)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.rule.Enable()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:silver'># Set =
status bar</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 <i>self</i>.set_status_bar(</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'Generated =
rule successfully.'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>def</span><spa=
n style=3D'font-size:10.0pt;font-family:Consolas;color:black'> =
<b>set_status_bar</b>(<i>self</i>, <u>str</u>):</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 Publisher().sendMessage((</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>'change_sta=
tusbar'</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>), =
str)</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 </span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>app =3D =
wx.App(</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>False</span><s=
pan =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>frame =3D =
MainWindow(</span><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:blue'>None</span><sp=
an style=3D'font-size:10.0pt;font-family:Consolas;color:black'>, =
</span><i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:#00AA00'>&quot;<u>Fi=
rewall</u> Management Tool&quot;</span></i><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>)</span><span=
 =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal style=3D'text-autospace:none'><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>frame.Maximiz=
e()</span><span =
style=3D'font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:Consolas;color:black'>app.MainLoop(=
)</span><o:p></o:p></p><p class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText><span style=3D'color:black'>I can run the program =
in Eclipse and telnet successfully to a Windows =
host.<o:p></o:p></span></p><p class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText><span style=3D'color:black'>But when I export to =
..exe file by py2exe:<o:p></o:p></span></p><p class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText style=3D'text-indent:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>python =
gen_exe.py py2exe<o:p></o:p></span></p><p class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText><span style=3D'color:black'>File =
gen_exe.py:<o:p></o:p></span></p><p class=3DMsoPlainText><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o=
:p></span></p><p class=3DMsoPlainText style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>from =
distutils.core import setup<o:p></o:p></span></p><p class=3DMsoPlainText =
style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>import =
py2exe<o:p></o:p></span></p><p class=3DMsoPlainText =
style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o=
:p></span></p><p class=3DMsoPlainText style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>setup(<o:p></o=
:p></span></p><p class=3DMsoPlainText style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0 options =3D {<o:p></o:p></span></p><p class=3DMsoPlainText =
style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
&quot;py2exe&quot;:{<o:p></o:p></span></p><p class=3DMsoPlainText =
style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
&quot;packages&quot;: ['wx.lib.pubsub'],<o:p></o:p></span></p><p =
class=3DMsoPlainText style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
&quot;dll_excludes&quot;: [&quot;MSVCP90.dll&quot;, &quot;HID.DLL&quot;, =
&quot;w9xpopen.exe&quot;],<o:p></o:p></span></p><p class=3DMsoPlainText =
style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 }<o:p></o:p></span></p><p =
class=3DMsoPlainText style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0 },<o:p></o:p></span></p><p class=3DMsoPlainText =
style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0 console =3D [{'script': =
=E2=80=98my_program.py'}]<o:p></o:p></span></p><p class=3DMsoPlainText =
style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>)<o:p></o:p></=
span></p><p class=3DMsoPlainText style=3D'margin-left:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o=
:p></span></p><p class=3DMsoPlainText><span style=3D'color:black'>When I =
run my_program.exe, this error is displayed:<o:p></o:p></span></p><p =
class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText style=3D'text-indent:.5in'><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>UnicodeDecodeE=
rror: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in =
range(128)<o:p></o:p></span></p><p class=3DMsoPlainText><span =
style=3D'color:black'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoPlainText><span style=3D'color:black'>at =
line:<o:p></o:p></span></p><p class=3DMsoPlainText><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o=
:p></span></p><p class=3DMsoPlainText><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 connection.write(username + =
'\r')<o:p></o:p></span></p><p class=3DMsoPlainText><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o=
:p></span></p><p class=3DMsoPlainText><span =
style=3D'font-size:9.0pt;font-family:Consolas;color:black'>--<o:p></o:p><=
/span></p><p class=3DMsoPlainText><span =
style=3D'color:black'>Viet<o:p></o:p></span></p></div></body></html>=

--Boundary_(ID_oK5MBHtGHXoVbM6v7o3uQQ)--
0
vietht2 (2)
11/19/2013 8:39:56 AM
comp.lang.python 77058 articles. 3 followers. Post Follow

0 Replies
591 Views

Similar Articles

[PageSpeed] 11

Reply:

Similar Artilces:

UnicodeDecodeError: 'ascii' codec can't decodee byte 0xff in position 0: ordinal not in range(128)
This is a multipart message in MIME format. --Boundary_(ID_E/4IbDwDEnubOe6Ijgqz/A) Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable Hi all, =20 I use Python telnetlib on Windows 7 32 bit. Here is my code: =20 def telnet(self, host, os, username, password): connection =3D telnetlib.Telnet(host) connection.read_until('login: ') connection.write(username + '\r') connection.read_until('assword: ') connection.write(password + '\r') connection...

UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 10: ordinal not in range(128)
I have no idea what is causing this error, or how to fix it. The full error is: Traceback (most recent call last): File "D:\ScriptRuntime\PS\Automation\Handlers\SCMTestToolResourceToolsBAT.py", line 60, in Run PS.Automation.Utility.System.AppendSystemPath(args["PATH"], context) File "D:\ScriptRuntime\PS\Automation\Utility\System.py", line 55, in AppendSys temPath AppendPathVariable("PATH", appendtext, context) File "D:\ScriptRuntime\PS\Automation\Utility\System.py", line 37, in AppendPat hVariable if(ap == pp): UnicodeDecod...

UnicodeEncodeError: 'ascii' codec can't encode character u'\ua000' in position 0: ordinal not in range(128)
Hi, I am trying to understand what does encode() do. What are the hex representations of "u" in main.py? Why there is UnicodeEncodeError when main.py is piped to xxd? Why there is no such error when it is not piped? Thanks. ~$ cat main.py #!/usr/bin/env python u =3D unichr(40960) + u'abcd' + unichr(1972) print u ~$ cat main_encode.py #!/usr/bin/env python u =3D unichr(40960) + u'abcd' + unichr(1972) print u.encode('utf-8') $ ./main.py =EA=80=80abcd=DE=B4 ~$ cat main.sh #!/usr/bin/env bash set -v ../main.py | xxd ../main_encode.py |...

'ascii' codec can't encode character u'\xe4' in position 4: ordinal not in range(128)
Hello friends, I am using pyWPS + GRASS to generate the maps for the given request XML. As my requestxml contains scandinavian letters , i got the following error, " 'ascii' codec can't encode character u'\xe4' in position 4: ordinal not in range(128) " The Request xml also contains encoding specification like <?xml version="1.0" encoding="UTF-8" standalone="yes"?> Then i traced the pywps code and added the following line, inputXml = inputXml.encode("utf-8") But it gives ...

UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 13: ordinal not in range(128)
Hi! Can anyone please help me getting rid of this error: UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 13: ordinal not in range(128) I am not a python programmer (though intend to start learning this wonderful language), I am just using a python script. After doing some search, I found that 0xb7 is a 'middle dot character' that is not interpreted by the python. Even after inserting text = text.replace('\u00b7', '') in the script, the problem still persists. Can anyone please tell me the easiest way to get rid of th...

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 99: ordinal not in range(128)
Hi, I don't know what I'm doing wrong here. I''m using Python 2.4 and py2exe. I get he following error: Traceback (most recent call last): File "notegui.pyc", line 34, in OnClose File "brain.pyc", line 61, in setNote File "points.pyc", line 151, in setNote File "point.pyc", line 100, in writeNote UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 99: ordinal not in range(128) The piece of code involved is: noteFileObj = open(noteFile, "wb") noteFileObj.write(...

UnicodeDecodeError: 'ascii' codec can't decode byte
Hello It seems like I have Unicode data in a CSV file but Python is using a different code page, so isn't happy when I'm trying to read and put this data into an SQLite database with APSW: ======== sql = "INSERT INTO mytable (col1,col2) VALUES (?,?)" cursor.executemany(sql, records("test.tsv")) """ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc9 in position 18: ordinal not in range(128) """ ======== What should I do so Python doesn't raise this error? Should I convert data in the CVS file, or is there some f...

[pysqlite 2.0.2] UnicodeDecodeError: 'utf8' codec can't decode bytes in position 44-45: invalid data
A fetchall() call causes the above error. There must be some non-utf8 chars in the table in question and - indeed - there very likely are: The table contains pathnames of files on the harddisk of a German "speaking" PC. What I have already done to try to overcome this is: - Inserted "# coding: iso-8859-1" (w/o the quotes) in (hopefully) every file of my project - All strings I could find prefixed with "u" (w/o the quotes) - Changed plain calls to execute(q) into execute(unicode(q)) Alas, I am not sure if this all makes really sense, and, obviously it doesn't...

Long way around UnicodeDecodeError, or 'ascii' codec can't decode byte
Hello, I'm working on an unicode-aware application. I like to use "print" to debug programs, but in this case it was nightmare. The most popular result of "print" was: UnicodeDecodeError: 'ascii' codec can't decode byte 0xXX in position 0: ordinal not in range(128) I spent two hours fixing it, and I hope it's done. The solution is one of the ugliest hack I ever written, but it solves the pain. The full story and the code is in my blog: http://uucode.com/blog/2007/03/23/shut-up-you-dummy-7-bit-python/ -- Oleg Parashchenko olpa@ http://uucode.com/ ht...

[2.5.1] "UnicodeDecodeError: 'ascii' codec can't decode byte"?
Hello I'm getting this error while downloading and parsing web pages: ===== title = m.group(1) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 48: ordinal not in range(128) ===== From what I understand, it's because some strings are Unicode, and hence contain characters that are illegal in ASCII. Does someone know how to solve this error? Thank you. Gilles Ganault wrote: > I'm getting this error while downloading and parsing web pages: > > ===== > title = m.group(1) > UnicodeDecodeError: 'ascii' codec can't...

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 308: character maps to <undefined>
For 'mimetypes' in the code given below, python is giving the following error. Kindly help. >>> import os >>> matches = [] >>> for (dirname, dirshere, fileshere) in os.walk(r'C:\Python34'): for filename in fileshere: if filename.endswith('.py'): pathname = os.path.join(dirname, filename) if 'mimetypes' in open(pathname).read(): matches.append(pathname) Traceback (most recent call last): File "<pyshell#165>", line 5, in <module> if 'mimetypes' in open(pathname).read()...

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 10442: character maps to <undefined>
Im reading a file. But there seems to be some encoding error. >>> f =3D open(filename) >>> data =3D f.read() Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> data =3D f.read() File "C:\Python30\lib\io.py", line 1724, in read decoder.decode(self.buffer.read(), final=3DTrue)) File "C:\Python30\lib\io.py", line 1295, in decode output =3D self.decoder.decode(input, final=3Dfinal) File "C:\Python30\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,se...

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
The script is very simple (abc.txt exists in ROOTDIR directory): import os import shutil ROOTDIR = 'C:\Users\zoran' file1 = os.path.join(ROOTDIR, 'abc.txt') file2 = os.path.join(ROOTDIR, 'def.txt') shutil.move(file1, file2) But it returns the following error: C:\Python34\python.exe C:/Users/bckslash_test.py File "C:/Users/bckslash_test.py", line 4 ROOTDIR = 'C:\Users' ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape Process ...

'ascii' codec can't encode character u'\xf3'
Hi, I get a piece of code of ogg123.py from the pyogg site, this is the code: ******************************* ogg_file = sys.argv[1] vorbis_file=ogg.vorbis.VorbisFile(ogg_file) comentarios = vorbis_file.comment() recognized_comments = ('Artist', 'Album', 'Title', 'Version', 'Organization', 'Genre', 'Description', 'Date', 'Location', 'Copyright', 'Vendor') comment_dict = {} for com in recognized_comments: comment_dict[string.upper(com)] = '%s: %%s' % com known_keys = comment_dict.keys(...

'ascii' codec can't encode character u'\u2013'
Hi Using Python 2.3.4 + Feedparser 3.3 (a library to parse XML documents) I'm trying to parse a UTF-8 document with special characters like acute-accent vowels: -------- <?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?> .... ------- But I get this error message: ------- UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 122: ordinal not in range(128) ------- when trying to execute a MySQL query: ---- query =3D "UPDATE blogs_news SET text =3D '" + text_extrated + "'WHER...

Re: '^=' and '~='?
Duckhye, According to the doc ( http://xrl.us/befwjx ) they, and one other set of characters, and the mnemonic 'NE' all represent 'NOT EQUAL'. Art ------- On Wed, 11 Feb 2009 16:52:40 -0600, Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote: >Hello, >What is the difference between '^=' and '~='? > >Thanks, >Duckhye ...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
OR you could use ARRAY data new; set old; array igor $ (*) str_mo str_da str_yr; do over igor; if igor ~in (' ','.') then do; end; run; Prasad Ravi Igor Kurbeko <ikurbeko@ATHEROGENIC To: SAS-L@LISTSERV.UGA.EDU S.COM> cc: Sent by: "SAS(r) Subject: if str_mo not in ('','.') and str_da not in ('','.') and str_yy ...

'is not' or '!='
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y" tells you whether x and y actually refer to the same object. In the case of singletons like None (there's only one None object), it's better to use "is". "ElChino" <elchino@cnn.cn>: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two $10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in the right hand. However, the bill in the left hand "==" the bill in the right hand. > Without any context, which one should be preferred? > IMHO, the latter is more readable. In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want...

'^=' and '~='?
Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_ yy not in ('','.') Any shorter ?
Igor: Are you really looking for missing values? If so, use the "nmiss" function. It returns the number of missing values in the supplied variables. e.g. if nmiss(str_mo,str_da,str_yy) then put 'Have missing values'; -----Original Message----- From: Igor Kurbeko [mailto:ikurbeko@ATHEROGENICS.COM] Sent: Wednesday, October 22, 2003 5:14 PM To: SAS-L@LISTSERV.UGA.EDU Subject: if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in (&#...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ? #2
Igor, There are many ways to make it more concise, however the parsimony is likely to be achieved at the expense of clarity. For instance, the expressions length ( input (mm||dd||yy, $10.) ) > 2 length ( compress(mm||dd||yy, ' .') ) > 2 and like might be somewhat shorter than the original, but they will execute slower, and their intent is far less eminent. Since it appears that you are trying to validate the components of a date, maybe it is not a worthless idea to try the date informat conforming to the mask you are testing. Say if all the pieces are 2-digit, the expres...

Why can't we 'tformfwd' a cp2tform(..., 'polynomial')
Hi, Just as an example: This is allowed xybase = reshape(randn(12,1),6,2); t_affine = cp2tform(xybase,xybase,'affine'); [x,y] = tformfwd(t_affine,xybase,xybase); but this t_poly = cp2tform(xybase,xybase,'polynomial',2); [x,y] = tformfwd(t_poly,xybase,xybase); gives an error "Function TFORMFWD expected T's forward_fcn field to be non- empty." I checked the code a bit and indeed, with the 'polynomial' case, the findPolynomialTransform() function has at its end trans = maketform('custom',2,2,[],@inv_polynomial,[A B]); wher...

Re: OT: Ah Lawyers. Can't live with 'em, can't shoot them...
Mark writes: > Is Google's cache cutting a cash flow? But on the positive side, last week the federal 9th circuit court affirmed that offering "thumbnails" of graphic images is "fair use"... http://yro.slashdot.org/article.pl?sid=03/07/07/2141216 G. * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html * ...

Re: OT: Ah Lawyers. Can't live with 'em, can't shoot them...
Does that mean that every PC that maintains a cache of web content is violating copyright ? -----Original Message----- From: Mark Wonsil [mailto:wonsil@4m-ent.com] Sent: Friday, July 11, 2003 10:40 AM To: HP3000-L@RAVEN.UTC.EDU Subject: [HP3000-L] OT: Ah Lawyers. Can't live with 'em, can't shoot them... http://zdnet.com.com/2100-1104_2-1024234.html Is Google's cache cutting a cash flow? By Stefanie Olsen CNET News.com July 10, 2003, 7:03 AM PT Quote: "Many of us copyright lawyers have been waiting for this issue to come up: Google is making cop...

Web resources about - RE: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128) - comp.lang.python

Resources last updated: 2/28/2016 5:48:21 AM