NewHeadline
rb_site_editor.py
<< rb_site_editor declarations >>
Make_pages
MsgBox
is_ord
class MyHtmlWindow
__init__
OnScroll
OnLinkClicked
OnSetTitle
class Links_Info
__init__
Evt_Text
OnPageChanged
Prep_HTML
put_ftp
class main_window
__init__
OnRefreshClick
OnToolCut
OnToolCopy
OnToolPaste
OnToolMHTML
OnToolUpload
OnToolRClick
OnClick_del_button
OnClick_save_button
OnExit
OnPageChanged
class App
OnInit
@path c:\RBRanch\out
@root RB__editor.py
<< rb_site_editor declarations >>
<< rb_site_editor methods >>
app = App(0)
app.MainLoop()
@code
from wxPython.wx import *
from wxPython.html import *
import wxPython.lib.wxpTag
import time
from string import *
import metakit
from ftplib import FTP
import sys
import urllib2
import os
RB_database = metakit.storage("rbranch.mk",1)
RB_view_news = RB_database.getas("news[story:S]")
RB_view_news_links = RB_database.getas("news_links[links:S]")
RB_view_events = RB_database.getas("events[story:S")
RB_view_events_links = RB_database.getas("events_links[links:S]")
RB_view_nature = RB_database.getas("nature[story:S")
RB_view_nature_links = RB_database.getas("nature_links[links:S]")
RB_view_business = RB_database.getas("business[story:S")
RB_view_business_links = RB_database.getas("business_links[links:S]")
RB_view_gov = RB_database.getas("gov[story:S")
RB_view_gov_links = RB_database.getas("gov_links[links:S]")
RB_view_strange = RB_database.getas("strange[story:S")
RB_view_strange_links = RB_database.getas("strange_links[links:S]")
RB_view_main = RB_database.getas("main[story:S")
RB_view_main_links = RB_database.getas("main_links[links:S]")
RB_view_news_top = RB_database.getas("news_top[text:S]")
RB_view_events_top = RB_database.getas("events_top[text:S]")
RB_view_nature_top = RB_database.getas("nature_top[text:S]")
RB_view_business_top = RB_database.getas("business_top[text:S]")
RB_view_gov_top = RB_database.getas("gov_top[text:S]")
RB_view_strange_top = RB_database.getas("strange_top[text:S]")
RB_view_main_top = RB_database.getas("main_top[text:S]")
RB_view_mid = RB_database.getas("page_mid[text:S]")
RB_view_bot = RB_database.getas("page_bot[text:S]")
Clip_board_data = wxClipboard()
wxInitAllImageHandlers()
save_flag = 0
end_Template = """<TABLE cellSpacing=0 cellPadding=5 width=600 align=center border=0><TBODY><TR><TD align=middle><FONT face="Book Antiqua" size=1>| <A href="index.htm"> Home</A> | <A href="rbranch_news.htm">The News</A> | <A href="rbranch_events.htm">Events</A> | <A href="rbranch_nature.htm">Nature</A> | <A href="rbranch_business.htm">Business</A> | <A href="rbranch_gov.htm">Government</A> | <A href="rbranch_strangness.htm">Strangness</A> | <a href="mailto:sbabbitt@commspeed.net">Contact Us</a> | </FONT></TD></TR></TBODY></TABLE> </P></TD></TR><TR><TD colSpan=2><BR></TD></TR>
</TBODY></TABLE></BODY></HTML>"""
RenderTemplate = """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<TITLE>Cottonwood Arizona's Rockin' B Ranch</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK REV="made" href="mailto:sbabbitt@commspeed.net">
<META NAME="keywords" CONTENT="Cottonwood, Sedona, Camp Verdy, Cornville, Geology, aliens, Nature, ufos, kids, Oak Creak, Red Rock Country, hyperdimensional">
<META NAME="description" CONTENT="Cottonwood's Rockin'B Ranch provides current happenings and news from all over the Vedy Vally.">
<META NAME="author" CONTENT="Tom Babbitt">
<META NAME="ROBOTS" CONTENT="ALL">
</HEAD>
<BODY vLink=#0033cc aLink=#0033cc link=#0033cc bgColor=#ffffff BACKGROUND="rb_image/back.jpg">
<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<TD width=780 rowSpan=2><IMG height=86 src="rb_image/rbranch.gif" width=780 align=center border=0><BR></TD></TR>
</TBODY></TABLE>"""
Button_Template = {'/index.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<TD width=130 bgColor=#fffffff><A href="rbranch_news.htm"><IMG height=30 src="rb_image/news_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_events.htm"><IMG height=30 src="rb_image/events_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_nature.htm"><IMG height=30 src="rb_image/nature_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_business.htm"><IMG height=30 src="rb_image/bussiness_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_gov.htm"><IMG height=30 src="rb_image/gov_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_strangness.htm"><IMG height=30 src="rb_image/strange_button.JPG" width=130 border=0></A><BR></TD>
<BR></TD>
</TR></TBODY></TABLE>""",'/rbranch_news.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<TD width=130 bgColor=#fffffff><A href="rbranch_news.htm"><IMG height=30 src="rb_image/news_button_down.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_events.htm"><IMG height=30 src="rb_image/events_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_nature.htm"><IMG height=30 src="rb_image/nature_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_business.htm"><IMG height=30 src="rb_image/bussiness_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_gov.htm"><IMG height=30 src="rb_image/gov_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_strangness.htm"><IMG height=30 src="rb_image/strange_button.JPG" width=130 border=0></A><BR></TD>
<BR></TD>
</TR></TBODY></TABLE>""",'/rbranch_events.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<TD width=130 bgColor=#fffffff><A href="rbranch_news.htm"><IMG height=30 src="rb_image/news_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_events.htm"><IMG height=30 src="rb_image/events_button_down.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_nature.htm"><IMG height=30 src="rb_image/nature_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_business.htm"><IMG height=30 src="rb_image/bussiness_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_gov.htm"><IMG height=30 src="rb_image/gov_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_strangness.htm"><IMG height=30 src="rb_image/strange_button.JPG" width=130 border=0></A><BR></TD>
<BR></TD>
</TR></TBODY></TABLE>""",'/rbranch_nature.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<TD width=130 bgColor=#fffffff><A href="rbranch_news.htm"><IMG height=30 src="rb_image/news_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_events.htm"><IMG height=30 src="rb_image/events_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_nature.htm"><IMG height=30 src="rb_image/nature_button_down.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_business.htm"><IMG height=30 src="rb_image/bussiness_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_gov.htm"><IMG height=30 src="rb_image/gov_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_strangness.htm"><IMG height=30 src="rb_image/strange_button.JPG" width=130 border=0></A><BR></TD>
<BR></TD>
</TR></TBODY></TABLE>""",'/rbranch_business.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<TD width=130 bgColor=#fffffff><A href="rbranch_news.htm"><IMG height=30 src="rb_image/news_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_events.htm"><IMG height=30 src="rb_image/events_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_nature.htm"><IMG height=30 src="rb_image/nature_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_business.htm"><IMG height=30 src="rb_image/bussiness_button_down.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_gov.htm"><IMG height=30 src="rb_image/gov_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_strangness.htm"><IMG height=30 src="rb_image/strange_button.JPG" width=130 border=0></A><BR></TD>
<BR></TD>
</TR></TBODY></TABLE>""",'/rbranch_gov.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<TD width=130 bgColor=#fffffff><A href="rbranch_news.htm"><IMG height=30 src="rb_image/news_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_events.htm"><IMG height=30 src="rb_image/events_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_nature.htm"><IMG height=30 src="rb_image/nature_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_business.htm"><IMG height=30 src="rb_image/bussiness_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_gov.htm"><IMG height=30 src="rb_image/gov_button_down.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_strangness.htm"><IMG height=30 src="rb_image/strange_button.JPG" width=130 border=0></A><BR></TD>
<BR></TD>
</TR></TBODY></TABLE>""",'/rbranch_strangness.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<TD width=130 bgColor=#fffffff><A href="rbranch_news.htm"><IMG height=30 src="rb_image/news_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_events.htm"><IMG height=30 src="rb_image/events_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_nature.htm"><IMG height=30 src="rb_image/nature_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_business.htm"><IMG height=30 src="rb_image/bussiness_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_gov.htm"><IMG height=30 src="rb_image/gov_button.JPG" width=130 border=0></A><BR></TD>
<TD width=130 bgColor=#fffffff><A href="rbranch_strangness.htm"><IMG height=30 src="rb_image/strange_button_down.JPG" width=130 border=0></A><BR></TD>
<BR></TD>
</TR></TBODY></TABLE>"""}
TopLinks_Template = {'/index.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0><TBODY><TR>
<td width=150><img src="rb_image/topleft2.gif" width=150 height=26><br></td>
<TD width=630><IMG height=26 src="rb_image/topright.gif" width=630><BR></TD></TR><TR>
<TD vAlign=top align=middle width=150 bgColor=#fffcc5><IMG height=27 src="rb_image/tab-morenews.gif" width=150><BR>
<IMG height=10 src="rb_image/trans.gif" width=1><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR>
<TABLE cellSpacing=0 cellPadding=5 width=140 align=center border=0><TBODY><TR><TD>
<A href="rbranch_news.htm">The News</A><BR><A href="rbranch_events.htm">Events</A><BR><A href="rbranch_nature.htm">
Nature</A><BR><A href="rbranch_business.htm">Business</A><BR><A href="rbranch_gov.htm">Government</A>
<BR><A href="rbranch_strangness.htm">Strangeness</A><BR><a href="mailto:sbabbitt@commspeed.net">Contact Us
</A><HR width="95%" color=#ffcc33 SIZE=1>""",'/rbranch_news.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
<TBODY><TR><td width=150><img src="rb_image/topleft2.gif" width=150 height=26><br>
</td><TD width=630><IMG height=26 src="rb_image/topright.gif" width=630><BR></TD></TR>
<TR><TD vAlign=top align=middle width=150 bgColor=#fffcc5><IMG height=27 src="rb_image/tab-morenews.gif" width=150><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR><TABLE cellSpacing=0 cellPadding=5 width=140 align=center border=0><TBODY><TR><TD>
<A href="index.htm">Home</A><BR><A href="rbranch_events.htm">
Events</A><BR><A href="rbranch_nature.htm">Nature</A><BR><A href="rbranch_business.htm">Business</A><BR><A href="rbranch_gov.htm">Government</A><BR>
<A href="rbranch_strangness.htm">Strangeness</A><BR><a href="mailto:sbabbitt@commspeed.net">Contact Us</a>
<HR width="95%" color=#ffcc33 SIZE=1>""",'/rbranch_events.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
<TBODY><TR><td width=150><img src="rb_image/topleft2.gif" width=150 height=26><br>
</td><TD width=630><IMG height=26 src="rb_image/topright.gif" width=630><BR></TD></TR>
<TR><TD vAlign=top align=middle width=150 bgColor=#fffcc5><IMG height=27 src="rb_image/tab-morenews.gif" width=150><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR>
<TABLE cellSpacing=0 cellPadding=5 width=140 align=center border=0><TBODY><TR><TD>
<A href="index.htm"> Home</A><BR><A href="rbranch_news.htm">The News</A><BR><A href="rbranch_nature.htm">Nature</A><BR><A href="rbranch_business.htm">Business</A><BR><A href="rbranch_gov.htm">Government</A><BR>
<A href="rbranch_strangness.htm">Strangeness</A><BR><a href="mailto:sbabbitt@commspeed.net">Contact Us</a>
<HR width="95%" color=#ffcc33 SIZE=1>""",'/rbranch_nature.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
<TBODY><TR><td width=150><img src="rb_image/topleft2.gif" width=150 height=26><br>
</td><TD width=630><IMG height=26 src="rb_image/topright.gif" width=630><BR></TD></TR>
<TR><TD vAlign=top align=middle width=150 bgColor=#fffcc5><IMG height=27 src="rb_image/tab-morenews.gif" width=150><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR>
<TABLE cellSpacing=0 cellPadding=5 width=140 align=center border=0><TBODY><TR><TD>
<A href="index.htm">Home</A><BR><A href="rbranch_news.htm">The News</A><BR><A href="rbranch_events.htm">
Events</A><BR><A href="rbranch_business.htm">Business</A><BR><A href="rbranch_gov.htm">Government</A><BR>
<A href="rbranch_strangness.htm">Strangeness</A><BR><a href="mailto:sbabbitt@commspeed.net">Contact Us</a>
<HR width="95%" color=#ffcc33 SIZE=1>""",'/rbranch_business.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
<TBODY><TR><td width=150><img src="rb_image/topleft2.gif" width=150 height=26><br>
</td><TD width=630><IMG height=26 src="rb_image/topright.gif" width=630><BR></TD></TR>
<TR><TD vAlign=top align=middle width=150 bgColor=#fffcc5><IMG height=27 src="rb_image/tab-morenews.gif" width=150><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR>
<TABLE cellSpacing=0 cellPadding=5 width=140 align=center border=0><TBODY><TR><TD>
<A href="index.htm"> Home</A><BR><A href="rbranch_news.htm">The News</A><BR><A href="rbranch_events.htm">
Events</A><BR><A href="rbranch_nature.htm">Nature</A><BR><A href="rbranch_gov.htm">Government</A><BR>
<A href="rbranch_strangness.htm">Strangeness</A><BR><a href="mailto:sbabbitt@commspeed.net">Contact Us</a>
<HR width="95%" color=#ffcc33 SIZE=1>""",'/rbranch_gov.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
<TBODY><TR><td width=150><img src="rb_image/topleft2.gif" width=150 height=26><br>
</td><TD width=630><IMG height=26 src="rb_image/topright.gif" width=630><BR></TD></TR>
<TR><TD vAlign=top align=middle width=150 bgColor=#fffcc5><IMG height=27 src="rb_image/tab-morenews.gif" width=150><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR>
<TABLE cellSpacing=0 cellPadding=5 width=140 align=center border=0><TBODY><TR><TD>
<A href="index.htm"> Home</A><BR><A href="rbranch_news.htm">The News</A><BR><A href="rbranch_events.htm">
Events</A><BR><A href="rbranch_nature.htm">Nature</A><BR><A href="rbranch_business.htm">Business</A><BR>
<A href="rbranch_strangness.htm">Strangeness</A><BR><a href="mailto:sbabbitt@commspeed.net">Contact Us</a>
<HR width="95%" color=#ffcc33 SIZE=1>
""",'/rbranch_strangness.htm':"""<TABLE cellSpacing=0 cellPadding=0 width=780 align=center border=0>
<TBODY><TR><td width=150><img src="rb_image/topleft2.gif" width=150 height=26><br>
</td><TD width=630><IMG height=26 src="rb_image/topright.gif" width=630><BR></TD></TR>
<TR><TD vAlign=top align=middle width=150 bgColor=#fffcc5><IMG height=27 src="rb_image/tab-morenews.gif" width=150><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR><IMG height=10 src="rb_image/trans.gif" width=1><BR>
<TABLE cellSpacing=0 cellPadding=5 width=140 align=center border=0><TBODY><TR><TD>
<A href="index.htm"> Home</A><BR><A href="rbranch_news.htm">The News</A><BR><A href="rbranch_events.htm">
Events</A><BR><A href="rbranch_nature.htm">Nature</A><BR><A href="rbranch_business.htm">Business</A><BR><A href="rbranch_gov.htm">Government</A><BR>
<a href="mailto:sbabbitt@commspeed.net">Contact Us</a>
<HR width="95%" color=#ffcc33 SIZE=1>"""}
Bottomlinks_Template = {'/index.htm':"""</TD></TR></TBODY></TABLE>
<TD vAlign=top width=630 bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
<TBODY><TR><TD width=443><BR></TD><TD width=187> </TD></TR></TBODY>
</TABLE>""",'/rbranch_news.htm':"""<FONT face="Book Antiqua" size=1><center><B>
<A HREF="http://www.sedonaverdevalley.com/verdevalleynews/myheadline.asp?S=385&P=433788&PubID=7000">Verde Independint</A>
<BR><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.verdevalleynews.com/verdevalleynews/myarticles.asp?S=385&P=433831&PubID=7000&EC=0">
Camp Verde Bugle</A><BR><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.verdevalleynews.com/verdevalleynews/myarticles.asp?S=385&P=433789&PubID=7000&EC=0">The Villager</A>
<BR><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://maps.yahoo.com/cgi-bin/webmap?Template=yahoo&Icon=Smallcross%2C%2C0%2C0&Address2=&Address3=Cottonwood%2CAZ&Style=Plain&Zoom=2">City Map</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.ci.cottonwood.az.us/" >City of Cottonwood</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.oldtown.org/" >Old Town Association</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://chamber.verdevalley.com/" >Cottonwood Chamber of Commerce</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.verde.org/" >Verde River Watershed</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.verdevalley.com/" >verdevalley.com's On-Line Community</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.vvredc.org/cottonwood/index.htm" >Regional Economic Development Council</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.azplansite.com/city/index.htm?cottonwo" >Arizona Cities & Towns</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://prescottinfo.com/org/ybbbs/index.htm" >Yavapai Big Brothers Big Sisters</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.mywebpal.com/mywebpal_cfmfiles/npv2/news_tool_v2.cfm?pnpid=791&show=5day" >Arizona Range News</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.arizonan.com/Cottonwood/index.html" >Arizonan, Guide to Cottonwood Arizona</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.cityvalue.org/news_cottonwood.htm" >CityValue.org News from the City of Cottonwood, Arizona</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.sedonaverdevalley.com/comguide/comguide.htm" >Community Guide</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.azconstructiontech.com/newsources.htm" >Arizona Construction Tech Links to Local Northern Arizona News & Events</A><BR></FONT></center></B></TD></TR></TBODY></TABLE>
<TD vAlign=top width=630 bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
<TBODY><TR><TD width=443><BR></TD><TD width=187> </TD></TR></TBODY>
</TABLE>""",'/rbranch_events.htm':"""<FONT face="Book Antiqua" size=1><center><B>
<A HREF="http://www.sedonaverdevalley.com/comguide/comguide.htm" >Community Guide</A><BR>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://maps.yahoo.com/cgi-bin/webmap?Template=yahoo&Icon=Smallcross%2C%2C0%2C0&Address2=&Address3=Cottonwood%2CAZ&Style=Plain&Zoom=2" >Interactive City Map</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.mywebpal.com/mywebpal_cfmfiles/npv2/news_tool_v2.cfm?pnpid=791&show=5day" >Arizona Range News</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.arizonan.com/Cottonwood/index.html" >Arizonan.com's Guide to Cottonwood Arizona</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.verdevalley.com/" >verdevalley.com's On-Line Community</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://chamber.verdevalley.com/" >Cottonwood Chamber of Commerce</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.ci.cottonwood.az.us/" >City of Cottonwood</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.oldtown.org/" >Cottonwood Old Town Association</A><BR></FONT></center></B></TD></TR></TBODY></TABLE>
<TD vAlign=top width=630 bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
<TBODY><TR><TD width=443><BR></TD><TD width=187> </TD></TR></TBODY>
</TABLE>""",'/rbranch_nature.htm':"""<FONT face="Book Antiqua" size=1><center><B><A HREF="http://www.pr.state.az.us/parkhtml/deadhorse.html" >Dead Horse Ranch State Park</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.pr.state.az.us/" >Arizona State Parks</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.sedonainfo.com/sedona/geology.html" >Sedona Geology.</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://maps.yahoo.com/cgi-bin/webmap?Template=yahoo&Icon=Smallcross%2C%2C0%2C0&Address2=&Address3=Cottonwood%2CAZ&Style=Plain&Zoom=2" >Interactive City Map</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.mywebpal.com/mywebpal_cfmfiles/npv2/news_tool_v2.cfm?pnpid=791&show=5day" >Arizona Range News</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.verde.org/" >Verde River Watershed</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://ag.arizona.edu/gardening/news/azdailystar/landscape_plants_selection.html" >Deciding on Landscape Plants</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www2.scotweb.co.uk/kitchen/wild/plants.html" >Wild Plants</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.central.edu/biology/botany/wild/plantsS.html" >Wild Edible Plants S</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://rain.org/~sals/our.html" >Our Garden</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.foodsubs.com/Flowers.html" >Cook's Thesaurus Edible Flowers</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.seedman.com/" >The Seed Man</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.ag.uiuc.edu/~robsond/solutions/horticulture/flowers.html" >Horticulture Solutions</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.pastrywiz.com/wedding/eatflower.htm" >Edible flowers</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.cuc.com/ctg/cgi-bin/Gardening/home/AAAAQdACwAAABSuAAL?type=&category_id=&keyword_c=&keyword_b=&keyword_a=" >National Home Gardening Club</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.nal.usda.gov/afsic/csa/csaorgs.htm" >Community Supported Agriculture</A><BR></FONT></center></B></TD></TR></TBODY></TABLE>
<TD vAlign=top width=630 bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
<TBODY><TR><TD width=443><BR></TD><TD width=187> </TD></TR></TBODY></TABLE>
""",'/rbranch_business.htm':"""<FONT face="Book Antiqua" size=1><center><H3>Web Design</H3><p><A HREF="http://www.ilov2dezyn.com/">Mary C. Beckman</A><BR><HR width="40%" color=#ffcc33 SIZE=1><H3>Real Estate</H3><p><A HREF="http://www.verdevalleynews.com/vvreg/vvreg.htm">Verde Valley & Sedona Real Estate Guide</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.newquestcity.com/templates/dirresults.cfm?pass=AZ0135&code=32163" >Harry A. Feltman - Real Estate Appraiser </A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.cwbanker.com/">Coldwell Banker Mabery</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.verdevalleyproperties.com/">Verde Valley Real Estate</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.c21sexton.com/">CENTURY 21 Sexton Realty</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.carizona.com/centaz/realestate/cottonwood.html" >Realtors In Verde Valley</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.internest.com/dwcoventryflagstaff/dwcoventryflagstaff280.asp" >Cottonwood Ranch by Del Webb</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.az-verdehomes.com/">RE-MAX Sunworld Realty</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.azsalebyowner.com/cotton1.htm">Private Home in Cottonwood</A><BR><p><H3>Hotels</H3><p><A HREF="http://www.cottonwoodinn-az.com/">Cottonwood Inn</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.qualityinn-az.com/">Quality Inn Las Campanas</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://chamber.verdevalley.com/hotel.html">Verde Valley Hotel Directory</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.hotelsupermarket.com/cottonw.htm">Discount Hotels, Motels, Inns</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://bestlodgings.com/sites/QualityCD/">Quality Inn Cottonwood</A><BR><p><H3>Other Business</H3><p><A HREF="http://www.verdesantafe.com/">Verde Santa Fe Golf Course</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.blazinm.com/">Blazin' M Ranch</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://asaaz.org/abcbody/abcbody-p4.htm">ABC Auto Body Shop</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.newquestcity.com/templates/dirresults.cfm?pass=AZ0135&code=26833" >Murphys Grill</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.artwerxgraphics.com/">Artwerx Graphic Design Co.</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.sedona.net/fdetat2/index.html" >Freedom Design Emporium</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.stephaniesunshineart.com/">Stephanie Sunshine Art Studio</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.angelfire.com/az/jcc/" >Jewel Computer Consulting</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.oilcanhenry.com/Cottonwood.htm" >Oil Can Henry's</A><BR><p><H3>Medical</H3><p><A HREF="http://www.nahealth.com/mjlmc.html" >Marcus J. Lawrence Medical Center</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.nahealth.com/nah.html" >Northern Arizona Homecare</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://azsmiledesigners.dentistryonline.com/" >Steve Vergra, DDS</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.sed-biz.com/verdevalleyphysicaltherapy/" >Verde Valley Physical Therapy Center</A><BR><p></center></FONT></TD></TR></TBODY></TABLE>
<TD vAlign=top width=630 bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
<TBODY><TR><TD width=443><BR></TD><TD width=187> </TD></TR></TBODY></TABLE>""",'/rbranch_gov.htm':"""<FONT face="Book Antiqua" size=1><center><B><H3>Gov</H3><p><A HREF="http://www.pr.state.az.us/parkhtml/deadhorse.html" >Dead Horse Ranch State Park</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://users.sedona.net/~cpd/nfindex.htm" >Cottonwood Police Department</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.co.yavapai.az.us/" >Yavapai County Government</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.ci.cottonwood.az.us/" >City of Cottonwood</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.pr.state.az.us/pressrelease/99archive/fee99_prls.html" >Arizona State Parks News Release</A><BR><p><H3>Medical</H3><p><A HREF="http://www.nahealth.com/mjlmc.html" >Marcus J. Lawrence Medical Center</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.nahealth.com/nah.html" >Northern Arizona Homecare</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://azsmiledesigners.dentistryonline.com/" >Steve Vergra, DDS</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.sed-biz.com/verdevalleyphysicaltherapy/" >Verde Valley Physical Therapy Center</A><BR><p><H3>Schools</H3><p><A HREF="http://www.tagnet.org/verdevalleyschool/" >Verde Valley Adventist School</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.cocsd.k12.az.us/" >Cottonwood Oak Creek School District</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.muhs.com/" >Mingus Union High School</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://proxy.ade.state.az.us/cgi-bin/rc1p.pl?CTD=130406001" >Cottonwood Elementary</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://proxy.ade.state.az.us/cgi-bin/rc1p.pl?CTD=130406002" >Cottonwood Middle School</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://proxy.ade.state.az.us/cgi-bin/rc1p.pl?CTD=130406004" >Dr. Daniel Bright Elementary</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://proxy.ade.state.az.us/directory/MingusUnionHighSchoolDistrict.html" >Mingus Union High School District</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.yavapai.cc.az.us/" >Yavapai College</A><BR><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://mingusfbla.com/" >Mingus Future Business Leaders of America</A><BR></FONT></center></B></TD></TR></TBODY></TABLE>
<TD vAlign=top width=630 bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
<TBODY><TR><TD width=443><BR></TD><TD width=187> </TD></TR></TBODY></TABLE>
""",'/rbranch_strangness.htm':"""<FONT face="Book Antiqua" size=1><center><H3>Energy</H3><p>
<A HREF="http://www.magneticenergy.com/">Magnetic Energy</A><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.keelynet.com/bedmot/bedbear.htm">Bearden on Bedini</A><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.zpower.net/zpe.htm">Zero Point</A><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.geocities.com/CapeCanaveral/Lab/1287/">Free Energy</A>
<p><H3>Mars</H3><p><A HREF="http://www.marssociety.org/" >The Mars Society</A><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.kksamurai.com/" >kksamurai.com</A><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.cybooks.com/">The Cydonia Files </A><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.mt.net/~watcher/mars.html">Sphinx Mars Cherubim</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.well.com/user/etorun/pyramid.html">The D&M Pyramid of Mars</A><HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.geocities.com/Area51/Station/5160/">Eredita Cydonia</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.geocities.com/Area51/Corridor/3452/index.html" >The Face of Mars</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www2.eridu.co.uk/eridu/Author/Mysteries_of_the_World/Mars/Mars.html">Mars</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.netstat.com/~downingm/">indexx</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://barsoom.msss.com/education/facepage/face.html">The Face on Mars</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://pub14.ezboard.com/bmarsanomalies">Mars Anomalies</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.catsarefrommars.com/index.htm">Cats Are From Mars</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://disc.server.com/Indices/127259.html" >Ruins of Mars message board</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://mars.jpl.nasa.gov/mgs/">Mars Global Surveyor - Welcome to Mars!</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.psrw.com/~markc/marshome.html" >The Martian Enigmas Home Page</A>
<p><H3>Egypt</H3><p>
<A HREF="http://www-oi.uchicago.edu/OI/DEPT/COMP/GIZ/MODEL/Giza_Model2.html">GIZA PLATEAU COMPUTER MODEL</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.gizapower.com/">Gizapower</A>
<p><H3>Gravity</H3><p>
<A HREF="http://home.att.net/~kfbrown/me.html">The Morgan Experiment</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://home.att.net/~kfbrown/index.html" >Gravitational Engineering Page</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://inetarena.com/~noetic/pls/woodward.html" >Woodward - Mach Principle</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.eskimo.com/~billb/freenrg/antigrav.html" >THE ANTIGRAVITY "UNDERGROUND"</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.allanstime.com/UnifiedFieldTheory/gravity.htm" >Gravity Theoryt</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<p><H3>More</H3><p><A HREF="http://www.crank.net/">Crank Dot Net</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.npl.washington.edu/AV/altvw83.html">Alternate View Column AV-83</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.npl.washington.edu/AV/altvw81.html">Alternate View Column AV-81</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.orbsite.com/home.html">All Are Welcome to Orbsite!!</A>
<HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.enterprisemission.com/">The Enterprise Mission</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.artbell.com/">Coast to Coast AM - Dreamland</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://members.xoom.com/ciler/MainPage.htm">MainPage.htm</A>
<HR width="40%" color=#ffcc33 SIZE=1>
<A HREF="http://www.are-cayce.com../ancient.htm">A.R.E. Ancient Civilizations</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.blackvault.com/">BlackVault.com</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.desertsecrets.com/">Welcome to desertsecrets.com</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.keelynet.com/index00.htm">Index00</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.planetarymysteries.com/">Planetary Mysteries</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.metaresearch.org/" >Meta Research (Washington, D.C.)</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://earthfiles.com/">EARTHFILES</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.strieber.com/" >Whitley's World</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.millenngroup.com/repository/repository.html" >THE REPOSITORY OF THE MILLENNIUM GROUP</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.mcremo.com/"> Forbidden Archeology</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://members.tripod.com/~RhapsodyM/ponder.html" >Prophecy</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://nav.webring.org/cgi-bin/navcgi?ring=anom;id=15;next5" >anomoly WebRing</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.kings.k12.ca.us/huhsd/huhse/projects/mytholog.htm" >Mythology</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.lauralee.com/">Llaura Lee</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.suberic.net/~dmm/mfb.html">Max Flax Beeblewax</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.unsolvedmysteries.com/" >Unsolved Mysteries</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.worldofthestrange.com/index.htm">World of the strange</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.stardrive.org/title.shtml">Stardrive</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.time%2Dtravel.com/cenozoic.htm">Time Travel Cenozoic</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.isleofavalon.co.uk/edu/g-bank/a1-index.html">Isle of Avalon</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.zyx.org/indexgen.html">ZYX</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.whitleysworld.com/">Whitley's World</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://home.online.no/~noetic/nagham/nhl.html" >Nag Hammadi Library</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.fractalwisdom.com/FractalWisdom/#paradigm">FRACTAL CHAOS</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.fractalwisdom.com/FractalWisdom/visual.html">Visualizing Dimensions</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.buddhanet.net/albers.htm">Buddhist Computer Art</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.koshertorah.com/physics.html">Physics & Kabbalah</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.elo.com.br/~deaquino/">Fran de Aquino</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://www.williamhenry.net/" >William Henry</A><HR width="40%" color=#ffcc33 SIZE=1><A HREF="http://p3n.org/">P3N - Home</A></FONT></center></TD></TR></TBODY></TABLE>
<TD vAlign=top width=630 bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
<TBODY><TR><TD width=443><BR></TD><TD width=187> </TD></TR></TBODY></TABLE>"""}
Stoies_TemplateA = """<TABLE cellSpacing=0 cellPadding=0 width=630 border=0>
<TBODY><TR><TD width=443><BR></TD>
<TD width=187> </TD></TR></TBODY></TABLE><TABLE cellSpacing=0 cellPadding=0 width="95%" align=center border=0>
<TBODY><TR><TD><IMG height=17 src="rb_image/latest.gif" width=235><BR></TD>
<TD align=right><FONT face="Book Antiqua" color=#666666 size=1>"""
Date = time.asctime(time.localtime())
Stoies_TemplateB = """</FONT></TD></TR><TR><TD colSpan=2><HR width="90%" color=#ffcc33 SIZE=1></TD></TR></TBODY></TABLE>"""
Message_TemplateA = """<TABLE cellSpacing=0 cellPadding=5 width=590 align=center border=0><TBODY>"""
Message_Title = """<TR><TD><FONT face="Book Antiqua" size=4>Welcome to the Rockin' B Ranch<BR></FONT>"""
Message_Picture = """<FONT face="Book Antiqua" size=1><B></B><BR></FONT><IMG SRC="rb_image/rbsmall.JPG"><BR>"""
Message = """<FONT face="Book Antiqua" size=2>The Rockin B Ranch is located in the heart of Old Town Cottonwood nestled between the free flowing Verde River and the majestic Mingus Mountain. On this website you will find event information and news about Cottonwood and the surrounding areas. You will also find links to government, medical and business sites. The Strangeness section will contain links to all my personal interests. These include paranormal phenomena gardening, dowsing, computer programming and many others.
<BR> Thank you and enjoy!<BR> Tom B.</FONT><BR>"""
Message_TemplateB = """<HR width="90%" color=#ffcc33 SIZE=1></TD></TR></TBODY></TABLE>"""
CounterTemplate = """ <H1>Server Statistics</H1>
This <A HREF=/index.html>server</A> has been accessed<b>%d</b> times."""
Images_Template = """<TABLE cellSpacing=0 cellPadding=5 width=590 align=center border=0><TBODY><TR><TD>
<IMG src="/images/W140N40az.GIF"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=5 width=590 align=center border=0><TBODY><TR><TD>
<IMG src="/images/glob.jpg"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=5 width=590 align=center border=0><TBODY><TR><TD>
<IMG src="/images/glob2.jpg"></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=5 width=590 align=center border=0><TBODY><TR><TD>
<IMG src="/images/glob3.jpg"></TD></TR></TBODY></TABLE>"""
form_template = """<form method="get" action="http://216.19.27.24:8000/DEMV">
<p>Latitude<input TYPE="text" NAME="Latitude" SIZE="4" MAXLENGTH="10">
Longitude<input TYPE="text" NAME="Longitude" SIZE="4" MAXLENGTH="10">
Width<input TYPE="text" NAME="Width" SIZE="4" MAXLENGTH="4" VALUE="1">
Height<input TYPE="text" NAME="Height" SIZE="4" MAXLENGTH="4" VALUE="1">
<p>Rotation Angle<input TYPE="text" NAME="RAngle" SIZE="3" MAXLENGTH="3" VALUE="10">
Up Angle<input TYPE="text" NAME="UAngle" SIZE="3" MAXLENGTH="3" VALUE="25">
Distance<input TYPE="text" NAME="DAngle" SIZE="5" MAXLENGTH="5" VALUE="400">
Contour Lines<input TYPE="text" NAME="Contlines" SIZE="2" MAXLENGTH="2" VALUE="10">
3D Depth<input TYPE="text" NAME="Z_depth" SIZE="3" MAXLENGTH="3" VALUE="10">
<input TYPE="submit" NAME="view" VALUE="View Area">
<input TYPE="reset" NAME="clear" VALUE="Clear Settings"></form>"""
wxInitAllImageHandlers()
<< rb_site_editor methods >>=
def Make_pages():
strang = ''
news = ''
event = ''
substories = ''
page = ''
print 'Makeing pages'
pre_page_text = ''
try:
stories = urllib2.urlopen('http://www.unknowncountry.com/')
page = stories.read()
substories = page[page.find('<table border=0 cellpadding=5 cellspacing=0 width=430 align=center>'):page.rfind('<table border=0 cellpadding=5 cellspacing=0 width=430 align=center>')]
stories.close()
substories = substories.replace('src=' , 'src=http://www.unknowncountry.com')
substories = substories.replace('href=' , 'href=http://www.unknowncountry.com')
print 'strang1 ok'
except:
print 'rbranch_strangness error1'
try:
stories = urllib2.urlopen('http://www.ananova.com/news/index.html?keywords=Quirkies&menu=news.quirkies')
page = stories.read()
newsubstories = page[page.find('<a href="./story/'):page.rfind('<a href="./story/')]
stories.close()
newsubstories = newsubstories.replace('<a href="./story/' , '<a href="http://www.ananova.com/news/story/')
substories = substories + newsubstories
page_text = pre_page_text + substories
#page_text = page_text + Message_TemplateB + end_Template
strang = str(is_ord(page_text))
print 'strang2 ok'
except:
print 'rbranch_strangness error2'
page_text = pre_page_text + substories + Message_Title + Message_Picture + Message+ end_Template
pre_page_text = ''
try:
stories = urllib2.urlopen('http://www.verdevalleynews.com/verdevalleynews/')
page = stories.read()
substories = page[page.find('<table width="90%">'):page.rfind('<table width="90%">')]
stories.close()
page_text = pre_page_text + substories
#page_text = page_text + Message_TemplateB + end_Template
news = str(is_ord(page_text))
print 'news1 ok'
except:
print 'uh oh'
page_text = pre_page_text + Message_Title + Message_Picture + Message+ end_Template
pre_page_text = ''
try:
stories = urllib2.urlopen('http://www.oldtown.org/oldtownpages/events.html')
page = stories.read()
substories = page[page.find('<table border="4" cellpadding="0" cellspacing="2" width="500" bgcolor="#ffe4e1">'):page.rfind('<p><font size="5"><b>')]
stories.close()
substories = '<CENTER>' + substories + '</CENTER>'
print 'event1 ok'
except:
print 'rbranch error'
try:
stories = urllib2.urlopen('http://www.musnaz.org/')
page = stories.read()
newsubstories = page[page.find('<p><font size="6" color="#D95936" face="MS Sans Serif">'):page.rfind('<p><font size="5" color="#D95936"><b> ')]
substories = substories + '<table border=0 cellpadding=0 cellspacing=0 width=630><FONT face="Book Antiqua" size=4><BR>Musieum of Northern Arizona<BR></FONT>' + newsubstories + '</table>'
stories.close()
stories = urllib2.urlopen('http://www.sedona.net/index.cfm?Render=Listing_Details_6&thisCategoryName=What%20To%20Do')
page = stories.read()
newsubstories = page[page.find('<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">'):page.rfind('<td width="150" bgcolor="#D9501A" valign="top">')]
substories = substories + '<table border=0 cellpadding=0 cellspacing=0 width=630><FONT face="Book Antiqua" size=4><BR>Sedona Area<BR></FONT>' + newsubstories + '</table>'+ '</table>'+ '</table>'
stories.close()
print 'event2 ok'
except:
print 'rbranch error1'
try:
stories = urllib2.urlopen('http://www.flagguide.com/index.cfm?Render=Listing_Details_6&thisCategoryName=What%20To%20Do')
page = stories.read()
newsubstories = page[page.find('<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">'):page.rfind('<td width="150" bgcolor="#43681C" valign="top">')]
substories = substories + '<table border=0 cellpadding=0 cellspacing=0 width=630><FONT face="Book Antiqua" size=4><BR>Flagstaff Area<BR><BR></FONT>' + newsubstories + '</table>'
stories.close()
print 'event3 ok'
except:
print 'rbranch error2'
try:
stories = urllib2.urlopen('http://www.prescott.com/index.cfm?go=Listings&CatID=1&SubCatID=5')
page = stories.read()
newsubstories = page[page.find('<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">'):page.rfind('<td width="150" bgcolor="#D9501A" valign="top">')]
substories = substories + '<table border=0 cellpadding=0 cellspacing=0 width=630><FONT face="Book Antiqua" size=4><BR>Prescott Area<BR></FONT>' + newsubstories + '</table>'
stories.close()
print 'event4 ok'
except:
print 'rbranch error3'
try:
stories = urllib2.urlopen('http://www.whitemountainsguide.com/index.cfm?go=Listings&CatID=1&SubCatID=7')
page = stories.read()
newsubstories = page[page.find('<table width="98%" border="0" cellspacing="0" cellpadding="3" align="center">'):page.rfind('<td width="150" bgcolor="#D9501A" valign="top">')]
substories = substories + '<table border=0 cellpadding=0 cellspacing=0 width=630><FONT face="Book Antiqua" size=4><BR>White Mountains Area<BR></FONT>' + newsubstories + '</table>'
stories.close()
page_text = pre_page_text + substories
#page_text = page_text + Message_TemplateB + end_Template
event = str(is_ord(page_text))
print 'event5 ok'
except:
print 'rbranch error4'
page_text = page_text + pre_page_text + Message_Title + Message_Picture + Message+ end_Template
return strang , news , event
<< rb_site_editor methods >>=
def MsgBox (window, string):
dlg=wxMessageDialog(window, string, 'Data Miner', wxOK)
dlg.ShowModal()
dlg.Destroy()
<< rb_site_editor methods >>=
def is_ord (string):
new_text = ''
for i in string:
if ord(i) > 127:
new_text = new_text + ''
else:
new_text = new_text + i
return new_text
<< rb_site_editor methods >>=
class MyHtmlWindow(wxHtmlWindow):
<< class MyHtmlWindow methods >>
<< class MyHtmlWindow methods >>=
def __init__(self, parent, id, Position, Size):
wxHtmlWindow.__init__(self, parent, id, Position, Size, wxHW_SCROLLBAR_AUTO, "Viewer")
EVT_SCROLLWIN( self, self.OnScroll )
<< class MyHtmlWindow methods >>=
def OnScroll( self, event ):
event.Skip()
<< class MyHtmlWindow methods >>=
def OnLinkClicked(self, linkinfo):
# Virtuals in the base class have been renamed with base_ on the front.
self.base_OnLinkClicked(linkinfo)
<< class MyHtmlWindow methods >>=
def OnSetTitle(self, title):
self.base_OnSetTitle(title)
<< rb_site_editor methods >>=
class Links_Info(wxNotebook):
<< class Links_Info methods >>
<< class Links_Info methods >>=
def __init__(self , window):
wxNotebook.__init__(self,window, -1, wxDefaultPosition, wxDefaultSize, 1 | wxEXPAND | wxNB_BOTTOM)
self.Winscrolled = wxSplitterWindow(self,-1)
self.Winscrolled2 = wxSplitterWindow(self,-1)
self.TabOpen = "links"
self.View_window_id = wxNewId()
self.View_info_window_id = wxNewId()
Info_id = wxNewId()
self.tinf = wxTextCtrl(self.Winscrolled, Info_id, "",wxPoint(80, 15), wxSize(300, 300), wxTE_MULTILINE)
self.tinf.SetInsertionPoint(0)
EVT_TEXT(self, Info_id, self.Evt_Text)
self.View_info_window = MyHtmlWindow(self.Winscrolled, self.View_info_window_id, wxPoint(390, 15), wxSize(300, 300))
self.Winscrolled.SplitVertically(self.tinf, self.View_info_window , 0)
Links_id = wxNewId()
self.tl = wxTextCtrl(self.Winscrolled2, Links_id, "",wxPoint(80, 15), wxSize(300, 300), wxTE_MULTILINE)
self.tl.SetInsertionPoint(0)
EVT_TEXT(self, Links_id, self.Evt_Text)
self.View_window = MyHtmlWindow(self.Winscrolled2, self.View_window_id, wxPoint(390, 15), wxSize(300, 300))
self.Winscrolled2.SplitVertically(self.tl, self.View_window , 0)
self.AddPage(self.Winscrolled2, "Links")
self.AddPage(self.Winscrolled, "Info.")
EVT_NOTEBOOK_PAGE_CHANGING(self, self.GetId(), self.OnPageChanged)
<< class Links_Info methods >>=
def Evt_Text(self, event):
save_flag = 1
<< class Links_Info methods >>=
def OnPageChanged(self, event):
if self.GetPageText(self.GetSelection()) == "Links":
self.TabOpen = "info"
else:
self.TabOpen = "links"
<< rb_site_editor methods >>=
def Prep_HTML(HTML_Txt):
tag_flag = 0
page_txt = ''
tag_text = ''
pre_page = ''
recur_flag = 0
for i in HTML_Txt:
if i == '<':
tag_flag = 1
elif i == '>':
tag_flag = 0
if tag_flag == 1:
tag_text = tag_text + i
elif i == '>' and tag_flag == 0:
tag_text = tag_text + i
if count(tag_text, '<') > 1 and recur_flag == 0:
recur_flag = 1
tag_text = '<' + Prep_HTML(tag_text[1:])
recur_flag = 0
if tag_text == '<$main_font>':
tag_text = '"Book Antiqua"'
if tag_text == '<$area_news>':
tag_text = '<A href="rbranch_news.htm">'
if tag_text == '<$events>':
tag_text = '<A href="rbranch_events.htm">'
if tag_text == '<$nature>':
tag_text = '<A href="rbranch_nature.htm">'
if tag_text == '<$business>':
tag_text = '<A href="rbranch_business.htm">'
if tag_text == '<$Government>':
tag_text = '<A href="rbranch_gov.htm">'
if tag_text == '<$strangness>':
tag_text = '<A href="rbranch_strangness.htm">'
if tag_text == '<$home_page>':
tag_text = '<A href="index.htm"> '
if tag_text == '<$contact>':
tag_text = '<a href="mailto:sbabbitt@commspeed.net">Contact Us</a>'
if tag_text == '<$rbranch_image>':
tag_text = '<IMG height=86 src="rb_image\rbranch.gif" width=780 align=center border=0>'
if tag_text == '<?CompileTime>':
tag_text = time.strftime('%B %Y')
pre_page = pre_page + tag_text
tag_text = ''
elif tag_flag == 0:
pre_page = pre_page + i
return pre_page
<< rb_site_editor methods >>=
def put_ftp(self):#function to upload files, first start a progress dialog
dlg = wxProgressDialog("Uploading Rockin' B Ranch","Local News",7,self,wxPD_CAN_ABORT | wxPD_APP_MODAL)
RBsite = FTP('ftp.commspeed.net','tbabbitt','ttom')# open the site,
RBsite.storbinary('STOR rbranch_news.htm',open('c:\\RBRanch\\out\\rbranch_news.htm','r'))
dlg.Update(0, "Career Report")# reteve file , write into local file , update dialog
RBsite.storbinary('STOR rbranch_events.htm',open('c:\\RBRanch\\out\\rbranch_events.htm','r'))
dlg.Update(1, "Events")
RBsite.storbinary('STOR rbranch_nature.htm',open('c:\\RBRanch\\out\\rbranch_nature.htm','r'))
dlg.Update(2, "Nature")
RBsite.storbinary('STOR rbranch_business.htm',open('c:\\RBRanch\\out\\rbranch_business.htm','r'))
dlg.Update(3, "Business")
RBsite.storbinary('STOR rbranch_gov.htm',open('c:\\RBRanch\\out\\rbranch_gov.htm','r'))
dlg.Update(4, "Government")
RBsite.storbinary('STOR rbranch_strangness.htm',open('c:\\RBRanch\\out\\rbranch_strangness.htm','r'))
dlg.Update(5, "Strangness")
RBsite.storbinary('STOR index.htm',open('c:\\RBRanch\\out\\index.htm','r'))
dlg.Update(6, "Closeing Connection")
dlg.Destroy()# close the progress dialog
RBsite.close()
<< rb_site_editor methods >>=
class main_window(wxFrame):
<< class main_window methods >>
<< class main_window methods >>=
def __init__(self, parent, id, title):
wxFrame.__init__(self, parent, -1, title, size = (500, 500),style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE )
Cut_Icon = wxBitmap('c:\\python22\\tom\\bitmaps\\pen.bmp' , wxBITMAP_TYPE_BMP)
#Cut_Icon = wxBitmap.LoadFile('c:\\python22\\tom\\bitmaps\\pen.bmp' , wxBITMAP_TYPE_BMP)
Copy_Icon = Cut_Icon
Paste_Icon = Cut_Icon
Upload_Icon = Cut_Icon
Html_Icon = Cut_Icon
#Refresh_Icon = wxBitmap('refresh.bmp', wxBITMAP_TYPE_BMP )
tb = self.CreateToolBar(wxTB_HORIZONTAL | wxTB_3DBUTTONS | wxNO_BORDER )#| wxTB_FLAT
tb.AddSimpleTool(10 , Cut_Icon, "Cut", "Cut Marked Text")
EVT_TOOL(self, 10, self.OnToolCut)
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
tb.AddSimpleTool( 20 , Copy_Icon, "Copy", "Copy Marked Text")
EVT_TOOL(self, 20 , self.OnToolCopy)
EVT_TOOL_RCLICKED(self, 20 , self.OnToolRClick)
tb.AddSimpleTool(30, Paste_Icon, "Paste", "Paste text")
EVT_TOOL(self, 30 , self.OnToolPaste)
EVT_TOOL_RCLICKED(self, 30 , self.OnToolRClick)
tb.AddSeparator()
tb.AddSimpleTool(40, Html_Icon, "Make HTML", "Genirate Wep Pages")
EVT_TOOL(self, 40, self.OnToolMHTML)
EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick)
tb.AddSimpleTool(50, Upload_Icon, "Upload", "Upload files to web site")
EVT_TOOL(self, 50, self.OnToolUpload)
EVT_TOOL_RCLICKED(self ,50, self.OnToolRClick)
tb.AddSeparator()
tb.AddSimpleTool(60, Upload_Icon, "Refresh", "Refresh changes")
EVT_TOOL(self, 60, self.OnRefreshClick)
EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick)
tb.Realize()
self.CreateStatusBar()
self.bdr = wxBoxSizer(wxHORIZONTAL)
self.button_sizer = wxBoxSizer(wxHORIZONTAL)
self.master_sizer = wxBoxSizer(wxVERTICAL)
self.Notebook = wxNotebook(self, -1, wxDefaultPosition,wxDefaultSize,wxSUNKEN_BORDER)
self.bdr.Add(self.Notebook, 1, wxEXPAND , 0)
self.new_strang , self.new_news , self.new_events = Make_pages()
self.News_entry = Links_Info(self.Notebook)
self.News_entry.tl.SetValue(RB_view_news_links[0].links)
self.News_entry.tinf.SetValue(RB_view_news[0].story + self.new_news)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_news_links[0].links) + '</HTML></BODY>'
self.News_entry.View_window.SetPage(page_txt)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_news[0].story) + self.new_news + '</HTML></BODY>'
self.News_entry.View_info_window.SetPage(page_txt)
self.Notebook.AddPage(self.News_entry, "Local News")
self.Event_entry = Links_Info(self.Notebook)
self.Event_entry.tl.SetValue(RB_view_events_links[0].links)
self.Event_entry.tinf.SetValue(RB_view_events[0].story + self.new_events )
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_events_links[0].links) + '</HTML></BODY>'
self.Event_entry.View_window.SetPage(page_txt)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_events[0].story) + self.new_events + '</HTML></BODY>'
self.Event_entry.View_info_window.SetPage(page_txt)
self.Notebook.AddPage(self.Event_entry , "Events")
self.Nature_entry = Links_Info(self.Notebook)
self.Nature_entry.tl.SetValue(RB_view_nature_links[0].links)
self.Nature_entry.tinf.SetValue(RB_view_nature[0].story)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_nature_links[0].links) + '</HTML></BODY>'
self.Nature_entry.View_window.SetPage(page_txt)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_nature[0].story) + '</HTML></BODY>'
self.Nature_entry.View_info_window.SetPage(page_txt)
self.Notebook.AddPage(self.Nature_entry, "Nature")
self.Business_entry = Links_Info(self.Notebook)
self.Business_entry.tl.SetValue(RB_view_business_links[0].links)
self.Business_entry.tinf.SetValue(RB_view_business[0].story)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_business_links[0].links) + '</HTML></BODY>'
self.Business_entry.View_window.SetPage(page_txt)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_business[0].story) + '</HTML></BODY>'
self.Business_entry.View_info_window.SetPage(page_txt)
self.Notebook.AddPage(self.Business_entry, "Business")
self.Govornment_entry = Links_Info(self.Notebook)
self.Govornment_entry.tl.SetValue(RB_view_gov_links[0].links)
self.Govornment_entry.tinf.SetValue(RB_view_gov[0].story)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_gov_links[0].links) + '</HTML></BODY>'
self.Govornment_entry.View_window.SetPage(page_txt)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_gov[0].story) + '</HTML></BODY>'
self.Govornment_entry.View_info_window.SetPage(page_txt)
self.Notebook.AddPage(self.Govornment_entry, "Govornment")
self.Strangness_entry = Links_Info(self.Notebook)
self.Strangness_entry.tl.SetValue(RB_view_strange_links[0].links)
self.Strangness_entry.tinf.SetValue(RB_view_strange[0].story + self.new_strang)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_strange_links[0].links) + '</HTML></BODY>'
self.Strangness_entry.View_window.SetPage(page_txt)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_strange[0].story) + self.new_strang + '</HTML></BODY>'
self.Strangness_entry.View_info_window.SetPage(page_txt)
self.Notebook.AddPage(self.Strangness_entry, "Strangness")
self.Main_entry = Links_Info(self.Notebook)
self.Main_entry.tl.SetValue(RB_view_main_links[0].links)
self.Main_entry.tinf.SetValue(RB_view_main[0].story)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_main_links[0].links) + '</HTML></BODY>'
self.Main_entry.View_window.SetPage(page_txt)
page_txt = '<HTML><BODY>' + Prep_HTML(RB_view_main[0].story) + '</HTML></BODY>'
self.Main_entry.View_info_window.SetPage(page_txt)
self.Notebook.AddPage(self.Main_entry, "Main")
EVT_NOTEBOOK_PAGE_CHANGED(self, self.Notebook.GetId(), self.OnPageChanged)
del_button_id = wxNewId()
del_button = wxButton(self, del_button_id, "Delete")
EVT_BUTTON(self, del_button_id, self.OnClick_del_button)
self.button_sizer.Add(del_button, 1, wxEXPAND)
save_button_id = wxNewId()
save_button = wxButton(self, save_button_id, "Save")
EVT_BUTTON(self, save_button_id, self.OnClick_save_button)
self.button_sizer.Add(save_button, 1, wxEXPAND)
self.master_sizer.Add(self.bdr, 12, wxEXPAND)
self.master_sizer.Add(self.button_sizer, 1, wxEXPAND)
self.SetSizer(self.master_sizer)
self.SetAutoLayout(1)
self.master_sizer.Fit(self)
self.tabs_selected = "Local News"
self.Show(true)
<< class main_window methods >>=
def OnRefreshClick(self, event):
if self.tabs_selected == "Local News":
if self.News_entry.TabOpen == 'links':
temp_txt = self.News_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.News_entry.View_window.SetPage(page_txt)
else:
temp_txt = self.News_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.News_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Events":
if self.Event_entry.TabOpen == 'links':
temp_txt = self.Event_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Event_entry.View_window.SetPage(page_txt)
else:
temp_txt = self.Event_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Event_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Nature":
if self.Nature_entry.TabOpen == 'links':
temp_txt = self.Nature_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Nature_entry.View_window.SetPage(page_txt)
else:
temp_txt = self.Nature_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Nature_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Business":
if self.Business_entry.TabOpen == 'links':
temp_txt = self.Business_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Business_entry.View_window.SetPage(page_txt)
else:
temp_txt = self.Business_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Business_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Govornment":
if self.Govornment_entry.TabOpen == 'links':
temp_txt = self.Govornment_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Govornment_entry.View_window.SetPage(page_txt)
else:
temp_txt = self.Govornment_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Govornment_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Strangness":
if self.Strangness_entry.TabOpen == 'links':
temp_txt = self.Strangness_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Strangness_entry.View_window.SetPage(page_txt)
else:
temp_txt = self.Strangness_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Strangness_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Main":
if self.Main_entry.TabOpen == 'links':
temp_txt = self.Main_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Main_entry.View_window.SetPage(page_txt)
else:
temp_txt = self.Main_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Main_entry.View_info_window.SetPage(page_txt)
<< class main_window methods >>=
def OnToolCut(self, event):
span =()
print self.tabs_selected
if self.tabs_selected == "Local News":
if self.News_entry.TabOpen == 'links':
temp_txt = self.News_entry.tl.GetValue()
span = self.News_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.News_entry.tl.SetValue(page_txt)
else:
temp_txt = self.News_entry.tinf.GetValue()
span = self.News_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.News_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Events":
if self.Event_entry.TabOpen == 'links':
temp_txt = self.Event_entry.tl.GetValue()
span = self.Event_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Event_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Event_entry.tinf.GetValue()
span = self.Event_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Event_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Nature":
if self.Nature_entry.TabOpen == 'links':
temp_txt = self.Nature_entry.tl.GetValue()
span = self.Nature_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Nature_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Nature_entry.tinf.GetValue()
span = self.Nature_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Nature_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Business":
if self.Business_entry.TabOpen == 'links':
temp_txt = self.Business_entry.tl.GetValue()
span = self.Business_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Business_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Business_entry.tinf.GetValue()
span = self.Business_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Business_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Govornment":
if self.Govornment_entry.TabOpen == 'links':
temp_txt = self.Govornment_entry.tl.GetValue()
span = self.Govornment_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Govornment_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Govornment_entry.tinf.GetValue()
span = self.Govornment_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Govornment_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Strangness":
if self.Strangness_entry.TabOpen == 'links':
temp_txt = self.Strangness_entry.tl.GetValue()
span = self.Strangness_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Strangness_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Strangness_entry.tinf.GetValue()
span = self.Strangness_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Strangness_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Main":
if self.Main_entry.TabOpen == 'links':
temp_txt = self.Main_entry.tl.GetValue()
span = self.Main_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Main_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Main_entry.tinf.GetValue()
span = self.Main_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
page_txt = temp_txt[:span[0]] + temp_txt[span[1]:]
self.Main_entry.tinf.SetValue(page_txt)
<< class main_window methods >>=
def OnToolCopy(self, event):
span =()
if self.tabs_selected == "Local News":
if self.News_entry.TabOpen == 'links':
temp_txt = self.News_entry.tl.GetValue()
span = self.News_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
else:
temp_txt = self.News_entry.tinf.GetValue()
span = self.News_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
elif self.tabs_selected == "Events":
if self.Event_entry.TabOpen == 'links':
temp_txt = self.Event_entry.tl.GetValue()
span = self.Event_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
else:
temp_txt = self.Event_entry.tinf.GetValue()
span = self.Event_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
elif self.tabs_selected == "Nature":
if self.Nature_entry.TabOpen == 'links':
temp_txt = self.Nature_entry.tl.GetValue()
span = self.Nature_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
else:
temp_txt = self.Nature_entry.tinf.GetValue()
span = self.Nature_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
elif self.tabs_selected == "Business":
if self.Business_entry.TabOpen == 'links':
temp_txt = self.Business_entry.tl.GetValue()
span = self.Business_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
else:
temp_txt = self.Business_entry.tinf.GetValue()
span = self.Business_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
elif self.tabs_selected == "Govornment":
if self.Govornment_entry.TabOpen == 'links':
temp_txt = self.Govornment_entry.tl.GetValue()
span = self.Govornment_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
else:
temp_txt = self.Govornment_entry.tinf.GetValue()
span = self.Govornment_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
elif self.tabs_selected == "Strangness":
if self.Strangness_entry.TabOpen == 'links':
temp_txt = self.Strangness_entry.tl.GetValue()
span = self.Strangness_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
else:
temp_txt = self.Strangness_entry.tinf.GetValue()
span = self.Strangness_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
elif self.tabs_selected == "Main":
if self.Main_entry.TabOpen == 'links':
temp_txt = self.Main_entry.tl.GetValue()
span = self.Main_entry.tl.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
else:
temp_txt = self.Main_entry.tinf.GetValue()
span = self.Main_entry.tinf.GetSelection()
cut_txt = wxTextDataObject(temp_txt[span[0]:span[1]])
Clip_board_data.Open()
Clip_board_data.SetData(cut_txt)
Clip_board_data.Close()
<< class main_window methods >>=
def OnToolPaste(self, event):
span =()
if self.tabs_selected == "Local News":
if self.News_entry.TabOpen == 'links':
temp_txt = self.News_entry.tl.GetValue()
span = self.News_entry.tl.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.News_entry.tl.SetValue(page_txt)
else:
temp_txt = self.News_entry.tinf.GetValue()
span = self.News_entry.tinf.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.News_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Events":
if self.Event_entry.TabOpen == 'links':
temp_txt = self.Event_entry.tl.GetValue()
span = self.Event_entry.tl.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Event_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Event_entry.tinf.GetValue()
span = self.Event_entry.tinf.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Event_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Nature":
if self.Nature_entry.TabOpen == 'links':
temp_txt = self.Nature_entry.tl.GetValue()
span = self.Nature_entry.tl.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Nature_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Nature_entry.tinf.GetValue()
span = self.Nature_entry.tinf.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Nature_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Business":
if self.Business_entry.TabOpen == 'links':
temp_txt = self.Business_entry.tl.GetValue()
span = self.Business_entry.tl.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Business_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Business_entry.tinf.GetValue()
span = self.Business_entry.tinf.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Business_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Govornment":
if self.Govornment_entry.TabOpen == 'links':
temp_txt = self.Govornment_entry.tl.GetValue()
span = self.Govornment_entry.tl.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Govornment_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Govornment_entry.tinf.GetValue()
span = self.Govornment_entry.tinf.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Govornment_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Strangness":
if self.Strangness_entry.TabOpen == 'links':
temp_txt = self.Strangness_entry.tl.GetValue()
span = self.Strangness_entry.tl.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Strangness_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Strangness_entry.tinf.GetValue()
span = self.Strangness_entry.tinf.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Strangness_entry.tinf.SetValue(page_txt)
elif self.tabs_selected == "Main":
if self.Main_entry.TabOpen == 'links':
temp_txt = self.Main_entry.tl.GetValue()
span = self.Main_entry.tl.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Main_entry.tl.SetValue(page_txt)
else:
temp_txt = self.Main_entry.tinf.GetValue()
span = self.Main_entry.tinf.GetSelection()
cut_txt = wxTextDataObject('')
Clip_board_data.Open()
Clip_board_data.GetData(cut_txt)
Clip_board_data.Close()
insert_txt = cut_txt.GetText()
page_txt = temp_txt[:span[0]] + insert_txt + temp_txt[span[0]:]
self.Main_entry.tinf.SetValue(page_txt)
<< class main_window methods >>=
def OnToolMHTML(self, event):
if self.tabs_selected == "Local News":
tom = ''
write_file = open('c:\\RBRanch\\out\\rbranch_news.htm','w')
tom = RB_view_news_top[0].text
write_file.write(tom)
tom = Prep_HTML(RB_view_news_links[0].links)
write_file.write(tom)
tom = Prep_HTML(RB_view_mid[0].text)
write_file.write(tom)
tom = Prep_HTML(RB_view_news[0].story)
write_file.write(tom)
tom = Prep_HTML(RB_view_bot[0].text)
write_file.write(tom)
write_file.close()
elif self.tabs_selected == "Events":
tom = ''
write_file = open('c:\\RBRanch\\out\\rbranch_events.htm','w')
tom = RB_view_events_top[0].text
write_file.write(tom)
tom = Prep_HTML(RB_view_events_links[0].links)
write_file.write(tom)
tom = Prep_HTML(RB_view_mid[0].text)
write_file.write(tom)
tom = Prep_HTML(RB_view_events[0].story)
write_file.write(tom)
tom = Prep_HTML(RB_view_bot[0].text)
write_file.write(tom)
write_file.close()
elif self.tabs_selected == "Nature":
tom = ''
write_file = open('c:\\RBRanch\\out\\rbranch_nature.htm','w')
tom = RB_view_nature_top[0].text
write_file.write(tom)
tom = Prep_HTML(RB_view_nature_links[0].links)
write_file.write(tom)
tom = Prep_HTML(RB_view_mid[0].text)
write_file.write(tom)
tom = Prep_HTML(RB_view_nature[0].story)
write_file.write(tom)
tom = Prep_HTML(RB_view_bot[0].text)
write_file.write(tom)
write_file.close()
elif self.tabs_selected == "Business":
tom = ''
write_file = open('c:\\RBRanch\\out\\rbranch_business.htm','w')
tom = RB_view_business_top[0].text
write_file.write(tom)
tom = Prep_HTML(RB_view_business_links[0].links)
write_file.write(tom)
tom = Prep_HTML(RB_view_mid[0].text)
write_file.write(tom)
tom = Prep_HTML(RB_view_business[0].story)
write_file.write(tom)
tom = Prep_HTML(RB_view_bot[0].text)
write_file.write(tom)
write_file.close()
elif self.tabs_selected == "Govornment":
tom = ''
write_file = open('c:\\RBRanch\\out\\rbranch_gov.htm','w')
tom = RB_view_gov_top[0].text
write_file.write(tom)
tom = Prep_HTML(RB_view_gov_links[0].links)
write_file.write(tom)
tom = Prep_HTML(RB_view_mid[0].text)
write_file.write(tom)
tom = Prep_HTML(RB_view_gov[0].story)
write_file.write(tom)
tom = Prep_HTML(RB_view_bot[0].text)
write_file.write(tom)
write_file.close()
elif self.tabs_selected == "Strangness":
tom = ''
write_file = open('c:\\RBRanch\\out\\rbranch_strangness.htm','w')
tom = RB_view_strange_top[0].text
write_file.write(tom)
tom = Prep_HTML(RB_view_strange_links[0].links)
write_file.write(tom)
tom = Prep_HTML(RB_view_mid[0].text)
write_file.write(tom)
tom = Prep_HTML(RB_view_strange[0].story)
write_file.write(tom)
tom = Prep_HTML(RB_view_bot[0].text)
write_file.write(tom)
write_file.close()
elif self.tabs_selected == "Main":
tom = ''
write_file = open('c:\\RBRanch\\out\\index.htm','w')
tom = RB_view_main_top[0].text
write_file.write(tom)
tom = Prep_HTML(RB_view_main_links[0].links)
write_file.write(tom)
tom = Prep_HTML(RB_view_mid[0].text)
write_file.write(tom)
tom = Prep_HTML(RB_view_main[0].story)
write_file.write(tom)
tom2 = """<P><TABLE cellSpacing=0 cellPadding=5 width=600 align=center border=0><TBODY><TR><TD align=middle></TD></TR><TR><TD align=middle><FONT face=<$main_font> size=1>| <$home_page>Home</A> | <$area_news>The News</A> | <$events>Events</A> | <$nature>Nature</A> | <$business>Business</A> | <$Government>Government</A> | <$strangness>Strangness</A> | <$contact> | </FONT></TD></TR></TBODY></TABLE> </P></TD></TR><TR><TD colSpan=2><BR></TD></TR><TR><TD><A TARGET="_top" HREF="http://www.aaddzz.com/alscripts/nph-stats?id=90267"><IMG SRC="http://counter.aaddzz.com/counter.cgi?id=104477" ALT="[Aaddzz Counter]" WIDTH=90 HEIGHT=20 BORDER=0></A></TD></TR></TBODY></TABLE></BODY></HTML>"""
tom = Prep_HTML(tom2)
write_file.write(tom)
write_file.close()
<< class main_window methods >>=
def OnToolUpload(self, event):
put_ftp(self)
<< class main_window methods >>=
def OnToolRClick(self, event):
pass
<< class main_window methods >>=
def OnClick_del_button(self, event):
if self.tabs_selected == "Local News":
if self.News_entry.TabOpen == 'links':
page_txt = ''
self.News_entry.View_window.SetPage(page_txt)
else:
page_txt = ''
self.News_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Events":
if self.Event_entry.TabOpen == 'links':
page_txt = ''
self.Event_entry.View_window.SetPage(page_txt)
else:
page_txt = ''
self.Event_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Nature":
if self.Nature_entry.TabOpen == 'links':
page_txt = ''
self.Nature_entry.View_window.SetPage(page_txt)
else:
page_txt = ''
self.Nature_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Business":
if self.Business_entry.TabOpen == 'links':
page_txt = ''
self.Business_entry.View_window.SetPage(page_txt)
else:
page_txt = ''
self.Business_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Govornment":
if self.Govornment_entry.TabOpen == 'links':
page_txt = ''
self.Govornment_entry.View_window.SetPage(page_txt)
else:
page_txt = ''
self.Govornment_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Strangness":
if self.Strangness_entry.TabOpen == 'links':
page_txt = ''
self.Strangness_entry.View_window.SetPage(page_txt)
else:
page_txt = ''
self.Strangness_entry.View_info_window.SetPage(page_txt)
elif self.tabs_selected == "Main":
if self.Main_entry.TabOpen == 'links':
page_txt = ''
self.Main_entry.View_window.SetPage(page_txt)
else:
page_txt = ''
self.Main_entry.View_info_window.SetPage(page_txt)
<< class main_window methods >>=
def OnClick_save_button(self, event):
if self.tabs_selected == "Local News":
if self.News_entry.TabOpen == 'links':
temp_txt = self.News_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.News_entry.View_window.SetPage(page_txt)
RB_view_news_links.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_news_links.append(links = temp_txt)
else:
temp_txt = self.News_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.News_entry.View_info_window.SetPage(page_txt)
RB_view_news.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_news.append(story = temp_txt)
elif self.tabs_selected == "Events":
if self.Event_entry.TabOpen == 'links':
temp_txt = self.Event_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Event_entry.View_window.SetPage(page_txt)
RB_view_events_links.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_events_links.append(links = temp_txt)
else:
temp_txt = self.Event_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Event_entry.View_info_window.SetPage(page_txt)
RB_view_events.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_events.append(story = temp_txt)
elif self.tabs_selected == "Nature":
if self.Nature_entry.TabOpen == 'links':
temp_txt = self.Nature_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Nature_entry.View_window.SetPage(page_txt)
RB_view_nature_links.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_nature_links.append(links = temp_txt)
else:
temp_txt = self.Nature_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Nature_entry.View_info_window.SetPage(page_txt)
RB_view_nature.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_nature.append(story = temp_txt)
elif self.tabs_selected == "Business":
if self.Business_entry.TabOpen == 'links':
temp_txt = self.Business_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Business_entry.View_window.SetPage(page_txt)
RB_view_business_links.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_business_links.append(links = temp_txt)
else:
temp_txt = self.Business_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Business_entry.View_info_window.SetPage(page_txt)
RB_view_business.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_business.append(story = temp_txt)
elif self.tabs_selected == "Govornment":
if self.Govornment_entry.TabOpen == 'links':
temp_txt = self.Govornment_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Govornment_entry.View_window.SetPage(page_txt)
RB_view_gov_links.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_gov_links.append(links = temp_txt)
else:
temp_txt = self.Govornment_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Govornment_entry.View_info_window.SetPage(page_txt)
RB_view_gov.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_gov.append(story = temp_txt)
elif self.tabs_selected == "Strangness":
if self.Strangness_entry.TabOpen == 'links':
temp_txt = self.Strangness_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Strangness_entry.View_window.SetPage(page_txt)
RB_view_strange_links.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_strange_links.append(links = temp_txt)
else:
temp_txt = self.Strangness_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Strangness_entry.View_info_window.SetPage(page_txt)
RB_view_strange.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_strange.append(story = temp_txt)
elif self.tabs_selected == "Main":
if self.Main_entry.TabOpen == 'links':
temp_txt = self.Main_entry.tl.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Main_entry.View_window.SetPage(page_txt)
RB_view_main_links.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_main_links.append(links = temp_txt)
else:
temp_txt = self.Main_entry.tinf.GetValue()
page_txt = '<HTML><BODY>' + Prep_HTML(temp_txt) + '</HTML></BODY>'
self.Main_entry.View_info_window.SetPage(page_txt)
RB_view_main.delete(0)
temp_txt = str(is_ord(temp_txt))
RB_view_main.append(story = temp_txt)
RB_database.commit()
<< class main_window methods >>=
def OnExit(self, event):
RB_database.commit()
del RB_database
self.Close()
<< class main_window methods >>=
def OnPageChanged(self, event):
self.tabs_selected = self.Notebook.GetPageText(self.Notebook.GetSelection())
event.Skip()
<< rb_site_editor methods >>=
class App(wxApp):
<< class App methods >>
<< class App methods >>=
def OnInit(self):
frame = main_window(None, -1, "Rockin' B Ranch")
self.SetTopWindow(frame)
return true