--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+privatechatlogs/*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CHANGELOG.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,33 @@
+# Neutron - a Jabber bot in Python
+# Changelog
+
+0.5 - 30/Sep/2005 - Badlop
+
+ * neutron.py: New --pid command line option, writes PID to a file. (Mikem)
+
+ * neutron.sh: New shell script to start and stop Neutron. (Badlop)
+
+ * neutron.py, plugins/admin_plugin.py: Invite-autojoin patch:
+ Anybody who has access to issue !join command will have access to send a
+ protocol groupchat invite, all others will be ignored. (Mikem)
+
+ * plugins/rss_plugin.py: strip HTML tags on headline messages. (Mikem)
+
+ * plugins/weather_plugin.py: Little fixes. (Sef)
+
+ * plugins/sg_plugin.py: New plugin, shows server statistics with JEP-0039. (Sef)
+ * modules/xmpp/: XMPPpy updated to CVS, required by sg_plugin.py. (Sef)
+
+ * plugins/eliza_plugin.py: New plugin. (Sef)
+ * modules/eliza.py: New module, required by eliza_plugin.py. (Sef)
+
+ * localized/czech/: New plugins, only usefull to Czech people. (Sef)
+
+
+0.4.2 - 02/May/2005 - Badlop
+
+ * plugins/admin_plugin.py: fixed a bug about NICK (Mcsim)
+ * plugins/log_plugin.py: fixed a bug on href generation (Slisptream)
+
+ * 3hauka.txt, q.txt, quizdata.txt, zipcodes.txt: moved from neutron
+ package to a standalone neutron-extras package (Gonzo)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/COPYING.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,152 @@
+
+ Neutron - a Jabber bot in Python
+ --------------------------------
+
+ Copyright 2002-2007 Mike Mintz http://www.mikemintz.com/
+
+ http://ejabberd.jabber.ru/neutron
+
+
+ Introduction
+ ------------
+
+Neutron is a plugin-based Jabber bot written in Python that provides
+functionalities for individuals and chatrooms. To use it, you only need
+to create an account on a Jabber server, configure Neutron to log into
+that account and start it. Neutron will allow users to subscribe to its
+presence, enter into chatrooms and answer to commands.
+
+
+ Install
+ -------
+
+1. Get the source code from the SVN repository
+svn checkout http://svn.hypothetic.org/neutron/trunk neutron
+
+2. Prepare permissions (optional)
+addgroup jabber
+adduser neutron
+adduser neutron jabber
+chown neutron:jabber neutron-0.5 -R
+chmod 750 neutron-0.5 -R
+
+cd neutron
+
+3. Configure
+Edit config.txt and put the username, server and password of the Jabber
+account where Neutron must login.
+
+4. Execute
+./neutron.py
+
+5. Execute as different user in daemon mode (optional)
+su neutron -c "./neutron.py &"
+
+
+ Directory structure
+ -------------------
+
+# Directories
+chatlogs Chatroom logs in HTML format
+dynamic Files automatically generated
+localized Localized plugins: copy them to 'plugins/' to enable them
+modules Python modules required to run Neutron and plugins
+plugins Plugins that extend Neutron functionalities
+private Logs of private chats
+static Files with static data
+
+# Files
+neutron.py Neutron executable
+neutron.cfg Main configuration file
+neutron.rc Init script with commands to execute on initialization
+dynamic/chatrooms.cfg List of chatrooms where Neutron will enter
+dynamic/log.txt Log of all XMPP traffic (does not work)
+
+
+ Plugins
+ -------
+
+# Bot
+access Gives access to admin privileges
+admin Commands to administer Neutron
+chat
+help Shows help
+log Logs private chats, chatrooms and debug info
+python Evaluates a Python expression, statement or shell command
+
+# Jabber related
+presence Allows contacts to subscribe to its presence
+sg Asks a server its statistics
+userinfo Gives information on JIDs
+
+# Chatrooms
+chatbot Joins a chatroom and speaks to Chatbot (useless)
+eliza Talks with chat participants (uses Eliza)
+rss Subscribes a chatroom to a RSS feed
+vote Polls
+
+# Utilities
+query Create word definitions and stores in file
+temperature Converts temperatures to and from C and F
+time Gives UTC and Internet time
+
+# Reads database
+quote Gives a random quote or fortune
+
+# Asks Internet
+babel Translate between languages [babelfish]
+dict Shows the DICT definition of a word
+dns Returns the DNS lookup for a host or IP address
+domain Returns information on specified domain
+google Performs a Google search. Set your Google key on modules/googlekey.txt
+stock Returns information on stock [yahoo]
+weather Shows weather from NOAA
+
+# Local plugins
+ Czech:
+idos Searches IDOS for direct connection between two places in Czech Republic
+kino Returns list of movies in cinemas for given city in Czech Rep.
+lamer Shows random message from www.lamer.cz
+tv Returns TV programme for one of supported channels
+ Other:
+update Updates Neutron from Internet (does not work)
+ Russian:
+quiz Quiz in chatroom (requires quizdata.txt)
+ Spanish:
+saluda It's a modification of quote plugin (requires saludos.txt and saludos2.txt)
+ USA:
+fact-usa Shows info in Area code and ZIP code (requires areacodes.txt and zipcodes.txt)
+
+
+ Start using it
+ --------------
+
+Now that Neutron is logged on his account in a Jabber server, you can add it
+to your roster and start to chat with him. Some example commands:
+ help
+ !commands
+ help !domain
+ !domain jabber.org
+ help !join
+
+
+ RSS plugin
+ ----------
+
+1. Add a RSS feed to Neutron:
+ !rss_add identifier link
+ !rss_add planetjab http://planet.jabber.org/rss10.xml
+2. Subscribe room to it:
+ !rss_subscribe identifier room
+ !rss_subscribe planetjab group@conference.jabber.no
+3. Finally start the RSS fetching loop::
+ !rss_start
+
+
+ Feature Requests
+ ----------------
+
+# help_plugin
+- !commands should show only commands that the user has privileges enought to use
+
+- Give helpful error on invalid username/password for initial login
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/RSS_CACHE.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+{'channels': {u'planetjab': {'description': u'Planet Jabber - http://planet.jabber.org/', 'title': u'Planet Jabber', 'url': u'http://planet.jabber.org/rss10.xml', 'link': u'http://planet.jabber.org/', 'subscribers': [u'test@conf.lilotux.net'], 'lastitem': {'link': u'http://blog.jabber.com/filaments/2007/04/30/web-refresh-discover-the-power-of-presence/', 'description': '', 'title': u'Jabber Filaments Blog: Web Refresh: Discover The Power of Presence'}}, u'mcabber': {'description': u'mcabber Changelog', 'title': u'mcabber Changelog', 'url': u'http://www.lilotux.net/~mikael/mcabber/hg/?rss-log', 'link': u'http://www.lilotux.net/~mikael/mcabber/hg/?', 'subscribers': [u'test@conf.lilotux.net', u'mcabber@conf.lilotux.net'], 'lastitem': {'link': u'http://www.lilotux.net/~mikael/mcabber/hg/?rev/56f7f504b4ba', 'description': u'Add an autoconf check for vsnprintf() (Suggested by Till Maas)', 'title': u'Add an autoconf check for vsnprintf() (Suggested by Till Maas)'}}, u'slashdot': {'description': u'News for nerds, stuff that matters', 'title': u'Slashdot', 'url': u'http://www.slashdot.org/slashdot.rdf', 'link': u'http://slashdot.org/', 'subscribers': [u'test@conf.lilotux.net'], 'lastitem': {'link': u'http://rss.slashdot.org/~r/Slashdot/slashdot/to/~3/113297028/article.pl', 'description': u'<p><a href="http://rss.slashdot.org/~a/Slashdot/slashdot/to?a=zh57F5"><img src="http://rss.slashdot.org/~a/Slashdot/slashdot/to?i=zh57F5" border="0"></img></a></p><img src="http://rss.slashdot.org/~r/Slashdot/slashdot/to/~4/113297028" height="1" width="1"/>', 'title': u'Microsoft To Open Source Some of Silverlight'}}}}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/config.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,31 @@
+# Neutron configuration
+
+{
+# Jabber account where Neutron will login
+'SERVER': 'neutron2.nett',
+'PORT': 5222,
+'USERNAME': 'neutron2',
+'PASSWORD': '',
+'RESOURCE': 'McBot' + str(random.randrange(10, 99)),
+
+# Chatroom nick
+'DEFAULT_NICK': 'McBot',
+
+# Jabber accounts that will administrate Neutron
+'ADMINS': ['neutron2@neutron.nett', 'neutron3@neutron.nett'],
+'ADMIN_PASSWORD': str(random.randrange(999999999)),
+
+# Neutron will try to reconnect on disconnections
+'AUTO_RESTART': 0,
+
+# Where to store HTML files from chatrooms logs
+# To disable logging, set to empty string: '',
+'PUBLIC_LOG_DIR': '/nonexistent/var/www/neutron',
+
+# Where to store logs of private chats
+# To disable logging, set to empty string: '',
+'PRIVATE_LOG_DIR': 'privatechatlogs',
+
+'INITSCRIPT_FILE': 'neutron.rc',
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dynamic/RSS_CACHE.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+{}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dynamic/access.cfg Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+{'neutron2@neutron.nett': 100}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dynamic/chatnicks.cfg Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+{}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dynamic/chatrooms.cfg Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+[]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dynamic/config.cfg Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+{}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dynamic/localdb.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+{}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dynamic/logcache.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+{}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/czech/idos_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,93 @@
+#$ neutron_plugin 01
+
+import time
+
+def IDOS(prvni,druha,datum,cas):
+ import urllib2,re,urllib
+
+ con=urllib2.Request('http://idos.cz/ConnForm.asp?tt=c')
+ link=urllib2.urlopen(con)
+ form=link.read()
+ code=re.search('name=\"link\" value=\"',form)
+ kod=form[code.end():code.end()+4]
+
+ req = urllib2.Request('http://idos.cz/ConnForm.asp?tt=c')
+ req.add_header = ('User-agent', 'Mozilla/5.0')
+ req.add_data(urllib.urlencode({'FromStn':urllib.quote(prvni),'ToStn':urllib.quote(druha),'ViaStn':'','ConnDate':datum,'ConnTime':cas,'ConnIsDep':'1','ConnAlg':'0','tt':'c','changeext':'0','Mask1':'-1','Min1':'5','Max1':'240','Std1':'1','Mask2':"-1",'Min2':"0","Max2":"240","Std2":"0","beds":"0","alg": "1","chn":"5","odch":"50","odcht":"0","ConnFromList":"-1","ConnToList":"-1","ConnViaList":"-1","recalc":"0","pars":"0","process":"0","link":kod}))
+ r = urllib2.urlopen(req)
+ cele=r.read()
+ #print cele
+ zacatek=re.search('<table border=.0. width=.100%. cellspacing=.0. cellpadding=.0. Class=.TDForm.>',cele)
+ if zacatek!=None:
+ kus_1=cele[zacatek.end():]
+ kus_2=kus_1[re.search('</table>',kus_1).end():]
+ telo=kus_2[:re.search('</table>',kus_2).start()]
+ out_date=re.findall('<td align="right">([0-9]{0,2}\.[0-9]{0,2}\.)',telo)
+ out_st=re.findall('<td nowrap>(((<a [^<>]*>)?[^<>]+(</a>)?.+<br>)+.+)</td>',telo)
+ out_arrivs=re.findall('<td align="right" nowrap>( )*(((<br> )*<br>[0-9]{0,2}:[0-9]{0,2})+)</td>',telo)
+ out_departs=re.findall('<td align="right">((([0-9]{0,2}:[0-9]{0,2})<br>( <br>)*)+)</td>',telo)
+ out_nrs=re.findall("(<img [^<>]+> (<a href='Route\.asp\?cl=C&tt=.&i=[^<>]+>)?([^<>]+)(</a>)?( )*(<img [^<>]+>( )*)*(<br>)?)+",telo)
+ #print out_arrivs,out_date,out_departs,out_nrs,out_st
+
+ nrs=[]
+ for i in out_nrs:
+ o=re.sub("<[^<>]+>", "",i[0])
+ o=re.sub(" ", "",o)
+ nrs.append(o)
+
+
+ arrivs=[]
+ for i in out_arrivs:
+ o=re.sub('<br>','',i[1])
+ arrivs.append(o)
+
+
+ departs=[]
+ for i in out_departs:
+ o=re.sub('<br>','',i[1])
+ departs.append(o)
+
+
+ st=[]
+ for i in out_st:
+ o=[]
+ stanice=i[0].split('<br>')
+ o.append(re.sub("<[^<>]+>", "",stanice[0]).replace(' ',''))
+ o.append(re.sub("<[^<>]+>", "",stanice[1]).replace(' ',''))
+ st.append(o)
+
+ #print arrivs,departs,nrs,st
+
+ vysl=len(nrs)
+ out=''
+ for n in range(0,vysl):
+ out+='\n'+st[n][0]+'('+departs[n]+') - '+st[n][1]+'('+arrivs[n]+')'
+ return out
+ else:
+ if cele.find('vyberte ze seznamu objekt')!=-1:
+ kus=cele[re.search('<select name=\"ToStn\" size=\"1\">',cele).end():]
+ kus=kus[:re.search('</select>',kus).start()]
+ kus=re.sub("<[^<>]+>", "",kus)
+ mista=kus.split()
+ mista=mista[0,-1]
+ out='Vyberte stanici ze seznamu:'
+ for x in mista:
+ out+='\n'+x
+ return out
+ else:
+ return 'CHYBA! >> spojeni nelze nalezt/spatny pozadavek'
+ print cele
+
+def handler_IDOS_get(type, source, parameters):
+ par=parameters.split('*')
+ if len(par)==2:
+
+ datum=time.localtime()
+ par.append(str(datum[2])+'.'+str(datum[1])+'.'+str(datum[0]))
+ par.append(str(datum[3])+':'+str(datum[4]))
+ elif len(par)==3:
+ par.append(str(datum[3])+':'+str(datum[4]))
+ smsg(type,source,unicode(IDOS(par[0],par[1],par[2],par[3]),'windows-1250'))
+
+
+register_command_handler(handler_IDOS_get, '!spoj', 0, '', '!spoj <odkud>*<kam>*<datum>*<cas>', ['!spoj praha*ostrava*3.3.2006*10:21'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/czech/kino_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,78 @@
+#$ neutron_plugin 01
+import urllib2,re,urllib
+def kino_grab(vstup):
+
+## req = urllib2.Request('http://dokina.tiscali.cz/')
+## req.add_header = ('User-agent', 'Mozilla/5.0')
+## r = urllib2.urlopen(req)
+## cele=r.read()
+## #ripnem z toho seznam mest
+## m=re.search('<select name="city" size="1" class="programcombo">',cele)
+## mesta=cele[m.end():]
+## mesta=mesta[:re.search('<option value="0">',mesta).start()]
+## m_kusy=re.findall('<option value="\d+">[^\d<]+</option>',mesta)
+## slovnik={}
+## for i in m_kusy:
+## mesto=re.sub("<[^<>]+>", "",i)
+## cislo=re.search('\d+',i)
+## slovnik[mesto]=cislo.group()
+## print slovnik
+ slovnik={'turnov': '189', 'kralupy-nad-vltavou': '116', 'uherske-hradiste': '16', 'jihlava': '26', 'znojmo': '125', 'pernink': '155', 'horsovsky-tyn': '158', 'ceske-budejovice': '3', 'sezimovo-usti': '120', 'opava': '20', 'zlin': '68', 'kamenicky-senov': '187', 'caslav': '153', 'blatna': '140', 'havlickuv-brod': '119', 'tabor': '5', 'hradec-kralove': '14', 'holesov': '28', 'klatovy': '166', 'vyskov': '131', 'hermanuv-mestec': '157', 'cernosice': '185', 'kutna-hora': '151', 'slany': '148', 'karlovy-vary': '67', 'frydek-mistek': '35', 'lysa-nad-labem': '114', 'veseli-nad-moravou': '179', 'pelhrimov': '39', 'tyn-nad-vltavou': '115', 'novy-bor': '169', 'prostejov': '121', 'ceska-lipa': '152', 'plana': '188', 'boskovice': '171', 'cheb': '149', 'jablonec-nad-nisou': '143', 'chrudim': '127', 'brno': '2', 'olomouc': '9', 'mnichovo-hradiste': '32', 'chomutov': '128', 'horovice': '159', 'jesenik': '113', 'beroun': '132', 'pardubice': '117', 'orlova': '191', 'kladno': '112', 'usti-nad-orlici': '18', 'kdyne': '12', 'dobrany': '177', 'humpolec': '150', 'prerov': '23', 'nymburk': '144', 'novy-jicin': '126', 'litomerice': '129', 'kolin': '130', 'blansko': '123', 'trebic': '19', 'sebetov': '10', 'cesky-krumlov': '6', 'straz-pod-ralskem': '183', 'ostrava': '8', 'kromeriz': '21', 'trest': '176', 'ostrov': '167', 'liberec': '147', 'uhersky-brod': '40', 'usti-nadlabem': '66', 'sumperk': '17', 'strakonice': '146', 'neratovice': '182', 'frystak': '175', 'praha': '1', 'decin': '162', 'pisek': '118', 'litomysl': '37', 'teplice': '124', 'karvina': '34', 'plzen': '7', 'havirov': '111', 'holice': '141', 'jilemnice': '173', 'koprivnice': '170'}
+
+
+ tajm={'dnes':1,'zitra':2,'tyden':3, 'vikend':4,'mesic':5}
+
+ par=vstup.split()
+ if len(par)==1:
+ par.append('dnes')
+ if len(vstup.split())==0:
+ klice=slovnik.keys()
+ klice.sort()
+ out='\n MESTA: \n'
+ for i in klice:
+ out+=' '+i
+ out+='\n OBDOBI: \n'
+ for i in tajm.keys():
+ out+=' '+i
+ return out
+ elif par[0] in slovnik.keys() and par[1].lower() in tajm.keys():
+ mesto=slovnik[par[0]]
+ cas=tajm[par[1].lower()]
+ else:
+ return 'Chybny dotaz.'
+
+
+ req = urllib2.Request('http://dokina.tiscali.cz/programy/program.asp?city='+str(mesto)+'&where_search=movie1&movie=&term='+str(cas)+'&order=cinema&filtr=0&multikino=true')
+ req.add_header = ('User-agent', 'Mozilla/5.0')
+ r = urllib2.urlopen(req)
+ cele=r.read()
+
+ od=re.search('<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td colspan="4"> </td></tr>',cele)
+ vysledek=cele[od.end():]
+ vysledek=vysledek[:re.search('</table><hr size="1">',vysledek).start()]
+ kina_mass=vysledek.split('<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td>')
+ kina_mass=kina_mass[1:]
+ out='\n'
+ for f in kina_mass:
+ kino=re.search('<a class="kinoprogram" href="/programy/showcinema.asp.id=\d+">.+</a></b></font><br>',f)
+ data=re.findall('<strong>.+</strong> </td>',f)
+ filmy=re.findall('<a class="kinoprogramdef" href="/filmy/f_info.asp.film_id=\d+">.+</a>',f)
+ casy=re.findall('<strong>.+ h</strong></td>',f)
+ out+=re.sub("<[^<>]+>", "",kino.group())+'\n'
+ program=[]
+ if len(data)==len(filmy) and len(data)==len(casy):
+ for x in range(0,len(filmy)):
+ text=re.sub("<[^<>]+>", "",data[x])+'\t: '+re.sub("<[^<>]+>", "",filmy[x])+ ' ('+re.sub("<[^<>]+>", "",casy[x])+')'
+ program.append(text.replace(' ',' '))
+ out+=text.replace(' ',' ')+'\n'
+ #print program
+ else:
+ hlaska=re.search('<tr><td colspan="2" class="kinoprogramdef">.+</td></tr>',f)
+ out+=re.sub("<[^<>]+>", "",hlaska.group())+'\n'
+ return out
+
+def handler_kino_get(type, source, parameters):
+
+ smsg(type,source,unicode(kino_grab(parameters),'windows-1250'))
+
+register_command_handler(handler_kino_get, '!kino', 0, 'Vypise program kin ve zvolenem meste a obdobi.', '!kino <mesto> <kdy>', ['!kino 8 1'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/czech/lamer_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,19 @@
+#$ neutron_plugin 01
+import urllib2,re,urllib
+
+def handler_lamer_get(type, source, parameters):
+ if parameters.strip()=='':
+ req = urllib2.Request('http://lamer.cz/?item=show&action=random')
+ else:
+ req = urllib2.Request('http://lamer.cz/?item=show&id='+parameters.strip())
+ req.add_header = ('User-agent', 'Mozilla/5.0')
+ r = urllib2.urlopen(req)
+ cele=r.read()
+ od=re.search('<div id="quotes">',cele)
+ hlaska=cele[od.end():]
+ hlaska=hlaska[:re.search('</div>',hlaska).start()]
+ hlaska=hlaska.replace('<br />','\n')
+ hlaska=re.sub("<[^<>]+>", "",hlaska).replace(' ',' ').replace('<','<').replace('>','>')
+ smsg(type,source,unicode(hlaska,'windows-1250'))
+
+register_command_handler(handler_lamer_get, '!lamer', 0, 'Vypise hlasku z lamer.cz', '!lamer', ['!lamer 22'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/czech/tv_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,43 @@
+#$ neutron_plugin 01
+import urllib2,re,time
+def prog_grab(code):
+ kody={'ct1':'%C8T1', 'ct2':'%C8T2', 'nova':'Nova', 'prima':'Prima', 'hbo':'HBO', 'hbo2':'HBO2', 'csfilm':'%C8S+Film', 'filmplus':'Film%2B', 'cinemax':'Cinemax', 'hallmark':'Hallmark', 'galaxiesport':'Galaxie+Sport', 'eurosport':'EuroSport', 'eurosport2':'EuroSport2', 'ct24':'%C8T24', '24cz':'24cz', 'jetix':'Jetix', 'minimax':'Minimax', 'animeplus':'Anime%2B', 'spektrum':'Spektrum', 'discovery':'Discovery', 'animalplanet':'AnimalPlanet', 'nationalgeographic':'National+Geographic', 'viasatexplorer':'Viasat+Explorer', 'viasathistory':'Viasat+History', 'realitytv':'Reality+TV', 'axn':'AXN', 'romantica':'Romantica', 'ocko':'%D3%E8ko', 'tvpaprika':'TV+Paprika', 'markiza':'Mark%EDza', 'joj':'JOJ', 'stv1':'STV1', 'stv2':'STV2', 'ta3':'TA3', 'tvp1':'TVP1', 'tvp2':'TVP2', 'polonia':'Polonia', 'tvn':'TVN', 'tvn7':'TVN7', 'polsat':'Polsat', 'tv4':'TV4', 'rtl2':'RTL2', 'kabel1':'Kabel1', 'superrtl':'SuperRTL', 'pro7':'PRO7', 'sat1':'SAT1', '3sat':'3SAT', 'orf1':'ORF1', 'orf2':'ORF2', 'ard':'ARD', 'dsf':'DSF', 'vox':'VOX', 'zdf':'ZDF', 'viva':'VIVA', 'viva+':'VIVA%2B', 'mtv':'MTV', 'mtv2':'MTV2', 'mtvbase':'MTV+Base', 'mtvhits':'MTV+Hits', 'vh1':'VH1', 'vh1classic':'VH1+Classic', 'cartoon-network':'Cartoon+Network', 'boomerang':'Boomerang', 'tcm':'TCM', 'club':''Club', 'bbcprime':'BBC+Prime', 'espn-classic-sport':'ESPN+Classic+Sport', 'extreme':'Extreme', 'privateblue':'Private+Blue', 'privategold':'Private+Gold', 'cnn':'CNN', 'mezzo':'Mezzo'}
+ if code.lower() in kody.keys():
+ kod=kody[code.lower()]
+ req = urllib2.Request('http://365dni.sms.cz/index.php?typ=televize&formular_datum=&formular_casod=&formular_typprg=&televize_tvarray='+kod)
+ r = urllib2.urlopen(req)
+ radky=r.readlines()
+ program=''
+ porad0_0={}
+ porad_od0_0={}
+ for x in radky:
+ if x.find('porad0_0[0] = ')!=-1:
+ program=x
+ kusy=program.split(';')
+ for x in kusy:
+ prikaz=x.replace('\\"',"").replace("'","")
+ prikaz=re.sub('</.*>','',prikaz)
+ prikaz=re.sub('<.*>','',prikaz)
+ #print prikaz
+ if prikaz.strip()!='':
+ exec(prikaz)
+ # toz a vcil muzem zformatovat vystup ..
+ n=range(0,len(porad0_0))
+ vystup='\n'
+ for x in n:
+ vystup+=time.strftime('%H:%M',time.localtime((porad_od0_0[x])/1000))+' - '+porad0_0[x]+'\n'
+ return vystup
+ else:
+ vystup='Channels: \n'
+ kanaly=kody.keys()
+ kanaly.sort()
+ for x in kanaly:
+ vystup+=x+ ' '
+ return vystup
+
+
+def handler_TV_get(type, source, parameters):
+ smsg(type,source,unicode(prog_grab(parameters),'windows-1250'))
+
+
+register_command_handler(handler_TV_get, '!tv', 0, 'Returns TV program for given channel.', '!tv <channel>', ['!tv ct1'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/more/update_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,59 @@
+#$ neutron_plugin 01
+
+import httplib
+
+UPDATE_HOST = 'www.jabber.ru'
+UPDATE_PATH = '/projects/neutron/files/'
+
+VERSIONS_FILE = 'dynamic/versions.txt'
+
+def update_download(file):
+ httpcon = httplib.HTTPConnection(UPDATE_HOST)
+ httpcon.request('GET', UPDATE_PATH + file)
+ response = httpcon.getresponse()
+ if response.status == 200:
+ reply = response.read()
+ else:
+ reply = None
+ httpcon.close()
+ return reply
+
+def handler_update_update(type, source, parameters):
+ try:
+ server_versions = eval(update_download('dynamic/versions.txt'))
+ except:
+ smsg(type, source, 'Server Error')
+ return
+ my_versions = eval(read_file(VERSIONS_FILE))
+ to_update = []
+ to_remove = []
+ for filename in my_versions:
+ if server_versions.has_key(filename):
+ if my_versions[filename] < server_versions[filename]:
+ to_update.append(filename)
+ else:
+ to_remove.append(filename)
+ for filename in server_versions:
+ if not my_versions.has_key(filename):
+ to_update.append(filename)
+ if not (to_update or to_remove):
+ smsg(type, source, 'Neutron is already completely up to date. Finished')
+ return
+ for filename in to_remove:
+ smsg(type, source, 'Removing: ' + filename)
+ os.remove(filename)
+ del my_versions[filename]
+ for filename in to_update:
+ smsg(type, source, 'Updating: ' + filename)
+ new_file_data = update_download(filename)
+ if new_file_data == 'None':
+ smsg(type, source, 'Error Updating: ' + filename)
+ continue
+ update_fp = file(filename, 'wb')
+ update_fp.write(new_file_data)
+ update_fp.close()
+ my_versions[filename] = server_versions[filename]
+ write_file(VERSIONS_FILE, str(my_versions))
+ smsg(type, source, 'Neutron is now completely up to date. Finished')
+
+register_command_handler(handler_update_update, '!update', 100, 'Updates Neutron from Internet.', '!update', ['!update'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/russian/plugins/quiz_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,139 @@
+#$ neutron_plugin 01
+
+QUIZ_FILE = 'static/quizdata.txt'
+QUIZ_TOTAL_LINES = 16197
+QUIZ_TIME_LIMIT = 60
+QUIZ_IDLE_LIMIT = 5
+
+QUIZ_RECURSIVE_MAX = 20
+QUIZ_SCORES = {}
+QUIZ_CURRENT_ANSWER = {}
+QUIZ_CURRENT_HINT = {}
+QUIZ_CURRENT_TIME = {}
+QUIZ_IDLENESS = {}
+
+def quiz_timer(groupchat, start_time):
+ time.sleep(QUIZ_TIME_LIMIT)
+ if QUIZ_CURRENT_TIME.has_key(groupchat) and QUIZ_CURRENT_ANSWER.has_key(groupchat) and start_time == QUIZ_CURRENT_TIME[groupchat]:
+ QUIZ_CURRENT_ANSWER[groupchat]
+ msg(groupchat, '[QUIZ] Time is up! ' + str(QUIZ_TIME_LIMIT) + ' seconds have elapsed. The correct answer was: ' + QUIZ_CURRENT_ANSWER[groupchat])
+ if QUIZ_IDLENESS.has_key(groupchat):
+ QUIZ_IDLENESS[groupchat] += 1
+ else:
+ QUIZ_IDLENESS[groupchat] = 1
+ if QUIZ_IDLENESS[groupchat] >= QUIZ_IDLE_LIMIT:
+ msg(groupchat, '[QUIZ] Quiz has automatically ended due to inactivity for ' + str(QUIZ_IDLE_LIMIT) + ' questions. Please type !quiz_start to restart the quiz.')
+ del QUIZ_CURRENT_ANSWER[groupchat]
+ quiz_list_scores(groupchat)
+ else:
+ quiz_ask_question(groupchat)
+
+def quiz_new_question():
+ line_num = random.randrange(16197)
+ fp = file(QUIZ_FILE)
+ for n in range(line_num + 1):
+ if n == line_num:
+ try:
+ (question, answer) = string.split(fp.readline().strip(), '|', 1)
+ return (unicode(question), unicode(answer))
+ except:
+ QUIZ_RECURSIVE_MAX -= 1
+ if QUIZ_RECURSIVE_MAX:
+ return quiz_new_question()
+ else:
+ QUIZ_RECURSIVE_MAX = 20
+ return ('Parsing Error: Line ' + str(n), '')
+ else:
+ fp.readline()
+
+def quiz_ask_question(groupchat):
+ (question, answer) = quiz_new_question()
+ QUIZ_CURRENT_ANSWER[groupchat] = answer
+ QUIZ_CURRENT_HINT[groupchat] = None
+ QUIZ_CURRENT_TIME[groupchat] = time.time()
+ thread.start_new(quiz_timer, (groupchat, QUIZ_CURRENT_TIME[groupchat]))
+ msg(groupchat, '[QUIZ] New Question: ' + question)
+
+def quiz_answer_question(groupchat, nick, answer):
+ if QUIZ_CURRENT_ANSWER.has_key(groupchat):
+ if QUIZ_CURRENT_ANSWER[groupchat] == answer:
+ if QUIZ_IDLENESS.has_key(groupchat):
+ del QUIZ_IDLENESS[groupchat]
+ answer_time = int(time.time() - QUIZ_CURRENT_TIME[groupchat])
+ points = QUIZ_TIME_LIMIT / answer_time / 3 + 1
+ msg(groupchat, '[QUIZ] ' + nick + ' was correct for +' + str(points) + ' points! The answer was: ' + answer)
+ if not QUIZ_SCORES.has_key(groupchat):
+ QUIZ_SCORES[groupchat] = {}
+ if QUIZ_SCORES[groupchat].has_key(nick):
+ QUIZ_SCORES[groupchat][nick] += points
+ else:
+ QUIZ_SCORES[groupchat][nick] = points
+ quiz_list_scores(groupchat)
+ quiz_ask_question(groupchat)
+
+def quiz_list_scores(groupchat):
+ if QUIZ_SCORES.has_key(groupchat):
+ if QUIZ_SCORES[groupchat]:
+ if QUIZ_IDLENESS.has_key(groupchat):
+ del QUIZ_IDLENESS[groupchat]
+ result = '[QUIZ] Current Scores'
+ for nick in QUIZ_SCORES[groupchat]:
+ result += '\n' + nick + ': ' + str(QUIZ_SCORES[groupchat][nick])
+ msg(groupchat, result)
+
+def handler_quiz_start(type, source, parameters):
+ groupchat = get_groupchat(source)
+ if not groupchat:
+ smsg(type, source, 'Not in groupchat.')
+ return
+ if QUIZ_CURRENT_ANSWER.has_key(groupchat):
+ smsg(type, source, 'Quiz already exists.')
+ return
+ QUIZ_SCORES[groupchat] = {}
+ if QUIZ_IDLENESS.has_key(groupchat):
+ del QUIZ_IDLENESS[groupchat]
+ msg(groupchat, '[QUIZ] Quiz has begun. Scores reset.')
+ quiz_ask_question(groupchat)
+
+def handler_quiz_stop(type, source, parameters):
+ groupchat = get_groupchat(source)
+ if QUIZ_CURRENT_ANSWER.has_key(groupchat):
+ del QUIZ_CURRENT_ANSWER[groupchat]
+ msg(groupchat, '[QUIZ] Quiz has ended.')
+ quiz_list_scores(groupchat)
+ else:
+ smsg(type, source, 'No quiz to stop.')
+
+def handler_quiz_hint(type, source, parameters):
+ groupchat = get_groupchat(source)
+ if QUIZ_CURRENT_ANSWER.has_key(groupchat):
+ if QUIZ_IDLENESS.has_key(groupchat):
+ del QUIZ_IDLENESS[groupchat]
+ if QUIZ_CURRENT_HINT[groupchat] == None:
+ QUIZ_CURRENT_HINT[groupchat] = 0
+ #msg(groupchat, '[QUIZ] Answer has ' + str(len(QUIZ_CURRENT_ANSWER[groupchat])) + ' letters.')
+ QUIZ_CURRENT_HINT[groupchat] += 1
+ hint = QUIZ_CURRENT_ANSWER[groupchat][0:QUIZ_CURRENT_HINT[groupchat]]
+ hint += '...'
+ #hint += ' _' * (len(QUIZ_CURRENT_ANSWER[groupchat]) - QUIZ_CURRENT_HINT[groupchat])
+ msg(groupchat, '[QUIZ] Hint: ' + hint)
+ else:
+ smsg(type, source, 'No quiz exists.')
+
+def handler_quiz_scores(type, source, parameters):
+ groupchat = get_groupchat(source)
+ if QUIZ_CURRENT_ANSWER.has_key(groupchat):
+ quiz_list_scores(groupchat)
+ else:
+ smsg(type, source, 'No quiz exists.')
+
+def handler_quiz_message(type, source, body):
+ groupchat = get_groupchat(source)
+ if groupchat and QUIZ_CURRENT_ANSWER.has_key(groupchat):
+ quiz_answer_question(source[1], source[2], body.strip())
+
+register_command_handler(handler_quiz_start, '!quiz_start', 0, 'Starts a quiz in the groupchat.', '!quiz_start', ['!quiz_start'])
+register_command_handler(handler_quiz_stop, '!quiz_stop', 0, 'Stops a quiz in the groupchat.', '!quiz_stop', ['!quiz_stop'])
+register_command_handler(handler_quiz_hint, '!hint', 0, 'Asks for a hint on the current quiz question.', '!hint', ['!hint'])
+register_command_handler(handler_quiz_scores, '!quiz_scores', 0, 'Request scores for current quiz.', '!quiz_scores', ['!quiz_scores'])
+register_message_handler(handler_quiz_message)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/spanish/plugins/saluda_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,38 @@
+#$ neutron_plugin 01
+
+# Neutron plugin; spanish localized
+# Author: Badlop
+# Last Revision: 18 sept 2004
+
+import codecs
+
+SALUDOS_FILE = 'static/saludos.txt'
+SALUDOS2_FILE = 'static/saludos2.txt'
+
+def handler_quote_quote(type, source, parameters):
+ reply = random.choice(codecs.open(SALUDOS_FILE, 'r', 'latin1').readlines()).strip()
+ #smsg(type, source, reply)
+ msg(source[1], reply)
+
+def handler_quote_quote2(type, source, parameters):
+ reply = random.choice(codecs.open(SALUDOS2_FILE, 'r', 'utf-8').readlines()).strip()
+ #smsg(type, source, reply)
+ msg(source[1], reply)
+
+def handler_quote_gracias(type, source, parameters):
+ smsg(type, source, 'de nada')
+
+register_command_handler(handler_quote_gracias, 'gracias', 0, '', '', [''])
+
+register_command_handler(handler_quote_quote, 'Hola', 0, 'Saluda', 'hola', ['hola'])
+register_command_handler(handler_quote_quote, 'hola', 0, 'Saluda', 'hola', ['hola'])
+register_command_handler(handler_quote_quote, 're', 0, 'Saluda', 'hola', ['hola'])
+register_command_handler(handler_quote_quote, 'Buenas', 0, 'Saluda', 'hola', ['hola'])
+register_command_handler(handler_quote_quote, 'buenas', 0, 'Saluda', 'hola', ['hola'])
+register_command_handler(handler_quote_quote, 'nas', 0, 'Saluda', 'hola', ['hola'])
+
+register_command_handler(handler_quote_quote2, 'Adios', 0, 'Despide', 'Adios', ['Adios'])
+register_command_handler(handler_quote_quote2, 'deu', 0, 'Despide', 'Adios', ['Adios'])
+register_command_handler(handler_quote_quote2, 'talue', 0, 'Despide', 'Adios', ['Adios'])
+register_command_handler(handler_quote_quote2, 'taluego', 0, 'Despide', 'Adios', ['Adios'])
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/spanish/static/saludos.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,30 @@
+¡Hola!
+¡Hola!
+¡Hola!
+hola!
+hola!
+hola!
+¡Buenas!
+¡Buenas!
+¡Buenas!
+enas
+enas
+enas
+nas!
+nas!
+nas!
+rehola
+rehola
+rehola
+epa
+epa
+yepa
+yepa
+aupa
+aupa
+kaixo
+kaixo
+Bienvenido a este, nuestro lugar de encuentro, espero que tu estancia aquí sea gratificante.
+Buenos dias. Perdone la intromisión, pero ¿tengo el gusto de conocerle? Es que su cara me resulta familiar.
+¿Ahora vienes, cobarde? Ayer te estube esperando tooooda la noche.
+Ya esta aquí, por fin entró, el humano más pesado que jamás conocí.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/spanish/static/saludos2.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,27 @@
+Hasta luego
+Hasta luego
+Hasta luego
+¡Adios!
+¡Adios!
+¡Adios!
+Taluego
+Taluego
+Taluego
+ale pues
+ale pues
+ale pues
+Nos vemos
+Nos vemos
+Nos vemos
+Hasta otra
+Hasta otra
+Hasta otra
+Que lo pases bien ahà fuera
+Que no te coma el lobo
+Con viento fresco
+No te echaré de menos
+Nadie notará tu ausencia
+¿Y a mi qué?
+¿Ya te vas?
+¿No te quedas un rato más a hacerme compañÃa?
+Are you really sure you want to exit to DOS?
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/usa/plugins/fact-usa_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,47 @@
+#$ neutron_plugin 01
+
+AREACODE_FILE = 'static/areacodes.txt'
+ZIPCODE_FILE = 'static/zipcodes.txt'
+
+def fact_areacode(query):
+ try:
+ int(query)
+ except:
+ return 'Invalid'
+ fp = open(AREACODE_FILE, 'r')
+ while 1:
+ line = fp.readline()
+ if not line:
+ return 'Not Found'
+ elif query == line[:3]:
+ return line[4:].strip()
+ elif int(query) < int(line[:3]):
+ return 'Not Found'
+
+def fact_zipcode(query):
+ try:
+ int(query)
+ except:
+ return 'Invalid'
+ fp = open(ZIPCODE_FILE, 'r')
+ while 1:
+ line = fp.readline()
+ if not line:
+ return 'Not Found'
+ code, region, city, state = string.split(line, '\t', 3)
+ if query == code:
+ return region + ', ' + city + ', ' + state.strip()
+ elif int(query) < int(code):
+ return 'Not Found'
+
+def handler_fact_areacode(type, source, parameters):
+ result = fact_areacode(parameters.strip())
+ smsg(type, source, result)
+
+def handler_fact_zipcode(type, source, parameters):
+ result = fact_zipcode(parameters.strip())
+ smsg(type, source, result)
+
+register_command_handler(handler_fact_areacode, '!areacode', 0, 'Returns the location of a U.S. area code.', '!areacode <###>', ['!areacode 800'])
+
+register_command_handler(handler_fact_zipcode, '!zipcode', 0, 'Returns the location of a U.S. zipcode.', '!zipcode <#####>', ['!zipcode 12345'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/localized/usa/static/areacodes.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,181 @@
+011 the International Access Code
+201 Hackensack, Morristown and Newark, New Jersey
+202 Washington, District of Columbia
+203 Bridgeport, New Haven and Stamford, Connecticut
+204 all regions, Manitoba, CANADA
+205 Birmingham and Huntsville, Alabama
+206 Seattle and Tacoma, Washington
+207 all regions, Maine
+208 all regions, Idaho
+209 Fresno and Stockton, California
+210 San Antonio, Texas
+212 New York City (Manhattan only), New York
+213 Los Angeles, California
+214 Dallas, Texas
+215 Philadelphia and Quakertown, Pennsylvania
+216 Cleveland, Ohio
+217 Springfield and central Illinois
+218 Duluth, Minnesota
+219 Gary, Hammond, Michigan City and South Bend, Indiana
+242 as of 10-1996, Bahamas
+250 as of 10-1996, outside of Vancouver area, British Columbia, CANADA
+281 an overlay on 713 area, Texas
+301 Silver Spring and Frederick, Maryland
+302 all regions, Delaware
+303 Denver, Colorado
+304 all regions, West Virginia
+305 Key West and Miami, Florida
+306 all regions, Saskatchewan, CANADA
+307 all regions, Wyoming
+308 North Platte and Scottsbluff, Nebraska
+309 Bloomington, Normal and Peoria, Illinois
+310 Beverly Hills, California
+312 Chicago, Illinois (as of 10-1996, just downtown Chicago)
+313 Detroit and Ann Arbor, Michigan
+314 Saint Louis, Missouri
+315 Syracuse and Utica, New York
+316 Coffeyville, Dodge City and Wichita, Kansas
+317 Indianapolis and Kokomo, Indiana
+318 Lake Charles and Shreveport, Louisiana
+319 Dubuque, Iowa
+320 as of 3-1996, St. Cloud, Minnesota
+330 as of 3-1996, Akron, Massillon and Youngstown, Ohio
+334 Mobile and Montgomery, Alabama
+352 Gainesville and Ocala, Florida
+360 Bellingham, Olympia and Vancouver, Washington
+401 all regions, Rhode Island
+402 Lincoln and Omaha, Nebraska
+403 Alberta, Yukon Territory and (Western) Northwest Territories, CANADA
+404 Atlanta, Georgia
+405 Oklahoma City, Oklahoma
+406 all regions, Montana
+407 Orlando, Florida
+408 San Jose and Sunnyvale, California
+409 Galveston, Texas
+410 Baltimore and Annapolis, Maryland
+411 the code used for local Directory Assistance in many areas
+412 Pittsburgh, Indiana and Rochester, Pennsylvania
+413 Springfield, Massachusetts
+414 Green Bay, Milwaukee and Racine, Wisconsin
+415 San Francisco, California
+416 Toronto, Ontario, CANADA
+417 Joplin and Springfield, Missouri
+418 Quebec, Quebec, CANADA
+419 Toledo, Ohio
+423 Chattanooga, Knoxville and Kingsport, Tennessee
+441 Bermuda
+456 used for premium-rate calling (only used outside of +1)
+500 used for Personal Number Service/AT&T, other carriers
+501 all regions, Arkansas
+502 Louisville, Paducah and Shelbyville, Kentucky
+503 Portland, Oregon
+504 Baton Rouge and New Orleans, Louisiana
+505 all regions, New Mexico
+506 all regions, New Brunswick, CANADA
+507 Albert Lea and Rochester, Minnesota
+508 Framingham and New Bedford, Massachusetts
+509 Pullman, Spokane and Walla Walla, Washington
+510 Oakland, California
+512 Austin and Corpus Christi, Texas
+513 Cincinnati and Dayton, Ohio
+514 Montreal, CANADA
+515 Des Moines and Mason City, Iowa
+516 Hempstead, New York
+517 Lansing and Saginaw, Michigan
+518 Albany, Greenwich and Schenectady, New York
+519 London, Ontario, CANADA
+520 Flagstaff and Tucson, Arizona
+540 Fredericksburg, Roanoke and Winchester, Virginia
+541 Eugene, Oregon
+561 to be used at a future time for West Palm Beach, Florida
+562 as of 2-1997, Long Beach, California
+573 Cape Girardeau and Jefferson City, Missouri
+601 all regions, Mississippi
+602 Phoenix, Arizona
+603 all regions, New Hampshire
+604 Vancouver, British Columbia, CANADA
+605 all regions, South Dakota
+606 Ashland and Winchester, Kentucky
+607 Elmira, Ithaca and Stamford, New York
+608 Beloit and Madison, Wisconsin
+609 Atlantic City, Camden and Trenton, New Jersey
+610 Allentown, Reading and Chester, Pennsylvania
+611 the code used for telephone repair service in many areas
+612 Minneapolis and Saint Paul, Minnesota
+613 Ottawa, Ontario, CANADA
+614 Columbus, Marietta and Newark, Ohio
+615 Nashville, Tennessee
+616 Battle Creek, Cadillac and Grand Rapids, Michigan
+617 Boston, Massachusetts
+618 Alton, Mount Vernon and Centralia, Illinois
+619 San Diego, California
+626 as of 1997(?), an overlay or split of 818 in California
+630 as of 8-1996, Aurora, Oak Park (west suburbs of Chicago), Illinois
+700 used for Value Added Special Services, per individual carrier
+701 all regions, North Dakota
+702 all regions, Nevada
+703 Arlington and Manassas, Virginia
+704 Charlotte and Salisbury, North Carolina
+705 Central Ontario, Canada
+706 Augusta, Columbus and Rome, Georgia
+707 Eureka, Napa and Santa Rosa, California
+708 as of 8-1996, Calumet City, Harvey (south suburbs of Chicago), Illinois
+709 all regions, Newfoundland and Labrador, CANADA
+710 Federal Government Special Services
+712 Council Bluffs, Iowa
+713 Houston, Texas
+714 Orange and Anaheim, California
+715 Eau Claire and Wausau, Wisconsin
+716 Buffalo, Niagara Falls and Rochester, New York
+717 Harrisburg, Scranton and Wilkes-Barre, Pennsylvania
+718 New York City (Bronx, Brooklyn, Queens, Staten Island), New York
+719 Colorado Springs, Colorado
+760 as of 3-1997, Palm Springs and the Imperial Valley, California
+770 Marietta, Georgia
+773 as of 10-1996, Chicago, Illinois (except downtown area is 312)
+800 used for In-WATS Toll Free Calling
+801 all regions, Utah
+802 all regions, Vermont
+803 Charleston, Columbia and Florence, South Carolina
+804 Charlottesville, Norfolk and Richmond, Virginia
+805 Bakersfield, Ventura and Simi Valley, California
+806 Amarillo, Texas
+807 Northwestern Ontario, Canada
+808 all regions, Hawaii
+809 Puerto Rico, the Virgin Islands, etc.
+810 Flint and Pontiac, Michigan
+812 Evansville, Indiana
+813 Clearwater, St. Petersburg and Tampa, Florida
+814 Altoona, Erie and Punxsutawney, Pennsylvania
+815 La Salle, Joliet and Rockford, Illinois
+816 Kansas City and Saint Joseph, Missouri
+817 Fort Worth, Temple and Waco, Texas
+818 the suburban area north of Los Angeles, California
+819 Hull and Sherbrooke, (Western) Quebec and (Eastern) NW Territories, CANADA
+847 Evanston, Glenview, Skokie, Waukegan, (north suburbs of Chicago), Illinois
+860 Hartford, Connecticut
+864 Greenville and Spartanburg, South Carolina
+900 used for Mass Calling Value Added Information Services
+901 Memphis, Tennessee
+902 all regions, Prince Edward Island and Nova Scotia, CANADA
+903 Tyler and Texarkana, Texas
+904 Jacksonville and Pensacola, Florida
+905 Southern Ontario, Canada (excluding Toronto)
+906 Sault Ste. Marie, Michigan
+907 all regions, Alaska
+908 Elizabeth and New Brunswick, New Jersey
+909 Riverside and San Bernardino, California
+910 Winston-Salem, Greensboro and Fayetteville, North Carolina
+911 the code used for Police/Fire emergencies in most areas
+912 Waycross and Savannah, Georgia
+913 Ottawa and Topeka, Kansas
+914 Monroe, Mount Vernon and Poughkeepsie, New York
+915 El Paso, Texas
+916 Sacramento and South Tahoe, California
+917 New York City (cellular/pager only overlaid on 212/718), New York
+918 Muskogee and Tulsa, Oklahoma
+919 Greenville, Raleigh and Williamston, North Carolina
+941 Avon Park, Fort Myers and Winter Haven, Florida
+954 Fort Lauderdale, Florida
+970 Fort Collins, Grand Junction and Vail, Colorado
+972 an overlay on 214 area, Texas
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/DICT.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,114 @@
+
+import socket, string, sys
+
+def split_and_remove_quotes(str):
+ pos = string.find(str, " ")
+ return (str[ : pos], str[pos + 2 : -1])
+
+class DictError(Exception):
+
+ def __init__(self, msg, code):
+ self._code = code
+
+ def get_code(self):
+ return self._code
+
+class DictConnection:
+
+ def __init__(self, server, port = 2628, identify = 1):
+ self._server = server
+ self._port = port
+ self._conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self._conn.connect((socket.gethostbyname(self._server),
+ self._port))
+ self._conn.recv(1024) # eat welcome message
+
+# if identify:
+# self._send("CLIENT dict.py/0.00", 1)
+
+ def get_databases(self):
+ return map(split_and_remove_quotes,
+ self._interpret_multiline(self._send("SHOW DATABASES")))
+
+ def get_strategies(self):
+ return map(split_and_remove_quotes,
+ self._interpret_multiline(self._send("SHOW STRAT")))
+
+ def get_database_info(self, db):
+ return self._interpret_multiline(self._send("SHOW INFO %s" % db))
+
+ def get_server_info(self):
+ return self._interpret_multiline(self._send("SHOW SERVER"), "\r\n")
+
+ def get_definition(self, word, db = "*"):
+ try:
+ return self._interpret_multiresp(self._send("DEFINE %s %s" %
+ (db, word),
+ "\r\n.\r\n250"))
+ except DictError, e:
+ if e.get_code() == 552:
+ return []
+
+ raise
+
+ def get_words(self, search, db = "*", strategy = "prefix"):
+ try:
+ return map(split_and_remove_quotes,
+ self._interpret_multiline(self._send("MATCH %s %s %s" %
+ (db, strategy, search))))
+ except DictError, e:
+ if e.get_code() == 552:
+ return []
+
+ raise
+
+ def _send(self, cmd, resp_term = "\r\n.\r\n"):
+ self._conn.send(cmd + "\r\n")
+ self._verify(self._conn.recv(1024 * 16))
+ return self._receive_response(resp_term)
+
+ def _verify(self, resp):
+ if resp[0] < "1" or resp[0] > "3":
+ raise DictError(resp[4 : ], int(resp[ : 3]))
+
+ def _interpret_multiline(self, resp):
+ lines = string.split(resp, "\r\n")
+ return lines[ : lines.index(".")]
+
+ def _interpret_multiresp(self, resp):
+ resps = []
+ lines = []
+ for line in string.split(resp, "\r\n"):
+ if line == ".":
+ resps.append(lines)
+ lines = []
+ else:
+ lines.append(line)
+
+ return resps
+
+ def _receive_response(self, look_for):
+ resp = self._conn.recv(1024 * 16)
+ while string.find(resp, look_for) == -1:
+ resp = resp + self._conn.recv(1024 * 16)
+
+ return resp
+
+# ---
+
+if __name__ == "__main__":
+ from pprint import pprint
+
+ if len(sys.argv) > 1:
+ word = sys.argv[1]
+ else:
+ word = raw_input('Word: ')
+
+ dict = DictConnection("dict.org")
+
+ #pprint(dict.get_server_info())
+ #pprint(dict.get_database_info(word))
+ #pprint(dict.get_databases())
+ #pprint(dict.get_strategies())
+ pprint(dict.get_definition(word))
+ #pprint(dict.get_words(word))
Binary file modules/DICT.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/SOAP.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,3972 @@
+#!/usr/bin/python
+################################################################################
+#
+# SOAP.py 0.9.7 - Cayce Ullman (cayce@actzero.com)
+# Brian Matthews (blm@actzero.com)
+#
+# INCLUDED:
+# - General SOAP Parser based on sax.xml (requires Python 2.0)
+# - General SOAP Builder
+# - SOAP Proxy for RPC client code
+# - SOAP Server framework for RPC server code
+#
+# FEATURES:
+# - Handles all of the types in the BDG
+# - Handles faults
+# - Allows namespace specification
+# - Allows SOAPAction specification
+# - Homogeneous typed arrays
+# - Supports multiple schemas
+# - Header support (mustUnderstand and actor)
+# - XML attribute support
+# - Multi-referencing support (Parser/Builder)
+# - Understands SOAP-ENC:root attribute
+# - Good interop, passes all client tests for Frontier, SOAP::LITE, SOAPRMI
+# - Encodings
+# - SSL clients (with OpenSSL configured in to Python)
+# - SSL servers (with OpenSSL configured in to Python and M2Crypto installed)
+#
+# TODO:
+# - Timeout on method calls - MCU
+# - Arrays (sparse, multidimensional and partial) - BLM
+# - Clean up data types - BLM
+# - Type coercion system (Builder) - MCU
+# - Early WSDL Support - MCU
+# - Attachments - BLM
+# - setup.py - MCU
+# - mod_python example - MCU
+# - medusa example - MCU
+# - Documentation - JAG
+# - Look at performance
+#
+################################################################################
+#
+# Copyright (c) 2001, Cayce Ullman.
+# Copyright (c) 2001, Brian Matthews.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# Neither the name of actzero, inc. nor the names of its contributors may
+# be used to endorse or promote products derived from this software without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+################################################################################
+#
+# Additional changes:
+# 0.9.7.3 - 4/18/2002 - Mark Pilgrim (f8dy@diveintomark.org)
+# added dump_dict as alias for dump_dictionary for Python 2.2 compatibility
+# 0.9.7.2 - 4/12/2002 - Mark Pilgrim (f8dy@diveintomark.org)
+# fixed logic to unmarshal the value of "null" attributes ("true" or "1"
+# means true, others false)
+# 0.9.7.1 - 4/11/2002 - Mark Pilgrim (f8dy@diveintomark.org)
+# added "dump_str" as alias for "dump_string" for Python 2.2 compatibility
+# Between 2.1 and 2.2, type("").__name__ changed from "string" to "str"
+################################################################################
+
+import xml.sax
+import UserList
+import base64
+import cgi
+import urllib
+import exceptions
+import copy
+import re
+import socket
+import string
+import sys
+import time
+import SocketServer
+from types import *
+
+try: from M2Crypto import SSL
+except: pass
+
+ident = '$Id: SOAP.py,v 1.1.1.1 2005/09/29 21:38:51 mikem Exp $'
+
+__version__ = "0.9.7.3"
+
+# Platform hackery
+
+# Check float support
+try:
+ float("NaN")
+ float("INF")
+ float("-INF")
+ good_float = 1
+except:
+ good_float = 0
+
+################################################################################
+# Exceptions
+################################################################################
+class Error(exceptions.Exception):
+ def __init__(self, msg):
+ self.msg = msg
+ def __str__(self):
+ return "<Error : %s>" % self.msg
+ __repr__ = __str__
+
+class RecursionError(Error):
+ pass
+
+class UnknownTypeError(Error):
+ pass
+
+class HTTPError(Error):
+ # indicates an HTTP protocol error
+ def __init__(self, code, msg):
+ self.code = code
+ self.msg = msg
+ def __str__(self):
+ return "<HTTPError %s %s>" % (self.code, self.msg)
+ __repr__ = __str__
+
+##############################################################################
+# Namespace Class
+################################################################################
+def invertDict(dict):
+ d = {}
+
+ for k, v in dict.items():
+ d[v] = k
+
+ return d
+
+class NS:
+ XML = "http://www.w3.org/XML/1998/namespace"
+
+ ENV = "http://schemas.xmlsoap.org/soap/envelope/"
+ ENC = "http://schemas.xmlsoap.org/soap/encoding/"
+
+ XSD = "http://www.w3.org/1999/XMLSchema"
+ XSD2 = "http://www.w3.org/2000/10/XMLSchema"
+ XSD3 = "http://www.w3.org/2001/XMLSchema"
+
+ XSD_L = [XSD, XSD2, XSD3]
+ EXSD_L= [ENC, XSD, XSD2, XSD3]
+
+ XSI = "http://www.w3.org/1999/XMLSchema-instance"
+ XSI2 = "http://www.w3.org/2000/10/XMLSchema-instance"
+ XSI3 = "http://www.w3.org/2001/XMLSchema-instance"
+ XSI_L = [XSI, XSI2, XSI3]
+
+ URN = "http://soapinterop.org/xsd"
+
+ # For generated messages
+ XML_T = "xml"
+ ENV_T = "SOAP-ENV"
+ ENC_T = "SOAP-ENC"
+ XSD_T = "xsd"
+ XSD2_T= "xsd2"
+ XSD3_T= "xsd3"
+ XSI_T = "xsi"
+ XSI2_T= "xsi2"
+ XSI3_T= "xsi3"
+ URN_T = "urn"
+
+ NSMAP = {ENV_T: ENV, ENC_T: ENC, XSD_T: XSD, XSD2_T: XSD2,
+ XSD3_T: XSD3, XSI_T: XSI, XSI2_T: XSI2, XSI3_T: XSI3,
+ URN_T: URN}
+ NSMAP_R = invertDict(NSMAP)
+
+ STMAP = {'1999': (XSD_T, XSI_T), '2000': (XSD2_T, XSI2_T),
+ '2001': (XSD3_T, XSI3_T)}
+ STMAP_R = invertDict(STMAP)
+
+ def __init__(self):
+ raise Error, "Don't instantiate this"
+
+################################################################################
+# Configuration class
+################################################################################
+
+class SOAPConfig:
+ __readonly = ('SSLserver', 'SSLclient')
+
+ def __init__(self, config = None, **kw):
+ d = self.__dict__
+
+ if config:
+ if not isinstance(config, SOAPConfig):
+ raise AttributeError, \
+ "initializer must be SOAPConfig instance"
+
+ s = config.__dict__
+
+ for k, v in s.items():
+ if k[0] != '_':
+ d[k] = v
+ else:
+ # Setting debug also sets returnFaultInfo, dumpFaultInfo,
+ # dumpHeadersIn, dumpHeadersOut, dumpSOAPIn, and dumpSOAPOut
+ self.debug = 0
+ # Setting namespaceStyle sets typesNamespace, typesNamespaceURI,
+ # schemaNamespace, and schemaNamespaceURI
+ self.namespaceStyle = '1999'
+ self.strictNamespaces = 0
+ self.typed = 1
+ self.buildWithNamespacePrefix = 1
+ self.returnAllAttrs = 0
+
+ try: SSL; d['SSLserver'] = 1
+ except: d['SSLserver'] = 0
+
+ try: socket.ssl; d['SSLclient'] = 1
+ except: d['SSLclient'] = 0
+
+ for k, v in kw.items():
+ if k[0] != '_':
+ setattr(self, k, v)
+
+ def __setattr__(self, name, value):
+ if name in self.__readonly:
+ raise AttributeError, "readonly configuration setting"
+
+ d = self.__dict__
+
+ if name in ('typesNamespace', 'typesNamespaceURI',
+ 'schemaNamespace', 'schemaNamespaceURI'):
+
+ if name[-3:] == 'URI':
+ base, uri = name[:-3], 1
+ else:
+ base, uri = name, 0
+
+ if type(value) == StringType:
+ if NS.NSMAP.has_key(value):
+ n = (value, NS.NSMAP[value])
+ elif NS.NSMAP_R.has_key(value):
+ n = (NS.NSMAP_R[value], value)
+ else:
+ raise AttributeError, "unknown namespace"
+ elif type(value) in (ListType, TupleType):
+ if uri:
+ n = (value[1], value[0])
+ else:
+ n = (value[0], value[1])
+ else:
+ raise AttributeError, "unknown namespace type"
+
+ d[base], d[base + 'URI'] = n
+
+ try:
+ d['namespaceStyle'] = \
+ NS.STMAP_R[(d['typesNamespace'], d['schemaNamespace'])]
+ except:
+ d['namespaceStyle'] = ''
+
+ elif name == 'namespaceStyle':
+ value = str(value)
+
+ if not NS.STMAP.has_key(value):
+ raise AttributeError, "unknown namespace style"
+
+ d[name] = value
+ n = d['typesNamespace'] = NS.STMAP[value][0]
+ d['typesNamespaceURI'] = NS.NSMAP[n]
+ n = d['schemaNamespace'] = NS.STMAP[value][1]
+ d['schemaNamespaceURI'] = NS.NSMAP[n]
+
+ elif name == 'debug':
+ d[name] = \
+ d['returnFaultInfo'] = \
+ d['dumpFaultInfo'] = \
+ d['dumpHeadersIn'] = \
+ d['dumpHeadersOut'] = \
+ d['dumpSOAPIn'] = \
+ d['dumpSOAPOut'] = value
+
+ else:
+ d[name] = value
+
+Config = SOAPConfig()
+
+################################################################################
+# Types and Wrappers
+################################################################################
+
+class anyType:
+ _validURIs = (NS.XSD, NS.XSD2, NS.XSD3, NS.ENC)
+
+ def __init__(self, data = None, name = None, typed = 1, attrs = None):
+ if self.__class__ == anyType:
+ raise Error, "anyType can't be instantiated directly"
+
+ if type(name) in (ListType, TupleType):
+ self._ns, self._name = name
+ else:
+ self._ns, self._name = self._validURIs[0], name
+ self._typed = typed
+ self._attrs = {}
+
+ self._cache = None
+ self._type = self._typeName()
+
+ self._data = self._checkValueSpace(data)
+
+ if attrs != None:
+ self._setAttrs(attrs)
+
+ def __str__(self):
+ if self._name:
+ return "<%s %s at %d>" % (self.__class__, self._name, id(self))
+ return "<%s at %d>" % (self.__class__, id(self))
+
+ __repr__ = __str__
+
+ def _checkValueSpace(self, data):
+ return data
+
+ def _marshalData(self):
+ return str(self._data)
+
+ def _marshalAttrs(self, ns_map, builder):
+ a = ''
+
+ for attr, value in self._attrs.items():
+ ns, n = builder.genns(ns_map, attr[0])
+ a += n + ' %s%s="%s"' % \
+ (ns, attr[1], cgi.escape(str(value), 1))
+
+ return a
+
+ def _fixAttr(self, attr):
+ if type(attr) in (StringType, UnicodeType):
+ attr = (None, attr)
+ elif type(attr) == ListType:
+ attr = tuple(attr)
+ elif type(attr) != TupleType:
+ raise AttributeError, "invalid attribute type"
+
+ if len(attr) != 2:
+ raise AttributeError, "invalid attribute length"
+
+ if type(attr[0]) not in (NoneType, StringType, UnicodeType):
+ raise AttributeError, "invalid attribute namespace URI type"
+
+ return attr
+
+ def _getAttr(self, attr):
+ attr = self._fixAttr(attr)
+
+ try:
+ return self._attrs[attr]
+ except:
+ return None
+
+ def _setAttr(self, attr, value):
+ attr = self._fixAttr(attr)
+
+ self._attrs[attr] = str(value)
+
+ def _setAttrs(self, attrs):
+ if type(attrs) in (ListType, TupleType):
+ for i in range(0, len(attrs), 2):
+ self._setAttr(attrs[i], attrs[i + 1])
+
+ return
+
+ if type(attrs) == DictType:
+ d = attrs
+ elif isinstance(attrs, anyType):
+ d = attrs._attrs
+ else:
+ raise AttributeError, "invalid attribute type"
+
+ for attr, value in d.items():
+ self._setAttr(attr, value)
+
+ def _setMustUnderstand(self, val):
+ self._setAttr((NS.ENV, "mustUnderstand"), val)
+
+ def _getMustUnderstand(self):
+ return self._getAttr((NS.ENV, "mustUnderstand"))
+
+ def _setActor(self, val):
+ self._setAttr((NS.ENV, "actor"), val)
+
+ def _getActor(self):
+ return self._getAttr((NS.ENV, "actor"))
+
+ def _typeName(self):
+ return self.__class__.__name__[:-4]
+
+ def _validNamespaceURI(self, URI, strict):
+ if not self._typed:
+ return None
+ if URI in self._validURIs:
+ return URI
+ if not strict:
+ return self._ns
+ raise AttributeError, \
+ "not a valid namespace for type %s" % self._type
+
+class voidType(anyType):
+ pass
+
+class stringType(anyType):
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (StringType, UnicodeType):
+ raise AttributeError, "invalid %s type" % self._type
+
+ return data
+
+class untypedType(stringType):
+ def __init__(self, data = None, name = None, attrs = None):
+ stringType.__init__(self, data, name, 0, attrs)
+
+class IDType(stringType): pass
+class NCNameType(stringType): pass
+class NameType(stringType): pass
+class ENTITYType(stringType): pass
+class IDREFType(stringType): pass
+class languageType(stringType): pass
+class NMTOKENType(stringType): pass
+class QNameType(stringType): pass
+
+class tokenType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3)
+ __invalidre = '[\n\t]|^ | $| '
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (StringType, UnicodeType):
+ raise AttributeError, "invalid %s type" % self._type
+
+ if type(self.__invalidre) == StringType:
+ self.__invalidre = re.compile(self.__invalidre)
+
+ if self.__invalidre.search(data):
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class normalizedStringType(anyType):
+ _validURIs = (NS.XSD3,)
+ __invalidre = '[\n\r\t]'
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (StringType, UnicodeType):
+ raise AttributeError, "invalid %s type" % self._type
+
+ if type(self.__invalidre) == StringType:
+ self.__invalidre = re.compile(self.__invalidre)
+
+ if self.__invalidre.search(data):
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class CDATAType(normalizedStringType):
+ _validURIs = (NS.XSD2,)
+
+class booleanType(anyType):
+ def __int__(self):
+ return self._data
+
+ __nonzero__ = __int__
+
+ def _marshalData(self):
+ return ['false', 'true'][self._data]
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if data in (0, '0', 'false', ''):
+ return 0
+ if data in (1, '1', 'true'):
+ return 1
+ raise ValueError, "invalid %s value" % self._type
+
+class decimalType(anyType):
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType, FloatType):
+ raise Error, "invalid %s value" % self._type
+
+ return data
+
+class floatType(anyType):
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType, FloatType) or \
+ data < -3.4028234663852886E+38 or \
+ data > 3.4028234663852886E+38:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+ def _marshalData(self):
+ return "%.18g" % self._data # More precision
+
+class doubleType(anyType):
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType, FloatType) or \
+ data < -1.7976931348623158E+308 or \
+ data > 1.7976931348623157E+308:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+ def _marshalData(self):
+ return "%.18g" % self._data # More precision
+
+class durationType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ try:
+ # A tuple or a scalar is OK, but make them into a list
+
+ if type(data) == TupleType:
+ data = list(data)
+ elif type(data) != ListType:
+ data = [data]
+
+ if len(data) > 6:
+ raise Exception, "too many values"
+
+ # Now check the types of all the components, and find
+ # the first nonzero element along the way.
+
+ f = -1
+
+ for i in range(len(data)):
+ if data[i] == None:
+ data[i] = 0
+ continue
+
+ if type(data[i]) not in \
+ (IntType, LongType, FloatType):
+ raise Exception, "element %d a bad type" % i
+
+ if data[i] and f == -1:
+ f = i
+
+ # If they're all 0, just use zero seconds.
+
+ if f == -1:
+ self._cache = 'PT0S'
+
+ return (0,) * 6
+
+ # Make sure only the last nonzero element has a decimal fraction
+ # and only the first element is negative.
+
+ d = -1
+
+ for i in range(f, len(data)):
+ if data[i]:
+ if d != -1:
+ raise Exception, \
+ "all except the last nonzero element must be " \
+ "integers"
+ if data[i] < 0 and i > f:
+ raise Exception, \
+ "only the first nonzero element can be negative"
+ elif data[i] != long(data[i]):
+ d = i
+
+ # Pad the list on the left if necessary.
+
+ if len(data) < 6:
+ n = 6 - len(data)
+ f += n
+ d += n
+ data = [0] * n + data
+
+ # Save index of the first nonzero element and the decimal
+ # element for _marshalData.
+
+ self.__firstnonzero = f
+ self.__decimal = d
+
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return tuple(data)
+
+ def _marshalData(self):
+ if self._cache == None:
+ d = self._data
+ t = 0
+
+ if d[self.__firstnonzero] < 0:
+ s = '-P'
+ else:
+ s = 'P'
+
+ t = 0
+
+ for i in range(self.__firstnonzero, len(d)):
+ if d[i]:
+ if i > 2 and not t:
+ s += 'T'
+ t = 1
+ if self.__decimal == i:
+ s += "%g" % abs(d[i])
+ else:
+ s += "%d" % long(abs(d[i]))
+ s += ['Y', 'M', 'D', 'H', 'M', 'S'][i]
+
+ self._cache = s
+
+ return self._cache
+
+class timeDurationType(durationType):
+ _validURIs = (NS.XSD, NS.XSD2, NS.ENC)
+
+class dateTimeType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.time()
+
+ if (type(data) in (IntType, LongType)):
+ data = list(time.gmtime(data)[:6])
+ elif (type(data) == FloatType):
+ f = data - int(data)
+ data = list(time.gmtime(int(data))[:6])
+ data[5] += f
+ elif type(data) in (ListType, TupleType):
+ if len(data) < 6:
+ raise Exception, "not enough values"
+ if len(data) > 9:
+ raise Exception, "too many values"
+
+ data = list(data[:6])
+
+ cleanDate(data)
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return tuple(data)
+
+ def _marshalData(self):
+ if self._cache == None:
+ d = self._data
+ s = "%04d-%02d-%02dT%02d:%02d:%02d" % ((abs(d[0]),) + d[1:])
+ if d[0] < 0:
+ s = '-' + s
+ f = d[5] - int(d[5])
+ if f != 0:
+ s += ("%g" % f)[1:]
+ s += 'Z'
+
+ self._cache = s
+
+ return self._cache
+
+class recurringInstantType(anyType):
+ _validURIs = (NS.XSD,)
+
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = list(time.gmtime(time.time())[:6])
+ if (type(data) in (IntType, LongType)):
+ data = list(time.gmtime(data)[:6])
+ elif (type(data) == FloatType):
+ f = data - int(data)
+ data = list(time.gmtime(int(data))[:6])
+ data[5] += f
+ elif type(data) in (ListType, TupleType):
+ if len(data) < 1:
+ raise Exception, "not enough values"
+ if len(data) > 9:
+ raise Exception, "too many values"
+
+ data = list(data[:6])
+
+ if len(data) < 6:
+ data += [0] * (6 - len(data))
+
+ f = len(data)
+
+ for i in range(f):
+ if data[i] == None:
+ if f < i:
+ raise Exception, \
+ "only leftmost elements can be none"
+ else:
+ f = i
+ break
+
+ cleanDate(data, f)
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return tuple(data)
+
+ def _marshalData(self):
+ if self._cache == None:
+ d = self._data
+ e = list(d)
+ neg = ''
+
+ if e[0] < 0:
+ neg = '-'
+ e[0] = abs(e[0])
+
+ if not e[0]:
+ e[0] = '--'
+ elif e[0] < 100:
+ e[0] = '-' + "%02d" % e[0]
+ else:
+ e[0] = "%04d" % e[0]
+
+ for i in range(1, len(e)):
+ if e[i] == None or (i < 3 and e[i] == 0):
+ e[i] = '-'
+ else:
+ if e[i] < 0:
+ neg = '-'
+ e[i] = abs(e[i])
+
+ e[i] = "%02d" % e[i]
+
+ if d[5]:
+ f = abs(d[5] - int(d[5]))
+
+ if f:
+ e[5] += ("%g" % f)[1:]
+
+ s = "%s%s-%s-%sT%s:%s:%sZ" % ((neg,) + tuple(e))
+
+ self._cache = s
+
+ return self._cache
+
+class timeInstantType(dateTimeType):
+ _validURIs = (NS.XSD, NS.XSD2, NS.ENC)
+
+class timePeriodType(dateTimeType):
+ _validURIs = (NS.XSD2, NS.ENC)
+
+class timeType(anyType):
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.gmtime(time.time())[3:6]
+ elif (type(data) == FloatType):
+ f = data - int(data)
+ data = list(time.gmtime(int(data))[3:6])
+ data[2] += f
+ elif type(data) in (IntType, LongType):
+ data = time.gmtime(data)[3:6]
+ elif type(data) in (ListType, TupleType):
+ if len(data) == 9:
+ data = data[3:6]
+ elif len(data) > 3:
+ raise Exception, "too many values"
+
+ data = [None, None, None] + list(data)
+
+ if len(data) < 6:
+ data += [0] * (6 - len(data))
+
+ cleanDate(data, 3)
+
+ data = data[3:]
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return tuple(data)
+
+ def _marshalData(self):
+ if self._cache == None:
+ d = self._data
+ s = ''
+
+ s = time.strftime("%H:%M:%S", (0, 0, 0) + d + (0, 0, -1))
+ f = d[2] - int(d[2])
+ if f != 0:
+ s += ("%g" % f)[1:]
+ s += 'Z'
+
+ self._cache = s
+
+ return self._cache
+
+class dateType(anyType):
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.gmtime(time.time())[0:3]
+ elif type(data) in (IntType, LongType, FloatType):
+ data = time.gmtime(data)[0:3]
+ elif type(data) in (ListType, TupleType):
+ if len(data) == 9:
+ data = data[0:3]
+ elif len(data) > 3:
+ raise Exception, "too many values"
+
+ data = list(data)
+
+ if len(data) < 3:
+ data += [1, 1, 1][len(data):]
+
+ data += [0, 0, 0]
+
+ cleanDate(data)
+
+ data = data[:3]
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return tuple(data)
+
+ def _marshalData(self):
+ if self._cache == None:
+ d = self._data
+ s = "%04d-%02d-%02dZ" % ((abs(d[0]),) + d[1:])
+ if d[0] < 0:
+ s = '-' + s
+
+ self._cache = s
+
+ return self._cache
+
+class gYearMonthType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.gmtime(time.time())[0:2]
+ elif type(data) in (IntType, LongType, FloatType):
+ data = time.gmtime(data)[0:2]
+ elif type(data) in (ListType, TupleType):
+ if len(data) == 9:
+ data = data[0:2]
+ elif len(data) > 2:
+ raise Exception, "too many values"
+
+ data = list(data)
+
+ if len(data) < 2:
+ data += [1, 1][len(data):]
+
+ data += [1, 0, 0, 0]
+
+ cleanDate(data)
+
+ data = data[:2]
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return tuple(data)
+
+ def _marshalData(self):
+ if self._cache == None:
+ d = self._data
+ s = "%04d-%02dZ" % ((abs(d[0]),) + d[1:])
+ if d[0] < 0:
+ s = '-' + s
+
+ self._cache = s
+
+ return self._cache
+
+class gYearType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.gmtime(time.time())[0:1]
+ elif type(data) in (IntType, LongType, FloatType):
+ data = [data]
+
+ if type(data) in (ListType, TupleType):
+ if len(data) == 9:
+ data = data[0:1]
+ elif len(data) < 1:
+ raise Exception, "too few values"
+ elif len(data) > 1:
+ raise Exception, "too many values"
+
+ if type(data[0]) == FloatType:
+ try: s = int(data[0])
+ except: s = long(data[0])
+
+ if s != data[0]:
+ raise Exception, "not integral"
+
+ data = [s]
+ elif type(data[0]) not in (IntType, LongType):
+ raise Exception, "bad type"
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return data[0]
+
+ def _marshalData(self):
+ if self._cache == None:
+ d = self._data
+ s = "%04dZ" % abs(d)
+ if d < 0:
+ s = '-' + s
+
+ self._cache = s
+
+ return self._cache
+
+class centuryType(anyType):
+ _validURIs = (NS.XSD2, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.gmtime(time.time())[0:1] / 100
+ elif type(data) in (IntType, LongType, FloatType):
+ data = [data]
+
+ if type(data) in (ListType, TupleType):
+ if len(data) == 9:
+ data = data[0:1] / 100
+ elif len(data) < 1:
+ raise Exception, "too few values"
+ elif len(data) > 1:
+ raise Exception, "too many values"
+
+ if type(data[0]) == FloatType:
+ try: s = int(data[0])
+ except: s = long(data[0])
+
+ if s != data[0]:
+ raise Exception, "not integral"
+
+ data = [s]
+ elif type(data[0]) not in (IntType, LongType):
+ raise Exception, "bad type"
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return data[0]
+
+ def _marshalData(self):
+ if self._cache == None:
+ d = self._data
+ s = "%02dZ" % abs(d)
+ if d < 0:
+ s = '-' + s
+
+ self._cache = s
+
+ return self._cache
+
+class yearType(gYearType):
+ _validURIs = (NS.XSD2, NS.ENC)
+
+class gMonthDayType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.gmtime(time.time())[1:3]
+ elif type(data) in (IntType, LongType, FloatType):
+ data = time.gmtime(data)[1:3]
+ elif type(data) in (ListType, TupleType):
+ if len(data) == 9:
+ data = data[0:2]
+ elif len(data) > 2:
+ raise Exception, "too many values"
+
+ data = list(data)
+
+ if len(data) < 2:
+ data += [1, 1][len(data):]
+
+ data = [0] + data + [0, 0, 0]
+
+ cleanDate(data, 1)
+
+ data = data[1:3]
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return tuple(data)
+
+ def _marshalData(self):
+ if self._cache == None:
+ self._cache = "--%02d-%02dZ" % self._data
+
+ return self._cache
+
+class recurringDateType(gMonthDayType):
+ _validURIs = (NS.XSD2, NS.ENC)
+
+class gMonthType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.gmtime(time.time())[1:2]
+ elif type(data) in (IntType, LongType, FloatType):
+ data = [data]
+
+ if type(data) in (ListType, TupleType):
+ if len(data) == 9:
+ data = data[1:2]
+ elif len(data) < 1:
+ raise Exception, "too few values"
+ elif len(data) > 1:
+ raise Exception, "too many values"
+
+ if type(data[0]) == FloatType:
+ try: s = int(data[0])
+ except: s = long(data[0])
+
+ if s != data[0]:
+ raise Exception, "not integral"
+
+ data = [s]
+ elif type(data[0]) not in (IntType, LongType):
+ raise Exception, "bad type"
+
+ if data[0] < 1 or data[0] > 12:
+ raise Exception, "bad value"
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return data[0]
+
+ def _marshalData(self):
+ if self._cache == None:
+ self._cache = "--%02d--Z" % self._data
+
+ return self._cache
+
+class monthType(gMonthType):
+ _validURIs = (NS.XSD2, NS.ENC)
+
+class gDayType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ try:
+ if data == None:
+ data = time.gmtime(time.time())[2:3]
+ elif type(data) in (IntType, LongType, FloatType):
+ data = [data]
+
+ if type(data) in (ListType, TupleType):
+ if len(data) == 9:
+ data = data[2:3]
+ elif len(data) < 1:
+ raise Exception, "too few values"
+ elif len(data) > 1:
+ raise Exception, "too many values"
+
+ if type(data[0]) == FloatType:
+ try: s = int(data[0])
+ except: s = long(data[0])
+
+ if s != data[0]:
+ raise Exception, "not integral"
+
+ data = [s]
+ elif type(data[0]) not in (IntType, LongType):
+ raise Exception, "bad type"
+
+ if data[0] < 1 or data[0] > 31:
+ raise Exception, "bad value"
+ else:
+ raise Exception, "invalid type"
+ except Exception, e:
+ raise ValueError, "invalid %s value - %s" % (self._type, e)
+
+ return data[0]
+
+ def _marshalData(self):
+ if self._cache == None:
+ self._cache = "---%02dZ" % self._data
+
+ return self._cache
+
+class recurringDayType(gDayType):
+ _validURIs = (NS.XSD2, NS.ENC)
+
+class hexBinaryType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (StringType, UnicodeType):
+ raise AttributeError, "invalid %s type" % self._type
+
+ return data
+
+ def _marshalData(self):
+ if self._cache == None:
+ self._cache = encodeHexString(self._data)
+
+ return self._cache
+
+class base64BinaryType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (StringType, UnicodeType):
+ raise AttributeError, "invalid %s type" % self._type
+
+ return data
+
+ def _marshalData(self):
+ if self._cache == None:
+ self._cache = base64.encodestring(self._data)
+
+ return self._cache
+
+class base64Type(base64BinaryType):
+ _validURIs = (NS.ENC,)
+
+class binaryType(anyType):
+ _validURIs = (NS.XSD, NS.ENC)
+
+ def __init__(self, data, name = None, typed = 1, encoding = 'base64',
+ attrs = None):
+
+ anyType.__init__(self, data, name, typed, attrs)
+
+ self._setAttr('encoding', encoding)
+
+ def _marshalData(self):
+ if self._cache == None:
+ if self._getAttr((None, 'encoding')) == 'base64':
+ self._cache = base64.encodestring(self._data)
+ else:
+ self._cache = encodeHexString(self._data)
+
+ return self._cache
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (StringType, UnicodeType):
+ raise AttributeError, "invalid %s type" % self._type
+
+ return data
+
+ def _setAttr(self, attr, value):
+ attr = self._fixAttr(attr)
+
+ if attr[1] == 'encoding':
+ if attr[0] != None or value not in ('base64', 'hex'):
+ raise AttributeError, "invalid encoding"
+
+ self._cache = None
+
+ anyType._setAttr(self, attr, value)
+
+
+class anyURIType(anyType):
+ _validURIs = (NS.XSD3,)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (StringType, UnicodeType):
+ raise AttributeError, "invalid %s type" % self._type
+
+ return data
+
+ def _marshalData(self):
+ if self._cache == None:
+ self._cache = urllib.quote(self._data)
+
+ return self._cache
+
+class uriType(anyURIType):
+ _validURIs = (NS.XSD,)
+
+class uriReferenceType(anyURIType):
+ _validURIs = (NS.XSD2,)
+
+class NOTATIONType(anyType):
+ def __init__(self, data, name = None, typed = 1, attrs = None):
+
+ if self.__class__ == NOTATIONType:
+ raise Error, "a NOTATION can't be instantiated directly"
+
+ anyType.__init__(self, data, name, typed, attrs)
+
+class ENTITIESType(anyType):
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) in (StringType, UnicodeType):
+ return (data,)
+
+ if type(data) not in (ListType, TupleType) or \
+ filter (lambda x: type(x) not in (StringType, UnicodeType), data):
+ raise AttributeError, "invalid %s type" % self._type
+
+ return data
+
+ def _marshalData(self):
+ return ' '.join(self._data)
+
+class IDREFSType(ENTITIESType): pass
+class NMTOKENSType(ENTITIESType): pass
+
+class integerType(anyType):
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType):
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class nonPositiveIntegerType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or data > 0:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class non_Positive_IntegerType(nonPositiveIntegerType):
+ _validURIs = (NS.XSD,)
+
+ def _typeName(self):
+ return 'non-positive-integer'
+
+class negativeIntegerType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or data >= 0:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class negative_IntegerType(negativeIntegerType):
+ _validURIs = (NS.XSD,)
+
+ def _typeName(self):
+ return 'negative-integer'
+
+class longType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or \
+ data < -9223372036854775808L or \
+ data > 9223372036854775807L:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class intType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or \
+ data < -2147483648L or \
+ data > 2147483647:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class shortType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or \
+ data < -32768 or \
+ data > 32767:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class byteType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or \
+ data < -128 or \
+ data > 127:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class nonNegativeIntegerType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or data < 0:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class non_Negative_IntegerType(nonNegativeIntegerType):
+ _validURIs = (NS.XSD,)
+
+ def _typeName(self):
+ return 'non-negative-integer'
+
+class unsignedLongType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or \
+ data < 0 or \
+ data > 18446744073709551615L:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class unsignedIntType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or \
+ data < 0 or \
+ data > 4294967295L:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class unsignedShortType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or \
+ data < 0 or \
+ data > 65535:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class unsignedByteType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or \
+ data < 0 or \
+ data > 255:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class positiveIntegerType(anyType):
+ _validURIs = (NS.XSD2, NS.XSD3, NS.ENC)
+
+ def _checkValueSpace(self, data):
+ if data == None:
+ raise ValueError, "must supply initial %s value" % self._type
+
+ if type(data) not in (IntType, LongType) or data <= 0:
+ raise ValueError, "invalid %s value" % self._type
+
+ return data
+
+class positive_IntegerType(positiveIntegerType):
+ _validURIs = (NS.XSD,)
+
+ def _typeName(self):
+ return 'positive-integer'
+
+# Now compound types
+
+class compoundType(anyType):
+ def __init__(self, data = None, name = None, typed = 1, attrs = None):
+ if self.__class__ == compoundType:
+ raise Error, "a compound can't be instantiated directly"
+
+ anyType.__init__(self, data, name, typed, attrs)
+ self._aslist = []
+ self._asdict = {}
+ self._keyord = []
+
+ if type(data) == DictType:
+ self.__dict__.update(data)
+
+ def __getitem__(self, item):
+ if type(item) == IntType:
+ return self._aslist[item]
+ return getattr(self, item)
+
+ def __len__(self):
+ return len(self._aslist)
+
+ def __nonzero__(self):
+ return 1
+
+ def _keys(self):
+ return filter(lambda x: x[0] != '_', self.__dict__.keys())
+
+ def _addItem(self, name, value, attrs = None):
+ d = self._asdict
+
+ if d.has_key(name):
+ if type(d[name]) != ListType:
+ d[name] = [d[name]]
+ d[name].append(value)
+ else:
+ d[name] = value
+
+ self._keyord.append(name)
+ self._aslist.append(value)
+ self.__dict__[name] = d[name]
+
+ def _placeItem(self, name, value, pos, subpos = 0, attrs = None):
+ d = self._asdict
+
+ if subpos == 0 and type(d[name]) != ListType:
+ d[name] = value
+ else:
+ d[name][subpos] = value
+
+ self._keyord[pos] = name
+ self._aslist[pos] = value
+ self.__dict__[name] = d[name]
+
+ def _getItemAsList(self, name, default = []):
+ try:
+ d = self.__dict__[name]
+ except:
+ return default
+
+ if type(d) == ListType:
+ return d
+ return [d]
+
+class structType(compoundType):
+ pass
+
+class headerType(structType):
+ _validURIs = (NS.ENV,)
+
+ def __init__(self, data = None, typed = 1, attrs = None):
+ structType.__init__(self, data, "Header", typed, attrs)
+
+class bodyType(structType):
+ _validURIs = (NS.ENV,)
+
+ def __init__(self, data = None, typed = 1, attrs = None):
+ structType.__init__(self, data, "Body", typed, attrs)
+
+class arrayType(UserList.UserList, compoundType):
+ def __init__(self, data = None, name = None, attrs = None,
+ offset = 0, rank = None, asize = 0, elemsname = None):
+
+ if data:
+ if type(data) not in (ListType, TupleType):
+ raise Error, "Data must be a sequence"
+
+ UserList.UserList.__init__(self, data)
+ compoundType.__init__(self, data, name, 0, attrs)
+
+ self._elemsname = elemsname or "item"
+
+ if data == None:
+ self._rank = rank
+
+ # According to 5.4.2.2 in the SOAP spec, each element in a
+ # sparse array must have a position. _posstate keeps track of
+ # whether we've seen a position or not. It's possible values
+ # are:
+ # -1 No elements have been added, so the state is indeterminate
+ # 0 An element without a position has been added, so no
+ # elements can have positions
+ # 1 An element with a position has been added, so all elements
+ # must have positions
+
+ self._posstate = -1
+
+ self._full = 0
+
+ if asize in ('', None):
+ asize = '0'
+
+ self._dims = map (lambda x: int(x), str(asize).split(','))
+ self._dims.reverse() # It's easier to work with this way
+ self._poss = [0] * len(self._dims) # This will end up
+ # reversed too
+
+ for i in range(len(self._dims)):
+ if self._dims[i] < 0 or \
+ self._dims[i] == 0 and len(self._dims) > 1:
+ raise TypeError, "invalid Array dimensions"
+
+ if offset > 0:
+ self._poss[i] = offset % self._dims[i]
+ offset = int(offset / self._dims[i])
+
+ # Don't break out of the loop if offset is 0 so we test all the
+ # dimensions for > 0.
+ if offset:
+ raise AttributeError, "invalid Array offset"
+
+ a = [None] * self._dims[0]
+
+ for i in range(1, len(self._dims)):
+ b = []
+
+ for j in range(self._dims[i]):
+ b.append(copy.deepcopy(a))
+
+ a = b
+
+ self.data = a
+
+ def _addItem(self, name, value, attrs):
+ if self._full:
+ raise ValueError, "Array is full"
+
+ pos = attrs.get((NS.ENC, 'position'))
+
+ if pos != None:
+ if self._posstate == 0:
+ raise AttributeError, \
+ "all elements in a sparse Array must have a " \
+ "position attribute"
+
+ self._posstate = 1
+
+ try:
+ if pos[0] == '[' and pos[-1] == ']':
+ pos = map (lambda x: int(x), pos[1:-1].split(','))
+ pos.reverse()
+
+ if len(pos) == 1:
+ pos = pos[0]
+
+ curpos = [0] * len(self._dims)
+
+ for i in range(len(self._dims)):
+ curpos[i] = pos % self._dims[i]
+ pos = int(pos / self._dims[i])
+
+ if pos == 0:
+ break
+
+ if pos:
+ raise Exception
+ elif len(pos) != len(self._dims):
+ raise Exception
+ else:
+ for i in range(len(self._dims)):
+ if pos[i] >= self._dims[i]:
+ raise Exception
+
+ curpos = pos
+ else:
+ raise Exception
+ except:
+ raise AttributeError, \
+ "invalid Array element position %s" % str(pos)
+ else:
+ if self._posstate == 1:
+ raise AttributeError, \
+ "only elements in a sparse Array may have a " \
+ "position attribute"
+
+ self._posstate = 0
+
+ curpos = self._poss
+
+ a = self.data
+
+ for i in range(len(self._dims) - 1, 0, -1):
+ a = a[curpos[i]]
+
+ if curpos[0] >= len(a):
+ a += [None] * (len(a) - curpos[0] + 1)
+
+ a[curpos[0]] = value
+
+ if pos == None:
+ self._poss[0] += 1
+
+ for i in range(len(self._dims) - 1):
+ if self._poss[i] < self._dims[i]:
+ break
+
+ self._poss[i] = 0
+ self._poss[i + 1] += 1
+
+ if self._dims[-1] and self._poss[-1] >= self._dims[-1]:
+ self._full = 1
+
+ def _placeItem(self, name, value, pos, subpos, attrs = None):
+ curpos = [0] * len(self._dims)
+
+ for i in range(len(self._dims)):
+ if self._dims[i] == 0:
+ curpos[0] = pos
+ break
+
+ curpos[i] = pos % self._dims[i]
+ pos = int(pos / self._dims[i])
+
+ if pos == 0:
+ break
+
+ if self._dims[i] != 0 and pos:
+ raise Error, "array index out of range"
+
+ a = self.data
+
+ for i in range(len(self._dims) - 1, 0, -1):
+ a = a[curpos[i]]
+
+ if curpos[0] >= len(a):
+ a += [None] * (len(a) - curpos[0] + 1)
+
+ a[curpos[0]] = value
+
+class typedArrayType(arrayType):
+ def __init__(self, data = None, name = None, typed = None, attrs = None,
+ offset = 0, rank = None, asize = 0, elemsname = None):
+
+ arrayType.__init__(self, data, name, attrs, offset, rank, asize,
+ elemsname)
+
+ self._type = typed
+
+class faultType(structType, Error):
+ def __init__(self, faultcode = "", faultstring = "", detail = None):
+ self.faultcode = faultcode
+ self.faultstring = faultstring
+ if detail != None:
+ self.detail = detail
+
+ structType.__init__(self, None, 0)
+
+ def _setDetail(self, detail = None):
+ if detail != None:
+ self.detail = detail
+ else:
+ try: del self.detail
+ except AttributeError: pass
+
+ def __repr__(self):
+ return "<Fault %s: %s>" % (self.faultcode, self.faultstring)
+
+ __str__ = __repr__
+
+################################################################################
+class RefHolder:
+ def __init__(self, name, frame):
+ self.name = name
+ self.parent = frame
+ self.pos = len(frame)
+ self.subpos = frame.namecounts.get(name, 0)
+
+ def __repr__(self):
+ return "<%s %s at %d>" % (self.__class__, self.name, id(self))
+
+################################################################################
+# Utility infielders
+################################################################################
+def collapseWhiteSpace(s):
+ return re.sub('\s+', ' ', s).strip()
+
+def decodeHexString(data):
+ conv = {'0': 0x0, '1': 0x1, '2': 0x2, '3': 0x3, '4': 0x4,
+ '5': 0x5, '6': 0x6, '7': 0x7, '8': 0x8, '9': 0x9, 'a': 0xa,
+ 'b': 0xb, 'c': 0xc, 'd': 0xd, 'e': 0xe, 'f': 0xf, 'A': 0xa,
+ 'B': 0xb, 'C': 0xc, 'D': 0xd, 'E': 0xe, 'F': 0xf,}
+ ws = string.whitespace
+
+ bin = ''
+
+ i = 0
+
+ while i < len(data):
+ if data[i] not in ws:
+ break
+ i += 1
+
+ low = 0
+
+ while i < len(data):
+ c = data[i]
+
+ if c in string.whitespace:
+ break
+
+ try:
+ c = conv[c]
+ except KeyError:
+ raise ValueError, \
+ "invalid hex string character `%s'" % c
+
+ if low:
+ bin += chr(high * 16 + c)
+ low = 0
+ else:
+ high = c
+ low = 1
+
+ i += 1
+
+ if low:
+ raise ValueError, "invalid hex string length"
+
+ while i < len(data):
+ if data[i] not in string.whitespace:
+ raise ValueError, \
+ "invalid hex string character `%s'" % c
+
+ i += 1
+
+ return bin
+
+def encodeHexString(data):
+ h = ''
+
+ for i in data:
+ h += "%02X" % ord(i)
+
+ return h
+
+def leapMonth(year, month):
+ return month == 2 and \
+ year % 4 == 0 and \
+ (year % 100 != 0 or year % 400 == 0)
+
+def cleanDate(d, first = 0):
+ ranges = (None, (1, 12), (1, 31), (0, 23), (0, 59), (0, 61))
+ months = (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
+ names = ('year', 'month', 'day', 'hours', 'minutes', 'seconds')
+
+ if len(d) != 6:
+ raise ValueError, "date must have 6 elements"
+
+ for i in range(first, 6):
+ s = d[i]
+
+ if type(s) == FloatType:
+ if i < 5:
+ try:
+ s = int(s)
+ except OverflowError:
+ if i > 0:
+ raise
+ s = long(s)
+
+ if s != d[i]:
+ raise ValueError, "%s must be integral" % names[i]
+
+ d[i] = s
+ elif type(s) == LongType:
+ try: s = int(s)
+ except: pass
+ elif type(s) != IntType:
+ raise TypeError, "%s isn't a valid type" % names[i]
+
+ if i == first and s < 0:
+ continue
+
+ if ranges[i] != None and \
+ (s < ranges[i][0] or ranges[i][1] < s):
+ raise ValueError, "%s out of range" % names[i]
+
+ if first < 6 and d[5] >= 61:
+ raise ValueError, "seconds out of range"
+
+ if first < 2:
+ leap = first < 1 and leapMonth(d[0], d[1])
+
+ if d[2] > months[d[1]] + leap:
+ raise ValueError, "day out of range"
+
+class UnderflowError(exceptions.ArithmeticError):
+ pass
+
+def debugHeader(title):
+ s = '*** ' + title + ' '
+ print s + ('*' * (72 - len(s)))
+
+def debugFooter(title):
+ print '*' * 72
+ sys.stdout.flush()
+
+################################################################################
+# SOAP Parser
+################################################################################
+class SOAPParser(xml.sax.handler.ContentHandler):
+ class Frame:
+ def __init__(self, name, kind = None, attrs = {}, rules = {}):
+ self.name = name
+ self.kind = kind
+ self.attrs = attrs
+ self.rules = rules
+
+ self.contents = []
+ self.names = []
+ self.namecounts = {}
+ self.subattrs = []
+
+ def append(self, name, data, attrs):
+ self.names.append(name)
+ self.contents.append(data)
+ self.subattrs.append(attrs)
+
+ if self.namecounts.has_key(name):
+ self.namecounts[name] += 1
+ else:
+ self.namecounts[name] = 1
+
+ def _placeItem(self, name, value, pos, subpos = 0, attrs = None):
+ self.contents[pos] = value
+
+ if attrs:
+ self.attrs.update(attrs)
+
+ def __len__(self):
+ return len(self.contents)
+
+ def __repr__(self):
+ return "<%s %s at %d>" % (self.__class__, self.name, id(self))
+
+ def __init__(self, rules = None):
+ xml.sax.handler.ContentHandler.__init__(self)
+ self.body = None
+ self.header = None
+ self.attrs = {}
+ self._data = None
+ self._next = "E" # Keeping state for message validity
+ self._stack = [self.Frame('SOAP')]
+
+ # Make two dictionaries to store the prefix <-> URI mappings, and
+ # initialize them with the default
+ self._prem = {NS.XML_T: NS.XML}
+ self._prem_r = {NS.XML: NS.XML_T}
+ self._ids = {}
+ self._refs = {}
+ self._rules = rules
+
+ def startElementNS(self, name, qname, attrs):
+ # Workaround two sax bugs
+ if name[0] == None and name[1][0] == ' ':
+ name = (None, name[1][1:])
+ else:
+ name = tuple(name)
+
+ # First some checking of the layout of the message
+
+ if self._next == "E":
+ if name[1] != 'Envelope':
+ raise Error, "expected `SOAP-ENV:Envelope', got `%s:%s'" % \
+ (self._prem_r[name[0]], name[1])
+ if name[0] != NS.ENV:
+ raise faultType, ("%s:VersionMismatch" % NS.ENV_T,
+ "Don't understand version `%s' Envelope" % name[0])
+ else:
+ self._next = "HorB"
+ elif self._next == "HorB":
+ if name[0] == NS.ENV and name[1] in ("Header", "Body"):
+ self._next = None
+ else:
+ raise Error, \
+ "expected `SOAP-ENV:Header' or `SOAP-ENV:Body', " \
+ "got `%s'" % self._prem_r[name[0]] + ':' + name[1]
+ elif self._next == "B":
+ if name == (NS.ENV, "Body"):
+ self._next = None
+ else:
+ raise Error, "expected `SOAP-ENV:Body', got `%s'" % \
+ self._prem_r[name[0]] + ':' + name[1]
+ elif self._next == "":
+ raise Error, "expected nothing, got `%s'" % \
+ self._prem_r[name[0]] + ':' + name[1]
+
+ if len(self._stack) == 2:
+ rules = self._rules
+ else:
+ try:
+ rules = self._stack[-1].rules[name[1]]
+ except:
+ rules = None
+
+ if type(rules) not in (NoneType, DictType):
+ kind = rules
+ else:
+ kind = attrs.get((NS.ENC, 'arrayType'))
+
+ if kind != None:
+ del attrs._attrs[(NS.ENC, 'arrayType')]
+
+ i = kind.find(':')
+ if i >= 0:
+ kind = (self._prem[kind[:i]], kind[i + 1:])
+ else:
+ kind = None
+
+ self.pushFrame(self.Frame(name[1], kind, attrs._attrs, rules))
+
+ self._data = '' # Start accumulating
+
+ def pushFrame(self, frame):
+ self._stack.append(frame)
+
+ def popFrame(self):
+ return self._stack.pop()
+
+ def endElementNS(self, name, qname):
+ # Workaround two sax bugs
+ if name[0] == None and name[1][0] == ' ':
+ ns, name = None, name[1][1:]
+ else:
+ ns, name = tuple(name)
+
+ if self._next == "E":
+ raise Error, "didn't get SOAP-ENV:Envelope"
+ if self._next in ("HorB", "B"):
+ raise Error, "didn't get SOAP-ENV:Body"
+
+ cur = self.popFrame()
+ attrs = cur.attrs
+
+ idval = None
+
+ if attrs.has_key((None, 'id')):
+ idval = attrs[(None, 'id')]
+
+ if self._ids.has_key(idval):
+ raise Error, "duplicate id `%s'" % idval
+
+ del attrs[(None, 'id')]
+
+ root = 1
+
+ if len(self._stack) == 3:
+ if attrs.has_key((NS.ENC, 'root')):
+ root = int(attrs[(NS.ENC, 'root')])
+
+ # Do some preliminary checks. First, if root="0" is present,
+ # the element must have an id. Next, if root="n" is present,
+ # n something other than 0 or 1, raise an exception.
+
+ if root == 0:
+ if idval == None:
+ raise Error, "non-root element must have an id"
+ elif root != 1:
+ raise Error, "SOAP-ENC:root must be `0' or `1'"
+
+ del attrs[(NS.ENC, 'root')]
+
+ while 1:
+ href = attrs.get((None, 'href'))
+ if href:
+ if href[0] != '#':
+ raise Error, "only do local hrefs right now"
+ if self._data != None and self._data.strip() != '':
+ raise Error, "hrefs can't have data"
+
+ href = href[1:]
+
+ if self._ids.has_key(href):
+ data = self._ids[href]
+ else:
+ data = RefHolder(name, self._stack[-1])
+
+ if self._refs.has_key(href):
+ self._refs[href].append(data)
+ else:
+ self._refs[href] = [data]
+
+ del attrs[(None, 'href')]
+
+ break
+
+ kind = None
+
+ if attrs:
+ for i in NS.XSI_L:
+ if attrs.has_key((i, 'type')):
+ kind = attrs[(i, 'type')]
+ del attrs[(i, 'type')]
+
+ if kind != None:
+ i = kind.find(':')
+ if i >= 0:
+ kind = (self._prem[kind[:i]], kind[i + 1:])
+ else:
+# XXX What to do here? (None, kind) is just going to fail in convertType
+ kind = (None, kind)
+
+ null = 0
+
+ if attrs:
+ for i in (NS.XSI, NS.XSI2):
+ if attrs.has_key((i, 'null')):
+ null = attrs[(i, 'null')]
+ del attrs[(i, 'null')]
+
+ if attrs.has_key((NS.XSI3, 'nil')):
+ null = attrs[(NS.XSI3, 'nil')]
+ del attrs[(NS.XSI3, 'nil')]
+
+ #MAP 4/12/2002 - must also support "true"
+ #null = int(null)
+ null = (str(null).lower() in ['true', '1'])
+
+ if null:
+ if len(cur) or \
+ (self._data != None and self._data.strip() != ''):
+ raise Error, "nils can't have data"
+
+ data = None
+
+ break
+
+ if len(self._stack) == 2:
+ if (ns, name) == (NS.ENV, "Header"):
+ self.header = data = headerType(attrs = attrs)
+ self._next = "B"
+ break
+ elif (ns, name) == (NS.ENV, "Body"):
+ self.body = data = bodyType(attrs = attrs)
+ self._next = ""
+ break
+ elif len(self._stack) == 3 and self._next == None:
+ if (ns, name) == (NS.ENV, "Fault"):
+ data = faultType()
+ self._next = ""
+ break
+
+ if cur.rules != None:
+ rule = cur.rules
+
+ if type(rule) in (StringType, UnicodeType):
+# XXX Need a namespace here
+ rule = (None, rule)
+ elif type(rule) == ListType:
+ rule = tuple(rule)
+
+# XXX What if rule != kind?
+ if callable(rule):
+ data = rule(self._data)
+ elif type(rule) == DictType:
+ data = structType(name = (ns, name), attrs = attrs)
+ else:
+ data = self.convertType(self._data, rule, attrs)
+
+ break
+
+ if (kind == None and cur.kind != None) or \
+ (kind == (NS.ENC, 'Array')):
+ kind = cur.kind
+
+ if kind == None:
+ kind = 'ur-type[%d]' % len(cur)
+ else:
+ kind = kind[1]
+
+ if len(cur.namecounts) == 1:
+ elemsname = cur.names[0]
+ else:
+ elemsname = None
+
+ data = self.startArray((ns, name), kind, attrs, elemsname)
+
+ break
+
+ if len(self._stack) == 3 and kind == None and \
+ len(cur) == 0 and \
+ (self._data == None or self._data.strip() == ''):
+ data = structType(name = (ns, name), attrs = attrs)
+ break
+
+ if len(cur) == 0 and ns != NS.URN:
+ # Nothing's been added to the current frame so it must be a
+ # simple type.
+
+ if kind == None:
+ # If the current item's container is an array, it will
+ # have a kind. If so, get the bit before the first [,
+ # which is the type of the array, therefore the type of
+ # the current item.
+
+ kind = self._stack[-1].kind
+
+ if kind != None:
+ i = kind[1].find('[')
+ if i >= 0:
+ kind = (kind[0], kind[1][:i])
+ elif ns != None:
+ kind = (ns, name)
+
+ if kind != None:
+ try:
+ data = self.convertType(self._data, kind, attrs)
+ except UnknownTypeError:
+ data = None
+ else:
+ data = None
+
+ if data == None:
+ data = self._data or ''
+
+ if len(attrs) == 0:
+ try: data = str(data)
+ except: pass
+
+ break
+
+ data = structType(name = (ns, name), attrs = attrs)
+
+ break
+
+ if isinstance(data, compoundType):
+ for i in range(len(cur)):
+ v = cur.contents[i]
+ data._addItem(cur.names[i], v, cur.subattrs[i])
+
+ if isinstance(v, RefHolder):
+ v.parent = data
+
+ if root:
+ self._stack[-1].append(name, data, attrs)
+
+ if idval != None:
+ self._ids[idval] = data
+
+ if self._refs.has_key(idval):
+ for i in self._refs[idval]:
+ i.parent._placeItem(i.name, data, i.pos, i.subpos, attrs)
+
+ del self._refs[idval]
+
+ self.attrs[id(data)] = attrs
+
+ if isinstance(data, anyType):
+ data._setAttrs(attrs)
+
+ self._data = None # Stop accumulating
+
+ def endDocument(self):
+ if len(self._refs) == 1:
+ raise Error, \
+ "unresolved reference " + self._refs.keys()[0]
+ elif len(self._refs) > 1:
+ raise Error, \
+ "unresolved references " + ', '.join(self._refs.keys())
+
+ def startPrefixMapping(self, prefix, uri):
+ self._prem[prefix] = uri
+ self._prem_r[uri] = prefix
+
+ def endPrefixMapping(self, prefix):
+ try:
+ del self._prem_r[self._prem[prefix]]
+ del self._prem[prefix]
+ except:
+ pass
+
+ def characters(self, c):
+ if self._data != None:
+ self._data += c
+
+ arrayre = '^(?:(?P<ns>[^:]*):)?' \
+ '(?P<type>[^[]+)' \
+ '(?:\[(?P<rank>,*)\])?' \
+ '(?:\[(?P<asize>\d+(?:,\d+)*)?\])$'
+
+ def startArray(self, name, kind, attrs, elemsname):
+ if type(self.arrayre) == StringType:
+ self.arrayre = re.compile (self.arrayre)
+
+ offset = attrs.get((NS.ENC, "offset"))
+
+ if offset != None:
+ del attrs[(NS.ENC, "offset")]
+
+ try:
+ if offset[0] == '[' and offset[-1] == ']':
+ offset = int(offset[1:-1])
+ if offset < 0:
+ raise Exception
+ else:
+ raise Exception
+ except:
+ raise AttributeError, "invalid Array offset"
+ else:
+ offset = 0
+
+ try:
+ m = self.arrayre.search(kind)
+
+ if m == None:
+ raise Exception
+
+ t = m.group('type')
+
+ if t == 'ur-type':
+ return arrayType(None, name, attrs, offset, m.group('rank'),
+ m.group('asize'), elemsname)
+ elif m.group('ns') != None:
+ return typedArrayType(None, name,
+ (self._prem[m.group('ns')], t), attrs, offset,
+ m.group('rank'), m.group('asize'), elemsname)
+ else:
+ return typedArrayType(None, name, (None, t), attrs, offset,
+ m.group('rank'), m.group('asize'), elemsname)
+ except:
+ raise AttributeError, "invalid Array type `%s'" % kind
+
+ # Conversion
+
+ class DATETIMECONSTS:
+ SIGNre = '(?P<sign>-?)'
+ CENTURYre = '(?P<century>\d{2,})'
+ YEARre = '(?P<year>\d{2})'
+ MONTHre = '(?P<month>\d{2})'
+ DAYre = '(?P<day>\d{2})'
+ HOURre = '(?P<hour>\d{2})'
+ MINUTEre = '(?P<minute>\d{2})'
+ SECONDre = '(?P<second>\d{2}(?:\.\d*)?)'
+ TIMEZONEre = '(?P<zulu>Z)|(?P<tzsign>[-+])(?P<tzhour>\d{2}):' \
+ '(?P<tzminute>\d{2})'
+ BOSre = '^\s*'
+ EOSre = '\s*$'
+
+ __allres = {'sign': SIGNre, 'century': CENTURYre, 'year': YEARre,
+ 'month': MONTHre, 'day': DAYre, 'hour': HOURre,
+ 'minute': MINUTEre, 'second': SECONDre, 'timezone': TIMEZONEre,
+ 'b': BOSre, 'e': EOSre}
+
+ dateTime = '%(b)s%(sign)s%(century)s%(year)s-%(month)s-%(day)sT' \
+ '%(hour)s:%(minute)s:%(second)s(%(timezone)s)?%(e)s' % __allres
+ timeInstant = dateTime
+ timePeriod = dateTime
+ time = '%(b)s%(hour)s:%(minute)s:%(second)s(%(timezone)s)?%(e)s' % \
+ __allres
+ date = '%(b)s%(sign)s%(century)s%(year)s-%(month)s-%(day)s' \
+ '(%(timezone)s)?%(e)s' % __allres
+ century = '%(b)s%(sign)s%(century)s(%(timezone)s)?%(e)s' % __allres
+ gYearMonth = '%(b)s%(sign)s%(century)s%(year)s-%(month)s' \
+ '(%(timezone)s)?%(e)s' % __allres
+ gYear = '%(b)s%(sign)s%(century)s%(year)s(%(timezone)s)?%(e)s' % \
+ __allres
+ year = gYear
+ gMonthDay = '%(b)s--%(month)s-%(day)s(%(timezone)s)?%(e)s' % __allres
+ recurringDate = gMonthDay
+ gDay = '%(b)s---%(day)s(%(timezone)s)?%(e)s' % __allres
+ recurringDay = gDay
+ gMonth = '%(b)s--%(month)s--(%(timezone)s)?%(e)s' % __allres
+ month = gMonth
+
+ recurringInstant = '%(b)s%(sign)s(%(century)s|-)(%(year)s|-)-' \
+ '(%(month)s|-)-(%(day)s|-)T' \
+ '(%(hour)s|-):(%(minute)s|-):(%(second)s|-)' \
+ '(%(timezone)s)?%(e)s' % __allres
+
+ duration = '%(b)s%(sign)sP' \
+ '((?P<year>\d+)Y)?' \
+ '((?P<month>\d+)M)?' \
+ '((?P<day>\d+)D)?' \
+ '((?P<sep>T)' \
+ '((?P<hour>\d+)H)?' \
+ '((?P<minute>\d+)M)?' \
+ '((?P<second>\d*(?:\.\d*)?)S)?)?%(e)s' % \
+ __allres
+
+ timeDuration = duration
+
+ # The extra 31 on the front is:
+ # - so the tuple is 1-based
+ # - so months[month-1] is December's days if month is 1
+
+ months = (31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
+
+ def convertDateTime(self, value, kind):
+ def getZoneOffset(d):
+ zoffs = 0
+
+ try:
+ if d['zulu'] == None:
+ zoffs = 60 * int(d['tzhour']) + int(d['tzminute'])
+ if d['tzsign'] != '-':
+ zoffs = -zoffs
+ except TypeError:
+ pass
+
+ return zoffs
+
+ def applyZoneOffset(months, zoffs, date, minfield, posday = 1):
+ if zoffs == 0 and (minfield > 4 or 0 <= date[5] < 60):
+ return date
+
+ if minfield > 5: date[5] = 0
+ if minfield > 4: date[4] = 0
+
+ if date[5] < 0:
+ date[4] += int(date[5]) / 60
+ date[5] %= 60
+
+ date[4] += zoffs
+
+ if minfield > 3 or 0 <= date[4] < 60: return date
+
+ date[3] += date[4] / 60
+ date[4] %= 60
+
+ if minfield > 2 or 0 <= date[3] < 24: return date
+
+ date[2] += date[3] / 24
+ date[3] %= 24
+
+ if minfield > 1:
+ if posday and date[2] <= 0:
+ date[2] += 31 # zoffs is at most 99:59, so the
+ # day will never be less than -3
+ return date
+
+ while 1:
+ # The date[1] == 3 (instead of == 2) is because we're
+ # going back a month, so we need to know if the previous
+ # month is February, so we test if this month is March.
+
+ leap = minfield == 0 and date[1] == 3 and \
+ date[0] % 4 == 0 and \
+ (date[0] % 100 != 0 or date[0] % 400 == 0)
+
+ if 0 < date[2] <= months[date[1]] + leap: break
+
+ date[2] += months[date[1] - 1] + leap
+
+ date[1] -= 1
+
+ if date[1] > 0: break
+
+ date[1] = 12
+
+ if minfield > 0: break
+
+ date[0] -= 1
+
+ return date
+
+ try:
+ exp = getattr(self.DATETIMECONSTS, kind)
+ except AttributeError:
+ return None
+
+ if type(exp) == StringType:
+ exp = re.compile(exp)
+ setattr (self.DATETIMECONSTS, kind, exp)
+
+ m = exp.search(value)
+
+ try:
+ if m == None:
+ raise Exception
+
+ d = m.groupdict()
+ f = ('century', 'year', 'month', 'day',
+ 'hour', 'minute', 'second')
+ fn = len(f) # Index of first non-None value
+ r = []
+
+ if kind in ('duration', 'timeDuration'):
+ if d['sep'] != None and d['hour'] == None and \
+ d['minute'] == None and d['second'] == None:
+ raise Exception
+
+ f = f[1:]
+
+ for i in range(len(f)):
+ s = d[f[i]]
+
+ if s != None:
+ if f[i] == 'second':
+ s = float(s)
+ else:
+ try: s = int(s)
+ except ValueError: s = long(s)
+
+ if i < fn: fn = i
+
+ r.append(s)
+
+ if fn > len(r): # Any non-Nones?
+ raise Exception
+
+ if d['sign'] == '-':
+ r[fn] = -r[fn]
+
+ return tuple(r)
+
+ if kind == 'recurringInstant':
+ for i in range(len(f)):
+ s = d[f[i]]
+
+ if s == None or s == '-':
+ if i > fn:
+ raise Exception
+ s = None
+ else:
+ if i < fn:
+ fn = i
+
+ if f[i] == 'second':
+ s = float(s)
+ else:
+ try:
+ s = int(s)
+ except ValueError:
+ s = long(s)
+
+ r.append(s)
+
+ s = r.pop(0)
+
+ if fn == 0:
+ r[0] += s * 100
+ else:
+ fn -= 1
+
+ if fn < len(r) and d['sign'] == '-':
+ r[fn] = -r[fn]
+
+ cleanDate(r, fn)
+
+ return tuple(applyZoneOffset(self.DATETIMECONSTS.months,
+ getZoneOffset(d), r, fn, 0))
+
+ r = [0, 0, 1, 1, 0, 0, 0]
+
+ for i in range(len(f)):
+ field = f[i]
+
+ s = d.get(field)
+
+ if s != None:
+ if field == 'second':
+ s = float(s)
+ else:
+ try:
+ s = int(s)
+ except ValueError:
+ s = long(s)
+
+ if i < fn:
+ fn = i
+
+ r[i] = s
+
+ if fn > len(r): # Any non-Nones?
+ raise Exception
+
+ s = r.pop(0)
+
+ if fn == 0:
+ r[0] += s * 100
+ else:
+ fn -= 1
+
+ if d.get('sign') == '-':
+ r[fn] = -r[fn]
+
+ cleanDate(r, fn)
+
+ zoffs = getZoneOffset(d)
+
+ if zoffs:
+ r = applyZoneOffset(self.DATETIMECONSTS.months, zoffs, r, fn)
+
+ if kind == 'century':
+ return r[0] / 100
+
+ s = []
+
+ for i in range(1, len(f)):
+ if d.has_key(f[i]):
+ s.append(r[i - 1])
+
+ if len(s) == 1:
+ return s[0]
+ return tuple(s)
+ except Exception, e:
+ raise Error, "invalid %s value `%s' - %s" % (kind, value, e)
+
+ intlimits = \
+ {
+ 'nonPositiveInteger': (0, None, 0),
+ 'non-positive-integer': (0, None, 0),
+ 'negativeInteger': (0, None, -1),
+ 'negative-integer': (0, None, -1),
+ 'long': (1, -9223372036854775808L,
+ 9223372036854775807L),
+ 'int': (0, -2147483648L, 2147483647),
+ 'short': (0, -32768, 32767),
+ 'byte': (0, -128, 127),
+ 'nonNegativeInteger': (0, 0, None),
+ 'non-negative-integer': (0, 0, None),
+ 'positiveInteger': (0, 1, None),
+ 'positive-integer': (0, 1, None),
+ 'unsignedLong': (1, 0, 18446744073709551615L),
+ 'unsignedInt': (0, 0, 4294967295L),
+ 'unsignedShort': (0, 0, 65535),
+ 'unsignedByte': (0, 0, 255),
+ }
+ floatlimits = \
+ {
+ 'float': (7.0064923216240861E-46, -3.4028234663852886E+38,
+ 3.4028234663852886E+38),
+ 'double': (2.4703282292062327E-324, -1.7976931348623158E+308,
+ 1.7976931348623157E+308),
+ }
+ zerofloatre = '[1-9]'
+
+ def convertType(self, d, t, attrs):
+ dnn = d or ''
+
+ if t[0] in NS.EXSD_L:
+ if t[1] == "integer":
+ try:
+ d = int(d)
+ if len(attrs):
+ d = long(d)
+ except:
+ d = long(d)
+ return d
+ if self.intlimits.has_key (t[1]):
+ l = self.intlimits[t[1]]
+ try: d = int(d)
+ except: d = long(d)
+
+ if l[1] != None and d < l[1]:
+ raise UnderflowError, "%s too small" % d
+ if l[2] != None and d > l[2]:
+ raise OverflowError, "%s too large" % d
+
+ if l[0] or len(attrs):
+ return long(d)
+ return d
+ if t[1] == "string":
+ if len(attrs):
+ return unicode(dnn)
+ try:
+ return str(dnn)
+ except:
+ return dnn
+ if t[1] == "boolean":
+ d = d.strip().lower()
+ if d in ('0', 'false'):
+ return 0
+ if d in ('1', 'true'):
+ return 1
+ raise AttributeError, "invalid boolean value"
+ if self.floatlimits.has_key (t[1]):
+ l = self.floatlimits[t[1]]
+ s = d.strip().lower()
+ try:
+ d = float(s)
+ except:
+ # Some platforms don't implement the float stuff. This
+ # is close, but NaN won't be > "INF" as required by the
+ # standard.
+
+ if s in ("nan", "inf"):
+ return 1e300**2
+ if s == "-inf":
+ return -1e300**2
+
+ raise
+
+ if str (d) == 'nan':
+ if s != 'nan':
+ raise ValueError, "invalid %s" % t[1]
+ elif str (d) == '-inf':
+ if s != '-inf':
+ raise UnderflowError, "%s too small" % t[1]
+ elif str (d) == 'inf':
+ if s != 'inf':
+ raise OverflowError, "%s too large" % t[1]
+ elif d < 0:
+ if d < l[1]:
+ raise UnderflowError, "%s too small" % t[1]
+ elif d > 0:
+ if d < l[0] or d > l[2]:
+ raise OverflowError, "%s too large" % t[1]
+ elif d == 0:
+ if type(self.zerofloatre) == StringType:
+ self.zerofloatre = re.compile(self.zerofloatre)
+
+ if self.zerofloatre.search(s):
+ raise UnderflowError, "invalid %s" % t[1]
+
+ return d
+ if t[1] in ("dateTime", "date", "timeInstant", "time"):
+ return self.convertDateTime(d, t[1])
+ if t[1] == "decimal":
+ return float(d)
+ if t[1] in ("language", "QName", "NOTATION", "NMTOKEN", "Name",
+ "NCName", "ID", "IDREF", "ENTITY"):
+ return collapseWhiteSpace(d)
+ if t[1] in ("IDREFS", "ENTITIES", "NMTOKENS"):
+ d = collapseWhiteSpace(d)
+ return d.split()
+ if t[0] in NS.XSD_L:
+ if t[1] in ("base64", "base64Binary"):
+ return base64.decodestring(d)
+ if t[1] == "hexBinary":
+ return decodeHexString(d)
+ if t[1] == "anyURI":
+ return urllib.unquote(collapseWhiteSpace(d))
+ if t[1] in ("normalizedString", "token"):
+ return collapseWhiteSpace(d)
+ if t[0] == NS.ENC:
+ if t[1] == "base64":
+ return base64.decodestring(d)
+ if t[0] == NS.XSD:
+ if t[1] == "binary":
+ try:
+ e = attrs[(None, 'encoding')]
+
+ if e == 'hex':
+ return decodeHexString(d)
+ elif e == 'base64':
+ return base64.decodestring(d)
+ except:
+ pass
+
+ raise Error, "unknown or missing binary encoding"
+ if t[1] == "uri":
+ return urllib.unquote(collapseWhiteSpace(d))
+ if t[1] == "recurringInstant":
+ return self.convertDateTime(d, t[1])
+ if t[0] in (NS.XSD2, NS.ENC):
+ if t[1] == "uriReference":
+ return urllib.unquote(collapseWhiteSpace(d))
+ if t[1] == "timePeriod":
+ return self.convertDateTime(d, t[1])
+ if t[1] in ("century", "year"):
+ return self.convertDateTime(d, t[1])
+ if t[0] in (NS.XSD, NS.XSD2, NS.ENC):
+ if t[1] == "timeDuration":
+ return self.convertDateTime(d, t[1])
+ if t[0] == NS.XSD3:
+ if t[1] == "anyURI":
+ return urllib.unquote(collapseWhiteSpace(d))
+ if t[1] in ("gYearMonth", "gMonthDay"):
+ return self.convertDateTime(d, t[1])
+ if t[1] == "gYear":
+ return self.convertDateTime(d, t[1])
+ if t[1] == "gMonth":
+ return self.convertDateTime(d, t[1])
+ if t[1] == "gDay":
+ return self.convertDateTime(d, t[1])
+ if t[1] == "duration":
+ return self.convertDateTime(d, t[1])
+ if t[0] in (NS.XSD2, NS.XSD3):
+ if t[1] == "token":
+ return collapseWhiteSpace(d)
+ if t[1] == "recurringDate":
+ return self.convertDateTime(d, t[1])
+ if t[1] == "month":
+ return self.convertDateTime(d, t[1])
+ if t[1] == "recurringDay":
+ return self.convertDateTime(d, t[1])
+ if t[0] == NS.XSD2:
+ if t[1] == "CDATA":
+ return collapseWhiteSpace(d)
+
+ raise UnknownTypeError, "unknown type `%s'" % (t[0] + ':' + t[1])
+
+################################################################################
+# call to SOAPParser that keeps all of the info
+################################################################################
+def _parseSOAP(xml_str, rules = None):
+ try:
+ from cStringIO import StringIO
+ except ImportError:
+ from StringIO import StringIO
+
+ parser = xml.sax.make_parser()
+ t = SOAPParser(rules = rules)
+ parser.setContentHandler(t)
+ e = xml.sax.handler.ErrorHandler()
+ parser.setErrorHandler(e)
+
+ inpsrc = xml.sax.xmlreader.InputSource()
+ inpsrc.setByteStream(StringIO(xml_str))
+
+ # turn on namespace mangeling
+ parser.setFeature(xml.sax.handler.feature_namespaces,1)
+
+ parser.parse(inpsrc)
+
+ return t
+
+################################################################################
+# SOAPParser's more public interface
+################################################################################
+def parseSOAP(xml_str, attrs = 0):
+ t = _parseSOAP(xml_str)
+
+ if attrs:
+ return t.body, t.attrs
+ return t.body
+
+
+def parseSOAPRPC(xml_str, header = 0, body = 0, attrs = 0, rules = None):
+ t = _parseSOAP(xml_str, rules = rules)
+ p = t.body._aslist[0]
+
+ # Empty string, for RPC this translates into a void
+ if type(p) in (type(''), type(u'')) and p in ('', u''):
+ name = "Response"
+ for k in t.body.__dict__.keys():
+ if k[0] != "_":
+ name = k
+ p = structType(name)
+
+ if header or body or attrs:
+ ret = (p,)
+ if header : ret += (t.header,)
+ if body: ret += (t.body,)
+ if attrs: ret += (t.attrs,)
+ return ret
+ else:
+ return p
+
+
+################################################################################
+# SOAP Builder
+################################################################################
+class SOAPBuilder:
+ _xml_top = '<?xml version="1.0"?>\n'
+ _xml_enc_top = '<?xml version="1.0" encoding="%s"?>\n'
+ _env_top = '%(ENV_T)s:Envelope %(ENV_T)s:encodingStyle="%(ENC)s"' % \
+ NS.__dict__
+ _env_bot = '</%(ENV_T)s:Envelope>\n' % NS.__dict__
+
+ # Namespaces potentially defined in the Envelope tag.
+
+ _env_ns = {NS.ENC: NS.ENC_T, NS.ENV: NS.ENV_T,
+ NS.XSD: NS.XSD_T, NS.XSD2: NS.XSD2_T, NS.XSD3: NS.XSD3_T,
+ NS.XSI: NS.XSI_T, NS.XSI2: NS.XSI2_T, NS.XSI3: NS.XSI3_T}
+
+ def __init__(self, args = (), kw = {}, method = None, namespace = None,
+ header = None, methodattrs = None, envelope = 1, encoding = 'UTF-8',
+ use_refs = 0, config = Config):
+
+ # Test the encoding, raising an exception if it's not known
+ if encoding != None:
+ ''.encode(encoding)
+
+ self.args = args
+ self.kw = kw
+ self.envelope = envelope
+ self.encoding = encoding
+ self.method = method
+ self.namespace = namespace
+ self.header = header
+ self.methodattrs= methodattrs
+ self.use_refs = use_refs
+ self.config = config
+ self.out = ''
+ self.tcounter = 0
+ self.ncounter = 1
+ self.icounter = 1
+ self.envns = {}
+ self.ids = {}
+ self.depth = 0
+ self.multirefs = []
+ self.multis = 0
+ self.body = not isinstance(args, bodyType)
+
+ def build(self):
+ ns_map = {}
+
+ # Cache whether typing is on or not
+ typed = self.config.typed
+
+ if self.header:
+ # Create a header.
+ self.dump(self.header, "Header", typed = typed)
+ self.header = None # Wipe it out so no one is using it.
+ if self.body:
+ # Call genns to record that we've used SOAP-ENV.
+ self.depth += 1
+ body_ns = self.genns(ns_map, NS.ENV)[0]
+ self.out += "<%sBody>\n" % body_ns
+
+ if self.method:
+ self.depth += 1
+ a = ''
+ if self.methodattrs:
+ for (k, v) in self.methodattrs.items():
+ a += ' %s="%s"' % (k, v)
+
+ if self.namespace: # Use the namespace info handed to us
+ methodns, n = self.genns(ns_map, self.namespace)
+ else:
+ methodns, n = '', ''
+
+ self.out += '<%s%s%s%s%s>\n' % \
+ (methodns, self.method, n, a, self.genroot(ns_map))
+
+ try:
+ if type(self.args) != TupleType:
+ args = (self.args,)
+ else:
+ args = self.args
+
+ for i in args:
+ self.dump(i, typed = typed, ns_map = ns_map)
+
+ for (k, v) in self.kw.items():
+ self.dump(v, k, typed = typed, ns_map = ns_map)
+ except RecursionError:
+ if self.use_refs == 0:
+ # restart
+ b = SOAPBuilder(args = self.args, kw = self.kw,
+ method = self.method, namespace = self.namespace,
+ header = self.header, methodattrs = self.methodattrs,
+ envelope = self.envelope, encoding = self.encoding,
+ use_refs = 1, config = self.config)
+ return b.build()
+ raise
+
+ if self.method:
+ self.out += "</%s%s>\n" % (methodns, self.method)
+ self.depth -= 1
+
+ if self.body:
+ # dump may add to self.multirefs, but the for loop will keep
+ # going until it has used all of self.multirefs, even those
+ # entries added while in the loop.
+
+ self.multis = 1
+
+ for obj, tag in self.multirefs:
+ self.dump(obj, tag, typed = typed, ns_map = ns_map)
+
+ self.out += "</%sBody>\n" % body_ns
+ self.depth -= 1
+
+ if self.envelope:
+ e = map (lambda ns: 'xmlns:%s="%s"' % (ns[1], ns[0]),
+ self.envns.items())
+
+ self.out = '<' + self._env_top + ' '.join([''] + e) + '>\n' + \
+ self.out + \
+ self._env_bot
+
+ if self.encoding != None:
+ self.out = self._xml_enc_top % self.encoding + self.out
+
+ return self.out.encode(self.encoding)
+
+ return self._xml_top + self.out
+
+ def gentag(self):
+ self.tcounter += 1
+ return "v%d" % self.tcounter
+
+ def genns(self, ns_map, nsURI):
+ if nsURI == None:
+ return ('', '')
+
+ if type(nsURI) == TupleType: # already a tuple
+ if len(nsURI) == 2:
+ ns, nsURI = nsURI
+ else:
+ ns, nsURI = None, nsURI[0]
+ else:
+ ns = None
+
+ if ns_map.has_key(nsURI):
+ return (ns_map[nsURI] + ':', '')
+
+ if self._env_ns.has_key(nsURI):
+ ns = self.envns[nsURI] = ns_map[nsURI] = self._env_ns[nsURI]
+ return (ns + ':', '')
+
+ if not ns:
+ ns = "ns%d" % self.ncounter
+ self.ncounter += 1
+ ns_map[nsURI] = ns
+ if self.config.buildWithNamespacePrefix:
+ return (ns + ':', ' xmlns:%s="%s"' % (ns, nsURI))
+ else:
+ return ('', ' xmlns="%s"' % (nsURI))
+
+ def genroot(self, ns_map):
+ if self.depth != 2:
+ return ''
+
+ ns, n = self.genns(ns_map, NS.ENC)
+ return ' %sroot="%d"%s' % (ns, not self.multis, n)
+
+ # checkref checks an element to see if it needs to be encoded as a
+ # multi-reference element or not. If it returns None, the element has
+ # been handled and the caller can continue with subsequent elements.
+ # If it returns a string, the string should be included in the opening
+ # tag of the marshaled element.
+
+ def checkref(self, obj, tag, ns_map):
+ if self.depth < 2:
+ return ''
+
+ if not self.ids.has_key(id(obj)):
+ n = self.ids[id(obj)] = self.icounter
+ self.icounter = n + 1
+
+ if self.use_refs == 0:
+ return ''
+
+ if self.depth == 2:
+ return ' id="i%d"' % n
+
+ self.multirefs.append((obj, tag))
+ else:
+ if self.use_refs == 0:
+ raise RecursionError, "Cannot serialize recursive object"
+
+ n = self.ids[id(obj)]
+
+ if self.multis and self.depth == 2:
+ return ' id="i%d"' % n
+
+ self.out += '<%s href="#i%d"%s/>\n' % (tag, n, self.genroot(ns_map))
+ return None
+
+ # dumpers
+
+ def dump(self, obj, tag = None, typed = 1, ns_map = {}):
+ ns_map = ns_map.copy()
+ self.depth += 1
+
+ if type(tag) not in (NoneType, StringType, UnicodeType):
+ raise KeyError, "tag must be a string or None"
+
+ try:
+ meth = getattr(self, "dump_" + type(obj).__name__)
+ meth(obj, tag, typed, ns_map)
+ except AttributeError:
+ if type(obj) == LongType:
+ obj_type = "integer"
+ else:
+ obj_type = type(obj).__name__
+
+ self.out += self.dumper(None, obj_type, obj, tag, typed,
+ ns_map, self.genroot(ns_map))
+
+ self.depth -= 1
+
+ # generic dumper
+ def dumper(self, nsURI, obj_type, obj, tag, typed = 1, ns_map = {},
+ rootattr = '', id = '',
+ xml = '<%(tag)s%(type)s%(id)s%(attrs)s%(root)s>%(data)s</%(tag)s>\n'):
+
+ if nsURI == None:
+ nsURI = self.config.typesNamespaceURI
+
+ tag = tag or self.gentag()
+
+ a = n = t = ''
+ if typed and obj_type:
+ ns, n = self.genns(ns_map, nsURI)
+ ins = self.genns(ns_map, self.config.schemaNamespaceURI)[0]
+ t = ' %stype="%s%s"%s' % (ins, ns, obj_type, n)
+
+ try: a = obj._marshalAttrs(ns_map, self)
+ except: pass
+
+ try: data = obj._marshalData()
+ except: data = obj
+
+ return xml % {"tag": tag, "type": t, "data": data, "root": rootattr,
+ "id": id, "attrs": a}
+
+ def dump_float(self, obj, tag, typed = 1, ns_map = {}):
+ # Terrible windows hack
+ if not good_float:
+ if obj == float(1e300**2):
+ obj = "INF"
+ elif obj == float(-1e300**2):
+ obj = "-INF"
+
+ obj = str(obj)
+ if obj in ('inf', '-inf'):
+ obj = str(obj).upper()
+ elif obj == 'nan':
+ obj = 'NaN'
+ self.out += self.dumper(None, "float", obj, tag, typed, ns_map,
+ self.genroot(ns_map))
+
+ def dump_string(self, obj, tag, typed = 0, ns_map = {}):
+ tag = tag or self.gentag()
+
+ id = self.checkref(obj, tag, ns_map)
+ if id == None:
+ return
+
+ try: data = obj._marshalData()
+ except: data = obj
+
+ self.out += self.dumper(None, "string", cgi.escape(data), tag,
+ typed, ns_map, self.genroot(ns_map), id)
+
+ dump_unicode = dump_string
+ dump_str = dump_string # 4/12/2002 - MAP - for Python 2.2
+
+ def dump_None(self, obj, tag, typed = 0, ns_map = {}):
+ tag = tag or self.gentag()
+ ns = self.genns(ns_map, self.config.schemaNamespaceURI)[0]
+
+ self.out += '<%s %snull="1"%s/>\n' % (tag, ns, self.genroot(ns_map))
+
+ def dump_list(self, obj, tag, typed = 1, ns_map = {}):
+ if type(obj) == InstanceType:
+ data = obj.data
+ else:
+ data = obj
+
+ tag = tag or self.gentag()
+
+ id = self.checkref(obj, tag, ns_map)
+ if id == None:
+ return
+
+ try:
+ sample = data[0]
+ empty = 0
+ except:
+ sample = structType()
+ empty = 1
+
+ # First scan list to see if all are the same type
+ same_type = 1
+
+ if not empty:
+ for i in data[1:]:
+ if type(sample) != type(i) or \
+ (type(sample) == InstanceType and \
+ sample.__class__ != i.__class__):
+ same_type = 0
+ break
+
+ ndecl = ''
+ if same_type:
+ if (isinstance(sample, structType)) or \
+ type(sample) == DictType: # force to urn struct
+
+ try:
+ tns = obj._ns or NS.URN
+ except:
+ tns = NS.URN
+
+ ns, ndecl = self.genns(ns_map, tns)
+
+ try:
+ typename = last._typename
+ except:
+ typename = "SOAPStruct"
+
+ t = ns + typename
+
+ elif isinstance(sample, anyType):
+ ns = sample._validNamespaceURI(self.config.typesNamespaceURI,
+ self.config.strictNamespaces)
+ if ns:
+ ns, ndecl = self.genns(ns_map, ns)
+ t = ns + sample._type
+ else:
+ t = 'ur-type'
+ else:
+ t = self.genns(ns_map, self.config.typesNamespaceURI)[0] + \
+ type(sample).__name__
+ else:
+ t = self.genns(ns_map, self.config.typesNamespaceURI)[0] + \
+ "ur-type"
+
+ try: a = obj._marshalAttrs(ns_map, self)
+ except: a = ''
+
+ ens, edecl = self.genns(ns_map, NS.ENC)
+ ins, idecl = self.genns(ns_map, self.config.schemaNamespaceURI)
+
+ self.out += \
+ '<%s %sarrayType="%s[%d]" %stype="%sArray"%s%s%s%s%s%s>\n' %\
+ (tag, ens, t, len(data), ins, ens, ndecl, edecl, idecl,
+ self.genroot(ns_map), id, a)
+
+ typed = not same_type
+
+ try: elemsname = obj._elemsname
+ except: elemsname = "item"
+
+ for i in data:
+ self.dump(i, elemsname, typed, ns_map)
+
+ self.out += '</%s>\n' % tag
+
+ dump_tuple = dump_list
+
+ def dump_dictionary(self, obj, tag, typed = 1, ns_map = {}):
+ tag = tag or self.gentag()
+
+ id = self.checkref(obj, tag, ns_map)
+ if id == None:
+ return
+
+ try: a = obj._marshalAttrs(ns_map, self)
+ except: a = ''
+
+ self.out += '<%s%s%s%s>\n' % \
+ (tag, id, a, self.genroot(ns_map))
+
+ for (k, v) in obj.items():
+ if k[0] != "_":
+ self.dump(v, k, 1, ns_map)
+
+ self.out += '</%s>\n' % tag
+ dump_dict = dump_dictionary # 4/18/2002 - MAP - for Python 2.2
+
+ def dump_instance(self, obj, tag, typed = 1, ns_map = {}):
+ if not tag:
+ # If it has a name use it.
+ if isinstance(obj, anyType) and obj._name:
+ tag = obj._name
+ else:
+ tag = self.gentag()
+
+ if isinstance(obj, arrayType): # Array
+ self.dump_list(obj, tag, typed, ns_map)
+ return
+
+ if isinstance(obj, faultType): # Fault
+ cns, cdecl = self.genns(ns_map, NS.ENC)
+ vns, vdecl = self.genns(ns_map, NS.ENV)
+ self.out += '''<%sFault %sroot="1"%s%s>
+<faultcode>%s</faultcode>
+<faultstring>%s</faultstring>
+''' % (vns, cns, vdecl, cdecl, obj.faultcode, obj.faultstring)
+ if hasattr(obj, "detail"):
+ self.dump(obj.detail, "detail", typed, ns_map)
+ self.out += "</%sFault>\n" % vns
+ return
+
+ r = self.genroot(ns_map)
+
+ try: a = obj._marshalAttrs(ns_map, self)
+ except: a = ''
+
+ if isinstance(obj, voidType): # void
+ self.out += "<%s%s%s></%s>\n" % (tag, a, r, tag)
+ return
+
+ id = self.checkref(obj, tag, ns_map)
+ if id == None:
+ return
+
+ if isinstance(obj, structType):
+ # Check for namespace
+ ndecl = ''
+ ns = obj._validNamespaceURI(self.config.typesNamespaceURI,
+ self.config.strictNamespaces)
+ if ns:
+ ns, ndecl = self.genns(ns_map, ns)
+ tag = ns + tag
+ self.out += "<%s%s%s%s%s>\n" % (tag, ndecl, id, a, r)
+
+ # If we have order use it.
+ order = 1
+
+ for i in obj._keys():
+ if i not in obj._keyord:
+ order = 0
+ break
+ if order:
+ for i in range(len(obj._keyord)):
+ self.dump(obj._aslist[i], obj._keyord[i], 1, ns_map)
+ else:
+ # don't have pristine order information, just build it.
+ for (k, v) in obj.__dict__.items():
+ if k[0] != "_":
+ self.dump(v, k, 1, ns_map)
+
+ if isinstance(obj, bodyType):
+ self.multis = 1
+
+ for v, k in self.multirefs:
+ self.dump(v, k, typed = typed, ns_map = ns_map)
+
+ self.out += '</%s>\n' % tag
+
+ elif isinstance(obj, anyType):
+ t = ''
+
+ if typed:
+ ns = obj._validNamespaceURI(self.config.typesNamespaceURI,
+ self.config.strictNamespaces)
+ if ns:
+ ons, ondecl = self.genns(ns_map, ns)
+ ins, indecl = self.genns(ns_map,
+ self.config.schemaNamespaceURI)
+ t = ' %stype="%s%s"%s%s' % \
+ (ins, ons, obj._type, ondecl, indecl)
+
+ self.out += '<%s%s%s%s%s>%s</%s>\n' % \
+ (tag, t, id, a, r, obj._marshalData(), tag)
+
+ else: # Some Class
+ self.out += '<%s%s%s>\n' % (tag, id, r)
+
+ for (k, v) in obj.__dict__.items():
+ if k[0] != "_":
+ self.dump(v, k, 1, ns_map)
+
+ self.out += '</%s>\n' % tag
+
+
+################################################################################
+# SOAPBuilder's more public interface
+################################################################################
+def buildSOAP(args=(), kw={}, method=None, namespace=None, header=None,
+ methodattrs=None,envelope=1,encoding='UTF-8',config=Config):
+ t = SOAPBuilder(args=args,kw=kw, method=method, namespace=namespace,
+ header=header, methodattrs=methodattrs,envelope=envelope,
+ encoding=encoding, config=config)
+ return t.build()
+
+################################################################################
+# RPC
+################################################################################
+
+def SOAPUserAgent():
+ return "SOAP.py " + __version__ + " (actzero.com)"
+
+################################################################################
+# Client
+################################################################################
+class SOAPAddress:
+ def __init__(self, url, config = Config):
+ proto, uri = urllib.splittype(url)
+
+ # apply some defaults
+ if uri[0:2] != '//':
+ if proto != None:
+ uri = proto + ':' + uri
+
+ uri = '//' + uri
+ proto = 'http'
+
+ host, path = urllib.splithost(uri)
+
+ try:
+ int(host)
+ host = 'localhost:' + host
+ except:
+ pass
+
+ if not path:
+ path = '/'
+
+ if proto not in ('http', 'https'):
+ raise IOError, "unsupported SOAP protocol"
+ if proto == 'https' and not config.SSLclient:
+ raise AttributeError, \
+ "SSL client not supported by this Python installation"
+
+ self.proto = proto
+ self.host = host
+ self.path = path
+
+ def __str__(self):
+ return "%(proto)s://%(host)s%(path)s" % self.__dict__
+
+ __repr__ = __str__
+
+
+class HTTPTransport:
+ # Need a Timeout someday?
+ def call(self, addr, data, soapaction = '', encoding = None,
+ http_proxy = None, config = Config):
+
+ import httplib
+
+ if not isinstance(addr, SOAPAddress):
+ addr = SOAPAddress(addr, config)
+
+ # Build a request
+ if http_proxy:
+ real_addr = http_proxy
+ real_path = addr.proto + "://" + addr.host + addr.path
+ else:
+ real_addr = addr.host
+ real_path = addr.path
+
+ if addr.proto == 'https':
+ r = httplib.HTTPS(real_addr)
+ else:
+ r = httplib.HTTP(real_addr)
+
+ r.putrequest("POST", real_path)
+
+ r.putheader("Host", addr.host)
+ r.putheader("User-agent", SOAPUserAgent())
+ t = 'text/xml';
+ if encoding != None:
+ t += '; charset="%s"' % encoding
+ r.putheader("Content-type", t)
+ r.putheader("Content-length", str(len(data)))
+ r.putheader("SOAPAction", '"%s"' % soapaction)
+
+ if config.dumpHeadersOut:
+ s = 'Outgoing HTTP headers'
+ debugHeader(s)
+ print "POST %s %s" % (real_path, r._http_vsn_str)
+ print "Host:", addr.host
+ print "User-agent: SOAP.py " + __version__ + " (actzero.com)"
+ print "Content-type:", t
+ print "Content-length:", len(data)
+ print 'SOAPAction: "%s"' % soapaction
+ debugFooter(s)
+
+ r.endheaders()
+
+ if config.dumpSOAPOut:
+ s = 'Outgoing SOAP'
+ debugHeader(s)
+ print data,
+ if data[-1] != '\n':
+ print
+ debugFooter(s)
+
+ # send the payload
+ r.send(data)
+
+ # read response line
+ code, msg, headers = r.getreply()
+
+ if config.dumpHeadersIn:
+ s = 'Incoming HTTP headers'
+ debugHeader(s)
+ if headers.headers:
+ print "HTTP/1.? %d %s" % (code, msg)
+ print "\n".join(map (lambda x: x.strip(), headers.headers))
+ else:
+ print "HTTP/0.9 %d %s" % (code, msg)
+ debugFooter(s)
+
+ if config.dumpSOAPIn:
+ data = r.getfile().read()
+
+ s = 'Incoming SOAP'
+ debugHeader(s)
+ print data,
+ if data[-1] != '\n':
+ print
+ debugFooter(s)
+
+ if code not in (200, 500):
+ raise HTTPError(code, msg)
+
+ if not config.dumpSOAPIn:
+ data = r.getfile().read()
+
+ # return response payload
+ return data
+
+################################################################################
+# SOAP Proxy
+################################################################################
+class SOAPProxy:
+ def __init__(self, proxy, namespace = None, soapaction = '',
+ header = None, methodattrs = None, transport = HTTPTransport,
+ encoding = 'UTF-8', throw_faults = 1, unwrap_results = 1,
+ http_proxy=None, config = Config):
+
+ # Test the encoding, raising an exception if it's not known
+ if encoding != None:
+ ''.encode(encoding)
+
+ self.proxy = SOAPAddress(proxy, config)
+ self.namespace = namespace
+ self.soapaction = soapaction
+ self.header = header
+ self.methodattrs = methodattrs
+ self.transport = transport()
+ self.encoding = encoding
+ self.throw_faults = throw_faults
+ self.unwrap_results = unwrap_results
+ self.http_proxy = http_proxy
+ self.config = config
+
+
+ def __call(self, name, args, kw, ns = None, sa = None, hd = None,
+ ma = None):
+
+ ns = ns or self.namespace
+ ma = ma or self.methodattrs
+
+ if sa: # Get soapaction
+ if type(sa) == TupleType: sa = sa[0]
+ else:
+ sa = self.soapaction
+
+ if hd: # Get header
+ if type(hd) == TupleType:
+ hd = hd[0]
+ else:
+ hd = self.header
+
+ hd = hd or self.header
+
+ if ma: # Get methodattrs
+ if type(ma) == TupleType: ma = ma[0]
+ else:
+ ma = self.methodattrs
+ ma = ma or self.methodattrs
+
+ m = buildSOAP(args = args, kw = kw, method = name, namespace = ns,
+ header = hd, methodattrs = ma, encoding = self.encoding,
+ config = self.config)
+
+ r = self.transport.call(self.proxy, m, sa, encoding = self.encoding,
+ http_proxy = self.http_proxy,
+ config = self.config)
+
+ p, attrs = parseSOAPRPC(r, attrs = 1)
+
+ try:
+ throw_struct = self.throw_faults and \
+ isinstance (p, faultType)
+ except:
+ throw_struct = 0
+
+ if throw_struct:
+ raise p
+
+ # Bubble a regular result up, if there is only element in the
+ # struct, assume that is the result and return it.
+ # Otherwise it will return the struct with all the elements
+ # as attributes.
+ if self.unwrap_results:
+ try:
+ count = 0
+ for i in p.__dict__.keys():
+ if i[0] != "_": # don't move the private stuff
+ count += 1
+ t = getattr(p, i)
+ if count == 1: p = t # Only one piece of data, bubble it up
+ except:
+ pass
+
+ if self.config.returnAllAttrs:
+ return p, attrs
+ return p
+
+ def _callWithBody(self, body):
+ return self.__call(None, body, {})
+
+ def __getattr__(self, name): # hook to catch method calls
+ return self.__Method(self.__call, name, config = self.config)
+
+ # To handle attribute wierdness
+ class __Method:
+ # Some magic to bind a SOAP method to an RPC server.
+ # Supports "nested" methods (e.g. examples.getStateName) -- concept
+ # borrowed from xmlrpc/soaplib -- www.pythonware.com
+ # Altered (improved?) to let you inline namespaces on a per call
+ # basis ala SOAP::LITE -- www.soaplite.com
+
+ def __init__(self, call, name, ns = None, sa = None, hd = None,
+ ma = None, config = Config):
+
+ self.__call = call
+ self.__name = name
+ self.__ns = ns
+ self.__sa = sa
+ self.__hd = hd
+ self.__ma = ma
+ self.__config = config
+ if self.__name[0] == "_":
+ if self.__name in ["__repr__","__str__"]:
+ self.__call__ = self.__repr__
+ else:
+ self.__call__ = self.__f_call
+ else:
+ self.__call__ = self.__r_call
+
+ def __getattr__(self, name):
+ if self.__name[0] == "_":
+ # Don't nest method if it is a directive
+ return self.__class__(self.__call, name, self.__ns,
+ self.__sa, self.__hd, self.__ma)
+
+ return self.__class__(self.__call, "%s.%s" % (self.__name, name),
+ self.__ns, self.__sa, self.__hd, self.__ma)
+
+ def __f_call(self, *args, **kw):
+ if self.__name == "_ns": self.__ns = args
+ elif self.__name == "_sa": self.__sa = args
+ elif self.__name == "_hd": self.__hd = args
+ elif self.__name == "_ma": self.__ma = args
+ return self
+
+ def __r_call(self, *args, **kw):
+ return self.__call(self.__name, args, kw, self.__ns, self.__sa,
+ self.__hd, self.__ma)
+
+ def __repr__(self):
+ return "<%s at %d>" % (self.__class__, id(self))
+
+################################################################################
+# Server
+################################################################################
+
+# Method Signature class for adding extra info to registered funcs, right now
+# used just to indicate it should be called with keywords, instead of ordered
+# params.
+class MethodSig:
+ def __init__(self, func, keywords=0, context=0):
+ self.func = func
+ self.keywords = keywords
+ self.context = context
+ self.__name__ = func.__name__
+
+ def __call__(self, *args, **kw):
+ return apply(self.func,args,kw)
+
+class SOAPContext:
+ def __init__(self, header, body, attrs, xmldata, connection, httpheaders,
+ soapaction):
+
+ self.header = header
+ self.body = body
+ self.attrs = attrs
+ self.xmldata = xmldata
+ self.connection = connection
+ self.httpheaders= httpheaders
+ self.soapaction = soapaction
+
+# A class to describe how header messages are handled
+class HeaderHandler:
+ # Initially fail out if there are any problems.
+ def __init__(self, header, attrs):
+ for i in header.__dict__.keys():
+ if i[0] == "_":
+ continue
+
+ d = getattr(header, i)
+
+ try:
+ fault = int(attrs[id(d)][(NS.ENV, 'mustUnderstand')])
+ except:
+ fault = 0
+
+ if fault:
+ raise faultType, ("%s:MustUnderstand" % NS.ENV_T,
+ "Don't understand `%s' header element but "
+ "mustUnderstand attribute is set." % i)
+
+
+################################################################################
+# SOAP Server
+################################################################################
+class SOAPServer(SocketServer.TCPServer):
+ import BaseHTTPServer
+
+ class SOAPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+ def version_string(self):
+ return '<a href="http://www.actzero.com/solution.html">' + \
+ 'SOAP.py ' + __version__ + '</a> (Python ' + \
+ sys.version.split()[0] + ')'
+
+ def date_time_string(self):
+ self.__last_date_time_string = \
+ SOAPServer.BaseHTTPServer.BaseHTTPRequestHandler.\
+ date_time_string(self)
+
+ return self.__last_date_time_string
+
+ def do_POST(self):
+ try:
+ if self.server.config.dumpHeadersIn:
+ s = 'Incoming HTTP headers'
+ debugHeader(s)
+ print self.raw_requestline.strip()
+ print "\n".join(map (lambda x: x.strip(),
+ self.headers.headers))
+ debugFooter(s)
+
+ data = self.rfile.read(int(self.headers["content-length"]))
+
+ if self.server.config.dumpSOAPIn:
+ s = 'Incoming SOAP'
+ debugHeader(s)
+ print data,
+ if data[-1] != '\n':
+ print
+ debugFooter(s)
+
+ (r, header, body, attrs) = \
+ parseSOAPRPC(data, header = 1, body = 1, attrs = 1)
+
+ method = r._name
+ args = r._aslist
+ kw = r._asdict
+
+ ns = r._ns
+ resp = ""
+ # For fault messages
+ if ns:
+ nsmethod = "%s:%s" % (ns, method)
+ else:
+ nsmethod = method
+
+ try:
+ # First look for registered functions
+ if self.server.funcmap.has_key(ns) and \
+ self.server.funcmap[ns].has_key(method):
+ f = self.server.funcmap[ns][method]
+ else: # Now look at registered objects
+ # Check for nested attributes. This works even if
+ # there are none, because the split will return
+ # [method]
+ f = self.server.objmap[ns]
+ l = method.split(".")
+ for i in l:
+ f = getattr(f, i)
+ except:
+ resp = buildSOAP(faultType("%s:Client" % NS.ENV_T,
+ "No method %s found" % nsmethod,
+ "%s %s" % tuple(sys.exc_info()[0:2])),
+ encoding = self.server.encoding,
+ config = self.server.config)
+ status = 500
+ else:
+ try:
+ if header:
+ x = HeaderHandler(header, attrs)
+
+ # If it's wrapped, some special action may be needed
+
+ if isinstance(f, MethodSig):
+ c = None
+
+ if f.context: # Build context object
+ c = SOAPContext(header, body, attrs, data,
+ self.connection, self.headers,
+ self.headers["soapaction"])
+
+ if f.keywords:
+ # This is lame, but have to de-unicode
+ # keywords
+
+ strkw = {}
+
+ for (k, v) in kw.items():
+ strkw[str(k)] = v
+ if c:
+ strkw["_SOAPContext"] = c
+ fr = apply(f, (), strkw)
+ elif c:
+ fr = apply(f, args, {'_SOAPContext':c})
+ else:
+ fr = apply(f, args, {})
+ else:
+ fr = apply(f, args, {})
+
+ if type(fr) == type(self) and \
+ isinstance(fr, voidType):
+ resp = buildSOAP(kw = {'%sResponse' % method: fr},
+ encoding = self.server.encoding,
+ config = self.server.config)
+ else:
+ resp = buildSOAP(kw =
+ {'%sResponse' % method: {'Result': fr}},
+ encoding = self.server.encoding,
+ config = self.server.config)
+ except Exception, e:
+ import traceback
+ info = sys.exc_info()
+
+ if self.server.config.dumpFaultInfo:
+ s = 'Method %s exception' % nsmethod
+ debugHeader(s)
+ traceback.print_exception(info[0], info[1],
+ info[2])
+ debugFooter(s)
+
+ if isinstance(e, faultType):
+ f = e
+ else:
+ f = faultType("%s:Server" % NS.ENV_T,
+ "Method %s failed." % nsmethod)
+
+ if self.server.config.returnFaultInfo:
+ f._setDetail("".join(traceback.format_exception(
+ info[0], info[1], info[2])))
+ elif not hasattr(f, 'detail'):
+ f._setDetail("%s %s" % (info[0], info[1]))
+
+ resp = buildSOAP(f, encoding = self.server.encoding,
+ config = self.server.config)
+ status = 500
+ else:
+ status = 200
+ except faultType, e:
+ import traceback
+ info = sys.exc_info()
+
+ if self.server.config.dumpFaultInfo:
+ s = 'Received fault exception'
+ debugHeader(s)
+ traceback.print_exception(info[0], info[1],
+ info[2])
+ debugFooter(s)
+
+ if self.server.config.returnFaultInfo:
+ e._setDetail("".join(traceback.format_exception(
+ info[0], info[1], info[2])))
+ elif not hasattr(e, 'detail'):
+ e._setDetail("%s %s" % (info[0], info[1]))
+
+ resp = buildSOAP(e, encoding = self.server.encoding,
+ config = self.server.config)
+ status = 500
+ except:
+ # internal error, report as HTTP server error
+ if self.server.config.dumpFaultInfo:
+ import traceback
+ s = 'Internal exception'
+ debugHeader(s)
+ traceback.print_exc ()
+ debugFooter(s)
+ self.send_response(500)
+ self.end_headers()
+
+ if self.server.config.dumpHeadersOut and \
+ self.request_version != 'HTTP/0.9':
+ s = 'Outgoing HTTP headers'
+ debugHeader(s)
+ if self.responses.has_key(status):
+ s = ' ' + self.responses[status][0]
+ else:
+ s = ''
+ print "%s %d%s" % (self.protocol_version, 500, s)
+ print "Server:", self.version_string()
+ print "Date:", self.__last_date_time_string
+ debugFooter(s)
+ else:
+ # got a valid SOAP response
+ self.send_response(status)
+
+ t = 'text/xml';
+ if self.server.encoding != None:
+ t += '; charset="%s"' % self.server.encoding
+ self.send_header("Content-type", t)
+ self.send_header("Content-length", str(len(resp)))
+ self.end_headers()
+
+ if self.server.config.dumpHeadersOut and \
+ self.request_version != 'HTTP/0.9':
+ s = 'Outgoing HTTP headers'
+ debugHeader(s)
+ if self.responses.has_key(status):
+ s = ' ' + self.responses[status][0]
+ else:
+ s = ''
+ print "%s %d%s" % (self.protocol_version, status, s)
+ print "Server:", self.version_string()
+ print "Date:", self.__last_date_time_string
+ print "Content-type:", t
+ print "Content-length:", len(resp)
+ debugFooter(s)
+
+ if self.server.config.dumpSOAPOut:
+ s = 'Outgoing SOAP'
+ debugHeader(s)
+ print resp,
+ if resp[-1] != '\n':
+ print
+ debugFooter(s)
+
+ self.wfile.write(resp)
+ self.wfile.flush()
+
+ # We should be able to shut down both a regular and an SSL
+ # connection, but under Python 2.1, calling shutdown on an
+ # SSL connections drops the output, so this work-around.
+ # This should be investigated more someday.
+
+ if self.server.config.SSLserver and \
+ isinstance(self.connection, SSL.Connection):
+ self.connection.set_shutdown(SSL.SSL_SENT_SHUTDOWN |
+ SSL.SSL_RECEIVED_SHUTDOWN)
+ else:
+ self.connection.shutdown(1)
+
+ def log_message(self, format, *args):
+ if self.server.log:
+ SOAPServer.BaseHTTPServer.BaseHTTPRequestHandler.\
+ log_message (self, format, *args)
+
+ def __init__(self, addr = ('localhost', 8000),
+ RequestHandler = SOAPRequestHandler, log = 1, encoding = 'UTF-8',
+ config = Config, namespace = None, ssl_context = None):
+
+ # Test the encoding, raising an exception if it's not known
+ if encoding != None:
+ ''.encode(encoding)
+
+ if ssl_context != None and not config.SSLserver:
+ raise AttributeError, \
+ "SSL server not supported by this Python installation"
+
+ self.namespace = namespace
+ self.objmap = {}
+ self.funcmap = {}
+ self.ssl_context = ssl_context
+ self.encoding = encoding
+ self.config = config
+ self.log = log
+
+ self.allow_reuse_address= 1
+
+ SocketServer.TCPServer.__init__(self, addr, RequestHandler)
+
+ def get_request(self):
+ sock, addr = SocketServer.TCPServer.get_request(self)
+
+ if self.ssl_context:
+ sock = SSL.Connection(self.ssl_context, sock)
+ sock._setup_ssl(addr)
+ if sock.accept_ssl() != 1:
+ raise socket.error, "Couldn't accept SSL connection"
+
+ return sock, addr
+
+ def registerObject(self, object, namespace = ''):
+ if namespace == '': namespace = self.namespace
+ self.objmap[namespace] = object
+
+ def registerFunction(self, function, namespace = '', funcName = None):
+ if not funcName : funcName = function.__name__
+ if namespace == '': namespace = self.namespace
+ if self.funcmap.has_key(namespace):
+ self.funcmap[namespace][funcName] = function
+ else:
+ self.funcmap[namespace] = {funcName : function}
+
+ def registerKWObject(self, object, namespace = ''):
+ if namespace == '': namespace = self.namespace
+ for i in dir(object.__class__):
+ if i[0] != "_" and callable(getattr(object, i)):
+ self.registerKWFunction(getattr(object,i), namespace)
+
+ # convenience - wraps your func for you.
+ def registerKWFunction(self, function, namespace = '', funcName = None):
+ self.registerFunction(MethodSig(function,keywords=1), namespace,
+ funcName)
Binary file modules/SOAP.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/babelizer.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,171 @@
+# babelizer.py - API for simple access to babelfish.altavista.com.
+# Requires python 2.0 or better.
+#
+# See it in use at http://babel.MrFeinberg.com/
+
+"""API for simple access to babelfish.altavista.com.
+
+Summary:
+
+ import babelizer
+
+ print ' '.join(babelizer.available_languages)
+
+ print babelizer.translate( 'How much is that doggie in the window?',
+ 'English', 'French' )
+
+ def babel_callback(phrase):
+ print phrase
+ sys.stdout.flush()
+
+ babelizer.babelize( 'I love a reigning knight.',
+ 'English', 'German',
+ callback = babel_callback )
+
+available_languages
+ A list of languages available for use with babelfish.
+
+translate( phrase, from_lang, to_lang )
+ Uses babelfish to translate phrase from from_lang to to_lang.
+
+babelize(phrase, from_lang, through_lang, limit = 12, callback = None)
+ Uses babelfish to translate back and forth between from_lang and
+ through_lang until either no more changes occur in translation or
+ limit iterations have been reached, whichever comes first. Takes
+ an optional callback function which should receive a single
+ parameter, being the next translation. Without the callback
+ returns a list of successive translations.
+
+It's only guaranteed to work if 'english' is one of the two languages
+given to either of the translation methods.
+
+Both translation methods throw exceptions which are all subclasses of
+BabelizerError. They include
+
+LanguageNotAvailableError
+ Thrown on an attempt to use an unknown language.
+
+BabelfishChangedError
+ Thrown when babelfish.altavista.com changes some detail of their
+ layout, and babelizer can no longer parse the results or submit
+ the correct form (a not infrequent occurance).
+
+BabelizerIOError
+ Thrown for various networking and IO errors.
+
+Version: $Id: babelizer.py,v 1.1.1.1 2005/09/29 21:38:49 mikem Exp $
+Author: Jonathan Feinberg <jdf@pobox.com>
+"""
+import re, string, urllib
+
+"""
+Various patterns I have encountered in looking for the babelfish result.
+We try each of them in turn, based on the relative number of times I've
+seen each of these patterns. $1.00 to anyone who can provide a heuristic
+for knowing which one to use. This includes AltaVista employees.
+"""
+__where = [ re.compile(r'name=\"q\">([^<]*)'),
+ re.compile(r'td bgcolor=white>([^<]*)'),
+ re.compile(r'<\/strong><br>([^<]*)'),
+ re.compile(r'<Div style=padding:10px;[^>]*>([^<]*)')
+]
+
+__languages = { 'english' : 'en',
+ 'french' : 'fr',
+ 'spanish' : 'es',
+ 'german' : 'de',
+ 'italian' : 'it',
+ 'portuguese' : 'pt',
+ 'russian' : 'ru',
+ 'korean' : 'ko',
+ 'chinese' : 'zh',
+ 'japanese' : 'ja',
+ 'en' : 'en',
+ 'fr' : 'fr',
+ 'es' : 'es',
+ 'de' : 'de',
+ 'it' : 'it',
+ 'pt' : 'pt',
+ 'ru' : 'ru',
+ 'ko' : 'ko',
+ 'zh' : 'zh',
+ 'ja' : 'ja',
+ }
+
+"""
+ All of the available language names.
+"""
+available_languages = [ x.title() for x in __languages.keys() ]
+
+"""
+ Calling translate() or babelize() can raise a BabelizerError
+"""
+class BabelizerError(Exception):
+ pass
+
+class LanguageNotAvailableError(BabelizerError):
+ pass
+class BabelfishChangedError(BabelizerError):
+ pass
+class BabelizerIOError(BabelizerError):
+ pass
+
+def clean(text):
+ return ' '.join(string.replace(text.strip(), "\n", ' ').split())
+
+def translate(phrase, from_lang, to_lang):
+ phrase = clean(phrase)
+ try:
+ from_code = __languages[from_lang.lower()]
+ to_code = __languages[to_lang.lower()]
+ except KeyError, lang:
+ raise LanguageNotAvailableError(lang)
+
+ params = urllib.urlencode( { 'doit' : 'done',
+ 'tt' : 'urltext',
+ 'intl' : '1',
+ 'urltext' : phrase.encode('utf-8', 'replace'),
+ 'lp' : from_code + '_' + to_code } )
+ try:
+ response = urllib.urlopen('http://babelfish.altavista.com/babelfish/tr', params)
+ except IOError, what:
+ raise BabelizerIOError("Couldn't talk to server: %s" % what)
+ except:
+ print "Unexpected error:", sys.exc_info()[0]
+
+ html = response.read()
+ for regex in __where:
+ match = regex.search(html)
+ if match: break
+ if not match: raise BabelfishChangedError("Can't recognize translated string.")
+ return clean(match.group(1))
+
+def babelize(phrase, from_language, through_language, limit = 12, callback = None):
+ phrase = clean(phrase)
+ seen = { phrase: 1 }
+ if callback:
+ callback(phrase)
+ else:
+ results = [ phrase ]
+ flip = { from_language: through_language, through_language: from_language }
+ next = from_language
+ for i in range(limit):
+ phrase = translate(phrase, next, flip[next])
+ if seen.has_key(phrase): break
+ seen[phrase] = 1
+ if callback:
+ callback(phrase)
+ else:
+ results.append(phrase)
+ next = flip[next]
+ if not callback: return results
+
+if __name__ == '__main__':
+ import sys
+ def printer(x):
+ print x
+ sys.stdout.flush();
+
+
+ babelize("I won't take that sort of treatment from you, or from your doggie!",
+ 'english', 'french', callback = printer)
Binary file modules/babelizer.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/eliza.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,311 @@
+#----------------------------------------------------------------------
+# eliza.py
+#
+# a cheezy little Eliza knock-off by Joe Strout <joe@strout.net>
+# with some updates by Jeff Epler <jepler@inetnebr.com>
+# hacked into a module and updated by Jez Higgins <jez@jezuk.co.uk>
+# last revised: 28 February 2005
+#----------------------------------------------------------------------
+
+import string
+import re
+import random
+
+class eliza:
+ def __init__(self):
+ self.keys = map(lambda x:re.compile(x[0], re.IGNORECASE),gPats)
+ self.values = map(lambda x:x[1],gPats)
+
+ #----------------------------------------------------------------------
+ # translate: take a string, replace any words found in dict.keys()
+ # with the corresponding dict.values()
+ #----------------------------------------------------------------------
+ def translate(self,str,dict):
+ words = string.split(string.lower(str))
+ keys = dict.keys();
+ for i in range(0,len(words)):
+ if words[i] in keys:
+ words[i] = dict[words[i]]
+ return string.join(words)
+
+ #----------------------------------------------------------------------
+ # respond: take a string, a set of regexps, and a corresponding
+ # set of response lists; find a match, and return a randomly
+ # chosen response from the corresponding list.
+ #----------------------------------------------------------------------
+ def respond(self,str):
+ # find a match among keys
+ for i in range(0,len(self.keys)):
+ match = self.keys[i].match(str)
+ if match:
+ # found a match ... stuff with corresponding value
+ # chosen randomly from among the available options
+ resp = random.choice(self.values[i])
+ # we've got a response... stuff in reflected text where indicated
+ pos = string.find(resp,'%')
+ while pos > -1:
+ num = string.atoi(resp[pos+1:pos+2])
+ resp = resp[:pos] + \
+ self.translate(match.group(num),gReflections) + \
+ resp[pos+2:]
+ pos = string.find(resp,'%')
+ # fix munged punctuation at the end
+ if resp[-2:] == '?.': resp = resp[:-2] + '.'
+ if resp[-2:] == '??': resp = resp[:-2] + '?'
+ return resp
+
+#----------------------------------------------------------------------
+# gReflections, a translation table used to convert things you say
+# into things the computer says back, e.g. "I am" --> "you are"
+#----------------------------------------------------------------------
+gReflections = {
+ "am" : "are",
+ "was" : "were",
+ "i" : "you",
+ "i'd" : "you would",
+ "i've" : "you have",
+ "i'll" : "you will",
+ "my" : "your",
+ "are" : "am",
+ "you've": "I have",
+ "you'll": "I will",
+ "your" : "my",
+ "yours" : "mine",
+ "you" : "me",
+ "me" : "you"
+}
+
+#----------------------------------------------------------------------
+# gPats, the main response table. Each element of the list is a
+# two-element list; the first is a regexp, and the second is a
+# list of possible responses, with group-macros labelled as
+# %1, %2, etc.
+#----------------------------------------------------------------------
+gPats = [
+ [r'I need (.*)',
+ [ "Why do you need %1?",
+ "Would it really help you to get %1?",
+ "Are you sure you need %1?"]],
+
+ [r'Why don\'?t you ([^\?]*)\??',
+ [ "Do you really think I don't %1?",
+ "Perhaps eventually I will %1.",
+ "Do you really want me to %1?"]],
+
+ [r'Why can\'?t I ([^\?]*)\??',
+ [ "Do you think you should be able to %1?",
+ "If you could %1, what would you do?",
+ "I don't know -- why can't you %1?",
+ "Have you really tried?"]],
+
+ [r'I can\'?t (.*)',
+ [ "How do you know you can't %1?",
+ "Perhaps you could %1 if you tried.",
+ "What would it take for you to %1?"]],
+
+ [r'I am (.*)',
+ [ "Did you come to me because you are %1?",
+ "How long have you been %1?",
+ "How do you feel about being %1?"]],
+
+ [r'I\'?m (.*)',
+ [ "How does being %1 make you feel?",
+ "Do you enjoy being %1?",
+ "Why do you tell me you're %1?",
+ "Why do you think you're %1?"]],
+
+ [r'Are you ([^\?]*)\??',
+ [ "Why does it matter whether I am %1?",
+ "Would you prefer it if I were not %1?",
+ "Perhaps you believe I am %1.",
+ "I may be %1 -- what do you think?"]],
+
+ [r'What (.*)',
+ [ "Why do you ask?",
+ "How would an answer to that help you?",
+ "What do you think?"]],
+
+ [r'How (.*)',
+ [ "How do you suppose?",
+ "Perhaps you can answer your own question.",
+ "What is it you're really asking?"]],
+
+ [r'Because (.*)',
+ [ "Is that the real reason?",
+ "What other reasons come to mind?",
+ "Does that reason apply to anything else?",
+ "If %1, what else must be true?"]],
+
+ [r'(.*) sorry (.*)',
+ [ "There are many times when no apology is needed.",
+ "What feelings do you have when you apologize?"]],
+
+ [r'Hello(.*)',
+ [ "Hello... I'm glad you could drop by today.",
+ "Hi there... how are you today?",
+ "Hello, how are you feeling today?"]],
+
+ [r'I think (.*)',
+ [ "Do you doubt %1?",
+ "Do you really think so?",
+ "But you're not sure %1?"]],
+
+ [r'(.*) friend (.*)',
+ [ "Tell me more about your friends.",
+ "When you think of a friend, what comes to mind?",
+ "Why don't you tell me about a childhood friend?"]],
+
+ [r'Yes',
+ [ "You seem quite sure.",
+ "OK, but can you elaborate a bit?"]],
+
+ [r'(.*) computer(.*)',
+ [ "Are you really talking about me?",
+ "Does it seem strange to talk to a computer?",
+ "How do computers make you feel?",
+ "Do you feel threatened by computers?"]],
+
+ [r'Is it (.*)',
+ [ "Do you think it is %1?",
+ "Perhaps it's %1 -- what do you think?",
+ "If it were %1, what would you do?",
+ "It could well be that %1."]],
+
+ [r'It is (.*)',
+ [ "You seem very certain.",
+ "If I told you that it probably isn't %1, what would you feel?"]],
+
+ [r'Can you ([^\?]*)\??',
+ [ "What makes you think I can't %1?",
+ "If I could %1, then what?",
+ "Why do you ask if I can %1?"]],
+
+ [r'Can I ([^\?]*)\??',
+ [ "Perhaps you don't want to %1.",
+ "Do you want to be able to %1?",
+ "If you could %1, would you?"]],
+
+ [r'You are (.*)',
+ [ "Why do you think I am %1?",
+ "Does it please you to think that I'm %1?",
+ "Perhaps you would like me to be %1.",
+ "Perhaps you're really talking about yourself?"]],
+
+ [r'You\'?re (.*)',
+ [ "Why do you say I am %1?",
+ "Why do you think I am %1?",
+ "Are we talking about you, or me?"]],
+
+ [r'I don\'?t (.*)',
+ [ "Don't you really %1?",
+ "Why don't you %1?",
+ "Do you want to %1?"]],
+
+ [r'I feel (.*)',
+ [ "Good, tell me more about these feelings.",
+ "Do you often feel %1?",
+ "When do you usually feel %1?",
+ "When you feel %1, what do you do?"]],
+
+ [r'I have (.*)',
+ [ "Why do you tell me that you've %1?",
+ "Have you really %1?",
+ "Now that you have %1, what will you do next?"]],
+
+ [r'I would (.*)',
+ [ "Could you explain why you would %1?",
+ "Why would you %1?",
+ "Who else knows that you would %1?"]],
+
+ [r'Is there (.*)',
+ [ "Do you think there is %1?",
+ "It's likely that there is %1.",
+ "Would you like there to be %1?"]],
+
+ [r'My (.*)',
+ [ "I see, your %1.",
+ "Why do you say that your %1?",
+ "When your %1, how do you feel?"]],
+
+ [r'You (.*)',
+ [ "We should be discussing you, not me.",
+ "Why do you say that about me?",
+ "Why do you care whether I %1?"]],
+
+ [r'Why (.*)',
+ [ "Why don't you tell me the reason why %1?",
+ "Why do you think %1?" ]],
+
+ [r'I want (.*)',
+ [ "What would it mean to you if you got %1?",
+ "Why do you want %1?",
+ "What would you do if you got %1?",
+ "If you got %1, then what would you do?"]],
+
+ [r'(.*) mother(.*)',
+ [ "Tell me more about your mother.",
+ "What was your relationship with your mother like?",
+ "How do you feel about your mother?",
+ "How does this relate to your feelings today?",
+ "Good family relations are important."]],
+
+ [r'(.*) father(.*)',
+ [ "Tell me more about your father.",
+ "How did your father make you feel?",
+ "How do you feel about your father?",
+ "Does your relationship with your father relate to your feelings today?",
+ "Do you have trouble showing affection with your family?"]],
+
+ [r'(.*) child(.*)',
+ [ "Did you have close friends as a child?",
+ "What is your favorite childhood memory?",
+ "Do you remember any dreams or nightmares from childhood?",
+ "Did the other children sometimes tease you?",
+ "How do you think your childhood experiences relate to your feelings today?"]],
+
+ [r'(.*)\?',
+ [ "Why do you ask that?",
+ "Please consider whether you can answer your own question.",
+ "Perhaps the answer lies within yourself?",
+ "Why don't you tell me?"]],
+
+ [r'quit',
+ [ "Thank you for talking with me.",
+ "Good-bye.",
+ "Thank you, that will be $150. Have a good day!"]],
+
+ [r'(.*)',
+ [ "Please tell me more.",
+ "Let's change focus a bit... Tell me about your family.",
+ "Can you elaborate on that?",
+ "Why do you say that %1?",
+ "I see.",
+ "Very interesting.",
+ "%1.",
+ "I see. And what does that tell you?",
+ "How does that make you feel?",
+ "How do you feel when you say that?"]]
+ ]
+
+#----------------------------------------------------------------------
+# command_interface
+#----------------------------------------------------------------------
+def command_interface():
+ print "Therapist\n---------"
+ print "Talk to the program by typing in plain English, using normal upper-"
+ print 'and lower-case letters and punctuation. Enter "quit" when done.'
+ print '='*72
+ print "Hello. How are you feeling today?"
+ s = ""
+ therapist = eliza();
+ while s != "quit":
+ try: s = raw_input(">")
+ except EOFError:
+ s = "quit"
+ print s
+ while s[-1] in "!.": s = s[:-1]
+ print therapist.respond(s)
+
+
+if __name__ == "__main__":
+ command_interface()
Binary file modules/eliza.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/google.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,432 @@
+"""Python wrapper for Google web APIs
+
+This module allows you to access Google's web APIs through SOAP,
+to do things like search Google and get the results programmatically.
+Described here:
+ http://www.google.com/apis/
+
+You need a Google-provided license key to use these services.
+Follow the link above to get one. These functions will look in
+several places (in this order) for the license key:
+- the "license_key" argument of each function
+- the module-level LICENSE_KEY variable (call setLicense once to set it)
+- an environment variable called GOOGLE_LICENSE_KEY
+- a file called ".googlekey" in the current directory
+- a file called "googlekey.txt" in the current directory
+- a file called ".googlekey" in your home directory
+- a file called "googlekey.txt" in your home directory
+- a file called ".googlekey" in the same directory as google.py
+- a file called "googlekey.txt" in the same directory as google.py
+
+Sample usage:
+>>> import google
+>>> google.setLicense('...') # must get your own key!
+>>> data = google.doGoogleSearch('python')
+>>> data.meta.searchTime
+0.043221000000000002
+>>> data.results[0].URL
+'http://www.python.org/'
+>>> data.results[0].title
+'<b>Python</b> Language Website'
+
+See documentation of SearchResultsMetaData and SearchResult classes
+for other available attributes.
+"""
+
+__author__ = "Mark Pilgrim (f8dy@diveintomark.org)"
+__version__ = "0.5.2"
+__cvsversion__ = "$Revision: 1.1.1.1 $"[11:-2]
+__date__ = "$Date: 2005/09/29 21:38:49 $"[7:-2]
+__copyright__ = "Copyright (c) 2002 Mark Pilgrim"
+__license__ = "Python"
+__credits__ = """David Ascher, for the install script
+Erik Max Francis, for the command line interface
+Michael Twomey, for HTTP proxy support"""
+
+import SOAP
+import os, sys, getopt
+
+LICENSE_KEY = None
+HTTP_PROXY = None
+
+# don't touch the rest of these constants
+class NoLicenseKey(Exception): pass
+_url = 'http://api.google.com/search/beta2'
+_namespace = 'urn:GoogleSearch'
+_false = SOAP.booleanType(0)
+_true = SOAP.booleanType(1)
+_googlefile1 = ".googlekey"
+_googlefile2 = "googlekey.txt"
+_licenseLocations = (
+ (lambda key: key, 'passed to the function in license_key variable'),
+ (lambda key: LICENSE_KEY, 'module-level LICENSE_KEY variable (call setLicense to set it)'),
+ (lambda key: os.environ.get('GOOGLE_LICENSE_KEY', None), 'an environment variable called GOOGLE_LICENSE_KEY'),
+ (lambda key: _contentsOf(os.getcwd(), _googlefile1), '%s in the current directory' % _googlefile1),
+ (lambda key: _contentsOf(os.getcwd(), _googlefile2), '%s in the current directory' % _googlefile2),
+ (lambda key: _contentsOf(os.environ.get('HOME', ''), _googlefile1), '%s in your home directory' % _googlefile1),
+ (lambda key: _contentsOf(os.environ.get('HOME', ''), _googlefile2), '%s in your home directory' % _googlefile2),
+ (lambda key: _contentsOf(_getScriptDir(), _googlefile1), '%s in the google.py directory' % _googlefile1),
+ (lambda key: _contentsOf(_getScriptDir(), _googlefile2), '%s in the google.py directory' % _googlefile2)
+ )
+
+## administrative functions
+def version():
+ print """PyGoogle %(__version__)s
+%(__copyright__)s
+released %(__date__)s
+
+Thanks to:
+%(__credits__)s""" % globals()
+
+def usage():
+ program = os.path.basename(sys.argv[0])
+ print """Usage: %(program)s [options] [querytype] query
+
+options:
+ -k, --key= <license key> Google license key (see important note below)
+ -1, -l, --lucky show only first hit
+ -m, --meta show meta information
+ -r, --reverse show results in reverse order
+ -x, --proxy= <url> use HTTP proxy
+ -h, --help print this help
+ -v, --version print version and copyright information
+ -t, --test run test queries
+
+querytype:
+ -s, --search= <query> search (default)
+ -c, --cache= <url> retrieve cached page
+ -p, --spelling= <word> check spelling
+
+IMPORTANT NOTE: all Google functions require a valid license key;
+visit http://www.google.com/apis/ to get one. %(program)s will look in
+these places (in order) and use the first license key it finds:
+ * the key specified on the command line""" % vars()
+ for get, location in _licenseLocations[2:]:
+ print " *", location
+
+## utility functions
+def setLicense(license_key):
+ """set license key"""
+ global LICENSE_KEY
+ LICENSE_KEY = license_key
+
+def getLicense(license_key = None):
+ """get license key
+
+ license key can come from any number of locations;
+ see module docs for search order"""
+ for get, location in _licenseLocations:
+ rc = get(license_key)
+ if rc: return rc
+ usage()
+ raise NoLicenseKey, 'get a license key at http://www.google.com/apis/'
+
+def setProxy(http_proxy):
+ """set HTTP proxy"""
+ global HTTP_PROXY
+ HTTP_PROXY = http_proxy
+
+def getProxy(http_proxy = None):
+ """get HTTP proxy"""
+ return http_proxy or HTTP_PROXY
+
+def _contentsOf(dirname, filename):
+ filename = os.path.join(dirname, filename)
+ if not os.path.exists(filename): return None
+ fsock = open(filename)
+ contents = fsock.read()
+ fsock.close()
+ return contents
+
+def _getScriptDir():
+ if __name__ == '__main__':
+ return os.path.abspath(os.path.dirname(sys.argv[0]))
+ else:
+ return os.path.abspath(os.path.dirname(sys.modules[__name__].__file__))
+
+def _marshalBoolean(value):
+ if value:
+ return _true
+ else:
+ return _false
+
+## output formatters
+def makeFormatter(outputFormat):
+ classname = "%sOutputFormatter" % outputFormat.capitalize()
+ return globals()[classname]()
+
+def output(results, params):
+ formatter = makeFormatter(params.get("outputFormat", "text"))
+ outputmethod = getattr(formatter, params["func"])
+ outputmethod(results, params)
+
+class OutputFormatter:
+ def boil(self, data):
+ if type(data) == type(u""):
+ return data.encode("ISO-8859-1", "replace")
+ else:
+ return data
+
+class TextOutputFormatter(OutputFormatter):
+ def common(self, data, params):
+ if params.get("showMeta", 0):
+ meta = data.meta
+ for category in meta.directoryCategories:
+ print "directoryCategory: %s" % self.boil(category["fullViewableName"])
+ for attr in [node for node in dir(meta) if node <> "directoryCategories" and node[:2] <> '__']:
+ print "%s:" % attr, self.boil(getattr(meta, attr))
+
+ def doGoogleSearch(self, data, params):
+ results = data.results
+ if params.get("feelingLucky", 0):
+ results = results[:1]
+ if params.get("reverseOrder", 0):
+ results.reverse()
+ for result in results:
+ for attr in dir(result):
+ if attr == "directoryCategory":
+ print "directoryCategory:", self.boil(result.directoryCategory["fullViewableName"])
+ elif attr[:2] <> '__':
+ print "%s:" % attr, self.boil(getattr(result, attr))
+ print
+ self.common(data, params)
+
+ def doGetCachedPage(self, data, params):
+ print data
+ self.common(data, params)
+
+ doSpellingSuggestion = doGetCachedPage
+
+## search results classes
+class _SearchBase:
+ def __init__(self, params):
+ for k, v in params.items():
+ if isinstance(v, SOAP.structType):
+ v = v._asdict
+ try:
+ if isinstance(v[0], SOAP.structType):
+ v = [node._asdict for node in v]
+ except:
+ pass
+ self.__dict__[str(k)] = v
+
+class SearchResultsMetaData(_SearchBase):
+ """metadata of search query results
+
+ Available attributes:
+ documentFiltering - flag indicates whether duplicate page filtering was perfomed in this search
+ searchComments - human-readable informational message (example: "'the' is a very common word
+ and was not included in your search")
+ estimatedTotalResultsCount - estimated total number of results for this query
+ estimateIsExact - flag indicates whether estimatedTotalResultsCount is an exact value
+ searchQuery - search string that initiated this search
+ startIndex - index of first result returned (zero-based)
+ endIndex - index of last result returned (zero-based)
+ searchTips - human-readable informational message on how to use Google bette
+ directoryCategories - list of dictionaries like this:
+ {'fullViewableName': Open Directory category,
+ 'specialEncoding': encoding scheme of this directory category}
+ searchTime - total search time, in seconds
+ """
+ pass
+
+class SearchResult(_SearchBase):
+ """search result
+
+ Available attributes:
+ URL - URL
+ title - title (HTML)
+ snippet - snippet showing query context (HTML)
+ cachedSize - size of cached version of this result, (KB)
+ relatedInformationPresent - flag indicates that the "related:" keyword is supported for this URL
+ hostName: When filtering occurs, a maximum of two results from any given host is returned.
+ When this occurs, the second resultElement that comes from that host contains
+ the host name in this parameter.
+ directoryCategory: dictionary like this:
+ {'fullViewableName': Open Directory category,
+ 'specialEncoding': encoding scheme of this directory category}
+ directoryTitle: Open Directory title of this result (or blank)
+ summary - Open Directory summary for this result (or blank)
+ """
+ pass
+
+class SearchReturnValue:
+ """complete search results for a single query
+
+ Available attributes:
+ meta - SearchResultsMetaData
+ results - list of SearchResult
+ """
+ def __init__(self, metadata, results):
+ self.meta = metadata
+ self.results = results
+
+## main functions
+def doGoogleSearch(q, start=0, maxResults=10, filter=1, restrict='',
+ safeSearch=0, language='', inputencoding='', outputencoding='',
+ license_key = None, http_proxy = None):
+ """search Google
+
+ You need a license key to call this function; see
+ http://www.google.com/apis/ to get one. Then you can either pass it to
+ this function every time, or set it globally; see the module docs for details.
+
+ Parameters:
+ q - search string. Anything you could type at google.com, you can pass here.
+ See http://www.google.com/help/features.html for examples of advanced features.
+ start (optional) - zero-based index of first desired result (for paging through
+ multiple pages of results)
+ maxResults (optional) - maximum number of results, currently capped at 10
+ filter (optional) - set to 1 to filter out similar results, set to 0 to see everything
+ restrict (optional) - restrict results by country or topic. Examples:
+ Ukraine - search only sites located in Ukraine
+ linux - search Linux sites only
+ mac - search Mac sites only
+ bsd - search FreeBSD sites only
+ See the APIs_reference.html file in the SDK (http://www.google.com/apis/download.html)
+ for more advanced examples and a full list of country codes and topics.
+ safeSearch (optional) - set to 1 to filter results with SafeSearch (no adult material)
+ language (optional) - restricts search to documents in one or more languages. Example:
+ lang_en - only return pages in English
+ lang_fr - only return pages in French
+ See the APIs_reference.html file in the SDK (http://www.google.com/apis/download.html)
+ for more advanced examples and a full list of language codes.
+ inputencoding (optional) - sets the character encoding of q parameter
+ outputencoding (optional) - sets the character encoding of the returned results
+ See the APIs_reference.html file in the SDK (http://www.google.com/apis/download.html)
+ for a full list of encodings.
+ http_proxy (optional) - address of HTTP proxy to use for sending and receiving SOAP messages
+
+ Returns: SearchReturnValue
+ .meta - SearchMetaData
+ .results - list of SearchResult
+ See documentation of these individual classes for list of available attributes
+ """
+ http_proxy = getProxy(http_proxy)
+ remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
+ license_key = getLicense(license_key)
+ filter = _marshalBoolean(filter)
+ safeSearch = _marshalBoolean(safeSearch)
+ data = remoteserver.doGoogleSearch(license_key, q, start, maxResults, filter, restrict,
+ safeSearch, language, inputencoding, outputencoding)
+ metadata = data._asdict
+ del metadata["resultElements"]
+ metadata = SearchResultsMetaData(metadata)
+ results = [SearchResult(node._asdict) for node in data.resultElements]
+ return SearchReturnValue(metadata, results)
+
+def doGetCachedPage(url, license_key = None, http_proxy = None):
+ """get page from Google cache
+
+ You need a license key to call this function; see
+ http://www.google.com/apis/ to get one. Then you can either pass it to
+ this function every time, or set it globally; see the module docs for details.
+
+ Parameters:
+ url - address of page to get
+ license_key (optional) - Google license key
+ http_proxy (optional) - address of HTTP proxy to use for sending and receiving SOAP messages
+
+ Returns: string, text of cached page
+ """
+ http_proxy = getProxy(http_proxy)
+ remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
+ license_key = getLicense(license_key)
+ return remoteserver.doGetCachedPage(license_key, url)
+
+def doSpellingSuggestion(phrase, license_key = None, http_proxy = None):
+ """get spelling suggestions from Google
+
+ You need a license key to call this function; see
+ http://www.google.com/apis/ to get one. Then you can either pass it to
+ this function every time, or set it globally; see the module docs for details.
+
+ Parameters:
+ phrase - word or phrase to spell-check
+ http_proxy (optional) - address of HTTP proxy to use for sending and receiving SOAP messages
+
+ Returns: text of suggested replacement, or None
+ """
+ http_proxy = getProxy(http_proxy)
+ remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy)
+ license_key = getLicense(license_key)
+ return remoteserver.doSpellingSuggestion(license_key, phrase)
+
+## functional test suite (see googletest.py for unit test suite)
+def test():
+ try:
+ getLicense(None)
+ except NoLicenseKey:
+ return
+ print "Searching for Python at google.com..."
+ data = doGoogleSearch("Python")
+ output(data, {"func": "doGoogleSearch"})
+
+ print "\nSearching for 5 _French_ pages about Python, encoded in ISO-8859-1..."
+ data = doGoogleSearch("Python", language='lang_fr', outputencoding='ISO-8859-1', maxResults=5)
+ output(data, {"func": "doGoogleSearch"})
+
+ phrase = "Pyhton programming languager"
+ print "\nTesting spelling suggetions for '%s'..." % phrase
+ data = doSpellingSuggestion(phrase)
+ output(data, {"func": "doSpellingSuggestion"})
+
+## main driver for command-line use
+def main(argv):
+ if not argv:
+ usage()
+ return
+ q = None
+ func = None
+ http_proxy = None
+ license_key = None
+ feelingLucky = 0
+ showMeta = 0
+ reverseOrder = 0
+ runTest = 0
+ outputFormat = "text"
+ try:
+ opts, args = getopt.getopt(argv, "s:c:p:k:lmrx:hvt1",
+ ["search=", "cache=", "spelling=", "key=", "lucky", "meta", "reverse", "proxy=", "help", "version", "test"])
+ except getopt.GetoptError:
+ usage()
+ sys.exit(2)
+ for opt, arg in opts:
+ if opt in ("-s", "--search"):
+ q = arg
+ func = "doGoogleSearch"
+ elif opt in ("-c", "--cache"):
+ q = arg
+ func = "doGetCachedPage"
+ elif opt in ("-p", "--spelling"):
+ q = arg
+ func = "doSpellingSuggestion"
+ elif opt in ("-k", "--key"):
+ license_key = arg
+ elif opt in ("-l", "-1", "--lucky"):
+ feelingLucky = 1
+ elif opt in ("-m", "--meta"):
+ showMeta = 1
+ elif opt in ("-r", "--reverse"):
+ reverseOrder = 1
+ elif opt in ("-x", "--proxy"):
+ http_proxy = arg
+ elif opt in ("-h", "--help"):
+ usage()
+ elif opt in ("-v", "--version"):
+ version()
+ elif opt in ("-t", "--test"):
+ runTest = 1
+ if runTest:
+ setLicense(license_key)
+ setProxy(http_proxy)
+ test()
+ if args and not q:
+ q = args[0]
+ func = "doGoogleSearch"
+ if func:
+ results = globals()[func](q, http_proxy=http_proxy, license_key=license_key)
+ output(results, locals())
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
Binary file modules/google.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/googlekey.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1 @@
+REPLACE THIS LINE WITH YOUR PERSONAL GOOGLE KEY
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/pymetar.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,895 @@
+# Copyright (C) 2002 Tobias Klausmann
+# Modified by Jerome Alet
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# By reading this code you agree not to ridicule the author =)
+
+import string
+import re
+import urllib
+import types
+import math, fpformat
+
+__author__ = "klausman-usenet@tuts.net"
+
+__version__ = "0.4"
+
+__doc__ = """Pymetar v%s (c) 2002 Tobias Klausman
+
+Pymetar is a python module and command line tool designed to fetch Metar
+reports from the NOAA (http://www.noaa.gov) and allow access to the included
+weather information.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place, Suite 330, Boston, MA 02111-1307, USA.
+
+Please e-mail bugs to: %s""" % (__version__, __author__)
+
+
+#
+# What a boring list to type !
+#
+# It seems the NOAA doesn't want to return plain text, but considering the
+# format of their response, this is not to save bandwidth :-)
+#
+_WeatherConditions = {
+ "DZ" : ("Drizzle", "rain", {
+ "" : "Moderate drizzle",
+ "-" : "Light drizzle",
+ "+" : "Heavy drizzle",
+ "VC" : "Drizzle in the vicinity",
+ "MI" : "Shallow drizzle",
+ "BC" : "Patches of drizzle",
+ "PR" : "Partial drizzle",
+ "TS" : ("Thunderstorm", "storm"),
+ "BL" : "Windy drizzle",
+ "SH" : "Showers",
+ "DR" : "Drifting drizzle",
+ "FZ" : "Freezing drizzle",
+ }),
+ "RA" : ("Rain", "rain", {
+ "" : "Moderate rain",
+ "-" : "Light rain",
+ "+" : "Heavy rain",
+ "VC" : "Rain in the vicinity",
+ "MI" : "Shallow rain",
+ "BC" : "Patches of rain",
+ "PR" : "Partial rainfall",
+ "TS" : ("Thunderstorm", "storm"),
+ "BL" : "Blowing rainfall",
+ "SH" : "Rain showers",
+ "DR" : "Drifting rain",
+ "FZ" : "Freezing rain",
+ }),
+ "SN" : ("Snow", "snow", {
+ "" : "Moderate snow",
+ "-" : "Light snow",
+ "+" : "Heavy snow",
+ "VC" : "Snow in the vicinity",
+ "MI" : "Shallow snow",
+ "BC" : "Patches of snow",
+ "PR" : "Partial snowfall",
+ "TS" : ("Snowstorm", "storm"),
+ "BL" : "Blowing snowfall",
+ "SH" : "Snowfall showers",
+ "DR" : "Drifting snow",
+ "FZ" : "Freezing snow",
+ }),
+ "SG" : ("Snow grains", "snow", {
+ "" : "Moderate snow grains",
+ "-" : "Light snow grains",
+ "+" : "Heavy snow grains",
+ "VC" : "Snow grains in the vicinity",
+ "MI" : "Shallow snow grains",
+ "BC" : "Patches of snow grains",
+ "PR" : "Partial snow grains",
+ "TS" : ("Snowstorm", "storm"),
+ "BL" : "Blowing snow grains",
+ "SH" : "Snow grain showers",
+ "DR" : "Drifting snow grains",
+ "FZ" : "Freezing snow grains",
+ }),
+ "IC" : ("Ice crystals", "snow", {
+ "" : "Moderate ice crystals",
+ "-" : "Few ice crystals",
+ "+" : "Heavy ice crystals",
+ "VC" : "Ice crystals in the vicinity",
+ "BC" : "Patches of ice crystals",
+ "PR" : "Partial ice crystals",
+ "TS" : ("Ice crystal storm", "storm"),
+ "BL" : "Blowing ice crystals",
+ "SH" : "Showers of ice crystals",
+ "DR" : "Drifting ice crystals",
+ "FZ" : "Freezing ice crystals",
+ }),
+ "PE" : ("Ice pellets", "snow", {
+ "" : "Moderate ice pellets",
+ "-" : "Few ice pellets",
+ "+" : "Heavy ice pellets",
+ "VC" : "Ice pellets in the vicinity",
+ "MI" : "Shallow ice pellets",
+ "BC" : "Patches of ice pellets",
+ "PR" : "Partial ice pellets",
+ "TS" : ("Ice pellets storm", "storm"),
+ "BL" : "Blowing ice pellets",
+ "SH" : "Showers of ice pellets",
+ "DR" : "Drifting ice pellets",
+ "FZ" : "Freezing ice pellets",
+ }),
+ "GR" : ("Hail", "rain", {
+ "" : "Moderate hail",
+ "-" : "Light hail",
+ "+" : "Heavy hail",
+ "VC" : "Hail in the vicinity",
+ "MI" : "Shallow hail",
+ "BC" : "Patches of hail",
+ "PR" : "Partial hail",
+ "TS" : ("Hailstorm", "storm"),
+ "BL" : "Blowing hail",
+ "SH" : "Hail showers",
+ "DR" : "Drifting hail",
+ "FZ" : "Freezing hail",
+ }),
+ "GS" : ("Small hail", "rain", {
+ "" : "Moderate small hail",
+ "-" : "Light small hail",
+ "+" : "Heavy small hail",
+ "VC" : "Small hail in the vicinity",
+ "MI" : "Shallow small hail",
+ "BC" : "Patches of small hail",
+ "PR" : "Partial small hail",
+ "TS" : ("Small hailstorm", "storm"),
+ "BL" : "Blowing small hail",
+ "SH" : "Showers of small hail",
+ "DR" : "Drifting small hail",
+ "FZ" : "Freezing small hail",
+ }),
+ "UP" : ("Precipitation", "rain", {
+ "" : "Moderate precipitation",
+ "-" : "Light precipitation",
+ "+" : "Heavy precipitation",
+ "VC" : "Precipitation in the vicinity",
+ "MI" : "Shallow precipitation",
+ "BC" : "Patches of precipitation",
+ "PR" : "Partial precipitation",
+ "TS" : ("Unknown thunderstorm", "storm"),
+ "BL" : "Blowing precipitation",
+ "SH" : "Showers, type unknown",
+ "DR" : "Drifting precipitation",
+ "FZ" : "Freezing precipitation",
+ }),
+ "BR" : ("Mist", "fog", {
+ "" : "Moderate mist",
+ "-" : "Light mist",
+ "+" : "Thick mist",
+ "VC" : "Mist in the vicinity",
+ "MI" : "Shallow mist",
+ "BC" : "Patches of mist",
+ "PR" : "Partial mist",
+ "BL" : "Mist with wind",
+ "DR" : "Drifting mist",
+ "FZ" : "Freezing mist",
+ }),
+ "FG" : ("Fog", "fog", {
+ "" : "Moderate fog",
+ "-" : "Light fog",
+ "+" : "Thick fog",
+ "VC" : "Fog in the vicinity",
+ "MI" : "Shallow fog",
+ "BC" : "Patches of fog",
+ "PR" : "Partial fog",
+ "BL" : "Fog with wind",
+ "DR" : "Drifting fog",
+ "FZ" : "Freezing fog",
+ }),
+ "FU" : ("Smoke", "fog", {
+ "" : "Moderate smoke",
+ "-" : "Thin smoke",
+ "+" : "Thick smoke",
+ "VC" : "Smoke in the vicinity",
+ "MI" : "Shallow smoke",
+ "BC" : "Patches of smoke",
+ "PR" : "Partial smoke",
+ "TS" : ("Smoke w/ thunders", "storm"),
+ "BL" : "Smoke with wind",
+ "DR" : "Drifting smoke",
+ }),
+ "VA" : ("Volcanic ash", "fog", {
+ "" : "Moderate volcanic ash",
+ "+" : "Thick volcanic ash",
+ "VC" : "Volcanic ash in the vicinity",
+ "MI" : "Shallow volcanic ash",
+ "BC" : "Patches of volcanic ash",
+ "PR" : "Partial volcanic ash",
+ "TS" : ("Volcanic ash w/ thunders", "storm"),
+ "BL" : "Blowing volcanic ash",
+ "SH" : "Showers of volcanic ash",
+ "DR" : "Drifting volcanic ash",
+ "FZ" : "Freezing volcanic ash",
+ }),
+ "SA" : ("Sand", "fog", {
+ "" : "Moderate sand",
+ "-" : "Light sand",
+ "+" : "Heavy sand",
+ "VC" : "Sand in the vicinity",
+ "BC" : "Patches of sand",
+ "PR" : "Partial sand",
+ "BL" : "Blowing sand",
+ "DR" : "Drifting sand",
+ }),
+ "HZ" : ("Haze", "fog", {
+ "" : "Moderate haze",
+ "-" : "Light haze",
+ "+" : "Thick haze",
+ "VC" : "Haze in the vicinity",
+ "MI" : "Shallow haze",
+ "BC" : "Patches of haze",
+ "PR" : "Partial haze",
+ "BL" : "Haze with wind",
+ "DR" : "Drifting haze",
+ "FZ" : "Freezing haze",
+ }),
+ "PY" : ("Sprays", "fog", {
+ "" : "Moderate sprays",
+ "-" : "Light sprays",
+ "+" : "Heavy sprays",
+ "VC" : "Sprays in the vicinity",
+ "MI" : "Shallow sprays",
+ "BC" : "Patches of sprays",
+ "PR" : "Partial sprays",
+ "BL" : "Blowing sprays",
+ "DR" : "Drifting sprays",
+ "FZ" : "Freezing sprays",
+ }),
+ "DU" : ("Dust", "fog", {
+ "" : "Moderate dust",
+ "-" : "Light dust",
+ "+" : "Heavy dust",
+ "VC" : "Dust in the vicinity",
+ "BC" : "Patches of dust",
+ "PR" : "Partial dust",
+ "BL" : "Blowing dust",
+ "DR" : "Drifting dust",
+ }),
+ "SQ" : ("Squall", "storm", {
+ "" : "Moderate squall",
+ "-" : "Light squall",
+ "+" : "Heavy squall",
+ "VC" : "Squall in the vicinity",
+ "PR" : "Partial squall",
+ "TS" : "Thunderous squall",
+ "BL" : "Blowing squall",
+ "DR" : "Drifting squall",
+ "FZ" : "Freezing squall",
+ }),
+ "SS" : ("Sandstorm", "fog", {
+ "" : "Moderate sandstorm",
+ "-" : "Light sandstorm",
+ "+" : "Heavy sandstorm",
+ "VC" : "Sandstorm in the vicinity",
+ "MI" : "Shallow sandstorm",
+ "PR" : "Partial sandstorm",
+ "TS" : ("Thunderous sandstorm", "storm"),
+ "BL" : "Blowing sandstorm",
+ "DR" : "Drifting sandstorm",
+ "FZ" : "Freezing sandstorm",
+ }),
+ "DS" : ("Duststorm", "fog", {
+ "" : "Moderate duststorm",
+ "-" : "Light duststorm",
+ "+" : "Heavy duststorm",
+ "VC" : "Duststorm in the vicinity",
+ "MI" : "Shallow duststorm",
+ "PR" : "Partial duststorm",
+ "TS" : ("Thunderous duststorm", "storm"),
+ "BL" : "Blowing duststorm",
+ "DR" : "Drifting duststorm",
+ "FZ" : "Freezing duststorm",
+ }),
+ "PO" : ("Dustwhirls", "fog", {
+ "" : "Moderate dustwhirls",
+ "-" : "Light dustwhirls",
+ "+" : "Heavy dustwhirls",
+ "VC" : "Dustwhirls in the vicinity",
+ "MI" : "Shallow dustwhirls",
+ "BC" : "Patches of dustwhirls",
+ "PR" : "Partial dustwhirls",
+ "BL" : "Blowing dustwhirls",
+ "DR" : "Drifting dustwhirls",
+ }),
+ "+FC" : ("Tornado", "storm", {
+ "" : "Moderate tornado",
+ "+" : "Raging tornado",
+ "VC" : "Tornado in the vicinity",
+ "PR" : "Partial tornado",
+ "TS" : "Thunderous tornado",
+ "BL" : "Tornado",
+ "DR" : "Drifting tornado",
+ "FZ" : "Freezing tornado",
+ }),
+ "FC" : ("Funnel cloud", "fog", {
+ "" : "Moderate funnel cloud",
+ "-" : "Light funnel cloud",
+ "+" : "Thick funnel cloud",
+ "VC" : "Funnel cloud in the vicinity",
+ "MI" : "Shallow funnel cloud",
+ "BC" : "Patches of funnel cloud",
+ "PR" : "Partial funnel cloud",
+ "BL" : "Funnel cloud w/ wind",
+ "DR" : "Drifting funnel cloud",
+ }),
+ }
+
+#
+# RegExps to extract the different parts from the Metar encoded report
+TIME_RE_STR = r"^([0-9]{6})Z$"
+WIND_RE_STR = r"^(([0-9]{3})|VRB)([0-9]?[0-9]{2})(G[0-9]?[0-9]{2})?KT$"
+VIS_RE_STR = r"^(([0-9]?[0-9])|(M?1/[0-9]?[0-9]))SM$"
+CLOUD_RE_STR= r"^(CLR|SKC|BKN|SCT|FEW|OVC)([0-9]{3})?$"
+TEMP_RE_STR = r"^(M?[0-9][0-9])/(M?[0-9][0-9])$"
+PRES_RE_STR = r"^(A|Q)([0-9]{4})$"
+COND_RE_STR = r"^(-|\\+)?(VC|MI|BC|PR|TS|BL|SH|DR|FZ)?(DZ|RA|SN|SG|IC|PE|GR|GS|UP|BR|FG|FU|VA|SA|HZ|PY|DU|SQ|SS|DS|PO|\\+?FC)$"
+
+class MetarReport:
+
+ """
+ This class provides a means to download and parse the decoded METAR reports
+ from http://weather.noaa.gov/
+
+ In order to find the report relevant for you, find the closest station at
+ http://www.nws.noaa.gov/oso/siteloc.shtml and feed its 4-letter station
+ code to fetchMetarReport(), case does not matter.
+
+ All methods return metric values, no matter what the station provides. The
+ conversion factors were taken from the excellent "units" program.
+
+ If None is returned that means the information wasn't available or could
+ not be parsed. If you have the suspicion that failure to parse an
+ information was this libs fault, please save the report generating the
+ error send it to me with a few lines detailing the problem. Thanks!
+ """
+
+ def match_WeatherPart(self, regexp) :
+ """
+ Returns the matching part of the encoded Metar report.
+ regexp: the regexp needed to extract this part.
+ Returns the first matching string or None.
+ WARNING: Some Metar reports may contain several matching strings, only
+ the first one is taken into account, e.g. FEW020 SCT075 BKN053
+ """
+ if self.code is not None :
+ rg = re.compile(regexp)
+ for wpart in self.getRawMetarCode().split() :
+ match = rg.match(wpart)
+ if match :
+ return match.string[match.start(0) : match.end(0)]
+
+ def extractSkyConditions(self) :
+ """
+ Extracts sky condition information from the encoded report. Returns a
+ tuple containing the description of the sky conditions as a string and
+ a suggested pixmap name for an icon representing said sky condition.
+ """
+ wcond = self.match_WeatherPart(COND_RE_STR)
+ if wcond is not None :
+ if (len(wcond) > 3) and (wcond.startswith('+') or wcond.startswith('-')) :
+ wcond = wcond[1:]
+ if wcond.startswith('+') or wcond.startswith('-') :
+ pphen = 1
+ elif len(wcond) < 4 :
+ pphen = 0
+ else :
+ pphen = 2
+ squal = wcond[:pphen]
+ sphen = wcond[pphen : pphen + 4]
+ phenomenon = _WeatherConditions.get(sphen, None)
+ if phenomenon is not None :
+ (name, pixmap, phenomenon) = phenomenon
+ pheninfo = phenomenon.get(squal, name)
+ if type(pheninfo) != types.TupleType :
+ return (pheninfo, pixmap)
+ else :
+ # contains pixmap info
+ return pheninfo
+
+ def parseLatLong(self, latlong):
+ """
+ Parse Lat or Long in METAR notation into float values. N and E are +, S
+ and W are -. Expects one positional string and returns one float value.
+ """
+ # I know, I could invert this if and put
+ # the rest of the function into its block,
+ # but I find this to be more readable
+ if latlong is None: return None
+
+ s = string.strip(string.upper(latlong))
+ elms = string.split(s,'-')
+ ud = elms[-1][-1]
+ elms[-1] = elms[-1][:-1]
+ elms = map(string.atoi, elms)
+ coords = 0.0
+ elen = len(elms)
+ if elen > 2:
+ coords = coords + float(elms[2])/3600.0
+
+ if elen > 1:
+ coords = coords + float(elms[1])/60.0
+
+ coords=coords + float(elms[0])
+
+ if ud in ('W','S'):
+ coords=-1.0*coords
+
+ f,i=math.modf(coords)
+
+ if elen > 2:
+ f=float(fpformat.sci(f,4))
+ elif elen > 1:
+ f=float(fpformat.sci(f,2))
+ else:
+ f=0.0
+
+ return f+i
+
+ def extractCloudInformation(self) :
+ """
+ Extracts cloud information. returns None or a tuple (sky type as a
+ string of text and suggested pixmap name)
+ """
+ wcloud = self.match_WeatherPart(CLOUD_RE_STR)
+ if wcloud is not None :
+ stype = wcloud[:3]
+ if (stype == "CLR") or (stype == "SKC") :
+ return ("Clear sky", "sun")
+ elif stype == "BKN" :
+ return ("Broken clouds", "suncloud")
+ elif stype == "SCT" :
+ return ("Scattered clouds", "suncloud")
+ elif stype == "FEW" :
+ return ("Few clouds", "suncloud")
+ elif stype == "OVC" :
+ return ("Overcast", "cloud")
+
+ def getFullReport(self):
+ """
+ Return the complete weather report.
+ """
+ return self.fullreport
+
+ def getTemperatureCelsius(self):
+ """
+ Return the temperature in degrees Celsius.
+ """
+ return self.temp
+
+ def getTemperatureFahrenheit(self):
+ """
+ Return the temperature in degrees Fahrenheit.
+ """
+ return (self.temp * (9.0/5.0)) + 32.0
+
+ def getDewPointCelsius(self):
+ """
+ Return dewpoint in degrees Celsius.
+ """
+ return self.dewp
+
+ def getDewPointFahrenheit(self):
+ """
+ Return dewpoint in degrees Fahrenheit.
+ """
+ return (self.dewp * (9.0/5.0)) + 32.0
+
+ def getWindSpeed(self):
+ """
+ Return the wind speed in meters per second.
+ """
+ return self.windspeed
+
+ def getWindDirection(self):
+ """
+ Return wind direction in degrees.
+ """
+ return self.winddir
+
+ def getWindCompass(self):
+ """
+ Return wind direction as compass direction
+ (e.g. NE or SSE)
+ """
+ return self.windcomp
+
+ def getVisibilityKilometers(self):
+ """
+ Return visibility in km.
+ """
+ return self.vis
+
+ def getVisibilityMiles(self):
+ """
+ Return visibility in miles.
+ """
+ return self.vis / 1.609344
+
+ def getHumidity(self):
+ """
+ Return relative humidity in percent.
+ """
+ return self.humid
+
+ def getPressure(self):
+ """
+ Return pressure in hPa.
+ """
+ return self.press
+
+ def getRawMetarCode(self):
+ """
+ Return the encoded weather report.
+ """
+ return self.code
+
+ def getWeather(self):
+ """
+ Return short weather conditions
+ """
+ return self.weather
+
+ def getSkyConditions(self):
+ """
+ Return sky conditions
+ """
+ return self.sky
+
+ def getStationName(self):
+ """
+ Return full station name
+ """
+ return self.fulln
+
+ def getStationCity(self):
+ """
+ Return city-part of station name
+ """
+ return self.stat_city
+
+ def getStationCountry(self):
+ """
+ Return country-part of station name
+ """
+ return self.stat_country
+
+ def getCycle(self):
+ """
+ Return cycle value.
+ The cycle value is not the frequency or delay between observations but
+ the "time slot" in which the observation was made. There are 24 cycle
+ slots every day which usually last from N:45 to N+1:45. The cycle from
+ 23:45 to 0:45 is cycle 0.
+ """
+ return self.cycle
+
+ def getStationPosition(self):
+ """
+ Return latitude, longitude and altitude above sea level of station as a
+ tuple. Some stations don't deliver altitude, for those, None is
+ returned as altitude. The lat/longs are expressed as follows:
+ xx-yyd
+ where xx is degrees, yy minutes and d the direction.
+ Thus 51-14N means 51 degrees, 14 minutes north. d may take the values
+ N, S for latitues and W, E for longitudes. Latitude and Longitude may
+ include seconds. Altitude is always given as meters above sea level,
+ including a trailing M.
+ Schipohl Int. Airport Amsterdam has, for example:
+ ('52-18N', '004-46E', '-2M')
+ Moenchengladbach (where I live):
+ ('51-14N', '063-03E', None)
+ If you need lat and long as float values, look at
+ getStationPositionFloat() instead
+ """
+ return (self.latitude, self.longitude, self.altitude)
+
+ def getStationPositionFloat(self):
+ """
+ Return latitude and longitude as float values in a tuple (lat,long,alt)
+ """
+ return (self.latf,self.longf,self.altitude)
+
+ def getStationLatitude(self) :
+ """
+ Return the station's latitude in dd-mm[-ss]D format :
+ dd : degrees
+ mm : minutes
+ ss : seconds
+ D : direction (N, S, E, W)
+ """
+ return self.latitude
+
+ def getStationLatitudeFloat(self):
+ """
+ Return latitude as a float
+ """
+ return self.latf
+
+ def getStationLongitude(self) :
+ """
+ Return the station's longitude in dd-mm[-ss]D format :
+ dd : degrees
+ mm : minutes
+ ss : seconds
+ D : direction (N, S, E, W)
+ """
+ return self.longitude
+
+ def getStationLongitudeFloat(self):
+ """
+ Return Longitude as a float
+ """
+ return (self.longf)
+
+ def getStationAltitude(self) :
+ """
+ Return the station's altitude above the sea in meters.
+ """
+ return self.altitude
+
+ def getReportURL(self):
+ """
+ Return the URL from which the report was fetched.
+ """
+ return self.reporturl
+
+ def getTime(self):
+ """
+ Return the time when the observation was made. Note that this is *not*
+ the time when the report was fetched by us
+ Format: YYYY.MM.DD HHMM UTC
+ Example: 2002.04.01 1020 UTC
+ """
+ return self.rtime
+
+ def getISOTime(self):
+ """
+ Return the time when the observation was made in ISO 8601 format
+ (e.g. 2002-07-25 15:12:00Z)
+ """
+ return(self.metar_to_iso8601(self.rtime))
+
+ def getPixmap(self):
+ """
+ Return a suggested pixmap name, without extension, depending on current
+ weather.
+ """
+ return self.pixmap
+
+ def metar_to_iso8601(self, metardate) :
+ """
+ Converts a metar date to an ISO8601 date.
+ """
+ if metardate is not None:
+ (date, hour, tz) = metardate.split()
+ (year, month, day) = date.split('.')
+ # assuming tz is always 'UTC', aka 'Z'
+ return "%s-%s-%s %s:%s:00Z" % (year, month, day, hour[:2], hour[2:4])
+
+ def strreverse(self, str):
+ """
+ Reverses a string
+ """
+ listr=list(str)
+ listr.reverse()
+ return (string.join(listr,""))
+
+ def __init__(self, MetarStationCode = None):
+ """
+ Get initial report if a station code is passed as a parameter,
+ otherwise initialize fields.
+ """
+ if MetarStationCode is not None :
+ self.fetchMetarReport(MetarStationCode)
+ else :
+ self._ClearAllFields()
+
+ def _ClearAllFields(self):
+ """
+ Clears all fields values.
+ """
+ # until finished, report is invalid
+ self.valid = 0
+ # Clear all
+ self.fullreport=None
+ self.temp=None
+ self.windspeed=None
+ self.winddir=None
+ self.vis=None
+ self.dewp=None
+ self.humid=None
+ self.press=None
+ self.code=None
+ self.weather=None
+ self.sky=None
+ self.fulln=None
+ self.cycle=None
+ self.windcomp=None
+ self.rtime=None
+ self.pixmap=None
+ self.latitude=None
+ self.longitude=None
+ self.altitude=None
+ self.stat_city=None
+ self.stat_country=None
+ self.reportutl=None
+ self.latf=None
+ self.longf=None
+
+ def fetchMetarReport(self, station, baseurl="http://weather.noaa.gov/pub/data/observations/metar/decoded/"):
+ """
+ Retrieve the decoded METAR report from the given base URL and parse it.
+ Fill the data properties in the class instance with the values found in
+ the report, converting them to metric values where necessary.
+ """
+ self._ClearAllFields()
+ station=string.upper(station)
+ self.reporturl="%s%s.TXT" % (baseurl, station)
+ fn=urllib.urlopen(self.reporturl)
+ # Dump entire report in a variable
+ self.fullreport=fn.read()
+
+ # if fn.info().status is 0, everything seems to be in order
+ if not fn.info().status:
+
+ lines=string.split(self.fullreport,"\n")
+
+ for line in lines:
+ # Most lines start with a Header and a colon
+ try:
+ header,data=string.split(line,":",1)
+ except ValueError:
+ header=data=line
+
+ header=string.strip(header)
+ data=string.strip(data)
+
+ # The station identifier and location
+ if (string.find(header,"("+station+")")!=-1):
+ try:
+ loc,p=string.split(data,"(",1)
+ loc=string.strip(loc)
+ rloc=self.strreverse(loc)
+ rcoun,rcity=string.split(rloc,",",1)
+ except ValueError:
+ city=""
+ coun=""
+ p=data
+ try:
+ id,lat,long,ht=string.split(p," ")
+ ht = int(ht[:-1]) # skip the 'M' for meters
+ except ValueError:
+ id,lat,long=string.split(p," ")
+ ht=None
+ self.stat_city=string.strip(self.strreverse(rcity))
+ self.stat_country=string.strip(self.strreverse(rcoun))
+ self.fulln=loc
+ self.latitude = lat
+ self.longitude = long
+ self.latf=self.parseLatLong(lat)
+ self.longf=self.parseLatLong(long)
+ self.altitude = ht
+
+ # The line containing the date/time of the report
+ elif (string.find(data,"UTC")!=-1):
+ local,rt=string.split(data,"/")
+ self.rtime=string.strip(rt)
+
+ # temperature
+ elif (header=="Temperature"):
+ t,i=string.split(data," ",1)
+ self.temp=(float(t)-32)*(5.0/9.0)
+
+ # wind direction and speed
+ elif (header == "Wind"):
+ if (string.find(data,"Calm")!=-1):
+ self.windspeed=0.0
+ self.winddir=None
+ self.windcomp=None
+ elif (string.find(data,"Variable")!=-1):
+ v,a,speed,r=string.split(data," ",3)
+ self.windspeed=(float(speed)*0.44704)
+ self.winddir=None
+ self.windcomp=None
+ else:
+ f,t,comp,deg,r,d,speed,r=string.split(data," ",7)
+ self.winddir=int(deg[1:])
+ self.windcomp=string.strip(comp)
+ self.windspeed=(float(speed)*0.44704)
+
+ # visibility
+ elif (header=="Visibility"):
+ for d in data.split() :
+ try :
+ self.vis = float(d)*1.609344
+ break
+ except ValueError :
+ pass
+
+ # dew point
+ elif (header=="Dew Point"):
+ dp,i=string.split(data," ",1)
+ self.dewp=(float(dp)-32)*(5.0/9.0)
+
+ # humidity
+ elif (header=="Relative Humidity"):
+ h,i=string.split(data,"%",1)
+ self.humid=int(h)
+
+ # pressure
+ elif (header=="Pressure (altimeter)"):
+ p,r=string.split(data," ",1)
+ self.press=(float(p)*33.863886)
+
+ # short weather description ("rain", "mist", ...)
+ elif (header=="Weather"):
+ self.weather=data
+
+ # short description of sky cond.
+ elif (header=="Sky conditions"):
+ self.sky=data
+
+ # the encoded weather report
+ elif (header=="ob"):
+ self.code=string.strip(data)
+
+ # the cycle value describes the cycle in
+ # which the observations were made
+ elif (header=="cycle"):
+ self.cycle=int(data)
+
+ # decode cloud and sky conditions informations from
+ # the raw report, this will suggest us a pixmap to use
+ # to graphically represent the weather.
+ cloudinfo = self.extractCloudInformation()
+ if cloudinfo is not None :
+ (cloudinfo, cloudpixmap) = cloudinfo
+ else :
+ (cloudinfo, cloudpixmap) = (None, None)
+ conditions = self.extractSkyConditions()
+ if conditions is not None :
+ (conditions, condpixmap) = conditions
+ else :
+ (conditions, condpixmap) = (None, None)
+
+ # fill the weather information
+ self.weather = self.weather or conditions or cloudinfo
+
+ # Pixmap guessed from general conditions has priority
+ # over pixmap guessed from clouds
+ self.pixmap = condpixmap or cloudpixmap
+
+ # report is complete
+ self.valid = 1
+
+ # Even if the report is bad, toss the fd
+ del fn
Binary file modules/pymetar.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/russian.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,76 @@
+import re, string, urllib
+
+__where = [re.compile(r'<span id="r_text" name="r_text">([^<]*)')]
+
+class BabelizerError(Exception):
+ pass
+
+class LanguageNotAvailableError(BabelizerError):
+ pass
+class BabelfishChangedError(BabelizerError):
+ pass
+class BabelizerIOError(BabelizerError):
+ pass
+
+def clean(text):
+ return ' '.join(string.replace(text.strip(), "\n", ' ').split())
+
+def translate(phrase, from_lang, to_lang):
+ from_lang = from_lang.lower()
+ to_lang = to_lang.lower()
+ if from_lang == 'es':
+ from_lang = 's'
+ if to_lang == 'es':
+ to_lang = 's'
+ if from_lang[0] not in ['e', 's', 'r', 'i', 'g', 'f'] or to_lang[0] not in ['e', 's', 'r', 'i', 'g', 'f']:
+ raise LanguageNotAvailableError(lang)
+ direction = from_lang[0] + to_lang[0]
+ phrase=phrase.encode('cp1251')
+ params = urllib.urlencode( {
+ 'lang': 'en',
+ 'status': 'translate',
+ 'source': phrase,
+ 'direction': direction,
+ 'template': 'General',
+ } )
+ try:
+ response = urllib.urlopen('http://www.translate.ru/text.asp', params)
+ except IOError, what:
+ raise BabelizerIOError("Couldn't talk to server: %s" % what)
+ except:
+ print "Unexpected error:", sys.exc_info()[0]
+
+ html = unicode(response.read(), 'CP1251')
+ for regex in __where:
+ match = regex.search(html)
+ if match: break
+ if not match: raise BabelfishChangedError("Can't recognize translated string.")
+ """
+ current_unichr = ''
+ result = ''
+ words = string.split(clean(match.group(1)))
+ chars = list(clean(match.group(1)))
+ for char in chars:
+ if char == '&':
+ current_unichr = '&'
+ continue
+ elif current_unichr:
+ if char == '#':
+ pass
+ elif char == ';':
+ result += unichr(int(current_unichr[1:]))
+ current_unichr = ''
+ else:
+ current_unichr += char
+ continue
+ result += char
+ """
+ #if to_lang == 'r':
+ result = clean(match.group(1))
+ #result = unicode(result, 'CP1251')
+ #else:
+ # result = string.split(string.split(html, '<span id="r_text" name="r_text">')[1], '<')[0]
+ #result = string.split(string.split(html, '<span id="r_text" name="r_text">')[1], '<')[0]
+ return result
+
+#print translate('hello')
Binary file modules/russian.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/rwhois.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,634 @@
+#! /usr/bin/python --
+
+"""
+usage: %(progname)s [domain...]
+
+Version: %(version)s
+
+Contacts the apropriate whois database for each domain and displays
+the result.
+
+class WhoisRecord:
+ self.domain -- Domain Name
+ self.whoisserver -- Whoisserver associated with domain
+ self.page -- raw whois record data
+
+ public methods:
+
+ def WhoisRecord(domain=None)
+ Whois object constructor
+
+ def whois(domainname=None, server=None, cache=0)
+ Fetches whoisrecord and places result in self.page
+ Raises NoSuchDomain if the domain doesn't exist.
+
+
+class DomainRecord(WhoisRecord):
+ self.domainid -- domainid for this domain
+ self.created -- date in which the domain was created
+ self.lastupdated -- date in which the domain was last updated.
+ self.expires -- date in which the domain expires
+ self.databaseupdated -- date in which the database was last updated.
+ self.servers -- list of (hostname, ip) pairs of the nameservers.
+ self.registrant -- ContactRecord of domain owner.
+ self.contacts -- dictionary of contacts (ContactRecord objects)
+
+ public methods:
+
+ def DomainRecord(domain=None)
+ Constructor for DomainRecord
+
+ def Parse()
+ Creates a parsed version of the information contained in
+ the whois record for domain from self.page
+ raises NoParser if a parser does not exist for a registry.
+
+
+
+class Contact:
+ self.type -- Type of contact
+ self.organization -- Organization associated with contact.
+ self.person -- Person associated with contact.
+ self.handle -- NIC Handle
+ self.address -- Street address of contact
+ self.email -- Email address of contact
+ self.phone -- Phone Number
+ self.fax -- Fax Number
+ self.lastupdated -- Last update of contact record
+"""
+
+_version = "1.1"
+
+import os, sys, string, time, getopt, socket, select, re, errno, copy, signal
+
+
+timeout=5
+
+class WhoisRecord:
+
+ defaultserver='whois.networksolutions.com'
+ whoismap={ 'com' : 'whois.internic.net' , \
+ 'org' : 'whois.internic.net' , \
+ 'net' : 'whois.internic.net' , \
+ 'edu' : 'whois.networksolutions.com' , \
+ 'de' : 'whois.denic.de' , \
+ 'gov' : 'whois.nic.gov' , \
+ # See http://www.nic.gov/cgi-bin/whois
+ 'mil' : 'whois.nic.mil' , \
+ # See http://www.nic.mil/cgi-bin/whois
+ 'ca' : 'whois.cdnnet.ca' , \
+ 'uk' : 'whois.nic.uk' , \
+ 'au' : 'whois.aunic.net' , \
+ 'hu' : 'whois.nic.hu' , \
+
+ # All the following are unverified/checked.
+ 'be' : 'whois.ripe.net',
+ 'it' : 'whois.ripe.net' , \
+ # also whois.nic.it
+ 'at' : 'whois.ripe.net' , \
+ # also www.nic.at, whois.aco.net
+ 'dk' : 'whois.ripe.net' , \
+ 'fo' : 'whois.ripe.net' , \
+ 'lt' : 'whois.ripe.net' , \
+ 'no' : 'whois.ripe.net' , \
+ 'sj' : 'whois.ripe.net' , \
+ 'sk' : 'whois.ripe.net' , \
+ 'tr' : 'whois.ripe.net' , \
+ # also whois.metu.edu.tr
+ 'il' : 'whois.ripe.net' , \
+ 'bv' : 'whois.ripe.net' , \
+ 'se' : 'whois.nic-se.se' , \
+ 'br' : 'whois.nic.br' , \
+ # a.k.a. whois.fapesp.br?
+ 'fr' : 'whois.nic.fr' , \
+ 'sg' : 'whois.nic.net.sg' , \
+ 'hm' : 'whois.registry.hm' , \
+ # see also whois.nic.hm
+ 'nz' : 'domainz.waikato.ac.nz' , \
+ 'nl' : 'whois.domain-registry.nl' , \
+ # RIPE also handles other countries
+ # See http://www.ripe.net/info/ncc/rir-areas.html
+ 'ru' : 'whois.ripn.net' , \
+ 'ch' : 'whois.nic.ch' , \
+ # see http://www.nic.ch/whois_readme.html
+ 'jp' : 'whois.nic.ad.jp' , \
+ # (use DOM foo.jp/e for english; need to lookup !handles separately)
+ 'to' : 'whois.tonic.to' , \
+ 'nu' : 'whois.nic.nu' , \
+ 'fm' : 'www.dot.fm' , \
+ # http request http://www.dot.fm/search.html
+ 'am' : 'whois.nic.am' , \
+ 'nu' : 'www.nunames.nu' , \
+ # http request
+ # e.g. http://www.nunames.nu/cgi-bin/drill.cfm?domainname=nunames.nu
+ #'cx' : 'whois.nic.cx' , \ # no response from this server
+ 'af' : 'whois.nic.af' , \
+ 'as' : 'whois.nic.as' , \
+ 'li' : 'whois.nic.li' , \
+ 'lk' : 'whois.nic.lk' , \
+ 'mx' : 'whois.nic.mx' , \
+ 'pw' : 'whois.nic.pw' , \
+ 'sh' : 'whois.nic.sh' , \
+ # consistently resets connection
+ 'tj' : 'whois.nic.tj' , \
+ 'tm' : 'whois.nic.tm' , \
+ 'pt' : 'whois.dns.pt' , \
+ 'kr' : 'whois.nic.or.kr' , \
+ # see also whois.krnic.net
+ 'kz' : 'whois.nic.or.kr' , \
+ # see also whois.krnic.net
+ 'al' : 'whois.ripe.net' , \
+ 'az' : 'whois.ripe.net' , \
+ 'ba' : 'whois.ripe.net' , \
+ 'bg' : 'whois.ripe.net' , \
+ 'by' : 'whois.ripe.net' , \
+ 'cy' : 'whois.ripe.net' , \
+ 'cz' : 'whois.ripe.net' , \
+ 'dz' : 'whois.ripe.net' , \
+ 'ee' : 'whois.ripe.net' , \
+ 'eg' : 'whois.ripe.net' , \
+ 'es' : 'whois.ripe.net' , \
+ 'fi' : 'whois.ripe.net' , \
+ 'gr' : 'whois.ripe.net' , \
+ 'hr' : 'whois.ripe.net' , \
+ 'lu' : 'whois.ripe.net' , \
+ 'lv' : 'whois.ripe.net' , \
+ 'ma' : 'whois.ripe.net' , \
+ 'md' : 'whois.ripe.net' , \
+ 'mk' : 'whois.ripe.net' , \
+ 'mt' : 'whois.ripe.net' , \
+ 'pl' : 'whois.ripe.net' , \
+ 'ro' : 'whois.ripe.net' , \
+ 'si' : 'whois.ripe.net' , \
+ 'sm' : 'whois.ripe.net' , \
+ 'su' : 'whois.ripe.net' , \
+ 'tn' : 'whois.ripe.net' , \
+ 'ua' : 'whois.ripe.net' , \
+ 'va' : 'whois.ripe.net' , \
+ 'yu' : 'whois.ripe.net' , \
+ # unchecked
+ 'ac' : 'whois.nic.ac' , \
+ 'cc' : 'whois.nic.cc' , \
+ #'cn' : 'whois.cnnic.cn' , \ # connection refused
+ 'gs' : 'whois.adamsnames.tc' , \
+ 'hk' : 'whois.apnic.net' , \
+ #'ie' : 'whois.ucd.ie' , \ # connection refused
+ #'is' : 'whois.isnet.is' , \# connection refused
+ #'mm' : 'whois.nic.mm' , \ # connection refused
+ 'ms' : 'whois.adamsnames.tc' , \
+ 'my' : 'whois.mynic.net' , \
+ #'pe' : 'whois.rcp.net.pe' , \ # connection refused
+ 'st' : 'whois.nic.st' , \
+ 'tc' : 'whois.adamsnames.tc' , \
+ 'tf' : 'whois.adamsnames.tc' , \
+ 'th' : 'whois.thnic.net' , \
+ 'tw' : 'whois.twnic.net' , \
+ 'us' : 'whois.isi.edu' , \
+ 'vg' : 'whois.adamsnames.tc' , \
+ #'za' : 'whois.co.za' # connection refused
+ }
+
+
+
+ def __init__(self,domain=None):
+ self.domain=domain
+ self.whoisserver=None
+ self.page=None
+ return
+
+ def whois(self,domain=None, server=None, cache=0):
+ if domain is not None:
+ self.domain=domain
+ pass
+
+ if server is not None:
+ self.whoisserver=server
+ pass
+
+ if self.domain is None:
+ print "No Domain"
+ raise "No Domain"
+
+ if self.whoisserver is None:
+ self.chooseserver()
+
+ if self.whoisserver is None:
+ print "No Server"
+ raise "No Server"
+
+ if cache:
+ fn = "%s.dom" % domainname
+ if os.path.exists(fn):
+ return open(fn).read()
+ pass
+
+ self.page=self._whois()
+
+ if cache:
+ open(fn, "w").write(page)
+ pass
+
+ return
+
+ def chooseserver(self):
+ try:
+ (secondlevel,toplevel)=string.split(self.domain,'.')
+ self.whoisserver=WhoisRecord.whoismap.get(toplevel)
+ if self.whoisserver==None:
+ self.whoisserver=WhoisRecord.defaultserver
+ return
+ pass
+ except:
+ self.whoisserver=WhoisRecord.defaultserver
+ return
+
+ if(toplevel=='com' or toplevel=='org' or toplevel=='net'):
+ tmp=self._whois()
+ m=re.search("Whois Server:(.+)",tmp)
+ if m:
+ self.whoisserver=string.strip(m.group(1))
+ return
+ self.whoisserver='whois.networksolutions.com'
+ tmp=self._whois()
+ m=re.search("Whois Server:(.+)",tmp)
+ if m:
+ self.whoisserver=string.strip(m.group(1))
+ return
+ pass
+ return
+
+
+ def _whois(self):
+ def alrmhandler(signum,frame):
+ raise "TimedOut", "on connect"
+
+ s = None
+
+ ## try until we timeout
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ s.setblocking(1)
+ #signal.signal(signal.SIGALRM,alrmhandler)
+ #signal.alarm(timeout)
+ while 1:
+ try:
+ s.connect((self.whoisserver, 43))
+ except socket.error, (ecode, reason):
+ if ecode==errno.EINPROGRESS:
+ continue
+ elif ecode==errno.EALREADY:
+ continue
+ else:
+ raise socket.error, (ecode, reason)
+ pass
+
+ break
+
+ #signal.alarm(0)
+
+ ret = select.select ([s], [s], [], 30)
+
+ if len(ret[1])== 0 and len(ret[0]) == 0:
+ s.close()
+ raise TimedOut, "on data"
+
+ s.setblocking(1)
+
+ s.send("%s\n" % self.domain)
+ page = ""
+ while 1:
+ data = s.recv(8196)
+ if not data: break
+ page = page + data
+ pass
+
+ s.close()
+
+
+ if string.find(page, "No match for") != -1:
+ raise 'NoSuchDomain', self.domain
+
+ if string.find(page, "No entries found") != -1:
+ raise 'NoSuchDomain', self.domain
+
+ if string.find(page, "no domain specified") != -1:
+ raise 'NoSuchDomain', self.domain
+
+ if string.find(page, "NO MATCH:") != -1:
+ raise 'NoSuchDomain', self.domain
+
+ return page
+
+##
+## ----------------------------------------------------------------------
+##
+class ContactRecord:
+ def __init__(self):
+ self.type=None
+ self.organization=None
+ self.person=None
+ self.handle=None
+ self.address=None
+ self.email=None
+ self.phone=None
+ self.fax=None
+ self.lastupdated=None
+ return
+ def __str__(self):
+ return "Type: %s\nOrganization: %s\nPerson: %s\nHandle: %s\nAddress: %s\nEmail: %s\nPhone: %s\nFax: %s\nLastupdate: %s\n" % (self.type,self.organization,self.person,self.handle,self.address,self.email,self.phone,self.fax,self.lastupdated)
+
+
+class DomainRecord(WhoisRecord):
+
+ parsemap={ 'whois.networksolutions.com' : 'ParseWhois_NetworkSolutions' , \
+ 'whois.register.com' : 'ParseWhois_RegisterCOM' }
+
+ def __init__(self,domain=None):
+ WhoisRecord.__init__(self,domain)
+ self.domainid = None
+ self.created = None
+ self.lastupdated = None
+ self.expires = None
+ self.databaseupdated = None
+ self.servers = None
+ self.registrant = ContactRecord()
+ self.registrant.type='registrant'
+ self.contacts = {}
+ return
+ def __str__(self):
+ con=''
+ for (k,v) in self.contacts.items():
+ con=con + str(v) +'\n'
+ return "%s (%s):\nWhoisServer: %s\nCreated : %s\nLastupdated : %s\nDatabaseupdated : %s\nExpires : %s\nServers : %s\nRegistrant >>\n\n%s\nContacts >>\n\n%s\n" % (self.domain, self.domainid,self.whoisserver,self.created, self.lastupdated, self.databaseupdated, self.expires,self.servers, self.registrant, con)
+
+ def Parse(self):
+ self._ParseWhois()
+ return
+
+ def _ParseWhois(self):
+ parser=DomainRecord.parsemap.get(self.whoisserver)
+ if parser==None:
+ raise 'NoParser'
+ parser='self.'+parser+'()'
+ eval(parser)
+ return
+
+ ##
+ ## ----------------------------------------------------------------------
+ ##
+ def _ParseContacts_RegisterCOM(self,page):
+
+ parts = re.split("((?:(?:Administrative|Billing|Technical|Zone) Contact,?[ ]*)+:)\n", page)
+
+ contacttypes = None
+ for part in parts:
+ if string.find(part, "Contact:") != -1:
+ if part[-1] == ":": part = part[:-1]
+ contacttypes = string.split(part, ",")
+ continue
+ part = string.strip(part)
+ if not part: continue
+
+ contact=ContactRecord()
+
+ m = re.search("Email: (.+@.+)", part)
+ if m:
+ contact.email=string.lower(string.strip(m.group(1)))
+
+ m = re.search("\s+Phone: (.+)", part)
+ if m:
+ contact.phone=m.group(1)
+ end=m.start(0)
+
+ start=0
+
+ lines = string.split(part[start:end], "\n")
+ lines = map(string.strip,lines)
+
+ contact.organization = lines.pop(0)
+ contact.person = lines.pop(0)
+
+ contact.address=string.join(lines,'\n')
+
+ for contacttype in contacttypes:
+ contacttype = string.lower(string.strip(contacttype))
+ contacttype = string.replace(contacttype, " contact", "")
+ contact.type=contacttype
+ self.contacts[contacttype] = copy.copy(contact)
+ pass
+ pass
+
+ return
+
+
+ def ParseWhois_RegisterCOM(self):
+ m = re.search("Record last updated on.*: (.+)", self.page)
+ if m: self.lastupdated = m.group(1)
+
+ m = re.search("Created on.*: (.+)", self.page)
+ if m: self.created = m.group(1)
+
+ m = re.search("Expires on.*: (.+)", self.page)
+ if m: self.expires = m.group(1)
+
+ m = re.search("Phone: (.+)", self.page)
+ if m: self.registrant.phone=m.group(1)
+
+ m = re.search("Email: (.+@.+)",self.page)
+ if m: self.registrant.email=m.group(1)
+
+ m = re.search("Organization:(.+?)Phone:",self.page,re.S)
+ if m:
+ start=m.start(1)
+ end=m.end(1)
+ registrant = string.strip(self.page[start:end])
+ registrant = string.split(registrant, "\n")
+ registrant = map(string.strip,registrant)
+
+ self.registrant.organization = registrant[0]
+ self.registrant.person =registrant[1]
+ self.registrant.address = string.join(registrant[2:], "\n")
+ pass
+
+ m = re.search("Domain servers in listed order:\n\n(.+?)\n\n", self.page, re.S)
+ if m:
+ start = m.start(1)
+ end = m.end(1)
+ servers = string.strip(self.page[start:end])
+ lines = string.split(servers, "\n")
+
+
+ self.servers = []
+ for line in lines:
+ m=re.search("(\w|\.)+?\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})",string.strip(line))
+ if m:
+ self.servers.append(m.group(1), m.group(2))
+ pass
+ pass
+ pass
+
+ m = re.search("((?:(?:Administrative|Billing|Technical|Zone) Contact,?[ ]*)+:)\n", self.page)
+ if m:
+ i = m.start()
+ m = re.search("Domain servers in listed order", self.page)
+ j = m.start()
+ contacts = string.strip(self.page[i:j])
+ pass
+ self._ParseContacts_RegisterCOM(contacts)
+ return
+
+
+ def _ParseContacts_NetworkSolutions(self,page):
+
+ parts = re.split("((?:(?:Administrative|Billing|Technical|Zone) Contact,?[ ]*)+:)\n", page)
+
+ contacttypes = None
+ for part in parts:
+ if string.find(part, "Contact:") != -1:
+ if part[-1] == ":": part = part[:-1]
+ contacttypes = string.split(part, ",")
+ continue
+ part = string.strip(part)
+ if not part: continue
+
+ record=ContactRecord()
+
+ lines = string.split(part, "\n")
+ m = re.search("(.+) \((.+)\) (.+@.+)", lines.pop(0))
+ if m:
+ record.person = string.strip(m.group(1))
+ record.handle = string.strip(m.group(2))
+ record.email = string.lower(string.strip(m.group(3)))
+ pass
+
+ record.organization=string.strip(lines.pop(0))
+
+ flag = 0
+ addresslines = []
+ phonelines = []
+ phonelines.append(string.strip(lines.pop()))
+ for line in lines:
+ line = string.strip(line)
+ #m=re.search("^(\d|-|\+|\s)+$",line)
+ #if m: flag = 1
+ if flag == 0:
+ addresslines.append(line)
+ else:
+ phonelines.append(line)
+ pass
+ pass
+ record.phone = string.join(phonelines, "\n")
+ record.address = string.join(addresslines, "\n")
+
+ for contacttype in contacttypes:
+ contacttype = string.lower(string.strip(contacttype))
+ contacttype = string.replace(contacttype, " contact", "")
+ record.type=contacttype
+ self.contacts.update({contacttype:copy.copy(record)})
+ pass
+ pass
+ return
+
+ def ParseWhois_NetworkSolutions(self):
+
+ m = re.search("Record last updated on (.+)\.", self.page)
+ if m: self.lastupdated = m.group(1)
+
+ m = re.search("Record created on (.+)\.", self.page)
+ if m: self.created = m.group(1)
+
+ m = re.search("Database last updated on (.+)\.", self.page)
+ if m: self.databaseupdated = m.group(1)
+
+ m = re.search("Record expires on (.+)\.",self.page)
+ if m: self.expires=m.group(1)
+
+ m = re.search("Registrant:(.+?)\n\n", self.page, re.S)
+ if m:
+ start= m.start(1)
+ end = m.end(1)
+ reg = string.strip(self.page[start:end])
+
+ reg = string.split(reg, "\n")
+ reg = map(string.strip,reg)
+ self.registrant.organization = reg[0]
+ self.registrant.address = string.join(reg[1:],'\n')
+
+ m = re.search("(.+) \((.+)\)", self.registrant.organization)
+ if m:
+ self.domainid = m.group(2)
+ pass
+ pass
+
+ m = re.search("Domain servers in listed order:\n\n", self.page)
+ if m:
+ i = m.end()
+ m = re.search("\n\n", self.page[i:])
+ j = m.start()
+ servers = string.strip(self.page[i:i+j])
+ lines = string.split(servers, "\n")
+ self.servers = []
+ for line in lines:
+ m=re.search("(\w|\.)+?\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})",string.strip(line))
+ if m:
+ self.servers.append(m.group(1), m.group(2))
+ pass
+ pass
+ pass
+
+ m = re.search("((?:(?:Administrative|Billing|Technical|Zone) Contact,?[ ]*)+:)\n", self.page)
+ if m:
+ i = m.start()
+ m = re.search("Record last updated on", self.page)
+ j = m.start()
+ contacts = string.strip(self.page[i:j])
+ pass
+ self._ParseContacts_NetworkSolutions(contacts)
+
+ return
+
+
+##
+## ----------------------------------------------------------------------
+##
+
+
+
+
+##
+## ----------------------------------------------------------------------
+##
+
+def usage(progname):
+ version = _version
+ print __doc__ % vars()
+
+def main(argv, stdout, environ):
+ progname = argv[0]
+ list, args = getopt.getopt(argv[1:], "", ["help", "version"])
+
+ for (field, val) in list:
+ if field == "--help":
+ usage(progname)
+ return
+ elif field == "--version":
+ print progname, _version
+ return
+
+ rec=WhoisRecord();
+
+ for domain in args:
+ whoisserver=None
+ if string.find(domain,'@')!=-1:
+ (domain,whoisserver)=string.split(domain,'@')
+ try:
+ rec.whois(domain,whoisserver)
+ print rec.page
+ except 'NoSuchDomain', reason:
+ print "ERROR: no such domain %s" % domain
+ except socket.error, (ecode,reason):
+ print reason
+ except "TimedOut", reason:
+ print "Timed out", reason
+
+if __name__ == "__main__":
+ main(sys.argv, sys.stdout, os.environ)
Binary file modules/rwhois.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/__init__.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,31 @@
+# $Id: __init__.py,v 1.9 2005/03/07 09:34:51 snakeru Exp $
+
+"""
+All features of xmpppy library contained within separate modules.
+At present there are modules:
+simplexml - XML handling routines
+protocol - jabber-objects (I.e. JID and different stanzas and sub-stanzas) handling routines.
+debug - Jacob Lundquist's debugging module. Very handy if you like colored debug.
+auth - Non-SASL and SASL stuff. You will need it to auth as a client or transport.
+transports - low level connection handling. TCP and TLS currently. HTTP support planned.
+roster - simple roster for use in clients.
+dispatcher - decision-making logic. Handles all hooks. The first who takes control over fresh stanzas.
+features - different stuff that didn't worths separating into modules
+browser - DISCO server framework. Allows to build dynamic disco tree.
+filetransfer - Currently contains only IBB stuff. Can be used for bot-to-bot transfers.
+
+Most of the classes that is defined in all these modules is an ancestors of
+class PlugIn so they share a single set of methods allowing you to compile
+a featured XMPP client. For every instance of PlugIn class the 'owner' is the class
+in what the plug was plugged. While plugging in such instance usually sets some
+methods of owner to it's own ones for easy access. All session specific info stored
+either in instance of PlugIn or in owner's instance. This is considered unhandy
+and there are plans to port 'Session' class from xmppd.py project for storing all
+session-related info. Though if you are not accessing instances variables directly
+and use only methods for access all values you should not have any problems.
+
+"""
+
+import simplexml,protocol,debug,auth,transports,roster,dispatcher,features,browser,filetransfer,commands
+from client import *
+from protocol import *
Binary file modules/xmpp/__init__.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/auth.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,324 @@
+## auth.py
+##
+## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: auth.py,v 1.37 2006/08/21 08:11:51 normanr Exp $
+
+"""
+Provides library with all Non-SASL and SASL authentication mechanisms.
+Can be used both for client and transport authentication.
+"""
+
+from protocol import *
+from client import PlugIn
+import sha,base64,random,dispatcher,re
+
+import md5
+def HH(some): return md5.new(some).hexdigest()
+def H(some): return md5.new(some).digest()
+def C(some): return ':'.join(some)
+
+class NonSASL(PlugIn):
+ """ Implements old Non-SASL (JEP-0078) authentication used in jabberd1.4 and transport authentication."""
+ def __init__(self,user,password,resource):
+ """ Caches username, password and resource for auth. """
+ PlugIn.__init__(self)
+ self.DBG_LINE='gen_auth'
+ self.user=user
+ self.password=password
+ self.resource=resource
+
+ def plugin(self,owner):
+ """ Determine the best auth method (digest/0k/plain) and use it for auth.
+ Returns used method name on success. Used internally. """
+ if not self.resource: return self.authComponent(owner)
+ self.DEBUG('Querying server about possible auth methods','start')
+ resp=owner.Dispatcher.SendAndWaitForResponse(Iq('get',NS_AUTH,payload=[Node('username',payload=[self.user])]))
+ if not isResultNode(resp):
+ self.DEBUG('No result node arrived! Aborting...','error')
+ return
+ iq=Iq(typ='set',node=resp)
+ query=iq.getTag('query')
+ query.setTagData('username',self.user)
+ query.setTagData('resource',self.resource)
+
+ if query.getTag('digest'):
+ self.DEBUG("Performing digest authentication",'ok')
+ query.setTagData('digest',sha.new(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest())
+ if query.getTag('password'): query.delChild('password')
+ method='digest'
+ elif query.getTag('token'):
+ token=query.getTagData('token')
+ seq=query.getTagData('sequence')
+ self.DEBUG("Performing zero-k authentication",'ok')
+ hash = sha.new(sha.new(self.password).hexdigest()+token).hexdigest()
+ for foo in xrange(int(seq)): hash = sha.new(hash).hexdigest()
+ query.setTagData('hash',hash)
+ method='0k'
+ else:
+ self.DEBUG("Sequre methods unsupported, performing plain text authentication",'warn')
+ query.setTagData('password',self.password)
+ method='plain'
+ resp=owner.Dispatcher.SendAndWaitForResponse(iq)
+ if isResultNode(resp):
+ self.DEBUG('Sucessfully authenticated with remove host.','ok')
+ owner.User=self.user
+ owner.Resource=self.resource
+ owner._registered_name=owner.User+'@'+owner.Server+'/'+owner.Resource
+ return method
+ self.DEBUG('Authentication failed!','error')
+
+ def authComponent(self,owner):
+ """ Authenticate component. Send handshake stanza and wait for result. Returns "ok" on success. """
+ self.handshake=0
+ owner.send(Node(NS_COMPONENT_ACCEPT+' handshake',payload=[sha.new(owner.Dispatcher.Stream._document_attrs['id']+self.password).hexdigest()]))
+ owner.RegisterHandler('handshake',self.handshakeHandler,xmlns=NS_COMPONENT_ACCEPT)
+ while not self.handshake:
+ self.DEBUG("waiting on handshake",'notify')
+ owner.Process(1)
+ owner._registered_name=self.user
+ if self.handshake+1: return 'ok'
+
+ def handshakeHandler(self,disp,stanza):
+ """ Handler for registering in dispatcher for accepting transport authentication. """
+ if stanza.getName()=='handshake': self.handshake=1
+ else: self.handshake=-1
+
+class SASL(PlugIn):
+ """ Implements SASL authentication. """
+ def __init__(self,username,password):
+ PlugIn.__init__(self)
+ self.username=username
+ self.password=password
+
+ def plugin(self,owner):
+ if not self._owner.Dispatcher.Stream._document_attrs.has_key('version'): self.startsasl='not-supported'
+ elif self._owner.Dispatcher.Stream.features:
+ try: self.FeaturesHandler(self._owner.Dispatcher,self._owner.Dispatcher.Stream.features)
+ except NodeProcessed: pass
+ else: self.startsasl=None
+
+ def auth(self):
+ """ Start authentication. Result can be obtained via "SASL.startsasl" attribute and will be
+ either "success" or "failure". Note that successfull auth will take at least
+ two Dispatcher.Process() calls. """
+ if self.startsasl: pass
+ elif self._owner.Dispatcher.Stream.features:
+ try: self.FeaturesHandler(self._owner.Dispatcher,self._owner.Dispatcher.Stream.features)
+ except NodeProcessed: pass
+ else: self._owner.RegisterHandler('features',self.FeaturesHandler,xmlns=NS_STREAMS)
+
+ def plugout(self):
+ """ Remove SASL handlers from owner's dispatcher. Used internally. """
+ self._owner.UnregisterHandler('features',self.FeaturesHandler,xmlns=NS_STREAMS)
+ self._owner.UnregisterHandler('challenge',self.SASLHandler,xmlns=NS_SASL)
+ self._owner.UnregisterHandler('failure',self.SASLHandler,xmlns=NS_SASL)
+ self._owner.UnregisterHandler('success',self.SASLHandler,xmlns=NS_SASL)
+
+ def FeaturesHandler(self,conn,feats):
+ """ Used to determine if server supports SASL auth. Used internally. """
+ if not feats.getTag('mechanisms',namespace=NS_SASL):
+ self.startsasl='not-supported'
+ self.DEBUG('SASL not supported by server','error')
+ return
+ mecs=[]
+ for mec in feats.getTag('mechanisms',namespace=NS_SASL).getTags('mechanism'):
+ mecs.append(mec.getData())
+ self._owner.RegisterHandler('challenge',self.SASLHandler,xmlns=NS_SASL)
+ self._owner.RegisterHandler('failure',self.SASLHandler,xmlns=NS_SASL)
+ self._owner.RegisterHandler('success',self.SASLHandler,xmlns=NS_SASL)
+ if "DIGEST-MD5" in mecs:
+ node=Node('auth',attrs={'xmlns':NS_SASL,'mechanism':'DIGEST-MD5'})
+ elif "PLAIN" in mecs:
+ sasl_data='%s\x00%s\x00%s'%(self.username+'@'+self._owner.Server,self.username,self.password)
+ node=Node('auth',attrs={'xmlns':NS_SASL,'mechanism':'PLAIN'},payload=[base64.encodestring(sasl_data)])
+ else:
+ self.startsasl='failure'
+ self.DEBUG('I can only use DIGEST-MD5 and PLAIN mecanisms.','error')
+ return
+ self.startsasl='in-process'
+ self._owner.send(node.__str__())
+ raise NodeProcessed
+
+ def SASLHandler(self,conn,challenge):
+ """ Perform next SASL auth step. Used internally. """
+ if challenge.getNamespace()<>NS_SASL: return
+ if challenge.getName()=='failure':
+ self.startsasl='failure'
+ try: reason=challenge.getChildren()[0]
+ except: reason=challenge
+ self.DEBUG('Failed SASL authentification: %s'%reason,'error')
+ raise NodeProcessed
+ elif challenge.getName()=='success':
+ self.startsasl='success'
+ self.DEBUG('Successfully authenticated with remote server.','ok')
+ handlers=self._owner.Dispatcher.dumpHandlers()
+ self._owner.Dispatcher.PlugOut()
+ dispatcher.Dispatcher().PlugIn(self._owner)
+ self._owner.Dispatcher.restoreHandlers(handlers)
+ self._owner.User=self.username
+ raise NodeProcessed
+########################################3333
+ incoming_data=challenge.getData()
+ chal={}
+ data=base64.decodestring(incoming_data)
+ self.DEBUG('Got challenge:'+data,'ok')
+ for pair in re.findall('(\w+=(?:"[^"]+")|(?:[^,]+))',data):
+ key,value=pair.split('=', 1)
+ if value[:1]=='"' and value[-1:]=='"': value=value[1:-1]
+ chal[key]=value
+ if chal.has_key('qop') and 'auth' in chal['qop'].split(','):
+ resp={}
+ resp['username']=self.username
+ resp['realm']=self._owner.Server
+ resp['nonce']=chal['nonce']
+ cnonce=''
+ for i in range(7):
+ cnonce+=hex(int(random.random()*65536*4096))[2:]
+ resp['cnonce']=cnonce
+ resp['nc']=('00000001')
+ resp['qop']='auth'
+ resp['digest-uri']='xmpp/'+self._owner.Server
+ A1=C([H(C([resp['username'],resp['realm'],self.password])),resp['nonce'],resp['cnonce']])
+ A2=C(['AUTHENTICATE',resp['digest-uri']])
+ response= HH(C([HH(A1),resp['nonce'],resp['nc'],resp['cnonce'],resp['qop'],HH(A2)]))
+ resp['response']=response
+ resp['charset']='utf-8'
+ sasl_data=''
+ for key in ['charset','username','realm','nonce','nc','cnonce','digest-uri','response','qop']:
+ if key in ['nc','qop','response','charset']: sasl_data+="%s=%s,"%(key,resp[key])
+ else: sasl_data+='%s="%s",'%(key,resp[key])
+########################################3333
+ node=Node('response',attrs={'xmlns':NS_SASL},payload=[base64.encodestring(sasl_data[:-1]).replace('\r','').replace('\n','')])
+ self._owner.send(node.__str__())
+ elif chal.has_key('rspauth'): self._owner.send(Node('response',attrs={'xmlns':NS_SASL}).__str__())
+ else:
+ self.startsasl='failure'
+ self.DEBUG('Failed SASL authentification: unknown challenge','error')
+ raise NodeProcessed
+
+class Bind(PlugIn):
+ """ Bind some JID to the current connection to allow router know of our location."""
+ def __init__(self):
+ PlugIn.__init__(self)
+ self.DBG_LINE='bind'
+ self.bound=None
+
+ def plugin(self,owner):
+ """ Start resource binding, if allowed at this time. Used internally. """
+ if self._owner.Dispatcher.Stream.features:
+ try: self.FeaturesHandler(self._owner.Dispatcher,self._owner.Dispatcher.Stream.features)
+ except NodeProcessed: pass
+ else: self._owner.RegisterHandler('features',self.FeaturesHandler,xmlns=NS_STREAMS)
+
+ def plugout(self):
+ """ Remove Bind handler from owner's dispatcher. Used internally. """
+ self._owner.UnregisterHandler('features',self.FeaturesHandler,xmlns=NS_STREAMS)
+
+ def FeaturesHandler(self,conn,feats):
+ """ Determine if server supports resource binding and set some internal attributes accordingly. """
+ if not feats.getTag('bind',namespace=NS_BIND):
+ self.bound='failure'
+ self.DEBUG('Server does not requested binding.','error')
+ return
+ if feats.getTag('session',namespace=NS_SESSION): self.session=1
+ else: self.session=-1
+ self.bound=[]
+
+ def Bind(self,resource=None):
+ """ Perform binding. Use provided resource name or random (if not provided). """
+ while self.bound is None and self._owner.Process(1): pass
+ if resource: resource=[Node('resource',payload=[resource])]
+ else: resource=[]
+ resp=self._owner.SendAndWaitForResponse(Protocol('iq',typ='set',payload=[Node('bind',attrs={'xmlns':NS_BIND},payload=resource)]))
+ if isResultNode(resp):
+ self.bound.append(resp.getTag('bind').getTagData('jid'))
+ self.DEBUG('Successfully bound %s.'%self.bound[-1],'ok')
+ jid=JID(resp.getTag('bind').getTagData('jid'))
+ self._owner.User=jid.getNode()
+ self._owner.Resource=jid.getResource()
+ resp=self._owner.SendAndWaitForResponse(Protocol('iq',typ='set',payload=[Node('session',attrs={'xmlns':NS_SESSION})]))
+ if isResultNode(resp):
+ self.DEBUG('Successfully opened session.','ok')
+ self.session=1
+ return 'ok'
+ else:
+ self.DEBUG('Session open failed.','error')
+ self.session=0
+ elif resp: self.DEBUG('Binding failed: %s.'%resp.getTag('error'),'error')
+ else:
+ self.DEBUG('Binding failed: timeout expired.','error')
+ return ''
+
+class ComponentBind(PlugIn):
+ """ ComponentBind some JID to the current connection to allow router know of our location."""
+ def __init__(self, sasl):
+ PlugIn.__init__(self)
+ self.DBG_LINE='bind'
+ self.bound=None
+ self.needsUnregister=None
+ self.sasl = sasl
+
+ def plugin(self,owner):
+ """ Start resource binding, if allowed at this time. Used internally. """
+ if not self.sasl:
+ self.bound=[]
+ return
+ if self._owner.Dispatcher.Stream.features:
+ try: self.FeaturesHandler(self._owner.Dispatcher,self._owner.Dispatcher.Stream.features)
+ except NodeProcessed: pass
+ else:
+ self._owner.RegisterHandler('features',self.FeaturesHandler,xmlns=NS_STREAMS)
+ self.needsUnregister=1
+
+ def plugout(self):
+ """ Remove ComponentBind handler from owner's dispatcher. Used internally. """
+ if self.needsUnregister:
+ self._owner.UnregisterHandler('features',self.FeaturesHandler,xmlns=NS_STREAMS)
+
+ def FeaturesHandler(self,conn,feats):
+ """ Determine if server supports resource binding and set some internal attributes accordingly. """
+ if not feats.getTag('bind',namespace=NS_BIND):
+ self.bound='failure'
+ self.DEBUG('Server does not requested binding.','error')
+ return
+ if feats.getTag('session',namespace=NS_SESSION): self.session=1
+ else: self.session=-1
+ self.bound=[]
+
+ def Bind(self,domain=None):
+ """ Perform binding. Use provided domain name (if not provided). """
+ while self.bound is None and self._owner.Process(1): pass
+ if self.sasl:
+ xmlns = NS_COMPONENT_1
+ else:
+ xmlns = None
+ self.bindresponse = None
+ ttl = dispatcher.DefaultTimeout
+ self._owner.RegisterHandler('bind',self.BindHandler,xmlns=xmlns)
+ self._owner.send(Protocol('bind',attrs={'name':domain},xmlns=NS_COMPONENT_1))
+ while self.bindresponse is None and self._owner.Process(1) and ttl > 0: ttl-=1
+ self._owner.UnregisterHandler('bind',self.BindHandler,xmlns=xmlns)
+ resp=self.bindresponse
+ if resp and resp.getAttr('error'):
+ self.DEBUG('Binding failed: %s.'%resp.getAttr('error'),'error')
+ elif resp:
+ self.DEBUG('Successfully bound.','ok')
+ return 'ok'
+ else:
+ self.DEBUG('Binding failed: timeout expired.','error')
+ return ''
+
+ def BindHandler(self,conn,bind):
+ self.bindresponse = bind
+ pass
Binary file modules/xmpp/auth.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/browser.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,216 @@
+## browser.py
+##
+## Copyright (C) 2004 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: browser.py,v 1.11 2005/10/07 23:17:09 normanr Exp $
+
+"""Browser module provides DISCO server framework for your application.
+This functionality can be used for very different purposes - from publishing
+software version and supported features to building of "jabber site" that users
+can navigate with their disco browsers and interact with active content.
+
+Such functionality is achieved via registering "DISCO handlers" that are
+automatically called when user requests some node of your disco tree.
+"""
+
+from dispatcher import *
+from client import PlugIn
+
+class Browser(PlugIn):
+ """ WARNING! This class is for components only. It will not work in client mode!
+
+ Standart xmpppy class that is ancestor of PlugIn and can be attached
+ to your application.
+ All processing will be performed in the handlers registered in the browser
+ instance. You can register any number of handlers ensuring that for each
+ node/jid combination only one (or none) handler registered.
+ You can register static information or the fully-blown function that will
+ calculate the answer dynamically.
+ Example of static info (see JEP-0030, examples 13-14):
+ # cl - your xmpppy connection instance.
+ b=xmpp.browser.Browser()
+ b.PlugIn(cl)
+ items=[]
+ item={}
+ item['jid']='catalog.shakespeare.lit'
+ item['node']='books'
+ item['name']='Books by and about Shakespeare'
+ items.append(item)
+ item={}
+ item['jid']='catalog.shakespeare.lit'
+ item['node']='clothing'
+ item['name']='Wear your literary taste with pride'
+ items.append(item)
+ item={}
+ item['jid']='catalog.shakespeare.lit'
+ item['node']='music'
+ item['name']='Music from the time of Shakespeare'
+ items.append(item)
+ info={'ids':[], 'features':[]}
+ b.setDiscoHandler({'items':items,'info':info})
+
+ items should be a list of item elements.
+ every item element can have any of these four keys: 'jid', 'node', 'name', 'action'
+ info should be a dicionary and must have keys 'ids' and 'features'.
+ Both of them should be lists:
+ ids is a list of dictionaries and features is a list of text strings.
+ Example (see JEP-0030, examples 1-2)
+ # cl - your xmpppy connection instance.
+ b=xmpp.browser.Browser()
+ b.PlugIn(cl)
+ items=[]
+ ids=[]
+ ids.append({'category':'conference','type':'text','name':'Play-Specific Chatrooms'})
+ ids.append({'category':'directory','type':'chatroom','name':'Play-Specific Chatrooms'})
+ features=[NS_DISCO_INFO,NS_DISCO_ITEMS,NS_MUC,NS_REGISTER,NS_SEARCH,NS_TIME,NS_VERSION]
+ info={'ids':ids,'features':features}
+ # info['xdata']=xmpp.protocol.DataForm() # JEP-0128
+ b.setDiscoHandler({'items':[],'info':info})
+ """
+ def __init__(self):
+ """Initialises internal variables. Used internally."""
+ PlugIn.__init__(self)
+ DBG_LINE='browser'
+ self._exported_methods=[]
+ self._handlers={'':{}}
+
+ def plugin(self, owner):
+ """ Registers it's own iq handlers in your application dispatcher instance.
+ Used internally."""
+ owner.RegisterHandler('iq',self._DiscoveryHandler,typ='get',ns=NS_DISCO_INFO)
+ owner.RegisterHandler('iq',self._DiscoveryHandler,typ='get',ns=NS_DISCO_ITEMS)
+
+ def plugout(self):
+ """ Unregisters browser's iq handlers from your application dispatcher instance.
+ Used internally."""
+ self._owner.UnregisterHandler('iq',self._DiscoveryHandler,typ='get',ns=NS_DISCO_INFO)
+ self._owner.UnregisterHandler('iq',self._DiscoveryHandler,typ='get',ns=NS_DISCO_ITEMS)
+
+ def _traversePath(self,node,jid,set=0):
+ """ Returns dictionary and key or None,None
+ None - root node (w/o "node" attribute)
+ /a/b/c - node
+ /a/b/ - branch
+ Set returns '' or None as the key
+ get returns '' or None as the key or None as the dict.
+ Used internally."""
+ if self._handlers.has_key(jid): cur=self._handlers[jid]
+ elif set:
+ self._handlers[jid]={}
+ cur=self._handlers[jid]
+ else: cur=self._handlers['']
+ if node is None: node=[None]
+ else: node=node.replace('/',' /').split('/')
+ for i in node:
+ if i<>'' and cur.has_key(i): cur=cur[i]
+ elif set and i<>'': cur[i]={dict:cur,str:i}; cur=cur[i]
+ elif set or cur.has_key(''): return cur,''
+ else: return None,None
+ if cur.has_key(1) or set: return cur,1
+ raise "Corrupted data"
+
+ def setDiscoHandler(self,handler,node='',jid=''):
+ """ This is the main method that you will use in this class.
+ It is used to register supplied DISCO handler (or dictionary with static info)
+ as handler of some disco tree branch.
+ If you do not specify the node this handler will be used for all queried nodes.
+ If you do not specify the jid this handler will be used for all queried JIDs.
+
+ Usage:
+ cl.Browser.setDiscoHandler(someDict,node,jid)
+ or
+ cl.Browser.setDiscoHandler(someDISCOHandler,node,jid)
+ where
+
+ someDict={
+ 'items':[
+ {'jid':'jid1','action':'action1','node':'node1','name':'name1'},
+ {'jid':'jid2','action':'action2','node':'node2','name':'name2'},
+ {'jid':'jid3','node':'node3','name':'name3'},
+ {'jid':'jid4','node':'node4'}
+ ],
+ 'info' :{
+ 'ids':[
+ {'category':'category1','type':'type1','name':'name1'},
+ {'category':'category2','type':'type2','name':'name2'},
+ {'category':'category3','type':'type3','name':'name3'},
+ ],
+ 'features':['feature1','feature2','feature3','feature4'],
+ 'xdata':DataForm
+ }
+ }
+
+ and/or
+
+ def someDISCOHandler(session,request,TYR):
+ # if TYR=='items': # returns items list of the same format as shown above
+ # elif TYR=='info': # returns info dictionary of the same format as shown above
+ # else: # this case is impossible for now.
+ """
+ self.DEBUG('Registering handler %s for "%s" node->%s'%(handler,jid,node), 'info')
+ node,key=self._traversePath(node,jid,1)
+ node[key]=handler
+
+ def getDiscoHandler(self,node='',jid=''):
+ """ Returns the previously registered DISCO handler
+ that is resonsible for this node/jid combination.
+ Used internally."""
+ node,key=self._traversePath(node,jid)
+ if node: return node[key]
+
+ def delDiscoHandler(self,node='',jid=''):
+ """ Unregisters DISCO handler that is resonsible for this
+ node/jid combination. When handler is unregistered the branch
+ is handled in the same way that it's parent branch from this moment.
+ """
+ node,key=self._traversePath(node,jid)
+ if node:
+ handler=node[key]
+ del node[dict][node[str]]
+ return handler
+
+ def _DiscoveryHandler(self,conn,request):
+ """ Servers DISCO iq request from the remote client.
+ Automatically determines the best handler to use and calls it
+ to handle the request. Used internally.
+ """
+ handler=self.getDiscoHandler(request.getQuerynode(),request.getTo())
+ if not handler:
+ self.DEBUG("No Handler for request with jid->%s node->%s ns->%s"%(request.getTo(),request.getQuerynode(),request.getQueryNS()),'error')
+ conn.send(Error(request,ERR_ITEM_NOT_FOUND))
+ raise NodeProcessed
+ self.DEBUG("Handling request with jid->%s node->%s ns->%s"%(request.getTo(),request.getQuerynode(),request.getQueryNS()),'ok')
+ rep=request.buildReply('result')
+ if request.getQuerynode(): rep.setQuerynode(request.getQuerynode())
+ q=rep.getTag('query')
+ if request.getQueryNS()==NS_DISCO_ITEMS:
+ # handler must return list: [{jid,action,node,name}]
+ if type(handler)==dict: lst=handler['items']
+ else: lst=handler(conn,request,'items')
+ if lst==None:
+ conn.send(Error(request,ERR_ITEM_NOT_FOUND))
+ raise NodeProcessed
+ for item in lst: q.addChild('item',item)
+ elif request.getQueryNS()==NS_DISCO_INFO:
+ if type(handler)==dict: dt=handler['info']
+ else: dt=handler(conn,request,'info')
+ if dt==None:
+ conn.send(Error(request,ERR_ITEM_NOT_FOUND))
+ raise NodeProcessed
+ # handler must return dictionary:
+ # {'ids':[{},{},{},{}], 'features':[fe,at,ur,es], 'xdata':DataForm}
+ for id in dt['ids']: q.addChild('identity',id)
+ for feature in dt['features']: q.addChild('feature',{'var':feature})
+ if dt.has_key('xdata'): q.addChild(node=dt['xdata'])
+ conn.send(rep)
+ raise NodeProcessed
Binary file modules/xmpp/browser.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/client.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,313 @@
+## client.py
+##
+## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: client.py,v 1.55 2006/06/03 13:53:27 normanr Exp $
+
+"""
+Provides PlugIn class functionality to develop extentions for xmpppy.
+Also provides Client and Component classes implementations as the
+examples of xmpppy structures usage.
+These classes can be used for simple applications "AS IS" though.
+"""
+
+import socket
+import debug
+Debug=debug
+Debug.DEBUGGING_IS_ON=1
+Debug.Debug.colors['socket']=debug.color_dark_gray
+Debug.Debug.colors['CONNECTproxy']=debug.color_dark_gray
+Debug.Debug.colors['nodebuilder']=debug.color_brown
+Debug.Debug.colors['client']=debug.color_cyan
+Debug.Debug.colors['component']=debug.color_cyan
+Debug.Debug.colors['dispatcher']=debug.color_green
+Debug.Debug.colors['browser']=debug.color_blue
+Debug.Debug.colors['auth']=debug.color_yellow
+Debug.Debug.colors['roster']=debug.color_magenta
+Debug.Debug.colors['ibb']=debug.color_yellow
+
+Debug.Debug.colors['down']=debug.color_brown
+Debug.Debug.colors['up']=debug.color_brown
+Debug.Debug.colors['data']=debug.color_brown
+Debug.Debug.colors['ok']=debug.color_green
+Debug.Debug.colors['warn']=debug.color_yellow
+Debug.Debug.colors['error']=debug.color_red
+Debug.Debug.colors['start']=debug.color_dark_gray
+Debug.Debug.colors['stop']=debug.color_dark_gray
+Debug.Debug.colors['sent']=debug.color_yellow
+Debug.Debug.colors['got']=debug.color_bright_cyan
+
+DBG_CLIENT='client'
+DBG_COMPONENT='component'
+
+class PlugIn:
+ """ Common xmpppy plugins infrastructure: plugging in/out, debugging. """
+ def __init__(self):
+ self._exported_methods=[]
+ self.DBG_LINE=self.__class__.__name__.lower()
+
+ def PlugIn(self,owner):
+ """ Attach to main instance and register ourself and all our staff in it. """
+ self._owner=owner
+ if self.DBG_LINE not in owner.debug_flags:
+ owner.debug_flags.append(self.DBG_LINE)
+ self.DEBUG('Plugging %s into %s'%(self,self._owner),'start')
+ if owner.__dict__.has_key(self.__class__.__name__):
+ return self.DEBUG('Plugging ignored: another instance already plugged.','error')
+ self._old_owners_methods=[]
+ for method in self._exported_methods:
+ if owner.__dict__.has_key(method.__name__):
+ self._old_owners_methods.append(owner.__dict__[method.__name__])
+ owner.__dict__[method.__name__]=method
+ owner.__dict__[self.__class__.__name__]=self
+ if self.__class__.__dict__.has_key('plugin'): return self.plugin(owner)
+
+ def PlugOut(self):
+ """ Unregister all our staff from main instance and detach from it. """
+ self.DEBUG('Plugging %s out of %s.'%(self,self._owner),'stop')
+ self._owner.debug_flags.remove(self.DBG_LINE)
+ for method in self._exported_methods: del self._owner.__dict__[method.__name__]
+ for method in self._old_owners_methods: self._owner.__dict__[method.__name__]=method
+ del self._owner.__dict__[self.__class__.__name__]
+ if self.__class__.__dict__.has_key('plugout'): return self.plugout()
+
+ def DEBUG(self,text,severity='info'):
+ """ Feed a provided debug line to main instance's debug facility along with our ID string. """
+ self._owner.DEBUG(self.DBG_LINE,text,severity)
+
+import transports,dispatcher,auth,roster
+class CommonClient:
+ """ Base for Client and Component classes."""
+ def __init__(self,server,port=5222,debug=['always', 'nodebuilder']):
+ """ Caches server name and (optionally) port to connect to. "debug" parameter specifies
+ the debug IDs that will go into debug output. You can either specifiy an "include"
+ or "exclude" list. The latter is done via adding "always" pseudo-ID to the list.
+ Full list: ['nodebuilder', 'dispatcher', 'gen_auth', 'SASL_auth', 'bind', 'socket',
+ 'CONNECTproxy', 'TLS', 'roster', 'browser', 'ibb'] . """
+ if self.__class__.__name__=='Client': self.Namespace,self.DBG='jabber:client',DBG_CLIENT
+ elif self.__class__.__name__=='Component': self.Namespace,self.DBG=dispatcher.NS_COMPONENT_ACCEPT,DBG_COMPONENT
+ self.defaultNamespace=self.Namespace
+ self.disconnect_handlers=[]
+ self.Server=server
+ self.Port=port
+ if debug and type(debug)<>list: debug=['always', 'nodebuilder']
+ self._DEBUG=Debug.Debug(debug)
+ self.DEBUG=self._DEBUG.Show
+ self.debug_flags=self._DEBUG.debug_flags
+ self.debug_flags.append(self.DBG)
+ self._owner=self
+ self._registered_name=None
+ self.RegisterDisconnectHandler(self.DisconnectHandler)
+ self.connected=''
+ self._route=0
+
+ def RegisterDisconnectHandler(self,handler):
+ """ Register handler that will be called on disconnect."""
+ self.disconnect_handlers.append(handler)
+
+ def UnregisterDisconnectHandler(self,handler):
+ """ Unregister handler that is called on disconnect."""
+ self.disconnect_handlers.remove(handler)
+
+ def disconnected(self):
+ """ Called on disconnection. Calls disconnect handlers and cleans things up. """
+ self.connected=''
+ self.DEBUG(self.DBG,'Disconnect detected','stop')
+ self.disconnect_handlers.reverse()
+ for i in self.disconnect_handlers: i()
+ self.disconnect_handlers.reverse()
+ if self.__dict__.has_key('TLS'): self.TLS.PlugOut()
+
+ def DisconnectHandler(self):
+ """ Default disconnect handler. Just raises an IOError.
+ If you choosed to use this class in your production client,
+ override this method or at least unregister it. """
+ raise IOError('Disconnected from server.')
+
+ def event(self,eventName,args={}):
+ """ Default event handler. To be overriden. """
+ print "Event: ",(eventName,args)
+
+ def isConnected(self):
+ """ Returns connection state. F.e.: None / 'tls' / 'tcp+non_sasl' . """
+ return self.connected
+
+ def reconnectAndReauth(self):
+ """ Example of reconnection method. In fact, it can be used to batch connection and auth as well. """
+ handlerssave=self.Dispatcher.dumpHandlers()
+ self.Dispatcher.PlugOut()
+ if self.__dict__.has_key('NonSASL'): self.NonSASL.PlugOut()
+ if self.__dict__.has_key('SASL'): self.SASL.PlugOut()
+ if self.__dict__.has_key('TLS'): self.TLS.PlugOut()
+ if self.__dict__.has_key('HTTPPROXYsocket'): self.HTTPPROXYsocket.PlugOut()
+ if self.__dict__.has_key('TCPsocket'): self.TCPsocket.PlugOut()
+ if not self.connect(server=self._Server,proxy=self._Proxy): return
+ if not self.auth(self._User,self._Password,self._Resource): return
+ self.Dispatcher.restoreHandlers(handlerssave)
+ return self.connected
+
+ def connect(self,server=None,proxy=None,ssl=None,use_srv=None):
+ """ Make a tcp/ip connection, protect it with tls/ssl if possible and start XMPP stream.
+ Returns None or 'tcp' or 'tls', depending on the result."""
+ if not server: server=(self.Server,self.Port)
+ if proxy: socket=transports.HTTPPROXYsocket(proxy,server,use_srv)
+ else: socket=transports.TCPsocket(server,use_srv)
+ connected=socket.PlugIn(self)
+ if not connected:
+ socket.PlugOut()
+ return
+ self._Server,self._Proxy=server,proxy
+ self.connected='tcp'
+ if (ssl is None and self.Connection.getPort() in (5223, 443)) or ssl:
+ try: # FIXME. This should be done in transports.py
+ transports.TLS().PlugIn(self,now=1)
+ self.connected='ssl'
+ except socket.sslerror:
+ return
+ dispatcher.Dispatcher().PlugIn(self)
+ while self.Dispatcher.Stream._document_attrs is None:
+ if not self.Process(1): return
+ if self.Dispatcher.Stream._document_attrs.has_key('version') and self.Dispatcher.Stream._document_attrs['version']=='1.0':
+ while not self.Dispatcher.Stream.features and self.Process(1): pass # If we get version 1.0 stream the features tag MUST BE presented
+ return self.connected
+
+class Client(CommonClient):
+ """ Example client class, based on CommonClient. """
+ def connect(self,server=None,proxy=None,secure=None,use_srv=True):
+ """ Connect to jabber server. If you want to specify different ip/port to connect to you can
+ pass it as tuple as first parameter. If there is HTTP proxy between you and server
+ specify it's address and credentials (if needed) in the second argument.
+ If you want ssl/tls support to be discovered and enable automatically - leave third argument as None. (ssl will be autodetected only if port is 5223 or 443)
+ If you want to force SSL start (i.e. if port 5223 or 443 is remapped to some non-standard port) then set it to 1.
+ If you want to disable tls/ssl support completely, set it to 0.
+ Example: connect(('192.168.5.5',5222),{'host':'proxy.my.net','port':8080,'user':'me','password':'secret'})
+ Returns '' or 'tcp' or 'tls', depending on the result."""
+ if not CommonClient.connect(self,server,proxy,secure,use_srv) or secure<>None and not secure: return self.connected
+ transports.TLS().PlugIn(self)
+ if not self.Dispatcher.Stream._document_attrs.has_key('version') or not self.Dispatcher.Stream._document_attrs['version']=='1.0': return self.connected
+ while not self.Dispatcher.Stream.features and self.Process(1): pass # If we get version 1.0 stream the features tag MUST BE presented
+ if not self.Dispatcher.Stream.features.getTag('starttls'): return self.connected # TLS not supported by server
+ while not self.TLS.starttls and self.Process(1): pass
+ if not hasattr(self, 'TLS') or self.TLS.starttls!='success': self.event('tls_failed'); return self.connected
+ self.connected='tls'
+ return self.connected
+
+ def auth(self,user,password,resource='',sasl=1):
+ """ Authenticate connnection and bind resource. If resource is not provided
+ random one or library name used. """
+ self._User,self._Password,self._Resource=user,password,resource
+ while not self.Dispatcher.Stream._document_attrs and self.Process(1): pass
+ if self.Dispatcher.Stream._document_attrs.has_key('version') and self.Dispatcher.Stream._document_attrs['version']=='1.0':
+ while not self.Dispatcher.Stream.features and self.Process(1): pass # If we get version 1.0 stream the features tag MUST BE presented
+ if sasl: auth.SASL(user,password).PlugIn(self)
+ if not sasl or self.SASL.startsasl=='not-supported':
+ if not resource: resource='xmpppy'
+ if auth.NonSASL(user,password,resource).PlugIn(self):
+ self.connected+='+old_auth'
+ return 'old_auth'
+ return
+ self.SASL.auth()
+ while self.SASL.startsasl=='in-process' and self.Process(1): pass
+ if self.SASL.startsasl=='success':
+ auth.Bind().PlugIn(self)
+ while self.Bind.bound is None and self.Process(1): pass
+ if self.Bind.Bind(resource):
+ self.connected+='+sasl'
+ return 'sasl'
+
+ def getRoster(self):
+ """ Return the Roster instance, previously plugging it in and
+ requesting roster from server if needed. """
+ if not self.__dict__.has_key('Roster'): roster.Roster().PlugIn(self)
+ return self.Roster.getRoster()
+
+ def sendInitPresence(self,requestRoster=1):
+ """ Send roster request and initial <presence/>.
+ You can disable the first by setting requestRoster argument to 0. """
+ self.sendPresence(requestRoster=requestRoster)
+
+ def sendPresence(self,jid=None,typ=None,requestRoster=0):
+ """ Send some specific presence state.
+ Can also request roster from server if according agrument is set."""
+ if requestRoster: roster.Roster().PlugIn(self)
+ self.send(dispatcher.Presence(to=jid, typ=typ))
+
+class Component(CommonClient):
+ """ Component class. The only difference from CommonClient is ability to perform component authentication. """
+ def __init__(self,server,port=5347,typ=None,debug=['always', 'nodebuilder'],domains=None,sasl=0,bind=0,route=0):
+ """ Init function for Components.
+ As components use a different auth mechanism which includes the namespace of the component.
+ Jabberd1.4 and Ejabberd use the default namespace then for all client messages.
+ Jabberd2 uses jabber:client.
+ 'server' argument is a server name that you are connecting to (f.e. "localhost").
+ 'port' can be specified if 'server' resolves to correct IP. If it is not then you'll need to specify IP
+ and port while calling "connect()"."""
+ CommonClient.__init__(self,server,port=port,debug=debug)
+ self.typ=typ
+ self.sasl=sasl
+ self.bind=bind
+ self.route=route
+ if domains:
+ self.domains=domains
+ else:
+ self.domains=[server]
+
+ def connect(self,server=None,proxy=None):
+ """ This will connect to the server, and if the features tag is found then set
+ the namespace to be jabber:client as that is required for jabberd2.
+ 'server' and 'proxy' arguments have the same meaning as in xmpp.Client.connect() """
+ if self.sasl:
+ self.Namespace=auth.NS_COMPONENT_1
+ self.Server=server[0]
+ CommonClient.connect(self,server=server,proxy=proxy)
+ if self.connected and (self.typ=='jabberd2' or not self.typ and self.Dispatcher.Stream.features != None):
+ self.defaultNamespace=auth.NS_CLIENT
+ self.Dispatcher.RegisterNamespace(self.defaultNamespace)
+ self.Dispatcher.RegisterProtocol('iq',dispatcher.Iq)
+ self.Dispatcher.RegisterProtocol('message',dispatcher.Message)
+ self.Dispatcher.RegisterProtocol('presence',dispatcher.Presence)
+ return self.connected
+
+ def dobind(self, sasl):
+ # This has to be done before binding, because we can receive a route stanza before binding finishes
+ self._route = self.route
+ if self.bind:
+ for domain in self.domains:
+ auth.ComponentBind(sasl).PlugIn(self)
+ while self.ComponentBind.bound is None: self.Process(1)
+ if (not self.ComponentBind.Bind(domain)):
+ self.ComponentBind.PlugOut()
+ return
+ self.ComponentBind.PlugOut()
+
+ def auth(self,name,password,dup=None):
+ """ Authenticate component "name" with password "password"."""
+ self._User,self._Password,self._Resource=name,password,''
+ try:
+ if self.sasl: auth.SASL(name,password).PlugIn(self)
+ if not self.sasl or self.SASL.startsasl=='not-supported':
+ if auth.NonSASL(name,password,'').PlugIn(self):
+ self.dobind(sasl=False)
+ self.connected+='+old_auth'
+ return 'old_auth'
+ return
+ self.SASL.auth()
+ while self.SASL.startsasl=='in-process' and self.Process(1): pass
+ if self.SASL.startsasl=='success':
+ self.dobind(sasl=True)
+ self.connected+='+sasl'
+ return 'sasl'
+ else:
+ raise auth.NotAuthorized(self.SASL.startsasl)
+ except:
+ self.DEBUG(self.DBG,"Failed to authenticate %s"%name,'error')
Binary file modules/xmpp/client.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/commands.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,328 @@
+## $Id: commands.py,v 1.16 2006/06/03 12:54:39 normanr Exp $
+
+## Ad-Hoc Command manager
+## Mike Albon (c) 5th January 2005
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+
+"""This module is a ad-hoc command processor for xmpppy. It uses the plug-in mechanism like most of the core library. It depends on a DISCO browser manager.
+
+There are 3 classes here, a command processor Commands like the Browser, and a command template plugin Command, and an example command.
+
+To use this module:
+
+ Instansiate the module with the parent transport and disco browser manager as parameters.
+ 'Plug in' commands using the command template.
+ The command feature must be added to existing disco replies where neccessary.
+
+What it supplies:
+
+ Automatic command registration with the disco browser manager.
+ Automatic listing of commands in the public command list.
+ A means of handling requests, by redirection though the command manager.
+"""
+
+from protocol import *
+from client import PlugIn
+
+class Commands(PlugIn):
+ """Commands is an ancestor of PlugIn and can be attached to any session.
+
+ The commands class provides a lookup and browse mechnism. It follows the same priciple of the Browser class, for Service Discovery to provide the list of commands, it adds the 'list' disco type to your existing disco handler function.
+
+ How it works:
+ The commands are added into the existing Browser on the correct nodes. When the command list is built the supplied discovery handler function needs to have a 'list' option in type. This then gets enumerated, all results returned as None are ignored.
+ The command executed is then called using it's Execute method. All session management is handled by the command itself.
+ """
+ def __init__(self, browser):
+ """Initialises class and sets up local variables"""
+ PlugIn.__init__(self)
+ DBG_LINE='commands'
+ self._exported_methods=[]
+ self._handlers={'':{}}
+ self._browser = browser
+
+ def plugin(self, owner):
+ """Makes handlers within the session"""
+ # Plug into the session and the disco manager
+ # We only need get and set, results are not needed by a service provider, only a service user.
+ owner.RegisterHandler('iq',self._CommandHandler,typ='set',ns=NS_COMMANDS)
+ owner.RegisterHandler('iq',self._CommandHandler,typ='get',ns=NS_COMMANDS)
+ self._browser.setDiscoHandler(self._DiscoHandler,node=NS_COMMANDS,jid='')
+
+ def plugout(self):
+ """Removes handlers from the session"""
+ # unPlug from the session and the disco manager
+ self._owner.UnregisterHandler('iq',self._CommandHandler,ns=NS_COMMANDS)
+ for jid in self._handlers:
+ self._browser.delDiscoHandler(self._DiscoHandler,node=NS_COMMANDS)
+
+ def _CommandHandler(self,conn,request):
+ """The internal method to process the routing of command execution requests"""
+ # This is the command handler itself.
+ # We must:
+ # Pass on command execution to command handler
+ # (Do we need to keep session details here, or can that be done in the command?)
+ jid = str(request.getTo())
+ try:
+ node = request.getTagAttr('command','node')
+ except:
+ conn.send(Error(request,ERR_BAD_REQUEST))
+ raise NodeProcessed
+ if self._handlers.has_key(jid):
+ if self._handlers[jid].has_key(node):
+ self._handlers[jid][node]['execute'](conn,request)
+ else:
+ conn.send(Error(request,ERR_ITEM_NOT_FOUND))
+ raise NodeProcessed
+ elif self._handlers[''].has_key(node):
+ self._handlers[''][node]['execute'](conn,request)
+ else:
+ conn.send(Error(requet,ERR_ITEM_NOT_FOUND))
+ raise NodeProcessed
+
+ def _DiscoHandler(self,conn,request,typ):
+ """The internal method to process service discovery requests"""
+ # This is the disco manager handler.
+ if typ == 'items':
+ # We must:
+ # Generate a list of commands and return the list
+ # * This handler does not handle individual commands disco requests.
+ # Pseudo:
+ # Enumerate the 'item' disco of each command for the specified jid
+ # Build responce and send
+ # To make this code easy to write we add an 'list' disco type, it returns a tuple or 'none' if not advertised
+ list = []
+ items = []
+ jid = str(request.getTo())
+ # Get specific jid based results
+ if self._handlers.has_key(jid):
+ for each in self._handlers[jid].keys():
+ items.append((jid,each))
+ else:
+ # Get generic results
+ for each in self._handlers[''].keys():
+ items.append(('',each))
+ if items != []:
+ for each in items:
+ i = self._handlers[each[0]][each[1]]['disco'](conn,request,'list')
+ if i != None:
+ list.append(Node(tag='item',attrs={'jid':i[0],'node':i[1],'name':i[2]}))
+ iq = request.buildReply('result')
+ if request.getQuerynode(): iq.setQuerynode(request.getQuerynode())
+ iq.setQueryPayload(list)
+ conn.send(iq)
+ else:
+ conn.send(Error(request,ERR_ITEM_NOT_FOUND))
+ raise NodeProcessed
+ elif typ == 'info':
+ return {'ids':[{'category':'automation','type':'command-list'}],'features':[]}
+
+ def addCommand(self,name,cmddisco,cmdexecute,jid=''):
+ """The method to call if adding a new command to the session, the requred parameters of cmddisco and cmdexecute are the methods to enable that command to be executed"""
+ # This command takes a command object and the name of the command for registration
+ # We must:
+ # Add item into disco
+ # Add item into command list
+ if not self._handlers.has_key(jid):
+ self._handlers[jid]={}
+ self._browser.setDiscoHandler(self._DiscoHandler,node=NS_COMMANDS,jid=jid)
+ if self._handlers[jid].has_key(name):
+ raise NameError,'Command Exists'
+ else:
+ self._handlers[jid][name]={'disco':cmddisco,'execute':cmdexecute}
+ # Need to add disco stuff here
+ self._browser.setDiscoHandler(cmddisco,node=name,jid=jid)
+
+ def delCommand(self,name,jid=''):
+ """Removed command from the session"""
+ # This command takes a command object and the name used for registration
+ # We must:
+ # Remove item from disco
+ # Remove item from command list
+ if not self._handlers.has_key(jid):
+ raise NameError,'Jid not found'
+ if not self._handlers[jid].has_key(name):
+ raise NameError, 'Command not found'
+ else:
+ #Do disco removal here
+ command = self.getCommand(name,jid)['disco']
+ del self._handlers[jid][name]
+ self._browser.delDiscoHandler(command,node=name,jid=jid)
+
+ def getCommand(self,name,jid=''):
+ """Returns the command tuple"""
+ # This gets the command object with name
+ # We must:
+ # Return item that matches this name
+ if not self._handlers.has_key(jid):
+ raise NameError,'Jid not found'
+ elif not self._handlers[jid].has_key(name):
+ raise NameError,'Command not found'
+ else:
+ return self._handlers[jid][name]
+
+class Command_Handler_Prototype(PlugIn):
+ """This is a prototype command handler, as each command uses a disco method
+ and execute method you can implement it any way you like, however this is
+ my first attempt at making a generic handler that you can hang process
+ stages on too. There is an example command below.
+
+ The parameters are as follows:
+ name : the name of the command within the jabber environment
+ description : the natural language description
+ discofeatures : the features supported by the command
+ initial : the initial command in the from of {'execute':commandname}
+
+ All stages set the 'actions' dictionary for each session to represent the possible options available.
+ """
+ name = 'examplecommand'
+ count = 0
+ description = 'an example command'
+ discofeatures = [NS_COMMANDS,NS_DATA]
+ # This is the command template
+ def __init__(self,jid=''):
+ """Set up the class"""
+ PlugIn.__init__(self)
+ DBG_LINE='command'
+ self.sessioncount = 0
+ self.sessions = {}
+ # Disco information for command list pre-formatted as a tuple
+ self.discoinfo = {'ids':[{'category':'automation','type':'command-node','name':self.description}],'features': self.discofeatures}
+ self._jid = jid
+
+ def plugin(self,owner):
+ """Plug command into the commands class"""
+ # The owner in this instance is the Command Processor
+ self._commands = owner
+ self._owner = owner._owner
+ self._commands.addCommand(self.name,self._DiscoHandler,self.Execute,jid=self._jid)
+
+ def plugout(self):
+ """Remove command from the commands class"""
+ self._commands.delCommand(self.name,self._jid)
+
+ def getSessionID(self):
+ """Returns an id for the command session"""
+ self.count = self.count+1
+ return 'cmd-%s-%d'%(self.name,self.count)
+
+ def Execute(self,conn,request):
+ """The method that handles all the commands, and routes them to the correct method for that stage."""
+ # New request or old?
+ try:
+ session = request.getTagAttr('command','sessionid')
+ except:
+ session = None
+ try:
+ action = request.getTagAttr('command','action')
+ except:
+ action = None
+ if action == None: action = 'execute'
+ # Check session is in session list
+ if self.sessions.has_key(session):
+ if self.sessions[session]['jid']==request.getFrom():
+ # Check action is vaild
+ if self.sessions[session]['actions'].has_key(action):
+ # Execute next action
+ self.sessions[session]['actions'][action](conn,request)
+ else:
+ # Stage not presented as an option
+ self._owner.send(Error(request,ERR_BAD_REQUEST))
+ raise NodeProcessed
+ else:
+ # Jid and session don't match. Go away imposter
+ self._owner.send(Error(request,ERR_BAD_REQUEST))
+ raise NodeProcessed
+ elif session != None:
+ # Not on this sessionid you won't.
+ self._owner.send(Error(request,ERR_BAD_REQUEST))
+ raise NodeProcessed
+ else:
+ # New session
+ self.initial[action](conn,request)
+
+ def _DiscoHandler(self,conn,request,type):
+ """The handler for discovery events"""
+ if type == 'list':
+ return (request.getTo(),self.name,self.description)
+ elif type == 'items':
+ return []
+ elif type == 'info':
+ return self.discoinfo
+
+class TestCommand(Command_Handler_Prototype):
+ """ Example class. You should read source if you wish to understate how it works.
+ Generally, it presents a "master" that giudes user through to calculate something.
+ """
+ name = 'testcommand'
+ description = 'a noddy example command'
+ def __init__(self,jid=''):
+ """ Init internal constants. """
+ Command_Handler_Prototype.__init__(self,jid)
+ self.initial = {'execute':self.cmdFirstStage}
+
+ def cmdFirstStage(self,conn,request):
+ """ Determine """
+ # This is the only place this should be repeated as all other stages should have SessionIDs
+ try:
+ session = request.getTagAttr('command','sessionid')
+ except:
+ session = None
+ if session == None:
+ session = self.getSessionID()
+ self.sessions[session]={'jid':request.getFrom(),'actions':{'cancel':self.cmdCancel,'next':self.cmdSecondStage,'execute':self.cmdSecondStage},'data':{'type':None}}
+ # As this is the first stage we only send a form
+ reply = request.buildReply('result')
+ form = DataForm(title='Select type of operation',data=['Use the combobox to select the type of calculation you would like to do, then click Next',DataField(name='calctype',desc='Calculation Type',value=self.sessions[session]['data']['type'],options=[['circlediameter','Calculate the Diameter of a circle'],['circlearea','Calculate the area of a circle']],typ='list-single',required=1)])
+ replypayload = [Node('actions',attrs={'execute':'next'},payload=[Node('next')]),form]
+ reply.addChild(name='command',namespace=NS_COMMANDS,attrs={'node':request.getTagAttr('command','node'),'sessionid':session,'status':'executing'},payload=replypayload)
+ self._owner.send(reply)
+ raise NodeProcessed
+
+ def cmdSecondStage(self,conn,request):
+ form = DataForm(node = request.getTag(name='command').getTag(name='x',namespace=NS_DATA))
+ self.sessions[request.getTagAttr('command','sessionid')]['data']['type']=form.getField('calctype').getValue()
+ self.sessions[request.getTagAttr('command','sessionid')]['actions']={'cancel':self.cmdCancel,None:self.cmdThirdStage,'previous':self.cmdFirstStage,'execute':self.cmdThirdStage,'next':self.cmdThirdStage}
+ # The form generation is split out to another method as it may be called by cmdThirdStage
+ self.cmdSecondStageReply(conn,request)
+
+ def cmdSecondStageReply(self,conn,request):
+ reply = request.buildReply('result')
+ form = DataForm(title = 'Enter the radius', data=['Enter the radius of the circle (numbers only)',DataField(desc='Radius',name='radius',typ='text-single')])
+ replypayload = [Node('actions',attrs={'execute':'complete'},payload=[Node('complete'),Node('prev')]),form]
+ reply.addChild(name='command',namespace=NS_COMMANDS,attrs={'node':request.getTagAttr('command','node'),'sessionid':request.getTagAttr('command','sessionid'),'status':'executing'},payload=replypayload)
+ self._owner.send(reply)
+ raise NodeProcessed
+
+ def cmdThirdStage(self,conn,request):
+ form = DataForm(node = request.getTag(name='command').getTag(name='x',namespace=NS_DATA))
+ try:
+ num = float(form.getField('radius').getValue())
+ except:
+ self.cmdSecondStageReply(conn,request)
+ from math import pi
+ if self.sessions[request.getTagAttr('command','sessionid')]['data']['type'] == 'circlearea':
+ result = (num**2)*pi
+ else:
+ result = num*2*pi
+ reply = request.buildReply('result')
+ form = DataForm(typ='result',data=[DataField(desc='result',name='result',value=result)])
+ reply.addChild(name='command',namespace=NS_COMMANDS,attrs={'node':request.getTagAttr('command','node'),'sessionid':request.getTagAttr('command','sessionid'),'status':'completed'},payload=[form])
+ self._owner.send(reply)
+ raise NodeProcessed
+
+ def cmdCancel(self,conn,request):
+ reply = request.buildReply('result')
+ reply.addChild(name='command',namespace=NS_COMMANDS,attrs={'node':request.getTagAttr('command','node'),'sessionid':request.getTagAttr('command','sessionid'),'status':'cancelled'})
+ self._owner.send(reply)
+ del self.sessions[request.getTagAttr('command','sessionid')]
Binary file modules/xmpp/commands.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/debug.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,423 @@
+## debug.py
+##
+## Copyright (C) 2003 Jacob Lundqvist
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU Lesser General Public License for more details.
+
+_version_ = '1.4.0'
+
+"""\
+
+Generic debug class
+
+Other modules can always define extra debug flags for local usage, as long as
+they make sure they append them to debug_flags
+
+Also its always a good thing to prefix local flags with something, to reduce risk
+of coliding flags. Nothing breaks if two flags would be identical, but it might
+activate unintended debugging.
+
+flags can be numeric, but that makes analysing harder, on creation its
+not obvious what is activated, and when flag_show is given, output isnt
+really meaningfull.
+
+This Debug class can either be initialized and used on app level, or used independantly
+by the individual classes.
+
+For samples of usage, see samples subdir in distro source, and selftest
+in this code
+
+"""
+
+
+
+import sys
+import traceback
+import time
+import os
+
+import types
+
+if os.environ.has_key('TERM'):
+ colors_enabled=True
+else:
+ colors_enabled=False
+
+color_none = chr(27) + "[0m"
+color_black = chr(27) + "[30m"
+color_red = chr(27) + "[31m"
+color_green = chr(27) + "[32m"
+color_brown = chr(27) + "[33m"
+color_blue = chr(27) + "[34m"
+color_magenta = chr(27) + "[35m"
+color_cyan = chr(27) + "[36m"
+color_light_gray = chr(27) + "[37m"
+color_dark_gray = chr(27) + "[30;1m"
+color_bright_red = chr(27) + "[31;1m"
+color_bright_green = chr(27) + "[32;1m"
+color_yellow = chr(27) + "[33;1m"
+color_bright_blue = chr(27) + "[34;1m"
+color_purple = chr(27) + "[35;1m"
+color_bright_cyan = chr(27) + "[36;1m"
+color_white = chr(27) + "[37;1m"
+
+
+"""
+Define your flags in yor modules like this:
+
+from debug import *
+
+DBG_INIT = 'init' ; debug_flags.append( DBG_INIT )
+DBG_CONNECTION = 'connection' ; debug_flags.append( DBG_CONNECTION )
+
+ The reason for having a double statement wis so we can validate params
+ and catch all undefined debug flags
+
+ This gives us control over all used flags, and makes it easier to allow
+ global debugging in your code, just do something like
+
+ foo = Debug( debug_flags )
+
+ group flags, that is a flag in it self containing multiple flags should be
+ defined without the debug_flags.append() sequence, since the parts are already
+ in the list, also they must of course be defined after the flags they depend on ;)
+ example:
+
+DBG_MULTI = [ DBG_INIT, DBG_CONNECTION ]
+
+
+
+ NoDebug
+ -------
+ To speed code up, typically for product releases or such
+ use this class instead if you globaly want to disable debugging
+"""
+
+
+class NoDebug:
+ def __init__( self, *args, **kwargs ):
+ self.debug_flags = []
+ def show( self, *args, **kwargs):
+ pass
+ def Show( self, *args, **kwargs):
+ pass
+ def is_active( self, flag ):
+ pass
+ colors={}
+ def active_set( self, active_flags = None ):
+ return 0
+
+
+LINE_FEED = '\n'
+
+
+class Debug:
+ def __init__( self,
+ #
+ # active_flags are those that will trigger output
+ #
+ active_flags = None,
+ #
+ # Log file should be file object or file namne
+ #
+ log_file = sys.stderr,
+ #
+ # prefix and sufix can either be set globaly or per call.
+ # personally I use this to color code debug statements
+ # with prefix = chr(27) + '[34m'
+ # sufix = chr(27) + '[37;1m\n'
+ #
+ prefix = 'DEBUG: ',
+ sufix = '\n',
+ #
+ # If you want unix style timestamps,
+ # 0 disables timestamps
+ # 1 before prefix, good when prefix is a string
+ # 2 after prefix, good when prefix is a color
+ #
+ time_stamp = 0,
+ #
+ # flag_show should normaly be of, but can be turned on to get a
+ # good view of what flags are actually used for calls,
+ # if it is not None, it should be a string
+ # flags for current call will be displayed
+ # with flag_show as separator
+ # recomended values vould be '-' or ':', but any string goes
+ #
+ flag_show = None,
+ #
+ # If you dont want to validate flags on each call to
+ # show(), set this to 0
+ #
+ validate_flags = 1,
+ #
+ # If you dont want the welcome message, set to 0
+ # default is to show welcome if any flags are active
+ welcome = -1
+ ):
+
+ self.debug_flags = []
+ if welcome == -1:
+ if active_flags and len(active_flags):
+ welcome = 1
+ else:
+ welcome = 0
+
+ self._remove_dupe_flags()
+ if log_file:
+ if type( log_file ) is type(''):
+ try:
+ self._fh = open(log_file,'w')
+ except:
+ print 'ERROR: can open %s for writing'
+ sys.exit(0)
+ else: ## assume its a stream type object
+ self._fh = log_file
+ else:
+ self._fh = sys.stdout
+
+ if time_stamp not in (0,1,2):
+ msg2 = '%s' % time_stamp
+ raise 'Invalid time_stamp param', msg2
+ self.prefix = prefix
+ self.sufix = sufix
+ self.time_stamp = time_stamp
+ self.flag_show = None # must be initialised after possible welcome
+ self.validate_flags = validate_flags
+
+ self.active_set( active_flags )
+ if welcome:
+ self.show('')
+ caller = sys._getframe(1) # used to get name of caller
+ try:
+ mod_name= ":%s" % caller.f_locals['__name__']
+ except:
+ mod_name = ""
+ self.show('Debug created for %s%s' % (caller.f_code.co_filename,
+ mod_name ))
+ self.show(' flags defined: %s' % ','.join( self.active ))
+
+ if type(flag_show) in (type(''), type(None)):
+ self.flag_show = flag_show
+ else:
+ msg2 = '%s' % type(flag_show )
+ raise 'Invalid type for flag_show!', msg2
+
+
+
+
+
+ def show( self, msg, flag = None, prefix = None, sufix = None,
+ lf = 0 ):
+ """
+ flag can be of folowing types:
+ None - this msg will always be shown if any debugging is on
+ flag - will be shown if flag is active
+ (flag1,flag2,,,) - will be shown if any of the given flags
+ are active
+
+ if prefix / sufix are not given, default ones from init will be used
+
+ lf = -1 means strip linefeed if pressent
+ lf = 1 means add linefeed if not pressent
+ """
+
+ if self.validate_flags:
+ self._validate_flag( flag )
+
+ if not self.is_active(flag):
+ return
+ if prefix:
+ pre = prefix
+ else:
+ pre = self.prefix
+ if sufix:
+ suf = sufix
+ else:
+ suf = self.sufix
+
+ if self.time_stamp == 2:
+ output = '%s%s ' % ( pre,
+ time.strftime('%b %d %H:%M:%S',
+ time.localtime(time.time() )),
+ )
+ elif self.time_stamp == 1:
+ output = '%s %s' % ( time.strftime('%b %d %H:%M:%S',
+ time.localtime(time.time() )),
+ pre,
+ )
+ else:
+ output = pre
+
+ if self.flag_show:
+ if flag:
+ output = '%s%s%s' % ( output, flag, self.flag_show )
+ else:
+ # this call uses the global default,
+ # dont print "None", just show the separator
+ output = '%s %s' % ( output, self.flag_show )
+
+ output = '%s%s%s' % ( output, msg, suf )
+ if lf:
+ # strip/add lf if needed
+ last_char = output[-1]
+ if lf == 1 and last_char != LINE_FEED:
+ output = output + LINE_FEED
+ elif lf == -1 and last_char == LINE_FEED:
+ output = output[:-1]
+ try:
+ self._fh.write( output )
+ except:
+ # unicode strikes again ;)
+ s=u''
+ for i in range(len(output)):
+ if ord(output[i]) < 128:
+ c = output[i]
+ else:
+ c = '?'
+ s=s+c
+ self._fh.write( '%s%s%s' % ( pre, s, suf ))
+ self._fh.flush()
+
+
+ def is_active( self, flag ):
+ 'If given flag(s) should generate output.'
+
+ # try to abort early to quicken code
+ if not self.active:
+ return 0
+ if not flag or flag in self.active:
+ return 1
+ else:
+ # check for multi flag type:
+ if type( flag ) in ( type(()), type([]) ):
+ for s in flag:
+ if s in self.active:
+ return 1
+ return 0
+
+
+ def active_set( self, active_flags = None ):
+ "returns 1 if any flags where actually set, otherwise 0."
+ r = 0
+ ok_flags = []
+ if not active_flags:
+ #no debuging at all
+ self.active = []
+ elif type( active_flags ) in ( types.TupleType, types.ListType ):
+ flags = self._as_one_list( active_flags )
+ for t in flags:
+ if t not in self.debug_flags:
+ sys.stderr.write('Invalid debugflag given: %s\n' % t )
+ ok_flags.append( t )
+
+ self.active = ok_flags
+ r = 1
+ else:
+ # assume comma string
+ try:
+ flags = active_flags.split(',')
+ except:
+ self.show( '***' )
+ self.show( '*** Invalid debug param given: %s' % active_flags )
+ self.show( '*** please correct your param!' )
+ self.show( '*** due to this, full debuging is enabled' )
+ self.active = self.debug_flags
+
+ for f in flags:
+ s = f.strip()
+ ok_flags.append( s )
+ self.active = ok_flags
+
+ self._remove_dupe_flags()
+ return r
+
+ def active_get( self ):
+ "returns currently active flags."
+ return self.active
+
+
+ def _as_one_list( self, items ):
+ """ init param might contain nested lists, typically from group flags.
+
+ This code organises lst and remves dupes
+ """
+ if type( items ) <> type( [] ) and type( items ) <> type( () ):
+ return [ items ]
+ r = []
+ for l in items:
+ if type( l ) == type([]):
+ lst2 = self._as_one_list( l )
+ for l2 in lst2:
+ self._append_unique_str(r, l2 )
+ elif l == None:
+ continue
+ else:
+ self._append_unique_str(r, l )
+ return r
+
+
+ def _append_unique_str( self, lst, item ):
+ """filter out any dupes."""
+ if type(item) <> type(''):
+ msg2 = '%s' % item
+ raise 'Invalid item type (should be string)',msg2
+ if item not in lst:
+ lst.append( item )
+ return lst
+
+
+ def _validate_flag( self, flags ):
+ 'verify that flag is defined.'
+ if flags:
+ for f in self._as_one_list( flags ):
+ if not f in self.debug_flags:
+ msg2 = '%s' % f
+ raise 'Invalid debugflag given', msg2
+
+ def _remove_dupe_flags( self ):
+ """
+ if multiple instances of Debug is used in same app,
+ some flags might be created multiple time, filter out dupes
+ """
+ unique_flags = []
+ for f in self.debug_flags:
+ if f not in unique_flags:
+ unique_flags.append(f)
+ self.debug_flags = unique_flags
+
+ colors={}
+ def Show(self, flag, msg, prefix=''):
+ msg=msg.replace('\r','\\r').replace('\n','\\n').replace('><','>\n <')
+ if not colors_enabled: pass
+ elif self.colors.has_key(prefix): msg=self.colors[prefix]+msg+color_none
+ else: msg=color_none+msg
+ if not colors_enabled: prefixcolor=''
+ elif self.colors.has_key(flag): prefixcolor=self.colors[flag]
+ else: prefixcolor=color_none
+
+ if prefix=='error':
+ _exception = sys.exc_info()
+ if _exception[0]:
+ msg=msg+'\n'+''.join(traceback.format_exception(_exception[0], _exception[1], _exception[2])).rstrip()
+
+ prefix= self.prefix+prefixcolor+(flag+' '*12)[:12]+' '+(prefix+' '*6)[:6]
+ self.show(msg, flag, prefix)
+
+ def is_active( self, flag ):
+ if not self.active: return 0
+ if not flag or flag in self.active and DBG_ALWAYS not in self.active or flag not in self.active and DBG_ALWAYS in self.active : return 1
+ return 0
+
+DBG_ALWAYS='always'
+
+##Uncomment this to effectively disable all debugging and all debugging overhead.
+#Debug=NoDebug
Binary file modules/xmpp/debug.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/dispatcher.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,372 @@
+## transports.py
+##
+## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: dispatcher.py,v 1.41 2006/06/03 13:53:27 normanr Exp $
+
+"""
+Main xmpppy mechanism. Provides library with methods to assign different handlers
+to different XMPP stanzas.
+Contains one tunable attribute: DefaultTimeout (25 seconds by default). It defines time that
+Dispatcher.SendAndWaitForResponce method will wait for reply stanza before giving up.
+"""
+
+import simplexml,time,sys
+from protocol import *
+from client import PlugIn
+
+DefaultTimeout=25
+ID=0
+
+class Dispatcher(PlugIn):
+ """ Ancestor of PlugIn class. Handles XMPP stream, i.e. aware of stream headers.
+ Can be plugged out/in to restart these headers (used for SASL f.e.). """
+ def __init__(self):
+ PlugIn.__init__(self)
+ DBG_LINE='dispatcher'
+ self.handlers={}
+ self._expected={}
+ self._defaultHandler=None
+ self._pendingExceptions=[]
+ self._eventHandler=None
+ self._cycleHandlers=[]
+ self._exported_methods=[self.Process,self.RegisterHandler,self.RegisterDefaultHandler,\
+ self.RegisterEventHandler,self.UnregisterCycleHandler,self.RegisterCycleHandler,\
+ self.RegisterHandlerOnce,self.UnregisterHandler,self.RegisterProtocol,\
+ self.WaitForResponse,self.SendAndWaitForResponse,self.send,self.disconnect,\
+ self.SendAndCallForResponse, ]
+
+ def dumpHandlers(self):
+ """ Return set of user-registered callbacks in it's internal format.
+ Used within the library to carry user handlers set over Dispatcher replugins. """
+ return self.handlers
+ def restoreHandlers(self,handlers):
+ """ Restores user-registered callbacks structure from dump previously obtained via dumpHandlers.
+ Used within the library to carry user handlers set over Dispatcher replugins. """
+ self.handlers=handlers
+
+ def _init(self):
+ """ Registers default namespaces/protocols/handlers. Used internally. """
+ self.RegisterNamespace('unknown')
+ self.RegisterNamespace(NS_STREAMS)
+ self.RegisterNamespace(self._owner.defaultNamespace)
+ self.RegisterProtocol('iq',Iq)
+ self.RegisterProtocol('presence',Presence)
+ self.RegisterProtocol('message',Message)
+ self.RegisterDefaultHandler(self.returnStanzaHandler)
+ self.RegisterHandler('error',self.streamErrorHandler,xmlns=NS_STREAMS)
+
+ def plugin(self, owner):
+ """ Plug the Dispatcher instance into Client class instance and send initial stream header. Used internally."""
+ self._init()
+ for method in self._old_owners_methods:
+ if method.__name__=='send': self._owner_send=method; break
+ self._owner.lastErrNode=None
+ self._owner.lastErr=None
+ self._owner.lastErrCode=None
+ self.StreamInit()
+
+ def plugout(self):
+ """ Prepares instance to be destructed. """
+ self.Stream.dispatch=None
+ self.Stream.DEBUG=None
+ self.Stream.features=None
+ self.Stream.destroy()
+
+ def StreamInit(self):
+ """ Send an initial stream header. """
+ self.Stream=simplexml.NodeBuilder()
+ self.Stream._dispatch_depth=2
+ self.Stream.dispatch=self.dispatch
+ self.Stream.stream_header_received=self._check_stream_start
+ self._owner.debug_flags.append(simplexml.DBG_NODEBUILDER)
+ self.Stream.DEBUG=self._owner.DEBUG
+ self.Stream.features=None
+ self._metastream=Node('stream:stream')
+ self._metastream.setNamespace(self._owner.Namespace)
+ self._metastream.setAttr('version','1.0')
+ self._metastream.setAttr('xmlns:stream',NS_STREAMS)
+ self._metastream.setAttr('to',self._owner.Server)
+ self._owner.send("<?xml version='1.0'?>%s>"%str(self._metastream)[:-2])
+
+ def _check_stream_start(self,ns,tag,attrs):
+ if ns<>NS_STREAMS or tag<>'stream':
+ raise ValueError('Incorrect stream start: (%s,%s). Terminating.'%(tag,ns))
+
+ def Process(self, timeout=0):
+ """ Check incoming stream for data waiting. If "timeout" is positive - block for as max. this time.
+ Returns:
+ 1) length of processed data if some data were processed;
+ 2) '0' string if no data were processed but link is alive;
+ 3) 0 (zero) if underlying connection is closed.
+ Take note that in case of disconnection detect during Process() call
+ disconnect handlers are called automatically.
+ """
+ for handler in self._cycleHandlers: handler(self)
+ if len(self._pendingExceptions) > 0:
+ _pendingException = self._pendingExceptions.pop()
+ raise _pendingException[0], _pendingException[1], _pendingException[2]
+ if self._owner.Connection.pending_data(timeout):
+ try: data=self._owner.Connection.receive()
+ except IOError: return
+ self.Stream.Parse(data)
+ if len(self._pendingExceptions) > 0:
+ _pendingException = self._pendingExceptions.pop()
+ raise _pendingException[0], _pendingException[1], _pendingException[2]
+ if data: return len(data)
+ return '0' # It means that nothing is received but link is alive.
+
+ def RegisterNamespace(self,xmlns,order='info'):
+ """ Creates internal structures for newly registered namespace.
+ You can register handlers for this namespace afterwards. By default one namespace
+ already registered (jabber:client or jabber:component:accept depending on context. """
+ self.DEBUG('Registering namespace "%s"'%xmlns,order)
+ self.handlers[xmlns]={}
+ self.RegisterProtocol('unknown',Protocol,xmlns=xmlns)
+ self.RegisterProtocol('default',Protocol,xmlns=xmlns)
+
+ def RegisterProtocol(self,tag_name,Proto,xmlns=None,order='info'):
+ """ Used to declare some top-level stanza name to dispatcher.
+ Needed to start registering handlers for such stanzas.
+ Iq, message and presence protocols are registered by default. """
+ if not xmlns: xmlns=self._owner.defaultNamespace
+ self.DEBUG('Registering protocol "%s" as %s(%s)'%(tag_name,Proto,xmlns), order)
+ self.handlers[xmlns][tag_name]={type:Proto, 'default':[]}
+
+ def RegisterNamespaceHandler(self,xmlns,handler,typ='',ns='', makefirst=0, system=0):
+ """ Register handler for processing all stanzas for specified namespace. """
+ self.RegisterHandler('default', handler, typ, ns, xmlns, makefirst, system)
+
+ def RegisterHandler(self,name,handler,typ='',ns='',xmlns=None, makefirst=0, system=0):
+ """Register user callback as stanzas handler of declared type. Callback must take
+ (if chained, see later) arguments: dispatcher instance (for replying), incomed
+ return of previous handlers.
+ The callback must raise xmpp.NodeProcessed just before return if it want preven
+ callbacks to be called with the same stanza as argument _and_, more importantly
+ library from returning stanza to sender with error set (to be enabled in 0.2 ve
+ Arguments:
+ "name" - name of stanza. F.e. "iq".
+ "handler" - user callback.
+ "typ" - value of stanza's "type" attribute. If not specified any value match
+ "ns" - namespace of child that stanza must contain.
+ "chained" - chain together output of several handlers.
+ "makefirst" - insert handler in the beginning of handlers list instead of
+ adding it to the end. Note that more common handlers (i.e. w/o "typ" and "
+ will be called first nevertheless.
+ "system" - call handler even if NodeProcessed Exception were raised already.
+ """
+ if not xmlns: xmlns=self._owner.defaultNamespace
+ self.DEBUG('Registering handler %s for "%s" type->%s ns->%s(%s)'%(handler,name,typ,ns,xmlns), 'info')
+ if not typ and not ns: typ='default'
+ if not self.handlers.has_key(xmlns): self.RegisterNamespace(xmlns,'warn')
+ if not self.handlers[xmlns].has_key(name): self.RegisterProtocol(name,Protocol,xmlns,'warn')
+ if not self.handlers[xmlns][name].has_key(typ+ns): self.handlers[xmlns][name][typ+ns]=[]
+ if makefirst: self.handlers[xmlns][name][typ+ns].insert(0,{'func':handler,'system':system})
+ else: self.handlers[xmlns][name][typ+ns].append({'func':handler,'system':system})
+
+ def RegisterHandlerOnce(self,name,handler,typ='',ns='',xmlns=None,makefirst=0, system=0):
+ """ Unregister handler after first call (not implemented yet). """
+ if not xmlns: xmlns=self._owner.defaultNamespace
+ self.RegisterHandler(name, handler, typ, ns, xmlns, makefirst, system)
+
+ def UnregisterHandler(self,name,handler,typ='',ns='',xmlns=None):
+ """ Unregister handler. "typ" and "ns" must be specified exactly the same as with registering."""
+ if not xmlns: xmlns=self._owner.defaultNamespace
+ if not typ and not ns: typ='default'
+ for pack in self.handlers[xmlns][name][typ+ns]:
+ if handler==pack['func']: break
+ else: pack=None
+ try: self.handlers[xmlns][name][typ+ns].remove(pack)
+ except ValueError: pass
+
+ def RegisterDefaultHandler(self,handler):
+ """ Specify the handler that will be used if no NodeProcessed exception were raised.
+ This is returnStanzaHandler by default. """
+ self._defaultHandler=handler
+
+ def RegisterEventHandler(self,handler):
+ """ Register handler that will process events. F.e. "FILERECEIVED" event. """
+ self._eventHandler=handler
+
+ def returnStanzaHandler(self,conn,stanza):
+ """ Return stanza back to the sender with <feature-not-implemennted/> error set. """
+ if stanza.getType() in ['get','set']:
+ conn.send(Error(stanza,ERR_FEATURE_NOT_IMPLEMENTED))
+
+ def streamErrorHandler(self,conn,error):
+ name,text='error',error.getData()
+ for tag in error.getChildren():
+ if tag.getNamespace()==NS_XMPP_STREAMS:
+ if tag.getName()=='text': text=tag.getData()
+ else: name=tag.getName()
+ if name in stream_exceptions.keys(): exc=stream_exceptions[name]
+ else: exc=StreamError
+ raise exc((name,text))
+
+ def RegisterCycleHandler(self,handler):
+ """ Register handler that will be called on every Dispatcher.Process() call. """
+ if handler not in self._cycleHandlers: self._cycleHandlers.append(handler)
+
+ def UnregisterCycleHandler(self,handler):
+ """ Unregister handler that will is called on every Dispatcher.Process() call."""
+ if handler in self._cycleHandlers: self._cycleHandlers.remove(handler)
+
+ def Event(self,realm,event,data):
+ """ Raise some event. Takes three arguments:
+ 1) "realm" - scope of event. Usually a namespace.
+ 2) "event" - the event itself. F.e. "SUCESSFULL SEND".
+ 3) data that comes along with event. Depends on event."""
+ if self._eventHandler: self._eventHandler(realm,event,data)
+
+ def dispatch(self,stanza,session=None,direct=0):
+ """ Main procedure that performs XMPP stanza recognition and calling apppropriate handlers for it.
+ Called internally. """
+ if not session: session=self
+ session.Stream._mini_dom=None
+ name=stanza.getName()
+
+ if not direct and self._owner._route:
+ if name == 'route':
+ if stanza.getAttr('error') == None:
+ if len(stanza.getChildren()) == 1:
+ stanza = stanza.getChildren()[0]
+ name=stanza.getName()
+ else:
+ for each in stanza.getChildren():
+ self.dispatch(each,session,direct=1)
+ return
+ elif name == 'presence':
+ return
+ elif name in ('features','bind'):
+ pass
+ else:
+ raise UnsupportedStanzaType(name)
+
+ if name=='features': session.Stream.features=stanza
+
+ xmlns=stanza.getNamespace()
+ if not self.handlers.has_key(xmlns):
+ self.DEBUG("Unknown namespace: " + xmlns,'warn')
+ xmlns='unknown'
+ if not self.handlers[xmlns].has_key(name):
+ self.DEBUG("Unknown stanza: " + name,'warn')
+ name='unknown'
+ else:
+ self.DEBUG("Got %s/%s stanza"%(xmlns,name), 'ok')
+
+ if stanza.__class__.__name__=='Node': stanza=self.handlers[xmlns][name][type](node=stanza)
+
+ typ=stanza.getType()
+ if not typ: typ=''
+ stanza.props=stanza.getProperties()
+ ID=stanza.getID()
+
+ session.DEBUG("Dispatching %s stanza with type->%s props->%s id->%s"%(name,typ,stanza.props,ID),'ok')
+
+ list=['default'] # we will use all handlers:
+ if self.handlers[xmlns][name].has_key(typ): list.append(typ) # from very common...
+ for prop in stanza.props:
+ if self.handlers[xmlns][name].has_key(prop): list.append(prop)
+ if typ and self.handlers[xmlns][name].has_key(typ+prop): list.append(typ+prop) # ...to very particular
+
+ chain=self.handlers[xmlns]['default']['default']
+ for key in list:
+ if key: chain = chain + self.handlers[xmlns][name][key]
+
+ output=''
+ if session._expected.has_key(ID):
+ user=0
+ if type(session._expected[ID])==type(()):
+ cb,args=session._expected[ID]
+ session.DEBUG("Expected stanza arrived. Callback %s(%s) found!"%(cb,args),'ok')
+ try: cb(session,stanza,**args)
+ except Exception, typ:
+ if typ.__class__.__name__<>'NodeProcessed': raise
+ else:
+ session.DEBUG("Expected stanza arrived!",'ok')
+ session._expected[ID]=stanza
+ else: user=1
+ for handler in chain:
+ if user or handler['system']:
+ try:
+ handler['func'](session,stanza)
+ except Exception, typ:
+ if typ.__class__.__name__<>'NodeProcessed':
+ self._pendingExceptions.insert(0, sys.exc_info())
+ return
+ user=0
+ if user and self._defaultHandler: self._defaultHandler(session,stanza)
+
+ def WaitForResponse(self, ID, timeout=DefaultTimeout):
+ """ Block and wait until stanza with specific "id" attribute will come.
+ If no such stanza is arrived within timeout, return None.
+ If operation failed for some reason then owner's attributes
+ lastErrNode, lastErr and lastErrCode are set accordingly. """
+ self._expected[ID]=None
+ has_timed_out=0
+ abort_time=time.time() + timeout
+ self.DEBUG("Waiting for ID:%s with timeout %s..." % (ID,timeout),'wait')
+ while not self._expected[ID]:
+ if not self.Process(0.04):
+ self._owner.lastErr="Disconnect"
+ return None
+ if time.time() > abort_time:
+ self._owner.lastErr="Timeout"
+ return None
+ response=self._expected[ID]
+ del self._expected[ID]
+ if response.getErrorCode():
+ self._owner.lastErrNode=response
+ self._owner.lastErr=response.getError()
+ self._owner.lastErrCode=response.getErrorCode()
+ return response
+
+ def SendAndWaitForResponse(self, stanza, timeout=DefaultTimeout):
+ """ Put stanza on the wire and wait for recipient's response to it. """
+ return self.WaitForResponse(self.send(stanza),timeout)
+
+ def SendAndCallForResponse(self, stanza, func, args={}):
+ """ Put stanza on the wire and call back when recipient replies.
+ Additional callback arguments can be specified in args. """
+ self._expected[self.send(stanza)]=(func,args)
+
+ def send(self,stanza):
+ """ Serialise stanza and put it on the wire. Assign an unique ID to it before send.
+ Returns assigned ID."""
+ if type(stanza) in [type(''), type(u'')]: return self._owner_send(stanza)
+ if not isinstance(stanza,Protocol): _ID=None
+ elif not stanza.getID():
+ global ID
+ ID+=1
+ _ID=`ID`
+ stanza.setID(_ID)
+ else: _ID=stanza.getID()
+ if self._owner._registered_name and not stanza.getAttr('from'): stanza.setAttr('from',self._owner._registered_name)
+ if self._owner._route and stanza.getName()!='bind':
+ to=self._owner.Server
+ if stanza.getTo() and stanza.getTo().getDomain():
+ to=stanza.getTo().getDomain()
+ frm=stanza.getFrom()
+ if frm.getDomain():
+ frm=frm.getDomain()
+ route=Protocol('route',to=to,frm=frm,payload=[stanza])
+ stanza=route
+ stanza.setNamespace(self._owner.Namespace)
+ stanza.setParent(self._metastream)
+ self._owner_send(stanza)
+ return _ID
+
+ def disconnect(self):
+ """ Send a stream terminator and and handle all incoming stanzas before stream closure. """
+ self._owner_send('</stream:stream>')
+ while self.Process(1): pass
Binary file modules/xmpp/dispatcher.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/features.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,182 @@
+## features.py
+##
+## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: features.py,v 1.24 2006/03/25 05:47:22 snakeru Exp $
+
+"""
+This module contains variable stuff that is not worth splitting into separate modules.
+Here is:
+ DISCO client and agents-to-DISCO and browse-to-DISCO emulators.
+ IBR and password manager.
+ jabber:iq:privacy methods
+All these methods takes 'disp' first argument that should be already connected
+(and in most cases already authorised) dispatcher instance.
+"""
+
+from protocol import *
+
+REGISTER_DATA_RECEIVED='REGISTER DATA RECEIVED'
+
+### DISCO ### http://jabber.org/protocol/disco ### JEP-0030 ####################
+### Browse ### jabber:iq:browse ### JEP-0030 ###################################
+### Agents ### jabber:iq:agents ### JEP-0030 ###################################
+def _discover(disp,ns,jid,node=None,fb2b=0,fb2a=1):
+ """ Try to obtain info from the remote object.
+ If remote object doesn't support disco fall back to browse (if fb2b is true)
+ and if it doesnt support browse (or fb2b is not true) fall back to agents protocol
+ (if gb2a is true). Returns obtained info. Used internally. """
+ iq=Iq(to=jid,typ='get',queryNS=ns)
+ if node: iq.setQuerynode(node)
+ rep=disp.SendAndWaitForResponse(iq)
+ if fb2b and not isResultNode(rep): rep=disp.SendAndWaitForResponse(Iq(to=jid,typ='get',queryNS=NS_BROWSE)) # Fallback to browse
+ if fb2a and not isResultNode(rep): rep=disp.SendAndWaitForResponse(Iq(to=jid,typ='get',queryNS=NS_AGENTS)) # Fallback to agents
+ if isResultNode(rep): return rep.getQueryPayload()
+ return []
+
+def discoverItems(disp,jid,node=None):
+ """ Query remote object about any items that it contains. Return items list. """
+ """ According to JEP-0030:
+ query MAY have node attribute
+ item: MUST HAVE jid attribute and MAY HAVE name, node, action attributes.
+ action attribute of item can be either of remove or update value."""
+ ret=[]
+ for i in _discover(disp,NS_DISCO_ITEMS,jid,node):
+ if i.getName()=='agent' and i.getTag('name'): i.setAttr('name',i.getTagData('name'))
+ ret.append(i.attrs)
+ return ret
+
+def discoverInfo(disp,jid,node=None):
+ """ Query remote object about info that it publishes. Returns identities and features lists."""
+ """ According to JEP-0030:
+ query MAY have node attribute
+ identity: MUST HAVE category and name attributes and MAY HAVE type attribute.
+ feature: MUST HAVE var attribute"""
+ identities , features = [] , []
+ for i in _discover(disp,NS_DISCO_INFO,jid,node):
+ if i.getName()=='identity': identities.append(i.attrs)
+ elif i.getName()=='feature': features.append(i.getAttr('var'))
+ elif i.getName()=='agent':
+ if i.getTag('name'): i.setAttr('name',i.getTagData('name'))
+ if i.getTag('description'): i.setAttr('name',i.getTagData('description'))
+ identities.append(i.attrs)
+ if i.getTag('groupchat'): features.append(NS_GROUPCHAT)
+ if i.getTag('register'): features.append(NS_REGISTER)
+ if i.getTag('search'): features.append(NS_SEARCH)
+ return identities , features
+
+### Registration ### jabber:iq:register ### JEP-0077 ###########################
+def getRegInfo(disp,host,info={},sync=True):
+ """ Gets registration form from remote host.
+ You can pre-fill the info dictionary.
+ F.e. if you are requesting info on registering user joey than specify
+ info as {'username':'joey'}. See JEP-0077 for details.
+ 'disp' must be connected dispatcher instance."""
+ iq=Iq('get',NS_REGISTER,to=host)
+ for i in info.keys(): iq.setTagData(i,info[i])
+ if sync:
+ resp=disp.SendAndWaitForResponse(iq)
+ _ReceivedRegInfo(disp.Dispatcher,resp, host)
+ return resp
+ else: disp.SendAndCallForResponse(iq,_ReceivedRegInfo, {'agent': host})
+
+def _ReceivedRegInfo(con, resp, agent):
+ iq=Iq('get',NS_REGISTER,to=agent)
+ if not isResultNode(resp): return
+ df=resp.getTag('query',namespace=NS_REGISTER).getTag('x',namespace=NS_DATA)
+ if df:
+ con.Event(NS_REGISTER,REGISTER_DATA_RECEIVED,(agent, DataForm(node=df)))
+ return
+ df=DataForm(typ='form')
+ for i in resp.getQueryPayload():
+ if type(i)<>type(iq): pass
+ elif i.getName()=='instructions': df.addInstructions(i.getData())
+ else: df.setField(i.getName()).setValue(i.getData())
+ con.Event(NS_REGISTER,REGISTER_DATA_RECEIVED,(agent, df))
+
+def register(disp,host,info):
+ """ Perform registration on remote server with provided info.
+ disp must be connected dispatcher instance.
+ Returns true or false depending on registration result.
+ If registration fails you can get additional info from the dispatcher's owner
+ attributes lastErrNode, lastErr and lastErrCode.
+ """
+ iq=Iq('set',NS_REGISTER,to=host)
+ if type(info)<>type({}): info=info.asDict()
+ for i in info.keys(): iq.setTag('query').setTagData(i,info[i])
+ resp=disp.SendAndWaitForResponse(iq)
+ if isResultNode(resp): return 1
+
+def unregister(disp,host):
+ """ Unregisters with host (permanently removes account).
+ disp must be connected and authorized dispatcher instance.
+ Returns true on success."""
+ resp=disp.SendAndWaitForResponse(Iq('set',NS_REGISTER,to=host,payload=[Node('remove')]))
+ if isResultNode(resp): return 1
+
+def changePasswordTo(disp,newpassword,host=None):
+ """ Changes password on specified or current (if not specified) server.
+ disp must be connected and authorized dispatcher instance.
+ Returns true on success."""
+ if not host: host=disp._owner.Server
+ resp=disp.SendAndWaitForResponse(Iq('set',NS_REGISTER,to=host,payload=[Node('username',payload=[disp._owner.Server]),Node('password',payload=[newpassword])]))
+ if isResultNode(resp): return 1
+
+### Privacy ### jabber:iq:privacy ### draft-ietf-xmpp-im-19 ####################
+#type=[jid|group|subscription]
+#action=[allow|deny]
+
+def getPrivacyLists(disp):
+ """ Requests privacy lists from connected server.
+ Returns dictionary of existing lists on success."""
+ try:
+ dict={'lists':[]}
+ resp=disp.SendAndWaitForResponse(Iq('get',NS_PRIVACY))
+ if not isResultNode(resp): return
+ for list in resp.getQueryPayload():
+ if list.getName()=='list': dict['lists'].append(list.getAttr('name'))
+ else: dict[list.getName()]=list.getAttr('name')
+ return dict
+ except: pass
+
+def getPrivacyList(disp,listname):
+ """ Requests specific privacy list listname. Returns list of XML nodes (rules)
+ taken from the server responce."""
+ try:
+ resp=disp.SendAndWaitForResponse(Iq('get',NS_PRIVACY,payload=[Node('list',{'name':listname})]))
+ if isResultNode(resp): return resp.getQueryPayload()[0]
+ except: pass
+
+def setActivePrivacyList(disp,listname=None,typ='active'):
+ """ Switches privacy list 'listname' to specified type.
+ By default the type is 'active'. Returns true on success."""
+ if listname: attrs={'name':listname}
+ else: attrs={}
+ resp=disp.SendAndWaitForResponse(Iq('set',NS_PRIVACY,payload=[Node(typ,attrs)]))
+ if isResultNode(resp): return 1
+
+def setDefaultPrivacyList(disp,listname=None):
+ """ Sets the default privacy list as 'listname'. Returns true on success."""
+ return setActivePrivacyList(disp,listname,'default')
+
+def setPrivacyList(disp,list):
+ """ Set the ruleset. 'list' should be the simpleXML node formatted
+ according to RFC 3921 (XMPP-IM) (I.e. Node('list',{'name':listname},payload=[...]) )
+ Returns true on success."""
+ resp=disp.SendAndWaitForResponse(Iq('set',NS_PRIVACY,payload=[list]))
+ if isResultNode(resp): return 1
+
+def delPrivacyList(disp,listname):
+ """ Deletes privacy list 'listname'. Returns true on success."""
+ resp=disp.SendAndWaitForResponse(Iq('set',NS_PRIVACY,payload=[Node('list',{'name':listname})]))
+ if isResultNode(resp): return 1
Binary file modules/xmpp/features.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/filetransfer.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,199 @@
+## filetransfer.py
+##
+## Copyright (C) 2004 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: filetransfer.py,v 1.6 2004/12/25 20:06:59 snakeru Exp $
+
+"""
+This module contains IBB class that is the simple implementation of JEP-0047.
+Note that this is just a transport for data. You have to negotiate data transfer before
+(via StreamInitiation most probably). Unfortunately SI is not implemented yet.
+"""
+
+from protocol import *
+from dispatcher import PlugIn
+import base64
+
+class IBB(PlugIn):
+ """ IBB used to transfer small-sized data chunk over estabilished xmpp connection.
+ Data is split into small blocks (by default 3000 bytes each), encoded as base 64
+ and sent to another entity that compiles these blocks back into the data chunk.
+ This is very inefficiend but should work under any circumstances. Note that
+ using IBB normally should be the last resort.
+ """
+ def __init__(self):
+ """ Initialise internal variables. """
+ PlugIn.__init__(self)
+ self.DBG_LINE='ibb'
+ self._exported_methods=[self.OpenStream]
+ self._streams={}
+ self._ampnode=Node(NS_AMP+' amp',payload=[Node('rule',{'condition':'deliver-at','value':'stored','action':'error'}),Node('rule',{'condition':'match-resource','value':'exact','action':'error'})])
+
+ def plugin(self,owner):
+ """ Register handlers for receiving incoming datastreams. Used internally. """
+ self._owner.RegisterHandlerOnce('iq',self.StreamOpenReplyHandler) # Move to StreamOpen and specify stanza id
+ self._owner.RegisterHandler('iq',self.IqHandler,ns=NS_IBB)
+ self._owner.RegisterHandler('message',self.ReceiveHandler,ns=NS_IBB)
+
+ def IqHandler(self,conn,stanza):
+ """ Handles streams state change. Used internally. """
+ typ=stanza.getType()
+ self.DEBUG('IqHandler called typ->%s'%typ,'info')
+ if typ=='set' and stanza.getTag('open',namespace=NS_IBB): self.StreamOpenHandler(conn,stanza)
+ elif typ=='set' and stanza.getTag('close',namespace=NS_IBB): self.StreamCloseHandler(conn,stanza)
+ elif typ=='result': self.StreamCommitHandler(conn,stanza)
+ elif typ=='error': self.StreamOpenReplyHandler(conn,stanza)
+ else: conn.send(Error(stanza,ERR_BAD_REQUEST))
+ raise NodeProcessed
+
+ def StreamOpenHandler(self,conn,stanza):
+ """ Handles opening of new incoming stream. Used internally. """
+ """
+<iq type='set'
+ from='romeo@montague.net/orchard'
+ to='juliet@capulet.com/balcony'
+ id='inband_1'>
+ <open sid='mySID'
+ block-size='4096'
+ xmlns='http://jabber.org/protocol/ibb'/>
+</iq>
+"""
+ err=None
+ sid,blocksize=stanza.getTagAttr('open','sid'),stanza.getTagAttr('open','block-size')
+ self.DEBUG('StreamOpenHandler called sid->%s blocksize->%s'%(sid,blocksize),'info')
+ try: blocksize=int(blocksize)
+ except: err=ERR_BAD_REQUEST
+ if not sid or not blocksize: err=ERR_BAD_REQUEST
+ elif sid in self._streams.keys(): err=ERR_UNEXPECTED_REQUEST
+ if err: rep=Error(stanza,err)
+ else:
+ self.DEBUG("Opening stream: id %s, block-size %s"%(sid,blocksize),'info')
+ rep=Protocol('iq',stanza.getFrom(),'result',stanza.getTo(),{'id':stanza.getID()})
+ self._streams[sid]={'direction':'<'+str(stanza.getFrom()),'block-size':blocksize,'fp':open('/tmp/xmpp_file_'+sid,'w'),'seq':0,'syn_id':stanza.getID()}
+ conn.send(rep)
+
+ def OpenStream(self,sid,to,fp,blocksize=3000):
+ """ Start new stream. You should provide stream id 'sid', the endpoind jid 'to',
+ the file object containing info for send 'fp'. Also the desired blocksize can be specified.
+ Take into account that recommended stanza size is 4k and IBB uses base64 encoding
+ that increases size of data by 1/3."""
+ if sid in self._streams.keys(): return
+ if not JID(to).getResource(): return
+ self._streams[sid]={'direction':'|>'+to,'block-size':blocksize,'fp':fp,'seq':0}
+ self._owner.RegisterCycleHandler(self.SendHandler)
+ syn=Protocol('iq',to,'set',payload=[Node(NS_IBB+' open',{'sid':sid,'block-size':blocksize})])
+ self._owner.send(syn)
+ self._streams[sid]['syn_id']=syn.getID()
+ return self._streams[sid]
+
+ def SendHandler(self,conn):
+ """ Send next portion of data if it is time to do it. Used internally. """
+ self.DEBUG('SendHandler called','info')
+ for sid in self._streams.keys():
+ stream=self._streams[sid]
+ if stream['direction'][:2]=='|>': cont=1
+ elif stream['direction'][0]=='>':
+ chunk=stream['fp'].read(stream['block-size'])
+ if chunk:
+ datanode=Node(NS_IBB+' data',{'sid':sid,'seq':stream['seq']},base64.encodestring(chunk))
+ stream['seq']+=1
+ if stream['seq']==65536: stream['seq']=0
+ conn.send(Protocol('message',stream['direction'][1:],payload=[datanode,self._ampnode]))
+ else:
+ """ notify the other side about stream closing
+ notify the local user about sucessfull send
+ delete the local stream"""
+ conn.send(Protocol('iq',stream['direction'][1:],'set',payload=[Node(NS_IBB+' close',{'sid':sid})]))
+ conn.Event(self.DBG_LINE,'SUCCESSFULL SEND',stream)
+ del self._streams[sid]
+ self._owner.UnregisterCycleHandler(self.SendHandler)
+
+ """
+<message from='romeo@montague.net/orchard' to='juliet@capulet.com/balcony' id='msg1'>
+ <data xmlns='http://jabber.org/protocol/ibb' sid='mySID' seq='0'>
+ qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
+ WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
+ IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
+ AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
+ kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
+ </data>
+ <amp xmlns='http://jabber.org/protocol/amp'>
+ <rule condition='deliver-at' value='stored' action='error'/>
+ <rule condition='match-resource' value='exact' action='error'/>
+ </amp>
+</message>
+"""
+
+ def ReceiveHandler(self,conn,stanza):
+ """ Receive next portion of incoming datastream and store it write
+ it to temporary file. Used internally.
+ """
+ sid,seq,data=stanza.getTagAttr('data','sid'),stanza.getTagAttr('data','seq'),stanza.getTagData('data')
+ self.DEBUG('ReceiveHandler called sid->%s seq->%s'%(sid,seq),'info')
+ try: seq=int(seq); data=base64.decodestring(data)
+ except: seq=''; data=''
+ err=None
+ if not sid in self._streams.keys(): err=ERR_ITEM_NOT_FOUND
+ else:
+ stream=self._streams[sid]
+ if not data: err=ERR_BAD_REQUEST
+ elif seq<>stream['seq']: err=ERR_UNEXPECTED_REQUEST
+ else:
+ self.DEBUG('Successfull receive sid->%s %s+%s bytes'%(sid,stream['fp'].tell(),len(data)),'ok')
+ stream['seq']+=1
+ stream['fp'].write(data)
+ if err:
+ self.DEBUG('Error on receive: %s'%err,'error')
+ conn.send(Error(Iq(to=stanza.getFrom(),frm=stanza.getTo(),payload=[Node(NS_IBB+' close')]),err,reply=0))
+
+ def StreamCloseHandler(self,conn,stanza):
+ """ Handle stream closure due to all data transmitted.
+ Raise xmpppy event specifying successfull data receive. """
+ sid=stanza.getTagAttr('close','sid')
+ self.DEBUG('StreamCloseHandler called sid->%s'%sid,'info')
+ if sid in self._streams.keys():
+ conn.send(stanza.buildReply('result'))
+ conn.Event(self.DBG_LINE,'SUCCESSFULL RECEIVE',self._streams[sid])
+ del self._streams[sid]
+ else: conn.send(Error(stanza,ERR_ITEM_NOT_FOUND))
+
+ def StreamBrokenHandler(self,conn,stanza):
+ """ Handle stream closure due to all some error while receiving data.
+ Raise xmpppy event specifying unsuccessfull data receive. """
+ syn_id=stanza.getID()
+ self.DEBUG('StreamBrokenHandler called syn_id->%s'%syn_id,'info')
+ for sid in self._streams.keys():
+ stream=self._streams[sid]
+ if stream['syn_id']==syn_id:
+ if stream['direction'][0]=='<': conn.Event(self.DBG_LINE,'ERROR ON RECEIVE',stream)
+ else: conn.Event(self.DBG_LINE,'ERROR ON SEND',stream)
+ del self._streams[sid]
+
+ def StreamOpenReplyHandler(self,conn,stanza):
+ """ Handle remote side reply about is it agree or not to receive our datastream.
+ Used internally. Raises xmpppy event specfiying if the data transfer
+ is agreed upon."""
+ syn_id=stanza.getID()
+ self.DEBUG('StreamOpenReplyHandler called syn_id->%s'%syn_id,'info')
+ for sid in self._streams.keys():
+ stream=self._streams[sid]
+ if stream['syn_id']==syn_id:
+ if stanza.getType()=='error':
+ if stream['direction'][0]=='<': conn.Event(self.DBG_LINE,'ERROR ON RECEIVE',stream)
+ else: conn.Event(self.DBG_LINE,'ERROR ON SEND',stream)
+ del self._streams[sid]
+ elif stanza.getType()=='result':
+ if stream['direction'][0]=='|':
+ stream['direction']=stream['direction'][1:]
+ conn.Event(self.DBG_LINE,'STREAM COMMITTED',stream)
+ else: conn.send(Error(stanza,ERR_UNEXPECTED_REQUEST))
Binary file modules/xmpp/filetransfer.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/jep0106.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,36 @@
+
+# JID Escaping Jep-0106 for the xmpppy based transports written by Norman Rasmussen
+
+"""This file is the JEP-0106 commands.
+
+Implemented commands as follows:
+
+4.2 Encode : Encoding Transformation
+4.3 Decode : Decoding Transformation
+
+
+"""
+
+jep0106mapping = [
+ [' ' ,'20'],
+ ['"' ,'22'],
+ ['&' ,'26'],
+ ['\'','27'],
+ ['/' ,'2f'],
+ [':' ,'3a'],
+ ['<' ,'3c'],
+ ['>' ,'3e'],
+ ['@' ,'40']]
+
+def JIDEncode(str):
+ str = str.replace('\\5c', '\\5c5c')
+ for each in jep0106mapping:
+ str = str.replace('\\' + each[1], '\\5c' + each[1])
+ for each in jep0106mapping:
+ str = str.replace(each[0], '\\' + each[1])
+ return str
+
+def JIDDecode(str):
+ for each in jep0106mapping:
+ str = str.replace('\\' + each[1], each[0])
+ return str.replace('\\5c', '\\')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/protocol.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,707 @@
+## protocol.py
+##
+## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: protocol.py,v 1.54 2006/10/03 20:03:02 normanr Exp $
+
+"""
+Protocol module contains tools that is needed for processing of
+xmpp-related data structures.
+"""
+
+from simplexml import Node,ustr
+import time
+NS_ACTIVITY ='http://jabber.org/protocol/activity' # JEP-0108
+NS_ADDRESS ='http://jabber.org/protocol/address' # JEP-0033
+NS_AGENTS ='jabber:iq:agents'
+NS_AMP ='http://jabber.org/protocol/amp'
+NS_AMP_ERRORS =NS_AMP+'#errors'
+NS_AUTH ='jabber:iq:auth'
+NS_AVATAR ='jabber:iq:avatar'
+NS_BIND ='urn:ietf:params:xml:ns:xmpp-bind'
+NS_BROWSE ='jabber:iq:browse'
+NS_BYTESTREAM ='http://jabber.org/protocol/bytestreams' # JEP-0065
+NS_CAPS ='http://jabber.org/protocol/caps' # JEP-0115
+NS_CHATSTATES ='http://jabber.org/protocol/chatstates' # JEP-0085
+NS_CLIENT ='jabber:client'
+NS_COMMANDS ='http://jabber.org/protocol/commands'
+NS_COMPONENT_ACCEPT='jabber:component:accept'
+NS_COMPONENT_1 ='http://jabberd.jabberstudio.org/ns/component/1.0'
+NS_COMPRESS ='http://jabber.org/protocol/compress' # JEP-0138
+NS_DATA ='jabber:x:data' # JEP-0004
+NS_DELAY ='jabber:x:delay'
+NS_DIALBACK ='jabber:server:dialback'
+NS_DISCO ='http://jabber.org/protocol/disco'
+NS_DISCO_INFO =NS_DISCO+'#info'
+NS_DISCO_ITEMS =NS_DISCO+'#items'
+NS_ENCRYPTED ='jabber:x:encrypted' # JEP-0027
+NS_EVENT ='jabber:x:event' # JEP-0022
+NS_FEATURE ='http://jabber.org/protocol/feature-neg'
+NS_FILE ='http://jabber.org/protocol/si/profile/file-transfer' # JEP-0096
+NS_GATEWAY ='jabber:iq:gateway'
+NS_GEOLOC ='http://jabber.org/protocol/geoloc' # JEP-0080
+NS_GROUPCHAT ='gc-1.0'
+NS_HTTP_BIND ='http://jabber.org/protocol/httpbind' # JEP-0124
+NS_IBB ='http://jabber.org/protocol/ibb'
+NS_INVISIBLE ='presence-invisible' # Jabberd2
+NS_IQ ='iq' # Jabberd2
+NS_LAST ='jabber:iq:last'
+NS_MESSAGE ='message' # Jabberd2
+NS_MOOD ='http://jabber.org/protocol/mood' # JEP-0107
+NS_MUC ='http://jabber.org/protocol/muc'
+NS_MUC_USER =NS_MUC+'#user'
+NS_MUC_ADMIN =NS_MUC+'#admin'
+NS_MUC_OWNER =NS_MUC+'#owner'
+NS_OFFLINE ='http://www.jabber.org/jeps/jep-0030.html' # JEP-0013
+NS_PHYSLOC ='http://jabber.org/protocol/physloc' # JEP-0112
+NS_PRESENCE ='presence' # Jabberd2
+NS_PRIVACY ='jabber:iq:privacy'
+NS_PRIVATE ='jabber:iq:private'
+NS_PUBSUB ='http://jabber.org/protocol/pubsub' # JEP-0060
+NS_REGISTER ='jabber:iq:register'
+NS_ROSTER ='jabber:iq:roster'
+NS_ROSTERX ='http://jabber.org/protocol/rosterx' # JEP-0144
+NS_RPC ='jabber:iq:rpc' # JEP-0009
+NS_SASL ='urn:ietf:params:xml:ns:xmpp-sasl'
+NS_SEARCH ='jabber:iq:search'
+NS_SERVER ='jabber:server'
+NS_SESSION ='urn:ietf:params:xml:ns:xmpp-session'
+NS_SI ='http://jabber.org/protocol/si' # JEP-0096
+NS_SI_PUB ='http://jabber.org/protocol/sipub' # JEP-0137
+NS_SIGNED ='jabber:x:signed' # JEP-0027
+NS_STANZAS ='urn:ietf:params:xml:ns:xmpp-stanzas'
+NS_STREAMS ='http://etherx.jabber.org/streams'
+NS_TIME ='jabber:iq:time'
+NS_TLS ='urn:ietf:params:xml:ns:xmpp-tls'
+NS_VACATION ='http://jabber.org/protocol/vacation'
+NS_VCARD ='vcard-temp'
+NS_VERSION ='jabber:iq:version'
+NS_WAITINGLIST ='http://jabber.org/protocol/waitinglist' # JEP-0130
+NS_XHTML_IM ='http://jabber.org/protocol/xhtml-im' # JEP-0071
+NS_DATA_LAYOUT ='http://jabber.org/protocol/xdata-layout' # JEP-0141
+NS_DATA_VALIDATE='http://jabber.org/protocol/xdata-validate' # JEP-0122
+NS_XMPP_STREAMS ='urn:ietf:params:xml:ns:xmpp-streams'
+
+xmpp_stream_error_conditions="""
+bad-format -- -- -- The entity has sent XML that cannot be processed.
+bad-namespace-prefix -- -- -- The entity has sent a namespace prefix that is unsupported, or has sent no namespace prefix on an element that requires such a prefix.
+conflict -- -- -- The server is closing the active stream for this entity because a new stream has been initiated that conflicts with the existing stream.
+connection-timeout -- -- -- The entity has not generated any traffic over the stream for some period of time.
+host-gone -- -- -- The value of the 'to' attribute provided by the initiating entity in the stream header corresponds to a hostname that is no longer hosted by the server.
+host-unknown -- -- -- The value of the 'to' attribute provided by the initiating entity in the stream header does not correspond to a hostname that is hosted by the server.
+improper-addressing -- -- -- A stanza sent between two servers lacks a 'to' or 'from' attribute (or the attribute has no value).
+internal-server-error -- -- -- The server has experienced a misconfiguration or an otherwise-undefined internal error that prevents it from servicing the stream.
+invalid-from -- cancel -- -- The JID or hostname provided in a 'from' address does not match an authorized JID or validated domain negotiated between servers via SASL or dialback, or between a client and a server via authentication and resource authorization.
+invalid-id -- -- -- The stream ID or dialback ID is invalid or does not match an ID previously provided.
+invalid-namespace -- -- -- The streams namespace name is something other than "http://etherx.jabber.org/streams" or the dialback namespace name is something other than "jabber:server:dialback".
+invalid-xml -- -- -- The entity has sent invalid XML over the stream to a server that performs validation.
+not-authorized -- -- -- The entity has attempted to send data before the stream has been authenticated, or otherwise is not authorized to perform an action related to stream negotiation.
+policy-violation -- -- -- The entity has violated some local service policy.
+remote-connection-failed -- -- -- The server is unable to properly connect to a remote resource that is required for authentication or authorization.
+resource-constraint -- -- -- The server lacks the system resources necessary to service the stream.
+restricted-xml -- -- -- The entity has attempted to send restricted XML features such as a comment, processing instruction, DTD, entity reference, or unescaped character.
+see-other-host -- -- -- The server will not provide service to the initiating entity but is redirecting traffic to another host.
+system-shutdown -- -- -- The server is being shut down and all active streams are being closed.
+undefined-condition -- -- -- The error condition is not one of those defined by the other conditions in this list.
+unsupported-encoding -- -- -- The initiating entity has encoded the stream in an encoding that is not supported by the server.
+unsupported-stanza-type -- -- -- The initiating entity has sent a first-level child of the stream that is not supported by the server.
+unsupported-version -- -- -- The value of the 'version' attribute provided by the initiating entity in the stream header specifies a version of XMPP that is not supported by the server.
+xml-not-well-formed -- -- -- The initiating entity has sent XML that is not well-formed."""
+xmpp_stanza_error_conditions="""
+bad-request -- 400 -- modify -- The sender has sent XML that is malformed or that cannot be processed.
+conflict -- 409 -- cancel -- Access cannot be granted because an existing resource or session exists with the same name or address.
+feature-not-implemented -- 501 -- cancel -- The feature requested is not implemented by the recipient or server and therefore cannot be processed.
+forbidden -- 403 -- auth -- The requesting entity does not possess the required permissions to perform the action.
+gone -- 302 -- modify -- The recipient or server can no longer be contacted at this address.
+internal-server-error -- 500 -- wait -- The server could not process the stanza because of a misconfiguration or an otherwise-undefined internal server error.
+item-not-found -- 404 -- cancel -- The addressed JID or item requested cannot be found.
+jid-malformed -- 400 -- modify -- The value of the 'to' attribute in the sender's stanza does not adhere to the syntax defined in Addressing Scheme.
+not-acceptable -- 406 -- cancel -- The recipient or server understands the request but is refusing to process it because it does not meet criteria defined by the recipient or server.
+not-allowed -- 405 -- cancel -- The recipient or server does not allow any entity to perform the action.
+not-authorized -- 401 -- auth -- The sender must provide proper credentials before being allowed to perform the action, or has provided improper credentials.
+payment-required -- 402 -- auth -- The requesting entity is not authorized to access the requested service because payment is required.
+recipient-unavailable -- 404 -- wait -- The intended recipient is temporarily unavailable.
+redirect -- 302 -- modify -- The recipient or server is redirecting requests for this information to another entity.
+registration-required -- 407 -- auth -- The requesting entity is not authorized to access the requested service because registration is required.
+remote-server-not-found -- 404 -- cancel -- A remote server or service specified as part or all of the JID of the intended recipient does not exist.
+remote-server-timeout -- 504 -- wait -- A remote server or service specified as part or all of the JID of the intended recipient could not be contacted within a reasonable amount of time.
+resource-constraint -- 500 -- wait -- The server or recipient lacks the system resources necessary to service the request.
+service-unavailable -- 503 -- cancel -- The server or recipient does not currently provide the requested service.
+subscription-required -- 407 -- auth -- The requesting entity is not authorized to access the requested service because a subscription is required.
+undefined-condition -- 500 -- --
+unexpected-request -- 400 -- wait -- The recipient or server understood the request but was not expecting it at this time (e.g., the request was out of order)."""
+sasl_error_conditions="""
+aborted -- -- -- The receiving entity acknowledges an <abort/> element sent by the initiating entity; sent in reply to the <abort/> element.
+incorrect-encoding -- -- -- The data provided by the initiating entity could not be processed because the [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003. encoding is incorrect (e.g., because the encoding does not adhere to the definition in Section 3 of [BASE64]Josefsson, S., The Base16, Base32, and Base64 Data Encodings, July 2003.); sent in reply to a <response/> element or an <auth/> element with initial response data.
+invalid-authzid -- -- -- The authzid provided by the initiating entity is invalid, either because it is incorrectly formatted or because the initiating entity does not have permissions to authorize that ID; sent in reply to a <response/> element or an <auth/> element with initial response data.
+invalid-mechanism -- -- -- The initiating entity did not provide a mechanism or requested a mechanism that is not supported by the receiving entity; sent in reply to an <auth/> element.
+mechanism-too-weak -- -- -- The mechanism requested by the initiating entity is weaker than server policy permits for that initiating entity; sent in reply to a <response/> element or an <auth/> element with initial response data.
+not-authorized -- -- -- The authentication failed because the initiating entity did not provide valid credentials (this includes but is not limited to the case of an unknown username); sent in reply to a <response/> element or an <auth/> element with initial response data.
+temporary-auth-failure -- -- -- The authentication failed because of a temporary error condition within the receiving entity; sent in reply to an <auth/> element or <response/> element."""
+
+ERRORS,_errorcodes={},{}
+for ns,errname,errpool in [(NS_XMPP_STREAMS,'STREAM',xmpp_stream_error_conditions),
+ (NS_STANZAS ,'ERR' ,xmpp_stanza_error_conditions),
+ (NS_SASL ,'SASL' ,sasl_error_conditions)]:
+ for err in errpool.split('\n')[1:]:
+ cond,code,typ,text=err.split(' -- ')
+ name=errname+'_'+cond.upper().replace('-','_')
+ locals()[name]=ns+' '+cond
+ ERRORS[ns+' '+cond]=[code,typ,text]
+ if code: _errorcodes[code]=cond
+del ns,errname,errpool,err,cond,code,typ,text
+
+def isResultNode(node):
+ """ Returns true if the node is a positive reply. """
+ return node and node.getType()=='result'
+def isErrorNode(node):
+ """ Returns true if the node is a negative reply. """
+ return node and node.getType()=='error'
+
+class NodeProcessed(Exception):
+ """ Exception that should be raised by handler when the handling should be stopped. """
+class StreamError(Exception):
+ """ Base exception class for stream errors."""
+class BadFormat(StreamError): pass
+class BadNamespacePrefix(StreamError): pass
+class Conflict(StreamError): pass
+class ConnectionTimeout(StreamError): pass
+class HostGone(StreamError): pass
+class HostUnknown(StreamError): pass
+class ImproperAddressing(StreamError): pass
+class InternalServerError(StreamError): pass
+class InvalidFrom(StreamError): pass
+class InvalidID(StreamError): pass
+class InvalidNamespace(StreamError): pass
+class InvalidXML(StreamError): pass
+class NotAuthorized(StreamError): pass
+class PolicyViolation(StreamError): pass
+class RemoteConnectionFailed(StreamError): pass
+class ResourceConstraint(StreamError): pass
+class RestrictedXML(StreamError): pass
+class SeeOtherHost(StreamError): pass
+class SystemShutdown(StreamError): pass
+class UndefinedCondition(StreamError): pass
+class UnsupportedEncoding(StreamError): pass
+class UnsupportedStanzaType(StreamError): pass
+class UnsupportedVersion(StreamError): pass
+class XMLNotWellFormed(StreamError): pass
+
+stream_exceptions = {'bad-format': BadFormat,
+ 'bad-namespace-prefix': BadNamespacePrefix,
+ 'conflict': Conflict,
+ 'connection-timeout': ConnectionTimeout,
+ 'host-gone': HostGone,
+ 'host-unknown': HostUnknown,
+ 'improper-addressing': ImproperAddressing,
+ 'internal-server-error': InternalServerError,
+ 'invalid-from': InvalidFrom,
+ 'invalid-id': InvalidID,
+ 'invalid-namespace': InvalidNamespace,
+ 'invalid-xml': InvalidXML,
+ 'not-authorized': NotAuthorized,
+ 'policy-violation': PolicyViolation,
+ 'remote-connection-failed': RemoteConnectionFailed,
+ 'resource-constraint': ResourceConstraint,
+ 'restricted-xml': RestrictedXML,
+ 'see-other-host': SeeOtherHost,
+ 'system-shutdown': SystemShutdown,
+ 'undefined-condition': UndefinedCondition,
+ 'unsupported-encoding': UnsupportedEncoding,
+ 'unsupported-stanza-type': UnsupportedStanzaType,
+ 'unsupported-version': UnsupportedVersion,
+ 'xml-not-well-formed': XMLNotWellFormed}
+
+class JID:
+ """ JID object. JID can be built from string, modified, compared, serialised into string. """
+ def __init__(self, jid=None, node='', domain='', resource=''):
+ """ Constructor. JID can be specified as string (jid argument) or as separate parts.
+ Examples:
+ JID('node@domain/resource')
+ JID(node='node',domain='domain.org')
+ """
+ if not jid and not domain: raise ValueError('JID must contain at least domain name')
+ elif type(jid)==type(self): self.node,self.domain,self.resource=jid.node,jid.domain,jid.resource
+ elif domain: self.node,self.domain,self.resource=node,domain,resource
+ else:
+ if jid.find('@')+1: self.node,jid=jid.split('@',1)
+ else: self.node=''
+ if jid.find('/')+1: self.domain,self.resource=jid.split('/',1)
+ else: self.domain,self.resource=jid,''
+ def getNode(self):
+ """ Return the node part of the JID """
+ return self.node
+ def setNode(self,node):
+ """ Set the node part of the JID to new value. Specify None to remove the node part."""
+ self.node=node.lower()
+ def getDomain(self):
+ """ Return the domain part of the JID """
+ return self.domain
+ def setDomain(self,domain):
+ """ Set the domain part of the JID to new value."""
+ self.domain=domain.lower()
+ def getResource(self):
+ """ Return the resource part of the JID """
+ return self.resource
+ def setResource(self,resource):
+ """ Set the resource part of the JID to new value. Specify None to remove the resource part."""
+ self.resource=resource
+ def getStripped(self):
+ """ Return the bare representation of JID. I.e. string value w/o resource. """
+ return self.__str__(0)
+ def __eq__(self, other):
+ """ Compare the JID to another instance or to string for equality. """
+ try: other=JID(other)
+ except ValueError: return 0
+ return self.resource==other.resource and self.__str__(0) == other.__str__(0)
+ def __ne__(self, other):
+ """ Compare the JID to another instance or to string for non-equality. """
+ return not self.__eq__(other)
+ def bareMatch(self, other):
+ """ Compare the node and domain parts of the JID's for equality. """
+ return self.__str__(0) == JID(other).__str__(0)
+ def __str__(self,wresource=1):
+ """ Serialise JID into string. """
+ if self.node: jid=self.node+'@'+self.domain
+ else: jid=self.domain
+ if wresource and self.resource: return jid+'/'+self.resource
+ return jid
+ def __hash__(self):
+ """ Produce hash of the JID, Allows to use JID objects as keys of the dictionary. """
+ return hash(self.__str__())
+
+class Protocol(Node):
+ """ A "stanza" object class. Contains methods that are common for presences, iqs and messages. """
+ def __init__(self, name=None, to=None, typ=None, frm=None, attrs={}, payload=[], timestamp=None, xmlns=None, node=None):
+ """ Constructor, name is the name of the stanza i.e. 'message' or 'presence' or 'iq'.
+ to is the value of 'to' attribure, 'typ' - 'type' attribute
+ frn - from attribure, attrs - other attributes mapping, payload - same meaning as for simplexml payload definition
+ timestamp - the time value that needs to be stamped over stanza
+ xmlns - namespace of top stanza node
+ node - parsed or unparsed stana to be taken as prototype.
+ """
+ if not attrs: attrs={}
+ if to: attrs['to']=to
+ if frm: attrs['from']=frm
+ if typ: attrs['type']=typ
+ Node.__init__(self, tag=name, attrs=attrs, payload=payload, node=node)
+ if not node and xmlns: self.setNamespace(xmlns)
+ if self['to']: self.setTo(self['to'])
+ if self['from']: self.setFrom(self['from'])
+ if node and type(self)==type(node) and self.__class__==node.__class__ and self.attrs.has_key('id'): del self.attrs['id']
+ self.timestamp=None
+ for x in self.getTags('x',namespace=NS_DELAY):
+ try:
+ if not self.getTimestamp() or x.getAttr('stamp')<self.getTimestamp(): self.setTimestamp(x.getAttr('stamp'))
+ except: pass
+ if timestamp is not None: self.setTimestamp(timestamp) # To auto-timestamp stanza just pass timestamp=''
+ def getTo(self):
+ """ Return value of the 'to' attribute. """
+ try: return self['to']
+ except: return None
+ def getFrom(self):
+ """ Return value of the 'from' attribute. """
+ try: return self['from']
+ except: return None
+ def getTimestamp(self):
+ """ Return the timestamp in the 'yyyymmddThhmmss' format. """
+ return self.timestamp
+ def getID(self):
+ """ Return the value of the 'id' attribute. """
+ return self.getAttr('id')
+ def setTo(self,val):
+ """ Set the value of the 'to' attribute. """
+ self.setAttr('to', JID(val))
+ def getType(self):
+ """ Return the value of the 'type' attribute. """
+ return self.getAttr('type')
+ def setFrom(self,val):
+ """ Set the value of the 'from' attribute. """
+ self.setAttr('from', JID(val))
+ def setType(self,val):
+ """ Set the value of the 'type' attribute. """
+ self.setAttr('type', val)
+ def setID(self,val):
+ """ Set the value of the 'id' attribute. """
+ self.setAttr('id', val)
+ def getError(self):
+ """ Return the error-condition (if present) or the textual description of the error (otherwise). """
+ errtag=self.getTag('error')
+ if errtag:
+ for tag in errtag.getChildren():
+ if tag.getName()<>'text': return tag.getName()
+ return errtag.getData()
+ def getErrorCode(self):
+ """ Return the error code. Obsolette. """
+ return self.getTagAttr('error','code')
+ def setError(self,error,code=None):
+ """ Set the error code. Obsolette. Use error-conditions instead. """
+ if code:
+ if str(code) in _errorcodes.keys(): error=ErrorNode(_errorcodes[str(code)],text=error)
+ else: error=ErrorNode(ERR_UNDEFINED_CONDITION,code=code,typ='cancel',text=error)
+ elif type(error) in [type(''),type(u'')]: error=ErrorNode(error)
+ self.setType('error')
+ self.addChild(node=error)
+ def setTimestamp(self,val=None):
+ """Set the timestamp. timestamp should be the yyyymmddThhmmss string."""
+ if not val: val=time.strftime('%Y%m%dT%H:%M:%S', time.gmtime())
+ self.timestamp=val
+ self.setTag('x',{'stamp':self.timestamp},namespace=NS_DELAY)
+ def getProperties(self):
+ """ Return the list of namespaces to which belongs the direct childs of element"""
+ props=[]
+ for child in self.getChildren():
+ prop=child.getNamespace()
+ if prop not in props: props.append(prop)
+ return props
+ def __setitem__(self,item,val):
+ """ Set the item 'item' to the value 'val'."""
+ if item in ['to','from']: val=JID(val)
+ return self.setAttr(item,val)
+
+class Message(Protocol):
+ """ XMPP Message stanza - "push" mechanism."""
+ def __init__(self, to=None, body=None, typ=None, subject=None, attrs={}, frm=None, payload=[], timestamp=None, xmlns=NS_CLIENT, node=None):
+ """ Create message object. You can specify recipient, text of message, type of message
+ any additional attributes, sender of the message, any additional payload (f.e. jabber:x:delay element) and namespace in one go.
+ Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as message. """
+ Protocol.__init__(self, 'message', to=to, typ=typ, attrs=attrs, frm=frm, payload=payload, timestamp=timestamp, xmlns=xmlns, node=node)
+ if body: self.setBody(body)
+ if subject: self.setSubject(subject)
+ def getBody(self):
+ """ Returns text of the message. """
+ return self.getTagData('body')
+ def getSubject(self):
+ """ Returns subject of the message. """
+ return self.getTagData('subject')
+ def getThread(self):
+ """ Returns thread of the message. """
+ return self.getTagData('thread')
+ def setBody(self,val):
+ """ Sets the text of the message. """
+ self.setTagData('body',val)
+ def setSubject(self,val):
+ """ Sets the subject of the message. """
+ self.setTagData('subject',val)
+ def setThread(self,val):
+ """ Sets the thread of the message. """
+ self.setTagData('thread',val)
+ def buildReply(self,text=None):
+ """ Builds and returns another message object with specified text.
+ The to, from and thread properties of new message are pre-set as reply to this message. """
+ m=Message(to=self.getFrom(),frm=self.getTo(),body=text)
+ th=self.getThread()
+ if th: m.setThread(th)
+ return m
+
+class Presence(Protocol):
+ """ XMPP Presence object."""
+ def __init__(self, to=None, typ=None, priority=None, show=None, status=None, attrs={}, frm=None, timestamp=None, payload=[], xmlns=NS_CLIENT, node=None):
+ """ Create presence object. You can specify recipient, type of message, priority, show and status values
+ any additional attributes, sender of the presence, timestamp, any additional payload (f.e. jabber:x:delay element) and namespace in one go.
+ Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as presence. """
+ Protocol.__init__(self, 'presence', to=to, typ=typ, attrs=attrs, frm=frm, payload=payload, timestamp=timestamp, xmlns=xmlns, node=node)
+ if priority: self.setPriority(priority)
+ if show: self.setShow(show)
+ if status: self.setStatus(status)
+ def getPriority(self):
+ """ Returns the priority of the message. """
+ return self.getTagData('priority')
+ def getShow(self):
+ """ Returns the show value of the message. """
+ return self.getTagData('show')
+ def getStatus(self):
+ """ Returns the status string of the message. """
+ return self.getTagData('status')
+ def setPriority(self,val):
+ """ Sets the priority of the message. """
+ self.setTagData('priority',val)
+ def setShow(self,val):
+ """ Sets the show value of the message. """
+ self.setTagData('show',val)
+ def setStatus(self,val):
+ """ Sets the status string of the message. """
+ self.setTagData('status',val)
+
+ def _muc_getItemAttr(self,tag,attr):
+ for xtag in self.getTags('x'):
+ for child in xtag.getTags(tag):
+ return child.getAttr(attr)
+ def _muc_getSubTagDataAttr(self,tag,attr):
+ for xtag in self.getTags('x'):
+ for child in xtag.getTags('item'):
+ for cchild in child.getTags(tag):
+ return cchild.getData(),cchild.getAttr(attr)
+ return None,None
+ def getRole(self):
+ """Returns the presence role (for groupchat)"""
+ return self._muc_getItemAttr('item','role')
+ def getAffiliation(self):
+ """Returns the presence affiliation (for groupchat)"""
+ return self._muc_getItemAttr('item','affiliation')
+ def getNick(self):
+ """Returns the nick value (for nick change in groupchat)"""
+ return self._muc_getItemAttr('item','nick')
+ def getJid(self):
+ """Returns the presence jid (for groupchat)"""
+ return self._muc_getItemAttr('item','jid')
+ def getReason(self):
+ """Returns the reason of the presence (for groupchat)"""
+ return self._muc_getSubTagDataAttr('reason','')[0]
+ def getActor(self):
+ """Returns the reason of the presence (for groupchat)"""
+ return self._muc_getSubTagDataAttr('actor','jid')[1]
+ def getStatusCode(self):
+ """Returns the status code of the presence (for groupchat)"""
+ return self._muc_getItemAttr('status','code')
+
+class Iq(Protocol):
+ """ XMPP Iq object - get/set dialog mechanism. """
+ def __init__(self, typ=None, queryNS=None, attrs={}, to=None, frm=None, payload=[], xmlns=NS_CLIENT, node=None):
+ """ Create Iq object. You can specify type, query namespace
+ any additional attributes, recipient of the iq, sender of the iq, any additional payload (f.e. jabber:x:data node) and namespace in one go.
+ Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as an iq. """
+ Protocol.__init__(self, 'iq', to=to, typ=typ, attrs=attrs, frm=frm, xmlns=xmlns, node=node)
+ if payload: self.setQueryPayload(payload)
+ if queryNS: self.setQueryNS(queryNS)
+ def getQueryNS(self):
+ """ Return the namespace of the 'query' child element."""
+ tag=self.getTag('query')
+ if tag: return tag.getNamespace()
+ def getQuerynode(self):
+ """ Return the 'node' attribute value of the 'query' child element."""
+ return self.getTagAttr('query','node')
+ def getQueryPayload(self):
+ """ Return the 'query' child element payload."""
+ tag=self.getTag('query')
+ if tag: return tag.getPayload()
+ def getQueryChildren(self):
+ """ Return the 'query' child element child nodes."""
+ tag=self.getTag('query')
+ if tag: return tag.getChildren()
+ def setQueryNS(self,namespace):
+ """ Set the namespace of the 'query' child element."""
+ self.setTag('query').setNamespace(namespace)
+ def setQueryPayload(self,payload):
+ """ Set the 'query' child element payload."""
+ self.setTag('query').setPayload(payload)
+ def setQuerynode(self,node):
+ """ Set the 'node' attribute value of the 'query' child element."""
+ self.setTagAttr('query','node',node)
+ def buildReply(self,typ):
+ """ Builds and returns another Iq object of specified type.
+ The to, from and query child node of new Iq are pre-set as reply to this Iq. """
+ iq=Iq(typ,to=self.getFrom(),frm=self.getTo(),attrs={'id':self.getID()})
+ if self.getTag('query'): iq.setQueryNS(self.getQueryNS())
+ return iq
+
+class ErrorNode(Node):
+ """ XMPP-style error element.
+ In the case of stanza error should be attached to XMPP stanza.
+ In the case of stream-level errors should be used separately. """
+ def __init__(self,name,code=None,typ=None,text=None):
+ """ Create new error node object.
+ Mandatory parameter: name - name of error condition.
+ Optional parameters: code, typ, text. Used for backwards compartibility with older jabber protocol."""
+ if ERRORS.has_key(name):
+ cod,type,txt=ERRORS[name]
+ ns=name.split()[0]
+ else: cod,ns,type,txt='500',NS_STANZAS,'cancel',''
+ if typ: type=typ
+ if code: cod=code
+ if text: txt=text
+ Node.__init__(self,'error',{},[Node(name)])
+ if type: self.setAttr('type',type)
+ if not cod: self.setName('stream:error')
+ if txt: self.addChild(node=Node(ns+' text',{},[txt]))
+ if cod: self.setAttr('code',cod)
+
+class Error(Protocol):
+ """ Used to quickly transform received stanza into error reply."""
+ def __init__(self,node,error,reply=1):
+ """ Create error reply basing on the received 'node' stanza and the 'error' error condition.
+ If the 'node' is not the received stanza but locally created ('to' and 'from' fields needs not swapping)
+ specify the 'reply' argument as false."""
+ if reply: Protocol.__init__(self,to=node.getFrom(),frm=node.getTo(),node=node)
+ else: Protocol.__init__(self,node=node)
+ self.setError(error)
+ if node.getType()=='error': self.__str__=self.__dupstr__
+ def __dupstr__(self,dup1=None,dup2=None):
+ """ Dummy function used as preventor of creating error node in reply to error node.
+ I.e. you will not be able to serialise "double" error into string.
+ """
+ return ''
+
+class DataField(Node):
+ """ This class is used in the DataForm class to describe the single data item.
+ If you are working with jabber:x:data (JEP-0004, JEP-0068, JEP-0122)
+ then you will need to work with instances of this class. """
+ def __init__(self,name=None,value=None,typ=None,required=0,desc=None,options=[],node=None):
+ """ Create new data field of specified name,value and type.
+ Also 'required','desc' and 'options' fields can be set.
+ Alternatively other XML object can be passed in as the 'node' parameted to replicate it as a new datafiled.
+ """
+ Node.__init__(self,'field',node=node)
+ if name: self.setVar(name)
+ if type(value) in [list,tuple]: self.setValues(value)
+ elif value: self.setValue(value)
+ if typ: self.setType(typ)
+ elif not typ and not node: self.setType('text-single')
+ if required: self.setRequired(required)
+ if desc: self.setDesc(desc)
+ if options: self.setOptions(options)
+ def setRequired(self,req=1):
+ """ Change the state of the 'required' flag. """
+ if req: self.setTag('required')
+ else:
+ try: self.delChild('required')
+ except ValueError: return
+ def isRequired(self):
+ """ Returns in this field a required one. """
+ return self.getTag('required')
+ def setDesc(self,desc):
+ """ Set the description of this field. """
+ self.setTagData('desc',desc)
+ def getDesc(self):
+ """ Return the description of this field. """
+ return self.getTagData('desc')
+ def setValue(self,val):
+ """ Set the value of this field. """
+ self.setTagData('value',val)
+ def getValue(self):
+ return self.getTagData('value')
+ def setValues(self,lst):
+ """ Set the values of this field as values-list.
+ Replaces all previous filed values! If you need to just add a value - use addValue method."""
+ while self.getTag('value'): self.delChild('value')
+ for val in lst: self.addValue(val)
+ def addValue(self,val):
+ """ Add one more value to this field. Used in 'get' iq's or such."""
+ self.addChild('value',{},[val])
+ def getValues(self):
+ """ Return the list of values associated with this field."""
+ ret=[]
+ for tag in self.getTags('value'): ret.append(tag.getData())
+ return ret
+ def getOptions(self):
+ """ Return label-option pairs list associated with this field."""
+ ret=[]
+ for tag in self.getTags('option'): ret.append([tag.getAttr('label'),tag.getTagData('value')])
+ return ret
+ def setOptions(self,lst):
+ """ Set label-option pairs list associated with this field."""
+ while self.getTag('option'): self.delChild('option')
+ for opt in lst: self.addOption(opt)
+ def addOption(self,opt):
+ """ Add one more label-option pair to this field."""
+ if type(opt) in [str,unicode]: self.addChild('option').setTagData('value',opt)
+ else: self.addChild('option',{'label':opt[0]}).setTagData('value',opt[1])
+ def getType(self):
+ """ Get type of this field. """
+ return self.getAttr('type')
+ def setType(self,val):
+ """ Set type of this field. """
+ return self.setAttr('type',val)
+ def getVar(self):
+ """ Get 'var' attribute value of this field. """
+ return self.getAttr('var')
+ def setVar(self,val):
+ """ Set 'var' attribute value of this field. """
+ return self.setAttr('var',val)
+
+class DataForm(Node):
+ """ DataForm class. Used for manipulating dataforms in XMPP.
+ Relevant JEPs: 0004, 0068, 0122.
+ Can be used in disco, pub-sub and many other applications."""
+ def __init__(self, typ=None, data=[], title=None, node=None):
+ """
+ Create new dataform of type 'typ'. 'data' is the list of DataField
+ instances that this dataform contains, 'title' - the title string.
+ You can specify the 'node' argument as the other node to be used as
+ base for constructing this dataform.
+
+ title and instructions is optional and SHOULD NOT contain newlines.
+ Several instructions MAY be present.
+ 'typ' can be one of ('form' | 'submit' | 'cancel' | 'result' )
+ 'typ' of reply iq can be ( 'result' | 'set' | 'set' | 'result' ) respectively.
+ 'cancel' form can not contain any fields. All other forms contains AT LEAST one field.
+ 'title' MAY be included in forms of type "form" and "result"
+ """
+ Node.__init__(self,'x',node=node)
+ if node:
+ newkids=[]
+ for n in self.getChildren():
+ if n.getName()=='field': newkids.append(DataField(node=n))
+ else: newkids.append(n)
+ self.kids=newkids
+ if typ: self.setType(typ)
+ self.setNamespace(NS_DATA)
+ if title: self.setTitle(title)
+ if type(data)==type({}):
+ newdata=[]
+ for name in data.keys(): newdata.append(DataField(name,data[name]))
+ data=newdata
+ for child in data:
+ if type(child) in [type(''),type(u'')]: self.addInstructions(child)
+ elif child.__class__.__name__=='DataField': self.kids.append(child)
+ else: self.kids.append(DataField(node=child))
+ def getType(self):
+ """ Return the type of dataform. """
+ return self.getAttr('type')
+ def setType(self,typ):
+ """ Set the type of dataform. """
+ self.setAttr('type',typ)
+ def getTitle(self):
+ """ Return the title of dataform. """
+ return self.getTagData('title')
+ def setTitle(self,text):
+ """ Set the title of dataform. """
+ self.setTagData('title',text)
+ def getInstructions(self):
+ """ Return the instructions of dataform. """
+ return self.getTagData('instructions')
+ def setInstructions(self,text):
+ """ Set the instructions of dataform. """
+ self.setTagData('instructions',text)
+ def addInstructions(self,text):
+ """ Add one more instruction to the dataform. """
+ self.addChild('instructions',{},[text])
+ def getField(self,name):
+ """ Return the datafield object with name 'name' (if exists). """
+ return self.getTag('field',attrs={'var':name})
+ def setField(self,name):
+ """ Create if nessessary or get the existing datafield object with name 'name' and return it. """
+ f=self.getField(name)
+ if f: return f
+ return self.addChild(node=DataField(name))
+ def asDict(self):
+ """ Represent dataform as simple dictionary mapping of datafield names to their values."""
+ ret={}
+ for field in self.getTags('field'):
+ name=field.getAttr('var')
+ typ=field.getType()
+ if isinstance(typ,(str,unicode)) and typ[-6:]=='-multi':
+ val=[]
+ for i in field.getTags('value'): val.append(i.getData())
+ else: val=field.getTagData('value')
+ ret[name]=val
+ if self.getTag('instructions'): ret['instructions']=self.getInstructions()
+ return ret
+ def __getitem__(self,name):
+ """ Simple dictionary interface for getting datafields values by their names."""
+ item=self.getField(name)
+ if item: return item.getValue()
+ raise IndexError('No such field')
+ def __setitem__(self,name,val):
+ """ Simple dictionary interface for setting datafields values by their names."""
+ return self.setField(name).setValue(val)
Binary file modules/xmpp/protocol.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/roster.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,184 @@
+## roster.py
+##
+## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: roster.py,v 1.20 2005/07/13 13:22:52 snakeru Exp $
+
+"""
+Simple roster implementation. Can be used though for different tasks like
+mass-renaming of contacts.
+"""
+
+from protocol import *
+from client import PlugIn
+
+class Roster(PlugIn):
+ """ Defines a plenty of methods that will allow you to manage roster.
+ Also automatically track presences from remote JIDs taking into
+ account that every JID can have multiple resources connected. Does not
+ currently support 'error' presences.
+ You can also use mapping interface for access to the internal representation of
+ contacts in roster.
+ """
+ def __init__(self):
+ """ Init internal variables. """
+ PlugIn.__init__(self)
+ self.DBG_LINE='roster'
+ self._data = {}
+ self.set=None
+ self._exported_methods=[self.getRoster]
+
+ def plugin(self,owner,request=1):
+ """ Register presence and subscription trackers in the owner's dispatcher.
+ Also request roster from server if the 'request' argument is set.
+ Used internally."""
+ self._owner.RegisterHandler('iq',self.RosterIqHandler,'result',NS_ROSTER)
+ self._owner.RegisterHandler('iq',self.RosterIqHandler,'set',NS_ROSTER)
+ self._owner.RegisterHandler('presence',self.PresenceHandler)
+ if request: self.Request()
+
+ def Request(self,force=0):
+ """ Request roster from server if it were not yet requested
+ (or if the 'force' argument is set). """
+ if self.set is None: self.set=0
+ elif not force: return
+ self._owner.send(Iq('get',NS_ROSTER))
+ self.DEBUG('Roster requested from server','start')
+
+ def getRoster(self):
+ """ Requests roster from server if neccessary and returns self."""
+ if not self.set: self.Request()
+ while not self.set: self._owner.Process(10)
+ return self
+
+ def RosterIqHandler(self,dis,stanza):
+ """ Subscription tracker. Used internally for setting items state in
+ internal roster representation. """
+ for item in stanza.getTag('query').getTags('item'):
+ jid=item.getAttr('jid')
+ if item.getAttr('subscription')=='remove':
+ if self._data.has_key(jid): del self._data[jid]
+ raise NodeProcessed # a MUST
+ self.DEBUG('Setting roster item %s...'%jid,'ok')
+ if not self._data.has_key(jid): self._data[jid]={}
+ self._data[jid]['name']=item.getAttr('name')
+ self._data[jid]['ask']=item.getAttr('ask')
+ self._data[jid]['subscription']=item.getAttr('subscription')
+ self._data[jid]['groups']=[]
+ if not self._data[jid].has_key('resources'): self._data[jid]['resources']={}
+ for group in item.getTags('group'): self._data[jid]['groups'].append(group.getData())
+ self._data[self._owner.User+'@'+self._owner.Server]={'resources':{},'name':None,'ask':None,'subscription':None,'groups':None,}
+ self.set=1
+ raise NodeProcessed # a MUST. Otherwise you'll get back an <iq type='error'/>
+
+ def PresenceHandler(self,dis,pres):
+ """ Presence tracker. Used internally for setting items' resources state in
+ internal roster representation. """
+ jid=JID(pres.getFrom())
+ if not self._data.has_key(jid.getStripped()): self._data[jid.getStripped()]={'name':None,'ask':None,'subscription':'none','groups':['Not in roster'],'resources':{}}
+
+ item=self._data[jid.getStripped()]
+ typ=pres.getType()
+
+ if not typ:
+ self.DEBUG('Setting roster item %s for resource %s...'%(jid.getStripped(),jid.getResource()),'ok')
+ item['resources'][jid.getResource()]=res={'show':None,'status':None,'priority':'0','timestamp':None}
+ if pres.getTag('show'): res['show']=pres.getShow()
+ if pres.getTag('status'): res['status']=pres.getStatus()
+ if pres.getTag('priority'): res['priority']=pres.getPriority()
+ if not pres.getTimestamp(): pres.setTimestamp()
+ res['timestamp']=pres.getTimestamp()
+ elif typ=='unavailable' and item['resources'].has_key(jid.getResource()): del item['resources'][jid.getResource()]
+ # Need to handle type='error' also
+
+ def _getItemData(self,jid,dataname):
+ """ Return specific jid's representation in internal format. Used internally. """
+ jid=jid[:(jid+'/').find('/')]
+ return self._data[jid][dataname]
+ def _getResourceData(self,jid,dataname):
+ """ Return specific jid's resource representation in internal format. Used internally. """
+ if jid.find('/')+1:
+ jid,resource=jid.split('/',1)
+ if self._data[jid]['resources'].has_key(resource): return self._data[jid]['resources'][resource][dataname]
+ elif self._data[jid]['resources'].keys():
+ lastpri=-129
+ for r in self._data[jid]['resources'].keys():
+ if int(self._data[jid]['resources'][r]['priority'])>lastpri: resource,lastpri=r,int(self._data[jid]['resources'][r]['priority'])
+ return self._data[jid]['resources'][resource][dataname]
+ def delItem(self,jid):
+ """ Delete contact 'jid' from roster."""
+ self._owner.send(Iq('set',NS_ROSTER,payload=[Node('item',{'jid':jid,'subscription':'remove'})]))
+ def getAsk(self,jid):
+ """ Returns 'ask' value of contact 'jid'."""
+ return self._getItemData(jid,'ask')
+ def getGroups(self,jid):
+ """ Returns groups list that contact 'jid' belongs to."""
+ return self._getItemData(jid,'groups')
+ def getName(self,jid):
+ """ Returns name of contact 'jid'."""
+ return self._getItemData(jid,'name')
+ def getPriority(self,jid):
+ """ Returns priority of contact 'jid'. 'jid' should be a full (not bare) JID."""
+ return self._getResourceData(jid,'priority')
+ def getRawRoster(self):
+ """ Returns roster representation in internal format. """
+ return self._data
+ def getRawItem(self,jid):
+ """ Returns roster item 'jid' representation in internal format. """
+ return self._data[jid[:(jid+'/').find('/')]]
+ def getShow(self, jid):
+ """ Returns 'show' value of contact 'jid'. 'jid' should be a full (not bare) JID."""
+ return self._getResourceData(jid,'show')
+ def getStatus(self, jid):
+ """ Returns 'status' value of contact 'jid'. 'jid' should be a full (not bare) JID."""
+ return self._getResourceData(jid,'status')
+ def getSubscription(self,jid):
+ """ Returns 'subscription' value of contact 'jid'."""
+ return self._getItemData(jid,'subscription')
+ def getResources(self,jid):
+ """ Returns list of connected resources of contact 'jid'."""
+ return self._data[jid[:(jid+'/').find('/')]]['resources'].keys()
+ def setItem(self,jid,name=None,groups=[]):
+ """ Creates/renames contact 'jid' and sets the groups list that it now belongs to."""
+ iq=Iq('set',NS_ROSTER)
+ query=iq.getTag('query')
+ attrs={'jid':jid}
+ if name: attrs['name']=name
+ item=query.setTag('item',attrs)
+ for group in groups: item.addChild(node=Node('group',payload=[group]))
+ self._owner.send(iq)
+ def getItems(self):
+ """ Return list of all [bare] JIDs that the roster is currently tracks."""
+ return self._data.keys()
+ def keys(self):
+ """ Same as getItems. Provided for the sake of dictionary interface."""
+ return self._data.keys()
+ def __getitem__(self,item):
+ """ Get the contact in the internal format. Raises KeyError if JID 'item' is not in roster."""
+ return self._data[item]
+ def getItem(self,item):
+ """ Get the contact in the internal format (or None if JID 'item' is not in roster)."""
+ if self._data.has_key(item): return self._data[item]
+ def Subscribe(self,jid):
+ """ Send subscription request to JID 'jid'."""
+ self._owner.send(Presence(jid,'subscribe'))
+ def Unsubscribe(self,jid):
+ """ Ask for removing our subscription for JID 'jid'."""
+ self._owner.send(Presence(jid,'unsubscribe'))
+ def Authorize(self,jid):
+ """ Authorise JID 'jid'. Works only if these JID requested auth previously. """
+ self._owner.send(Presence(jid,'subscribed'))
+ def Unauthorize(self,jid):
+ """ Unauthorise JID 'jid'. Use for declining authorisation request
+ or for removing existing authorization. """
+ self._owner.send(Presence(jid,'unsubscribed'))
Binary file modules/xmpp/roster.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/session.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,350 @@
+##
+## XMPP server
+##
+## Copyright (C) 2004 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+__version__="$Id"
+
+"""
+When your handler is called it is getting the session instance as the first argument.
+This is the difference from xmpppy 0.1 where you got the "Client" instance.
+With Session class you can have "multi-session" client instead of having
+one client for each connection. Is is specifically important when you are
+writing the server.
+"""
+
+from protocol import *
+
+# Transport-level flags
+SOCKET_UNCONNECTED =0
+SOCKET_ALIVE =1
+SOCKET_DEAD =2
+# XML-level flags
+STREAM__NOT_OPENED =1
+STREAM__OPENED =2
+STREAM__CLOSING =3
+STREAM__CLOSED =4
+# XMPP-session flags
+SESSION_NOT_AUTHED =1
+SESSION_AUTHED =2
+SESSION_BOUND =3
+SESSION_OPENED =4
+SESSION_CLOSED =5
+
+class Session:
+ """
+ The Session class instance is used for storing all session-related info like
+ credentials, socket/xml stream/session state flags, roster items (in case of
+ client type connection) etc.
+ Session object have no means of discovering is any info is ready to be read.
+ Instead you should use poll() (recomended) or select() methods for this purpose.
+ Session can be one of two types: 'server' and 'client'. 'server' session handles
+ inbound connection and 'client' one used to create an outbound one.
+ Session instance have multitude of internal attributes. The most imporant is the 'peer' one.
+ It is set once the peer is authenticated (client).
+ """
+ def __init__(self,socket,owner,xmlns=None,peer=None):
+ """ When the session is created it's type (client/server) is determined from the beginning.
+ socket argument is the pre-created socket-like object.
+ It must have the following methods: send, recv, fileno, close.
+ owner is the 'master' instance that have Dispatcher plugged into it and generally
+ will take care about all session events.
+ xmlns is the stream namespace that will be used. Client must set this argument
+ If server sets this argument than stream will be dropped if opened with some another namespace.
+ peer is the name of peer instance. This is the flag that differentiates client session from
+ server session. Client must set it to the name of the server that will be connected, server must
+ leave this argument alone.
+ """
+ self.xmlns=xmlns
+ if peer:
+ self.TYP='client'
+ self.peer=peer
+ self._socket_state=SOCKET_UNCONNECTED
+ else:
+ self.TYP='server'
+ self.peer=None
+ self._socket_state=SOCKET_ALIVE
+ self._sock=socket
+ self._send=socket.send
+ self._recv=socket.recv
+ self.fileno=socket.fileno
+ self._registered=0
+
+ self.Dispatcher=owner.Dispatcher
+ self.DBG_LINE='session'
+ self.DEBUG=owner.Dispatcher.DEBUG
+ self._expected={}
+ self._owner=owner
+ if self.TYP=='server': self.ID=`random.random()`[2:]
+ else: self.ID=None
+
+ self.sendbuffer=''
+ self._stream_pos_queued=None
+ self._stream_pos_sent=0
+ self.deliver_key_queue=[]
+ self.deliver_queue_map={}
+ self.stanza_queue=[]
+
+ self._session_state=SESSION_NOT_AUTHED
+ self.waiting_features=[]
+ for feature in [NS_TLS,NS_SASL,NS_BIND,NS_SESSION]:
+ if feature in owner.features: self.waiting_features.append(feature)
+ self.features=[]
+ self.feature_in_process=None
+ self.slave_session=None
+ self.StartStream()
+
+ def StartStream(self):
+ """ This method is used to initialise the internal xml expat parser
+ and to send initial stream header (in case of client connection).
+ Should be used after initial connection and after every stream restart."""
+ self._stream_state=STREAM__NOT_OPENED
+ self.Stream=simplexml.NodeBuilder()
+ self.Stream._dispatch_depth=2
+ self.Stream.dispatch=self._dispatch
+ self.Parse=self.Stream.Parse
+ self.Stream.stream_footer_received=self._stream_close
+ if self.TYP=='client':
+ self.Stream.stream_header_received=self._catch_stream_id
+ self._stream_open()
+ else:
+ self.Stream.stream_header_received=self._stream_open
+
+ def receive(self):
+ """ Reads all pending incoming data.
+ Raises IOError on disconnection.
+ Blocks until at least one byte is read."""
+ try: received = self._recv(10240)
+ except: received = ''
+
+ if len(received): # length of 0 means disconnect
+ self.DEBUG(`self.fileno()`+' '+received,'got')
+ else:
+ self.DEBUG('Socket error while receiving data','error')
+ self.set_socket_state(SOCKET_DEAD)
+ raise IOError("Peer disconnected")
+ return received
+
+ def sendnow(self,chunk):
+ """ Put chunk into "immidiatedly send" queue.
+ Should only be used for auth/TLS stuff and like.
+ If you just want to shedule regular stanza for delivery use enqueue method.
+ """
+ if isinstance(chunk,Node): chunk = chunk.__str__().encode('utf-8')
+ elif type(chunk)==type(u''): chunk = chunk.encode('utf-8')
+ self.enqueue(chunk)
+
+ def enqueue(self,stanza):
+ """ Takes Protocol instance as argument.
+ Puts stanza into "send" fifo queue. Items into the send queue are hold until
+ stream authenticated. After that this method is effectively the same as "sendnow" method."""
+ if isinstance(stanza,Protocol):
+ self.stanza_queue.append(stanza)
+ else: self.sendbuffer+=stanza
+ if self._socket_state>=SOCKET_ALIVE: self.push_queue()
+
+ def push_queue(self,failreason=ERR_RECIPIENT_UNAVAILABLE):
+ """ If stream is authenticated than move items from "send" queue to "immidiatedly send" queue.
+ Else if the stream is failed then return all queued stanzas with error passed as argument.
+ Otherwise do nothing."""
+ # If the stream authed - convert stanza_queue into sendbuffer and set the checkpoints
+
+ if self._stream_state>=STREAM__CLOSED or self._socket_state>=SOCKET_DEAD: # the stream failed. Return all stanzas that are still waiting for delivery.
+ self._owner.deactivatesession(self)
+ for key in self.deliver_key_queue: # Not sure. May be I
+ self._dispatch(Error(self.deliver_queue_map[key],failreason),trusted=1) # should simply re-dispatch it?
+ for stanza in self.stanza_queue: # But such action can invoke
+ self._dispatch(Error(stanza,failreason),trusted=1) # Infinite loops in case of S2S connection...
+ self.deliver_queue_map,self.deliver_key_queue,self.stanza_queue={},[],[]
+ return
+ elif self._session_state>=SESSION_AUTHED: # FIXME! äÏÌÖÅÎ ÂÙÔØ ËÁËÏÊ-ÔÏ ÄÒÕÇÏÊ ÆÌÁÇ.
+ #### LOCK_QUEUE
+ for stanza in self.stanza_queue:
+ txt=stanza.__str__().encode('utf-8')
+ self.sendbuffer+=txt
+ self._stream_pos_queued+=len(txt) # should be re-evaluated for SSL connection.
+ self.deliver_queue_map[self._stream_pos_queued]=stanza # position of the stream when stanza will be successfully and fully sent
+ self.deliver_key_queue.append(self._stream_pos_queued)
+ self.stanza_queue=[]
+ #### UNLOCK_QUEUE
+
+ def flush_queue(self):
+ """ Put the "immidiatedly send" queue content on the wire. Blocks until at least one byte sent."""
+ if self.sendbuffer:
+ try:
+ # LOCK_QUEUE
+ sent=self._send(self.sendbuffer) # âÌÏËÉÒÕÀÝÁÑ ÛÔÕÞËÁ!
+ except:
+ # UNLOCK_QUEUE
+ self.set_socket_state(SOCKET_DEAD)
+ self.DEBUG("Socket error while sending data",'error')
+ return self.terminate_stream()
+ self.DEBUG(`self.fileno()`+' '+self.sendbuffer[:sent],'sent')
+ self._stream_pos_sent+=sent
+ self.sendbuffer=self.sendbuffer[sent:]
+ self._stream_pos_delivered=self._stream_pos_sent # Should be acquired from socket somehow. Take SSL into account.
+ while self.deliver_key_queue and self._stream_pos_delivered>self.deliver_key_queue[0]:
+ del self.deliver_queue_map[self.deliver_key_queue[0]]
+ self.deliver_key_queue.remove(self.deliver_key_queue[0])
+ # UNLOCK_QUEUE
+
+ def _dispatch(self,stanza,trusted=0):
+ """ This is callback that is used to pass the received stanza forth to owner's dispatcher
+ _if_ the stream is authorised. Otherwise the stanza is just dropped.
+ The 'trusted' argument is used to emulate stanza receive.
+ This method is used internally.
+ """
+ self._owner.packets+=1
+ print self._owner.packets
+ if self._stream_state==STREAM__OPENED or trusted: # if the server really should reject all stanzas after he is closed stream (himeself)?
+ self.DEBUG(stanza.__str__(),'dispatch')
+ stanza.trusted=trusted
+ return self.Dispatcher.dispatch(stanza,self)
+
+ def _catch_stream_id(self,ns=None,tag='stream',attrs={}):
+ """ This callback is used to detect the stream namespace of incoming stream. Used internally. """
+ if not attrs.has_key('id') or not attrs['id']:
+ return self.terminate_stream(STREAM_INVALID_XML)
+ self.ID=attrs['id']
+ if not attrs.has_key('version'): self._owner.Dialback(self)
+
+ def _stream_open(self,ns=None,tag='stream',attrs={}):
+ """ This callback is used to handle opening stream tag of the incoming stream.
+ In the case of client session it just make some validation.
+ Server session also sends server headers and if the stream valid the features node.
+ Used internally. """
+ text='<?xml version="1.0" encoding="utf-8"?>\n<stream:stream'
+ if self.TYP=='client':
+ text+=' to="%s"'%self.peer
+ else:
+ text+=' id="%s"'%self.ID
+ if not attrs.has_key('to'): text+=' from="%s"'%self._owner.servernames[0]
+ else: text+=' from="%s"'%attrs['to']
+ if attrs.has_key('xml:lang'): text+=' xml:lang="%s"'%attrs['xml:lang']
+ if self.xmlns: xmlns=self.xmlns
+ else: xmlns=NS_SERVER
+ text+=' xmlns:db="%s" xmlns:stream="%s" xmlns="%s"'%(NS_DIALBACK,NS_STREAMS,xmlns)
+ if attrs.has_key('version') or self.TYP=='client': text+=' version="1.0"'
+ self.sendnow(text+'>')
+ self.set_stream_state(STREAM__OPENED)
+ if self.TYP=='client': return
+ if tag<>'stream': return self.terminate_stream(STREAM_INVALID_XML)
+ if ns<>NS_STREAMS: return self.terminate_stream(STREAM_INVALID_NAMESPACE)
+ if self.Stream.xmlns<>self.xmlns: return self.terminate_stream(STREAM_BAD_NAMESPACE_PREFIX)
+ if not attrs.has_key('to'): return self.terminate_stream(STREAM_IMPROPER_ADDRESSING)
+ if attrs['to'] not in self._owner.servernames: return self.terminate_stream(STREAM_HOST_UNKNOWN)
+ self.ourname=attrs['to'].lower()
+ if self.TYP=='server' and attrs.has_key('version'):
+ # send features
+ features=Node('stream:features')
+ if NS_TLS in self.waiting_features:
+ features.NT.starttls.setNamespace(NS_TLS)
+ features.T.starttls.NT.required
+ if NS_SASL in self.waiting_features:
+ features.NT.mechanisms.setNamespace(NS_SASL)
+ for mec in self._owner.SASL.mechanisms:
+ features.T.mechanisms.NT.mechanism=mec
+ else:
+ if NS_BIND in self.waiting_features: features.NT.bind.setNamespace(NS_BIND)
+ if NS_SESSION in self.waiting_features: features.NT.session.setNamespace(NS_SESSION)
+ self.sendnow(features)
+
+ def feature(self,feature):
+ """ Declare some stream feature as activated one. """
+ if feature not in self.features: self.features.append(feature)
+ self.unfeature(feature)
+
+ def unfeature(self,feature):
+ """ Declare some feature as illegal. Illegal features can not be used.
+ Example: BIND feature becomes illegal after Non-SASL auth. """
+ if feature in self.waiting_features: self.waiting_features.remove(feature)
+
+ def _stream_close(self,unregister=1):
+ """ Write the closing stream tag and destroy the underlaying socket. Used internally. """
+ if self._stream_state>=STREAM__CLOSED: return
+ self.set_stream_state(STREAM__CLOSING)
+ self.sendnow('</stream:stream>')
+ self.set_stream_state(STREAM__CLOSED)
+ self.push_queue() # decompose queue really since STREAM__CLOSED
+ self._owner.flush_queues()
+ if unregister: self._owner.unregistersession(self)
+ self._destroy_socket()
+
+ def terminate_stream(self,error=None,unregister=1):
+ """ Notify the peer about stream closure.
+ Ensure that xmlstream is not brokes - i.e. if the stream isn't opened yet -
+ open it before closure.
+ If the error condition is specified than create a stream error and send it along with
+ closing stream tag.
+ Emulate receiving 'unavailable' type presence just before stream closure.
+ """
+ if self._stream_state>=STREAM__CLOSING: return
+ if self._stream_state<STREAM__OPENED:
+ self.set_stream_state(STREAM__CLOSING)
+ self._stream_open()
+ else:
+ self.set_stream_state(STREAM__CLOSING)
+ p=Presence(typ='unavailable')
+ p.setNamespace(NS_CLIENT)
+ self._dispatch(p,trusted=1)
+ if error:
+ if isinstance(error,Node): self.sendnow(error)
+ else: self.sendnow(ErrorNode(error))
+ self._stream_close(unregister=unregister)
+ if self.slave_session:
+ self.slave_session.terminate_stream(STREAM_REMOTE_CONNECTION_FAILED)
+
+ def _destroy_socket(self):
+ """ Break cyclic dependancies to let python's GC free memory right now."""
+ self.Stream.dispatch=None
+ self.Stream.stream_footer_received=None
+ self.Stream.stream_header_received=None
+ self.Stream.destroy()
+ self._sock.close()
+ self.set_socket_state(SOCKET_DEAD)
+
+ def start_feature(self,f):
+ """ Declare some feature as "negotiating now" to prevent other features from start negotiating. """
+ if self.feature_in_process: raise "Starting feature %s over %s !"%(f,self.feature_in_process)
+ self.feature_in_process=f
+
+ def stop_feature(self,f):
+ """ Declare some feature as "negotiated" to allow other features start negotiating. """
+ if self.feature_in_process<>f: raise "Stopping feature %s instead of %s !"%(f,self.feature_in_process)
+ self.feature_in_process=None
+
+ def set_socket_state(self,newstate):
+ """ Change the underlaying socket state.
+ Socket starts with SOCKET_UNCONNECTED state
+ and then proceeds (possibly) to SOCKET_ALIVE
+ and then to SOCKET_DEAD """
+ if self._socket_state<newstate: self._socket_state=newstate
+
+ def set_session_state(self,newstate):
+ """ Change the session state.
+ Session starts with SESSION_NOT_AUTHED state
+ and then comes through
+ SESSION_AUTHED, SESSION_BOUND, SESSION_OPENED and SESSION_CLOSED states.
+ """
+ if self._session_state<newstate:
+ if self._session_state<SESSION_AUTHED and \
+ newstate>=SESSION_AUTHED: self._stream_pos_queued=self._stream_pos_sent
+ self._session_state=newstate
+
+ def set_stream_state(self,newstate):
+ """ Change the underlaying XML stream state
+ Stream starts with STREAM__NOT_OPENED and then proceeds with
+ STREAM__OPENED, STREAM__CLOSING and STREAM__CLOSED states.
+ Note that some features (like TLS and SASL)
+ requires stream re-start so this state can have non-linear changes. """
+ if self._stream_state<newstate: self._stream_state=newstate
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/simplexml.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,396 @@
+## simplexml.py based on Mattew Allum's xmlstream.py
+##
+## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: simplexml.py,v 1.30 2006/06/03 12:22:34 normanr Exp $
+
+"""Simplexml module provides xmpppy library with all needed tools to handle XML nodes and XML streams.
+I'm personally using it in many other separate projects. It is designed to be as standalone as possible."""
+
+import xml.parsers.expat
+
+def XMLescape(txt):
+ """Returns provided string with symbols & < > " replaced by their respective XML entities."""
+ return txt.replace("&", "&").replace("<", "<").replace(">", ">").replace('"', """)
+
+ENCODING='utf-8'
+def ustr(what):
+ """Converts object "what" to unicode string using it's own __str__ method if accessible or unicode method otherwise."""
+ if type(what) == type(u''): return what
+ try: r=what.__str__()
+ except AttributeError: r=str(what)
+ if type(r)<>type(u''): return unicode(r,ENCODING)
+ return r
+
+class Node:
+ """ Node class describes syntax of separate XML Node. It have a constructor that permits node creation
+ from set of "namespace name", attributes and payload of text strings and other nodes.
+ It does not natively support building node from text string and uses NodeBuilder class for that purpose.
+ After creation node can be mangled in many ways so it can be completely changed.
+ Also node can be serialised into string in one of two modes: default (where the textual representation
+ of node describes it exactly) and "fancy" - with whitespace added to make indentation and thus make
+ result more readable by human.
+
+ Node class have attribute FORCE_NODE_RECREATION that is defaults to False thus enabling fast node
+ replication from the some other node. The drawback of the fast way is that new node shares some
+ info with the "original" node that is changing the one node may influence the other. Though it is
+ rarely needed (in xmpppy it is never needed at all since I'm usually never using original node after
+ replication (and using replication only to move upwards on the classes tree).
+ """
+ FORCE_NODE_RECREATION=0
+ def __init__(self, tag=None, attrs={}, payload=[], parent=None, node=None):
+ """ Takes "tag" argument as the name of node (prepended by namespace, if needed and separated from it
+ by a space), attrs dictionary as the set of arguments, payload list as the set of textual strings
+ and child nodes that this node carries within itself and "parent" argument that is another node
+ that this one will be the child of. Also the __init__ can be provided with "node" argument that is
+ either a text string containing exactly one node or another Node instance to begin with. If both
+ "node" and other arguments is provided then the node initially created as replica of "node"
+ provided and then modified to be compliant with other arguments."""
+ if node:
+ if self.FORCE_NODE_RECREATION and type(node)==type(self): node=str(node)
+ if type(node)<>type(self): node=NodeBuilder(node,self)
+ else:
+ self.name,self.namespace,self.attrs,self.data,self.kids,self.parent = node.name,node.namespace,{},[],[],node.parent
+ for key in node.attrs.keys(): self.attrs[key]=node.attrs[key]
+ for data in node.data: self.data.append(data)
+ for kid in node.kids: self.kids.append(kid)
+ else: self.name,self.namespace,self.attrs,self.data,self.kids,self.parent = 'tag','',{},[],[],None
+
+ if tag: self.namespace, self.name = ([self.namespace]+tag.split())[-2:]
+ if parent: self.parent = parent
+ if self.parent and not self.namespace: self.namespace=self.parent.namespace
+ for attr in attrs.keys():
+ self.attrs[attr]=attrs[attr]
+ if type(payload) in (type(''),type(u'')): payload=[payload]
+ for i in payload:
+ if type(i)==type(self): self.addChild(node=i)
+ else: self.data.append(ustr(i))
+
+ def __str__(self,fancy=0):
+ """ Method used to dump node into textual representation.
+ if "fancy" argument is set to True produces indented output for readability."""
+ s = (fancy-1) * 2 * ' ' + "<" + self.name
+ if self.namespace:
+ if not self.parent or self.parent.namespace!=self.namespace:
+ s = s + ' xmlns="%s"'%self.namespace
+ for key in self.attrs.keys():
+ val = ustr(self.attrs[key])
+ s = s + ' %s="%s"' % ( key, XMLescape(val) )
+ s = s + ">"
+ cnt = 0
+ if self.kids:
+ if fancy: s = s + "\n"
+ for a in self.kids:
+ if not fancy and (len(self.data)-1)>=cnt: s=s+XMLescape(self.data[cnt])
+ elif (len(self.data)-1)>=cnt: s=s+XMLescape(self.data[cnt].strip())
+ s = s + a.__str__(fancy and fancy+1)
+ cnt=cnt+1
+ if not fancy and (len(self.data)-1) >= cnt: s = s + XMLescape(self.data[cnt])
+ elif (len(self.data)-1) >= cnt: s = s + XMLescape(self.data[cnt].strip())
+ if not self.kids and s[-1:]=='>':
+ s=s[:-1]+' />'
+ if fancy: s = s + "\n"
+ else:
+ if fancy and not self.data: s = s + (fancy-1) * 2 * ' '
+ s = s + "</" + self.name + ">"
+ if fancy: s = s + "\n"
+ return s
+ def getCDATA(self):
+ """ Serialise node, dropping all tags and leaving CDATA intact.
+ That is effectively kills all formatiing, leaving only text were contained in XML.
+ """
+ s =""
+ cnt = 0
+ if self.kids:
+ for a in self.kids:
+ s=s+self.data[cnt]
+ s = s + mystr(a)
+ cnt=cnt+1
+ if (len(self.data)-1) >= cnt: s = s + self.data[cnt]
+ return s
+ def addChild(self, name=None, attrs={}, payload=[], namespace=None, node=None):
+ """ If "node" argument is provided, adds it as child node. Else creates new node from
+ the other arguments' values and adds it as well."""
+ if attrs.has_key('xmlns'):
+ raise AttributeError("Use namespace=x instead of attrs={'xmlns':x}")
+ if namespace: name=namespace+' '+name
+ if node:
+ newnode=node
+ node.parent = self
+ else: newnode=Node(tag=name, parent=self, attrs=attrs, payload=payload)
+ self.kids.append(newnode)
+ return newnode
+ def addData(self, data):
+ """ Adds some CDATA to node. """
+ self.data.append(ustr(data))
+ def clearData(self):
+ """ Removes all CDATA from the node. """
+ self.data=[]
+ def delAttr(self, key):
+ """ Deletes an attribute "key" """
+ del self.attrs[key]
+ def delChild(self, node, attrs={}):
+ """ Deletes the "node" from the node's childs list, if "node" is an instance.
+ Else deletes the first node that have specified name and (optionally) attributes. """
+ if type(node)<>type(self): node=self.getTag(node,attrs)
+ self.kids.remove(node)
+ return node
+ def getAttrs(self):
+ """ Returns all node's attributes as dictionary. """
+ return self.attrs
+ def getAttr(self, key):
+ """ Returns value of specified attribute. """
+ try: return self.attrs[key]
+ except: return None
+ def getChildren(self):
+ """ Returns all node's child nodes as list. """
+ return self.kids
+ def getData(self):
+ """ Returns all node CDATA as string (concatenated). """
+ return ''.join(self.data)
+ def getName(self):
+ """ Returns the name of node """
+ return self.name
+ def getNamespace(self):
+ """ Returns the namespace of node """
+ return self.namespace
+ def getParent(self):
+ """ Returns the parent of node (if present). """
+ return self.parent
+ def getPayload(self):
+ """ Return the payload of node i.e. list of child nodes and CDATA entries.
+ F.e. for "<node>text1<nodea/><nodeb/> text2</node>" will be returned list:
+ ['text1', <nodea instance>, <nodeb instance>, ' text2']. """
+ ret=[]
+ for i in range(len(self.kids)+len(self.data)+1):
+ try:
+ if self.data[i]: ret.append(self.data[i])
+ except IndexError: pass
+ try: ret.append(self.kids[i])
+ except IndexError: pass
+ return ret
+ def getTag(self, name, attrs={}, namespace=None):
+ """ Filters all child nodes using specified arguments as filter.
+ Returns the first found or None if not found. """
+ return self.getTags(name, attrs, namespace, one=1)
+ def getTagAttr(self,tag,attr):
+ """ Returns attribute value of the child with specified name (or None if no such attribute)."""
+ try: return self.getTag(tag).attrs[attr]
+ except: return None
+ def getTagData(self,tag):
+ """ Returns cocatenated CDATA of the child with specified name."""
+ try: return self.getTag(tag).getData()
+ except: return None
+ def getTags(self, name, attrs={}, namespace=None, one=0):
+ """ Filters all child nodes using specified arguments as filter.
+ Returns the list of nodes found. """
+ nodes=[]
+ for node in self.kids:
+ if namespace and namespace<>node.getNamespace(): continue
+ if node.getName() == name:
+ for key in attrs.keys():
+ if not node.attrs.has_key(key) or node.attrs[key]<>attrs[key]: break
+ else: nodes.append(node)
+ if one and nodes: return nodes[0]
+ if not one: return nodes
+ def setAttr(self, key, val):
+ """ Sets attribute "key" with the value "val". """
+ self.attrs[key]=val
+ def setData(self, data):
+ """ Sets node's CDATA to provided string. Resets all previous CDATA!"""
+ self.data=[ustr(data)]
+ def setName(self,val):
+ """ Changes the node name. """
+ self.name = val
+ def setNamespace(self, namespace):
+ """ Changes the node namespace. """
+ self.namespace=namespace
+ def setParent(self, node):
+ """ Sets node's parent to "node". WARNING: do not checks if the parent already present
+ and not removes the node from the list of childs of previous parent. """
+ self.parent = node
+ def setPayload(self,payload,add=0):
+ """ Sets node payload according to the list specified. WARNING: completely replaces all node's
+ previous content. If you wish just to add child or CDATA - use addData or addChild methods. """
+ if type(payload) in (type(''),type(u'')): payload=[payload]
+ if add: self.kids+=payload
+ else: self.kids=payload
+ def setTag(self, name, attrs={}, namespace=None):
+ """ Same as getTag but if the node with specified namespace/attributes not found, creates such
+ node and returns it. """
+ node=self.getTags(name, attrs, namespace=namespace, one=1)
+ if node: return node
+ else: return self.addChild(name, attrs, namespace=namespace)
+ def setTagAttr(self,tag,attr,val):
+ """ Creates new node (if not already present) with name "tag"
+ and sets it's attribute "attr" to value "val". """
+ try: self.getTag(tag).attrs[attr]=val
+ except: self.addChild(tag,attrs={attr:val})
+ def setTagData(self,tag,val,attrs={}):
+ """ Creates new node (if not already present) with name "tag" and (optionally) attributes "attrs"
+ and sets it's CDATA to string "val". """
+ try: self.getTag(tag,attrs).setData(ustr(val))
+ except: self.addChild(tag,attrs,payload=[ustr(val)])
+ def has_attr(self,key):
+ """ Checks if node have attribute "key"."""
+ return self.attrs.has_key(key)
+ def __getitem__(self,item):
+ """ Returns node's attribute "item" value. """
+ return self.getAttr(item)
+ def __setitem__(self,item,val):
+ """ Sets node's attribute "item" value. """
+ return self.setAttr(item,val)
+ def __delitem__(self,item):
+ """ Deletes node's attribute "item". """
+ return self.delAttr(item,val)
+ def __getattr__(self,attr):
+ """ Reduce memory usage caused by T/NT classes - use memory only when needed. """
+ if attr=='T':
+ self.T=T(self)
+ return self.T
+ if attr=='NT':
+ self.NT=NT(self)
+ return self.NT
+ raise AttributeError
+
+class T:
+ """ Auxiliary class used to quick access to node's child nodes. """
+ def __init__(self,node): self.__dict__['node']=node
+ def __getattr__(self,attr): return self.node.getTag(attr)
+ def __setattr__(self,attr,val):
+ if isinstance(val,Node): Node.__init__(self.node.setTag(attr),node=val)
+ else: return self.node.setTagData(attr,val)
+ def __delattr__(self,attr): return self.node.delChild(attr)
+
+class NT(T):
+ """ Auxiliary class used to quick create node's child nodes. """
+ def __getattr__(self,attr): return self.node.addChild(attr)
+ def __setattr__(self,attr,val):
+ if isinstance(val,Node): self.node.addChild(attr,node=val)
+ else: return self.node.addChild(attr,payload=[val])
+
+DBG_NODEBUILDER = 'nodebuilder'
+class NodeBuilder:
+ """ Builds a Node class minidom from data parsed to it. This class used for two purposes:
+ 1. Creation an XML Node from a textual representation. F.e. reading a config file. See an XML2Node method.
+ 2. Handling an incoming XML stream. This is done by mangling
+ the __dispatch_depth parameter and redefining the dispatch method.
+ You do not need to use this class directly if you do not designing your own XML handler."""
+ def __init__(self,data=None,initial_node=None):
+ """ Takes two optional parameters: "data" and "initial_node".
+ By default class initialised with empty Node class instance.
+ Though, if "initial_node" is provided it used as "starting point".
+ You can think about it as of "node upgrade".
+ "data" (if provided) feeded to parser immidiatedly after instance init.
+ """
+ self.DEBUG(DBG_NODEBUILDER, "Preparing to handle incoming XML stream.", 'start')
+ self._parser = xml.parsers.expat.ParserCreate(namespace_separator=' ')
+ self._parser.StartElementHandler = self.starttag
+ self._parser.EndElementHandler = self.endtag
+ self._parser.CharacterDataHandler = self.handle_data
+ self._parser.StartNamespaceDeclHandler = self.handle_namespace_start
+ self.Parse = self._parser.Parse
+
+ self.__depth = 0
+ self._dispatch_depth = 1
+ self._document_attrs = None
+ self._mini_dom=initial_node
+ self.last_is_data = 1
+ self._ptr=None
+ self.namespaces={"http://www.w3.org/XML/1998/namespace":'xml:'}
+ self.xmlns="http://www.w3.org/XML/1998/namespace"
+
+ if data: self._parser.Parse(data,1)
+
+ def destroy(self):
+ """ Method used to allow class instance to be garbage-collected. """
+ self._parser.StartElementHandler = None
+ self._parser.EndElementHandler = None
+ self._parser.CharacterDataHandler = None
+ self._parser.StartNamespaceDeclHandler = None
+
+ def starttag(self, tag, attrs):
+ """XML Parser callback. Used internally"""
+ attlist=attrs.keys() #
+ for attr in attlist: # FIXME: Crude hack. And it also slows down the whole library considerably.
+ sp=attr.rfind(" ") #
+ if sp==-1: continue #
+ ns=attr[:sp] #
+ attrs[self.namespaces[ns]+attr[sp+1:]]=attrs[attr]
+ del attrs[attr] #
+ self.__depth += 1
+ self.DEBUG(DBG_NODEBUILDER, "DEPTH -> %i , tag -> %s, attrs -> %s" % (self.__depth, tag, `attrs`), 'down')
+ if self.__depth == self._dispatch_depth:
+ if not self._mini_dom : self._mini_dom = Node(tag=tag, attrs=attrs)
+ else: Node.__init__(self._mini_dom,tag=tag, attrs=attrs)
+ self._ptr = self._mini_dom
+ elif self.__depth > self._dispatch_depth:
+ self._ptr.kids.append(Node(tag=tag,parent=self._ptr,attrs=attrs))
+ self._ptr = self._ptr.kids[-1]
+ if self.__depth == 1:
+ self._document_attrs = attrs
+ ns, name = (['']+tag.split())[-2:]
+ self.stream_header_received(ns, name, attrs)
+ if not self.last_is_data and self._ptr.parent: self._ptr.parent.data.append('')
+ self.last_is_data = 0
+
+ def endtag(self, tag ):
+ """XML Parser callback. Used internally"""
+ self.DEBUG(DBG_NODEBUILDER, "DEPTH -> %i , tag -> %s" % (self.__depth, tag), 'up')
+ if self.__depth == self._dispatch_depth:
+ self.dispatch(self._mini_dom)
+ elif self.__depth > self._dispatch_depth:
+ self._ptr = self._ptr.parent
+ else:
+ self.DEBUG(DBG_NODEBUILDER, "Got higher than dispatch level. Stream terminated?", 'stop')
+ self.__depth -= 1
+ self.last_is_data = 0
+ if self.__depth == 0: self.stream_footer_received()
+
+ def handle_data(self, data):
+ """XML Parser callback. Used internally"""
+ self.DEBUG(DBG_NODEBUILDER, data, 'data')
+ if not self._ptr: return
+ if self.last_is_data:
+ self._ptr.data[-1] += data
+ else:
+ self._ptr.data.append(data)
+ self.last_is_data = 1
+
+ def handle_namespace_start(self, prefix, uri):
+ """XML Parser callback. Used internally"""
+ if prefix: self.namespaces[uri]=prefix+':'
+ else: self.xmlns=uri
+ def DEBUG(self, level, text, comment=None):
+ """ Gets all NodeBuilder walking events. Can be used for debugging if redefined."""
+ def getDom(self):
+ """ Returns just built Node. """
+ return self._mini_dom
+ def dispatch(self,stanza):
+ """ Gets called when the NodeBuilder reaches some level of depth on it's way up with the built
+ node as argument. Can be redefined to convert incoming XML stanzas to program events. """
+ def stream_header_received(self,ns,tag,attrs):
+ """ Method called when stream just opened. """
+ def stream_footer_received(self):
+ """ Method called when stream just closed. """
+
+def XML2Node(xml):
+ """ Converts supplied textual string into XML node. Handy f.e. for reading configuration file.
+ Raises xml.parser.expat.parsererror if provided string is not well-formed XML. """
+ return NodeBuilder(xml).getDom()
+
+def BadXML2Node(xml):
+ """ Converts supplied textual string into XML node. Survives if xml data is cutted half way round.
+ I.e. "<html>some text <br>some more text". Will raise xml.parser.expat.parsererror on misplaced
+ tags though. F.e. "<b>some text <br>some more text</b>" will not work."""
+ return NodeBuilder(xml).getDom()
Binary file modules/xmpp/simplexml.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/xmpp/transports.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,329 @@
+## transports.py
+##
+## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+# $Id: transports.py,v 1.29 2006/05/22 08:58:39 normanr Exp $
+
+"""
+This module contains the low-level implementations of xmpppy connect methods or
+(in other words) transports for xmpp-stanzas.
+Currently here is three transports:
+direct TCP connect - TCPsocket class
+proxied TCP connect - HTTPPROXYsocket class (CONNECT proxies)
+TLS connection - TLS class. Can be used for SSL connections also.
+
+Transports are stackable so you - f.e. TLS use HTPPROXYsocket or TCPsocket as more low-level transport.
+
+Also exception 'error' is defined to allow capture of this module specific exceptions.
+"""
+
+import socket,select,base64,dispatcher,sys
+from simplexml import ustr
+from client import PlugIn
+from protocol import *
+
+# determine which DNS resolution library is available
+HAVE_DNSPYTHON = False
+HAVE_PYDNS = False
+try:
+ import dns.resolver # http://dnspython.org/
+ HAVE_DNSPYTHON = True
+except ImportError:
+ try:
+ import DNS # http://pydns.sf.net/
+ HAVE_PYDNS = True
+ except ImportError:
+ #TODO: use self.DEBUG()
+ sys.stderr.write("Could not load one of the supported DNS libraries (dnspython or pydns). SRV records will not be queried and you may need to set custom hostname/port for some servers to be accessible.\n")
+
+DATA_RECEIVED='DATA RECEIVED'
+DATA_SENT='DATA SENT'
+
+class error:
+ """An exception to be raised in case of low-level errors in methods of 'transports' module."""
+ def __init__(self,comment):
+ """Cache the descriptive string"""
+ self._comment=comment
+
+ def __str__(self):
+ """Serialise exception into pre-cached descriptive string."""
+ return self._comment
+
+BUFLEN=1024
+class TCPsocket(PlugIn):
+ """ This class defines direct TCP connection method. """
+ def __init__(self, server=None, use_srv=True):
+ """ Cache connection point 'server'. 'server' is the tuple of (host, port)
+ absolutely the same as standard tcp socket uses. """
+ PlugIn.__init__(self)
+ self.DBG_LINE='socket'
+ self._exported_methods=[self.send,self.disconnect]
+
+ # SRV resolver
+ if use_srv and (HAVE_DNSPYTHON or HAVE_PYDNS):
+ host, port = server
+ possible_queries = ['_xmpp-client._tcp.' + host]
+
+ for query in possible_queries:
+ try:
+ if HAVE_DNSPYTHON:
+ answers = [x for x in dns.resolver.query(query, 'SRV')]
+ if answers:
+ host = str(answers[0].target)
+ port = int(answers[0].port)
+ break
+ elif HAVE_PYDNS:
+ # ensure we haven't cached an old configuration
+ DNS.ParseResolvConf()
+ response = DNS.Request().req(query, qtype='SRV')
+ answers = response.answers
+ if len(answers) > 0:
+ # ignore the priority and weight for now
+ _, _, port, host = answers[0]['data']
+ del _
+ port = int(port)
+ break
+ except:
+ #TODO: use self.DEBUG()
+ print 'An error occurred while looking up %s' % query
+ server = (host, port)
+ # end of SRV resolver
+
+ self._server = server
+
+ def plugin(self, owner):
+ """ Fire up connection. Return non-empty string on success.
+ Also registers self.disconnected method in the owner's dispatcher.
+ Called internally. """
+ if not self._server: self._server=(self._owner.Server,5222)
+ if not self.connect(self._server): return
+ self._owner.Connection=self
+ self._owner.RegisterDisconnectHandler(self.disconnected)
+ return 'ok'
+
+ def getHost(self):
+ """ Return the 'host' value that is connection is [will be] made to."""
+ return self._server[0]
+ def getPort(self):
+ """ Return the 'port' value that is connection is [will be] made to."""
+ return self._server[1]
+
+ def connect(self,server=None):
+ """ Try to connect. Returns non-empty string on success. """
+ try:
+ if not server: server=self._server
+ self._sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self._sock.connect((server[0], int(server[1])))
+ self._send=self._sock.sendall
+ self._recv=self._sock.recv
+ self.DEBUG("Successfully connected to remote host %s"%`server`,'start')
+ return 'ok'
+ except socket.error, (errno, strerror):
+ self.DEBUG("Failed to connect to remote host %s: %s (%s)"%(`server`, strerror, errno),'error')
+ except: pass
+
+ def plugout(self):
+ """ Disconnect from the remote server and unregister self.disconnected method from
+ the owner's dispatcher. """
+ self._sock.close()
+ if self._owner.__dict__.has_key('Connection'):
+ del self._owner.Connection
+ self._owner.UnregisterDisconnectHandler(self.disconnected)
+
+ def receive(self):
+ """ Reads all pending incoming data.
+ In case of disconnection calls owner's disconnected() method and then raises IOError exception."""
+ try: received = self._recv(BUFLEN)
+ except socket.sslerror,e:
+ self._seen_data=0
+ if e[0]==2: return ''
+ self.DEBUG('Socket error while receiving data','error')
+ self._owner.disconnected()
+ raise IOError("Disconnected from server")
+ except: received = ''
+
+ while self.pending_data(0):
+ try: add = self._recv(BUFLEN)
+ except: add=''
+ received +=add
+ if not add: break
+
+ if len(received): # length of 0 means disconnect
+ self._seen_data=1
+ self.DEBUG(received,'got')
+ if hasattr(self._owner, 'Dispatcher'):
+ self._owner.Dispatcher.Event('', DATA_RECEIVED, received)
+ else:
+ self.DEBUG('Socket error while receiving data','error')
+ self._owner.disconnected()
+ raise IOError("Disconnected from server")
+ return received
+
+ def send(self,raw_data):
+ """ Writes raw outgoing data. Blocks until done.
+ If supplied data is unicode string, encodes it to utf-8 before send."""
+ if type(raw_data)==type(u''): raw_data = raw_data.encode('utf-8')
+ elif type(raw_data)<>type(''): raw_data = ustr(raw_data).encode('utf-8')
+ try:
+ self._send(raw_data)
+ # Avoid printing messages that are empty keepalive packets.
+ if raw_data.strip():
+ self.DEBUG(raw_data,'sent')
+ self._owner.Dispatcher.Event('', DATA_SENT, raw_data)
+ except:
+ self.DEBUG("Socket error while sending data",'error')
+ self._owner.disconnected()
+
+ def pending_data(self,timeout=0):
+ """ Returns true if there is a data ready to be read. """
+ return select.select([self._sock],[],[],timeout)[0]
+
+ def disconnect(self):
+ """ Closes the socket. """
+ self.DEBUG("Closing socket",'stop')
+ self._sock.close()
+
+ def disconnected(self):
+ """ Called when a Network Error or disconnection occurs.
+ Designed to be overidden. """
+ self.DEBUG("Socket operation failed",'error')
+
+DBG_CONNECT_PROXY='CONNECTproxy'
+class HTTPPROXYsocket(TCPsocket):
+ """ HTTP (CONNECT) proxy connection class. Uses TCPsocket as the base class
+ redefines only connect method. Allows to use HTTP proxies like squid with
+ (optionally) simple authentication (using login and password). """
+ def __init__(self,proxy,server,use_srv=True):
+ """ Caches proxy and target addresses.
+ 'proxy' argument is a dictionary with mandatory keys 'host' and 'port' (proxy address)
+ and optional keys 'user' and 'password' to use for authentication.
+ 'server' argument is a tuple of host and port - just like TCPsocket uses. """
+ TCPsocket.__init__(self,server,use_srv)
+ self.DBG_LINE=DBG_CONNECT_PROXY
+ self._proxy=proxy
+
+ def plugin(self, owner):
+ """ Starts connection. Used interally. Returns non-empty string on success."""
+ owner.debug_flags.append(DBG_CONNECT_PROXY)
+ return TCPsocket.plugin(self,owner)
+
+ def connect(self,dupe=None):
+ """ Starts connection. Connects to proxy, supplies login and password to it
+ (if were specified while creating instance). Instructs proxy to make
+ connection to the target server. Returns non-empty sting on success. """
+ if not TCPsocket.connect(self,(self._proxy['host'],self._proxy['port'])): return
+ self.DEBUG("Proxy server contacted, performing authentification",'start')
+ connector = ['CONNECT %s:%s HTTP/1.0'%self._server,
+ 'Proxy-Connection: Keep-Alive',
+ 'Pragma: no-cache',
+ 'Host: %s:%s'%self._server,
+ 'User-Agent: HTTPPROXYsocket/v0.1']
+ if self._proxy.has_key('user') and self._proxy.has_key('password'):
+ credentials = '%s:%s'%(self._proxy['user'],self._proxy['password'])
+ credentials = base64.encodestring(credentials).strip()
+ connector.append('Proxy-Authorization: Basic '+credentials)
+ connector.append('\r\n')
+ self.send('\r\n'.join(connector))
+ try: reply = self.receive().replace('\r','')
+ except IOError:
+ self.DEBUG('Proxy suddenly disconnected','error')
+ self._owner.disconnected()
+ return
+ try: proto,code,desc=reply.split('\n')[0].split(' ',2)
+ except: raise error('Invalid proxy reply')
+ if code<>'200':
+ self.DEBUG('Invalid proxy reply: %s %s %s'%(proto,code,desc),'error')
+ self._owner.disconnected()
+ return
+ while reply.find('\n\n') == -1:
+ try: reply += self.receive().replace('\r','')
+ except IOError:
+ self.DEBUG('Proxy suddenly disconnected','error')
+ self._owner.disconnected()
+ return
+ self.DEBUG("Authentification successfull. Jabber server contacted.",'ok')
+ return 'ok'
+
+ def DEBUG(self,text,severity):
+ """Overwrites DEBUG tag to allow debug output be presented as "CONNECTproxy"."""
+ return self._owner.DEBUG(DBG_CONNECT_PROXY,text,severity)
+
+class TLS(PlugIn):
+ """ TLS connection used to encrypts already estabilished tcp connection."""
+ def PlugIn(self,owner,now=0):
+ """ If the 'now' argument is true then starts using encryption immidiatedly.
+ If 'now' in false then starts encryption as soon as TLS feature is
+ declared by the server (if it were already declared - it is ok).
+ """
+ if owner.__dict__.has_key('TLS'): return # Already enabled.
+ PlugIn.PlugIn(self,owner)
+ DBG_LINE='TLS'
+ if now: return self._startSSL()
+ if self._owner.Dispatcher.Stream.features:
+ try: self.FeaturesHandler(self._owner.Dispatcher,self._owner.Dispatcher.Stream.features)
+ except NodeProcessed: pass
+ else: self._owner.RegisterHandlerOnce('features',self.FeaturesHandler,xmlns=NS_STREAMS)
+ self.starttls=None
+
+ def plugout(self,now=0):
+ """ Unregisters TLS handler's from owner's dispatcher. Take note that encription
+ can not be stopped once started. You can only break the connection and start over."""
+ self._owner.UnregisterHandler('features',self.FeaturesHandler,xmlns=NS_STREAMS)
+ self._owner.UnregisterHandlerOnce('proceed',self.StartTLSHandler,xmlns=NS_TLS)
+ self._owner.UnregisterHandlerOnce('failure',self.StartTLSHandler,xmlns=NS_TLS)
+
+ def FeaturesHandler(self, conn, feats):
+ """ Used to analyse server <features/> tag for TLS support.
+ If TLS is supported starts the encryption negotiation. Used internally"""
+ if not feats.getTag('starttls',namespace=NS_TLS):
+ self.DEBUG("TLS unsupported by remote server.",'warn')
+ return
+ self.DEBUG("TLS supported by remote server. Requesting TLS start.",'ok')
+ self._owner.RegisterHandlerOnce('proceed',self.StartTLSHandler,xmlns=NS_TLS)
+ self._owner.RegisterHandlerOnce('failure',self.StartTLSHandler,xmlns=NS_TLS)
+ self._owner.Connection.send('<starttls xmlns="%s"/>'%NS_TLS)
+ raise NodeProcessed
+
+ def pending_data(self,timeout=0):
+ """ Returns true if there possible is a data ready to be read. """
+ return self._tcpsock._seen_data or select.select([self._tcpsock._sock],[],[],timeout)[0]
+
+ def _startSSL(self):
+ """ Immidiatedly switch socket to TLS mode. Used internally."""
+ """ Here we should switch pending_data to hint mode."""
+ tcpsock=self._owner.Connection
+ tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None)
+ tcpsock._sslIssuer = tcpsock._sslObj.issuer()
+ tcpsock._sslServer = tcpsock._sslObj.server()
+ tcpsock._recv = tcpsock._sslObj.read
+ tcpsock._send = tcpsock._sslObj.write
+
+ tcpsock._seen_data=1
+ self._tcpsock=tcpsock
+ tcpsock.pending_data=self.pending_data
+ tcpsock._sock.setblocking(0)
+
+ self.starttls='success'
+
+ def StartTLSHandler(self, conn, starttls):
+ """ Handle server reply if TLS is allowed to process. Behaves accordingly.
+ Used internally."""
+ if starttls.getNamespace()<>NS_TLS: return
+ self.starttls=starttls.getName()
+ if self.starttls=='failure':
+ self.DEBUG("Got starttls response: "+self.starttls,'error')
+ return
+ self.DEBUG("Got starttls proceed response. Switching to TLS/SSL...",'ok')
+ self._startSSL()
+ self._owner.Dispatcher.PlugOut()
+ dispatcher.Dispatcher().PlugIn(self._owner)
Binary file modules/xmpp/transports.pyc has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/neutron.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,507 @@
+#! /usr/bin/env python
+
+import sys
+import os
+os.chdir(os.path.dirname(sys.argv[0]))
+
+sys.path.insert(1, 'modules')
+
+import xmpp
+import string
+import time
+import thread
+import random
+import types
+import traceback
+import getopt
+
+################################################################################
+
+CONFIGURATION_FILE = 'dynamic/config.cfg'
+
+GENERAL_CONFIG_FILE = 'config.txt'
+
+fp = open(GENERAL_CONFIG_FILE, 'r')
+GENERAL_CONFIG = eval(fp.read())
+fp.close()
+
+SERVER = GENERAL_CONFIG['SERVER']
+PORT = GENERAL_CONFIG['PORT']
+USERNAME = GENERAL_CONFIG['USERNAME']
+PASSWORD = GENERAL_CONFIG['PASSWORD']
+RESOURCE = GENERAL_CONFIG['RESOURCE']
+
+NICKS_CACHE_FILE = 'dynamic/chatnicks.cfg'
+GROUPCHAT_CACHE_FILE = 'dynamic/chatrooms.cfg'
+ACCESS_FILE = 'dynamic/access.cfg'
+PLUGIN_DIR = 'plugins'
+
+DEFAULT_NICK = GENERAL_CONFIG['DEFAULT_NICK']
+ADMINS = GENERAL_CONFIG['ADMINS']
+ADMIN_PASSWORD = GENERAL_CONFIG['ADMIN_PASSWORD']
+
+AUTO_RESTART = GENERAL_CONFIG['AUTO_RESTART']
+
+PUBLIC_LOG_DIR = GENERAL_CONFIG['PUBLIC_LOG_DIR']
+PRIVATE_LOG_DIR = GENERAL_CONFIG['PRIVATE_LOG_DIR']
+
+INITSCRIPT_FILE = GENERAL_CONFIG['INITSCRIPT_FILE']
+
+
+################################################################################
+
+COMMANDS = {}
+
+GROUPCHATS = {}
+
+MESSAGE_HANDLERS = []
+OUTGOING_MESSAGE_HANDLERS = []
+JOIN_HANDLERS = []
+LEAVE_HANDLERS = []
+IQ_HANDLERS = []
+PRESENCE_HANDLERS = []
+GROUPCHAT_INVITE_HANDLERS = []
+
+COMMAND_HANDLERS = {}
+
+ACCESS = {}
+
+JCON = None
+
+CONFIGURATION = {}
+
+################################################################################
+
+optlist, args = getopt.getopt(sys.argv[1:], '', ['pid='])
+for opt_tuple in optlist:
+ if opt_tuple[0] == '--pid':
+ pid_filename = opt_tuple[1]
+ fp = open(pid_filename, 'w')
+ fp.write(str(os.getpid()))
+ fp.close()
+
+################################################################################
+
+def initialize_file(filename, data=''):
+ if not os.access(filename, os.F_OK):
+ fp = file(filename, 'w')
+ if data:
+ fp.write(data)
+ fp.close()
+
+def read_file(filename):
+ fp = file(filename)
+ data = fp.read()
+ fp.close()
+ return data
+
+def write_file(filename, data):
+ fp = file(filename, 'w')
+ fp.write(data)
+ fp.close()
+
+################################################################################
+
+initialize_file(CONFIGURATION_FILE, '{}')
+try:
+ CONFIGURATION = eval(read_file(CONFIGURATION_FILE))
+except:
+ print 'Error Parsing Configuration File'
+
+def config_get(category, key):
+ if CONFIGURATION.has_key(category):
+ if CONFIGURATION[category].has_key(key):
+ return CONFIGURATION[category][key]
+ else:
+ return None
+ else:
+ return None
+
+def config_set(category, key, value):
+ if not CONFIGURATION.has_key(category):
+ CONFIGURATION[category] = {}
+ CONFIGURATION[category][key] = value
+ config_string = '{\n'
+ for category in CONFIGURATION.keys():
+ config_string += repr(category) + ':\n'
+ for key in CONFIGURATION[category].keys():
+ config_string += '\t' + repr(key) + ': ' + repr(CONFIGURATION[category][key]) + '\n'
+ config_string += '\n'
+ config_string += '}'
+ write_file(CONFIGURATION_FILE, config_string)
+
+################################################################################
+
+def register_message_handler(instance):
+ MESSAGE_HANDLERS.append(instance)
+def register_outgoing_message_handler(instance):
+ OUTGOING_MESSAGE_HANDLERS.append(instance)
+def register_join_handler(instance):
+ JOIN_HANDLERS.append(instance)
+def register_leave_handler(instance):
+ LEAVE_HANDLERS.append(instance)
+def register_iq_handler(instance):
+ IQ_HANDLERS.append(instance)
+def register_presence_handler(instance):
+ PRESENCE_HANDLERS.append(instance)
+def register_groupchat_invite_handler(instance):
+ GROUPCHAT_INVITE_HANDLERS.append(instance)
+
+def register_command_handler(instance, command, access=0, description='', syntax='', examples=[]):
+ COMMAND_HANDLERS[command] = instance
+ COMMANDS[command] = {'access': access, 'description': description, 'syntax': syntax, 'examples': examples}
+
+def call_message_handlers(type, source, body):
+ for handler in MESSAGE_HANDLERS:
+ thread.start_new(handler, (type, source, body))
+def call_outgoing_message_handlers(target, body):
+ for handler in OUTGOING_MESSAGE_HANDLERS:
+ thread.start_new(handler, (target, body))
+def call_join_handlers(groupchat, nick):
+ for handler in JOIN_HANDLERS:
+ thread.start_new(handler, (groupchat, nick))
+def call_leave_handlers(groupchat, nick):
+ for handler in LEAVE_HANDLERS:
+ thread.start_new(handler, (groupchat, nick))
+def call_iq_handlers(iq):
+ for handler in IQ_HANDLERS:
+ thread.start_new(handler, (iq,))
+def call_presence_handlers(prs):
+ for handler in PRESENCE_HANDLERS:
+ thread.start_new(handler, (prs,))
+def call_groupchat_invite_handlers(source, groupchat, body):
+ for handler in GROUPCHAT_INVITE_HANDLERS:
+ thread.start_new(handler, (source, groupchat, body))
+
+def call_command_handlers(command, type, source, parameters):
+ if COMMAND_HANDLERS.has_key(command):
+ if has_access(source, COMMANDS[command]['access']):
+ thread.start_new(COMMAND_HANDLERS[command], (type, source, parameters))
+ else:
+ smsg(type, source, 'Unauthorized')
+
+################################################################################
+
+def find_plugins():
+ valid_plugins = []
+ possibilities = os.listdir('plugins')
+ for possibility in possibilities:
+ if possibility[-3:].lower() == '.py':
+ try:
+ fp = file(PLUGIN_DIR + '/' + possibility)
+ data = fp.read(20)
+ if data == '#$ neutron_plugin 01':
+ valid_plugins.append(possibility)
+ except:
+ pass
+ return valid_plugins
+
+def load_plugins():
+ valid_plugins = find_plugins()
+ for valid_plugin in valid_plugins:
+ try:
+ print 'Plugin: ' + valid_plugin
+ #execfile(PLUGIN_DIR + '/' + valid_plugin)
+ fp = file(PLUGIN_DIR + '/' + valid_plugin)
+ exec fp in globals()
+ fp.close()
+ except:
+ raise
+
+def load_initscript():
+ print 'Executing Init Script'
+ fp = file(INITSCRIPT_FILE)
+ exec fp in globals()
+ fp.close()
+
+
+################################################################################
+
+def get_true_jid(jid):
+ true_jid = ''
+ if type(jid) is types.ListType:
+ jid = jid[0]
+ if type(jid) is types.InstanceType:
+ jid = unicode(jid) # str(jid)
+ stripped_jid = string.split(jid, '/', 1)[0]
+ resource = ''
+ if len(string.split(jid, '/', 1)) == 2:
+ resource = string.split(jid, '/', 1)[1]
+ if GROUPCHATS.has_key(stripped_jid):
+ if GROUPCHATS[stripped_jid].has_key(resource):
+ true_jid = string.split(unicode(GROUPCHATS[stripped_jid][resource]['jid']), '/', 1)[0]
+ else:
+ true_jid = stripped_jid
+ else:
+ true_jid = stripped_jid
+ return true_jid
+
+def get_groupchat(jid):
+ if type(jid) is types.ListType:
+ jid = jid[1]
+ jid = string.split(unicode(jid), '/')[0] # str(jid)
+ if GROUPCHATS.has_key(jid):
+ return jid
+ else:
+ return None
+
+def get_nick(groupchat):
+ try:
+ nicks_string = read_file(NICKS_CACHE_FILE)
+ except:
+ fp = file(NICKS_CACHE_FILE, 'w')
+ fp.write('{}')
+ fp.close()
+ nicks_string = '{}'
+ print 'Initializing ' + NICKS_CACHE_FILE
+ nicks = eval(nicks_string)
+ if nicks.has_key(groupchat):
+ return nicks[groupchat]
+ else:
+ return DEFAULT_NICK
+
+def set_nick(groupchat, nick=None):
+ nicks = eval(read_file(NICKS_CACHE_FILE))
+ if nick:
+ nicks[groupchat] = nick
+ elif groupchat:
+ del nicks[groupchat]
+ fp = file(NICKS_CACHE_FILE, 'w')
+ fp.write(str(nicks))
+ fp.close()
+
+################################################################################
+
+def get_access_levels():
+ global ACCESS
+ initialize_file(ACCESS_FILE, '{}')
+ ACCESS = eval(read_file(ACCESS_FILE))
+ for jid in ADMINS:
+ change_access_perm(jid, 100)
+ for jid in ACCESS.keys():
+ if ACCESS[jid] == 0:
+ del ACCESS[jid]
+ write_file(ACCESS_FILE , str(ACCESS))
+
+def change_access_temp(source, level=0):
+ global ACCESS
+ jid = get_true_jid(source)
+ try:
+ level = int(level)
+ except:
+ level = 0
+ ACCESS[jid] = level
+
+def change_access_perm(source, level=0):
+ global ACCESS
+ jid = get_true_jid(source)
+ try:
+ level = int(level)
+ except:
+ level = 0
+ temp_access = eval(read_file(ACCESS_FILE))
+ temp_access[jid] = level
+ write_file(ACCESS_FILE, str(temp_access))
+ ACCESS[jid] = level
+
+def user_level(source):
+ global ACCESS
+ jid = get_true_jid(source)
+ if ACCESS.has_key(jid):
+ return ACCESS[jid]
+ else:
+ return 0
+
+def has_access(source, required_level):
+ jid = get_true_jid(source)
+ if user_level(jid) >= required_level:
+ return 1
+ return 0
+
+################################################################################
+
+def join_groupchat(groupchat, nick=None):
+ if nick:
+ set_nick(groupchat, nick)
+ else:
+ nick = get_nick(groupchat)
+ JCON.send(xmpp.Presence(groupchat + '/' + nick))
+ if not GROUPCHATS.has_key(groupchat):
+ GROUPCHATS[groupchat] = {}
+ write_file(GROUPCHAT_CACHE_FILE, str(GROUPCHATS.keys()))
+
+def leave_groupchat(groupchat):
+ JCON.send(xmpp.Presence(groupchat, 'unavailable'))
+ if GROUPCHATS.has_key(groupchat):
+ del GROUPCHATS[groupchat]
+ write_file(GROUPCHAT_CACHE_FILE, str(GROUPCHATS.keys()))
+
+def msg(target, body):
+ msg = xmpp.Message(target, body)
+ if GROUPCHATS.has_key(target):
+ msg.setType('groupchat')
+ else:
+ msg.setType('chat')
+ JCON.send(msg)
+ call_outgoing_message_handlers(target, body)
+
+def smsg(type, source, body):
+ if type == 'public':
+ msg(source[1], source[2] + ': ' + body)
+ elif type == 'private':
+ msg(source[0], body)
+
+def isadmin(jid):
+ admin_list = ADMINS
+ if type(jid) is types.ListType:
+ jid = jid[0]
+ jid = str(jid)
+ stripped_jid = string.split(jid, '/', 1)[0]
+ resource = ''
+ if len(string.split(jid, '/', 1)) == 2:
+ resource = string.split(jid, '/', 1)[1]
+ if stripped_jid in admin_list:
+ return 1
+ elif GROUPCHATS.has_key(stripped_jid):
+ if GROUPCHATS[stripped_jid].has_key(resource):
+ if string.split(GROUPCHATS[stripped_jid][resource]['jid'], '/', 1)[0] in admin_list:
+ return 1
+ return 0
+
+################################################################################
+
+def messageCB(con, msg):
+ msgtype = msg.getType()
+ body = msg.getBody()
+ fromjid = msg.getFrom()
+ command = ''
+ parameters = ''
+ if body and string.split(body):
+ command = string.lower(string.split(body)[0])
+ if body.count(' '):
+ parameters = body[(body.find(' ') + 1):]
+ if not msg.timestamp:
+ if msgtype == 'groupchat':
+ call_message_handlers('public', [fromjid, fromjid.getStripped(), fromjid.getResource()], body)
+ if command in COMMANDS:
+ call_command_handlers(command, 'public', [fromjid, fromjid.getStripped(), fromjid.getResource()], parameters)
+ else:
+ call_message_handlers('private', [fromjid, fromjid.getStripped(), fromjid.getResource()], body)
+ if command in COMMANDS:
+ call_command_handlers(command, 'private', [fromjid, fromjid.getStripped(), fromjid.getResource()], parameters)
+ for x_node in msg.getTags('x', {}, 'jabber:x:conference'):
+ inviter_jid = None
+ muc_inviter_tag = msg.getTag('x', {}, 'http://jabber.org/protocol/muc#user')
+ if muc_inviter_tag:
+ if muc_inviter_tag.getTag('invite'):
+ if muc_inviter_tag.getTag('invite').getAttr('from'):
+ inviter_jid = xmpp.JID(muc_inviter_tag.getTag('invite').getAttr('from'))
+ if not inviter_jid:
+ inviter_jid = fromjid
+ call_groupchat_invite_handlers([inviter_jid, inviter_jid.getStripped(), inviter_jid.getResource()], x_node.getAttr('jid'), body)
+
+def presenceCB(con, prs):
+ call_presence_handlers(prs)
+ type = prs.getType()
+ groupchat = prs.getFrom().getStripped()
+ nick = prs.getFrom().getResource()
+
+ if groupchat in GROUPCHATS:
+ if type == 'available' or type == None:
+ if not GROUPCHATS[groupchat].has_key(nick):
+ GROUPCHATS[groupchat][nick] = {'jid': prs.getFrom(), 'idle': time.time()}
+ call_join_handlers(groupchat, nick)
+ time.sleep(0.5)
+ elif type == 'unavailable':
+ if GROUPCHATS[groupchat].has_key(nick):
+ call_leave_handlers(groupchat, nick)
+ del GROUPCHATS[groupchat][nick]
+ elif type == 'error':
+ try:
+ code = prs.asNode().getTag('error').getAttr('code')
+ except:
+ code = None
+ if code == '409': # name conflict
+ join_groupchat(groupchat, nick + '_')
+ time.sleep(0.5)
+
+def iqCB(con, iq):
+ call_iq_handlers(iq)
+
+def dcCB():
+ print 'DISCONNECTED'
+ if AUTO_RESTART:
+ print 'WAITING FOR RESTART...'
+ time.sleep(240) # sleep for 240 seconds
+ print 'RESTARTING'
+ os.execl(sys.executable, sys.executable, sys.argv[0])
+ else:
+ sys.exit(0)
+
+################################################################################
+
+def start():
+ global JCON
+ JCON = xmpp.Client(server=SERVER, port=PORT, debug=[])
+
+ get_access_levels()
+ load_plugins()
+ load_initscript()
+
+ if JCON.connect():
+ print "Connected"
+ else:
+ print "Couldn't connect"
+ sys.exit(1)
+
+ if JCON.auth(USERNAME, PASSWORD, RESOURCE):
+ print 'Logged In'
+ else:
+ print "eek -> ", JCON.lastErr, JCON.lastErrCode
+ sys.exit(1)
+
+ JCON.RegisterHandler('message', messageCB)
+ JCON.RegisterHandler('presence', presenceCB)
+ JCON.RegisterHandler('iq', iqCB)
+ JCON.RegisterDisconnectHandler(dcCB)
+ JCON.UnregisterDisconnectHandler(JCON.DisconnectHandler)
+
+ JCON.getRoster()
+ JCON.sendInitPresence()
+ print 'Presence Sent'
+
+ initialize_file(GROUPCHAT_CACHE_FILE, '[]')
+ groupchats = eval(read_file(GROUPCHAT_CACHE_FILE))
+ for groupchat in groupchats:
+ join_groupchat(groupchat)
+ time.sleep(0.5)
+
+ while 1:
+ JCON.Process(10)
+
+if __name__ == "__main__":
+ try:
+ start()
+ except KeyboardInterrupt:
+ print '\nINTERUPT'
+ sys.exit(1)
+ except:
+ if AUTO_RESTART:
+ if sys.exc_info()[0] is not SystemExit:
+ traceback.print_exc()
+ try:
+ JCON.disconnected()
+ except IOError:
+ # IOError is raised by default DisconnectHandler
+ pass
+ try:
+ time.sleep(3)
+ except KeyboardInterrupt:
+ print '\nINTERUPT'
+ sys.exit(1)
+ print 'RESTARTING'
+ os.execl(sys.executable, sys.executable, sys.argv[0])
+ else:
+ raise
+
+#EOF
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/neutron.rc Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,8 @@
+# Neutron Init script
+
+#rss_add_channel('jsf', 'http://www.jabber.org/news/rss.xml')
+#rss_add_channel('jplanet', 'http://planet.jabber.org/rss20.xml')
+#rss_add_channel('slashdot', 'http://www.slashdot.org/slashdot.rdf')
+#rss_subscribe('jsf', 'jabber@conf.jabber.comm')
+
+thread.start_new(rss_query_channels_loop, ())
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/neutron.sh Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+NEUTRON=./neutron.py
+
+PIDPATH=.
+PIDFILE=$PIDPATH/neutron.pid
+
+case "$1" in
+ start)
+ echo -n "Starting Neutron: "
+ if ([[ -w $PIDFILE ]])
+ then
+ echo "ERROR: Neutron already started (PID file found)"
+ exit 1
+ fi
+ $NEUTRON --pid=$PIDFILE >/dev/null &
+ echo "done"
+ ;;
+ stop)
+ echo -n "Stopping Neutron: "
+ if !([[ -w $PIDFILE ]])
+ then
+ echo "ERROR: Neutron is not running (PID file not found)"
+ exit 1
+ fi
+ kill `cat $PIDFILE`
+ rm $PIDFILE
+ echo "done"
+ ;;
+ *)
+ echo "Usage: $0 {start|stop}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/admin_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,57 @@
+#$ neutron_plugin 01
+
+def admin_groupchat_invite_handler(source, groupchat, body):
+ if has_access(source, COMMANDS['!join']['access']):
+ join_groupchat(groupchat)
+
+def handler_admin_join(type, source, parameters):
+ if parameters:
+ if len(string.split(parameters)) > 1:
+ (groupchat, nick) = string.split(parameters.lstrip(), ' ', 1)
+ else:
+ groupchat = parameters.strip()
+ nick = DEFAULT_NICK
+ smsg(type, source, 'Joined ' + groupchat)
+ join_groupchat(groupchat, nick)
+ else:
+ smsg(type, source, 'Invalid Syntax')
+
+def handler_admin_leave(type, source, parameters):
+ if len(string.split(parameters)) > 0:
+ groupchat = parameters.strip()
+ else:
+ groupchat = source[1]
+ leave_groupchat(groupchat)
+ smsg(type, source, 'Left ' + groupchat)
+
+
+def handler_admin_msg(type, source, parameters):
+ msg(string.split(parameters)[0], string.join(string.split(parameters)[1:]))
+ smsg(type, source, 'Message Sent')
+
+def handler_admin_say(type, source, parameters):
+ if parameters:
+ msg(source[1], parameters)
+ else:
+ smsg(type, source, 'Enter Message')
+
+def handler_admin_restart(type, source, parameters):
+ #os.startfile(sys.argv[0])
+ smsg(type, source, 'Restarting')
+ JCON.disconnect()
+ os.execv('./neutron.py', sys.argv)
+
+def handler_admin_exit(type, source, parameters):
+ #os.startfile(sys.argv[0])
+ smsg(type, source, 'Exiting')
+ JCON.disconnect()
+ os.abort()
+
+register_command_handler(handler_admin_join, '!join', 100, 'Joins specified groupchat.', '!join <groupchat> [nick]', ['!join jabber@conference.jabber.org', '!join jdev@conference.jabber.org neutron2'])
+register_command_handler(handler_admin_leave, '!leave', 100, 'Joins specified (or current) groupchat.', '!leave [groupchat]', ['!leave jabber@conference.jabber.org', '!leave'])
+#register_command_handler(handler_admin_msg, '!msg' ,100, 'Sends a message to specified JID.', '!msg <jid> <message>', ['!msg mikem@jabber.org hey mike!'])
+#register_command_handler(handler_admin_say, '!say', 100, 'Sends a message to current groupchat or to your JID if message is not through groupchat.', '!say <message>', ['!say hi'])
+register_command_handler(handler_admin_restart, '!restart', 100, 'Restarts me.', '!restart', ['!restart'])
+register_command_handler(handler_admin_exit, '!exit', 100, 'Exits completely.', '!exit', ['!exit'])
+
+register_groupchat_invite_handler(admin_groupchat_invite_handler)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/babel_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,112 @@
+#$ neutron_plugin 01
+
+import babelizer
+import russian
+
+def handler_babel_babel(type, source, parameters):
+ splitdata = string.split(parameters)
+ if len(splitdata) >= 3:
+ from_lang = splitdata[0]
+ to_lang = splitdata[1]
+ body = string.join(splitdata[2:])
+ try:
+ reply = babelizer.translate(body, from_lang, to_lang)
+ except babelizer.LanguageNotAvailableError:
+ reply = 'Invalid Language'
+ except babelizer.BabelfishChangedError:
+ print str(sys.exc_info()[0]) + ' - ' + str(sys.exc_info()[1])
+ reply = 'Unknown Error'
+ else:
+ reply = 'Syntax Error'
+ if not reply:
+ reply = 'No Results'
+ reply = unicode(reply, 'utf-8')
+ smsg(type, source, reply)
+
+def handler_babel_tre(type, source, parameters):
+ handler_babel_babel(type, source, u'russian english ' + parameters)
+
+def handler_babel_translate(type, source, parameters):
+ splitdata = string.split(parameters)
+ if len(splitdata) >= 3:
+ from_lang = splitdata[0]
+ to_lang = splitdata[1]
+ body = string.join(splitdata[2:])
+ try:
+ reply = russian.translate(body, from_lang, to_lang)
+ except russian.LanguageNotAvailableError:
+ reply = 'Invalid Language'
+ except russian.BabelfishChangedError:
+ print str(sys.exc_info()[0]) + ' - ' + str(sys.exc_info()[1])
+ reply = 'Unknown Error'
+ else:
+ reply = 'Syntax Error'
+ if not reply:
+ reply = 'No Results'
+ smsg(type, source, reply)
+
+def handler_babel_enru(type, source, parameters):
+ handler_babel_translate(type, source, u'e r ' + parameters)
+
+def handler_babel_babelize(type, source, parameters):
+ splitdata = string.split(parameters)
+ if len(splitdata) >= 3:
+ from_lang = splitdata[0]
+ through_lang = splitdata[1]
+ body = string.join(splitdata[2:])
+ try:
+ results = babelizer.babelize(body, from_lang, through_lang)
+ reply = ''
+ for result in results:
+ reply += '\n' + result
+ except babelizer.LanguageNotAvailableError:
+ reply = 'Invalid Language'
+ except babelizer.BabelfishChangedError:
+ print str(sys.exc_info()[0]) + ' - ' + str(sys.exc_info()[1])
+ reply = 'Unknown Error'
+ else:
+ reply = 'Syntax Error'
+ if not reply:
+ reply = 'No Results'
+ smsg(type, source, reply)
+
+def handler_babel_esperanto(type, source, parameters):
+ formdata = 'al=2&de=3&al-k=4&teksto=' + urllib.quote(parameters)
+ import socket
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ s.connect(('lingvo.org', 80))
+ s.send("""POST /cgi-bin/eoxx/eoxx HTTP/1.1
+User-Agent: Mozilla/5.0 (compatible; Konqueror/3; Linux 2.4.18)
+Pragma: no-cache
+Cache-control: no-cache
+Accept: text/*, image/jpeg, image/png, image/*, */*
+Accept-Encoding: x-gzip, gzip, identity
+Accept-Charset: ISO-8859-1, utf-8;q=0.5, *;q=0.5
+Accept-Language: en, POSIX
+Host: lingvo.org
+Content-Type: application/x-www-form-urlencoded
+Content-Length: """ + str(len(formdata)) + '\n\n' + formdata + '\n\n')
+ pagedata = s.recv(1024)
+ s.close()
+ #formdata = urllib.urlencode({'al': '2', 'de': '3', 'al-k': '4', 'teksto': parameters})
+ #f = urllib.urlopen('http://lingvo.org/cgi-bin/eoxx/eoxx', formdata)
+ #pagedata = f.read()
+ #print pagedata
+ try:
+ reply = string.split(string.split(pagedata, 'lang="en">')[1], '</font>')[0].strip()
+ except:
+ reply = 'Unknown Error'
+ smsg(type, source, reply)
+
+register_command_handler(handler_babel_babel, '!babel', 0, 'Translate a phrase from one language to another using AltaVista BabelFish.', '!babel <fromlang> <tolang> <phrase>', ['!babel english spanish hello', '!babel fr en bonjour'])
+
+register_command_handler(handler_babel_translate, '!translate', 0, 'Translate a phrase from one language to another using translate.ru.', '!translate <fromlang> <tolang> <phrase>', ['!translate e s hello', '!translate f e bonjour'])
+
+# examples: register_command_handler(handler_babel_tre, '!tre', 0, 'Translate a phrase from Russian to English (shortcut).', '!tre <phrase>', ['!tre ????????'])
+
+# register_command_handler(handler_babel_enru, '!enru', 0, 'Translate a phrase from English to Russian (shortcut).', '!enru <phrase>', ['!enru the tortoise'])
+
+# register_command_handler(handler_babel_esperanto, '!esperanto', 0, 'Translate a phrase from Esperanto to English.', '!esperanto <phrase>', ['!esperanto Saluton!'])
+
+#register_command_handler(handler_babel_babelize, '!babelize', 0, 'Translate a phrase back and forth from one language to another (gives interesting results).', '!babelize <fromlang> <throughlang> <phrase>', ['!babelize english spanish hello'])
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/chat_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,25 @@
+#$ neutron_plugin 01
+
+def chat_personal(type, source, body):
+ replies = ['What\'s that?', 'I don\'t understand.', 'Huh... Pardon?']
+ reply = random.choice(replies)
+ if type == 'public':
+ if source[1]:
+ smsg(type, source, reply)
+ elif type == 'private':
+ smsg(type, source, reply)
+
+def handler_chat_message(type, source, body):
+ if type == 'public':
+ firstword = string.split(body)[0]
+ if string.split(string.split(firstword, '_')[0], ':')[0].lower() == 'mcbot' and firstword[-1] == ':':
+ if len(string.split(body)) > 1:
+ parameters = body[(body.find(' ') + 1):]
+ else:
+ parameters = ''
+ chat_personal(type, source, parameters)
+ elif type == 'private':
+ if not COMMANDS.has_key(string.split(body)[0]):
+ chat_personal(type, source, body)
+
+register_message_handler(handler_chat_message)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/dict_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,25 @@
+#$ neutron_plugin 01
+
+import DICT
+import urllib
+
+def handler_dict_define(type, source, parameters):
+ dc = DICT.DictConnection('dict.org')
+ try:
+ results = dc.get_definition(parameters.strip())
+ if len(results):
+ #reply = string.join(results[0], '\n')
+ reply = 'http://www.dict.org/bin/Dict?Form=Dict1&Query=' + urllib.quote(parameters) + '&Strategy=*&Database=*'
+ for result in results[:3]:
+ reply += '\n\n' + string.join(result[:8], '\n')[:500][4:]
+ if len(result) > 8:
+ reply += ' . . .'
+ reply = reply.replace('\n\n\n', '\n\n')
+ else:
+ reply = 'No Results'
+ except:
+ raise
+ reply = 'Error'
+ smsg(type, source, reply.rstrip())
+
+register_command_handler(handler_dict_define, 'dict', 0, 'Defines a word using the DICT protocol.', 'dict <word>', ['dict jabber'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/access_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,40 @@
+#$ neutron_plugin 01
+
+def handler_access_login(type, source, parameters):
+ if type == 'public':
+ smsg(type, source, 'Please login privately so others do not see the password.')
+ elif type == 'private':
+ jid = get_true_jid(source)
+ if parameters.strip() == ADMIN_PASSWORD:
+ change_access_temp(jid, 100)
+ smsg(type, source, 'Access Granted')
+ else:
+ smsg(type, source, 'Access Denied')
+
+def handler_access_logout(type, source, parameters):
+ jid = get_true_jid(source)
+ change_access_temp(jid, 0)
+ smsg(type, source, 'Successfully Logged Out')
+
+def handler_access_view_access(type, source, parameters):
+ if not parameters.strip():
+ smsg(type, source, str(user_level(source)))
+ else:
+ smsg(type, source, str(user_level(parameters)))
+
+def handler_access_set_access(type, source, parameters):
+ splitdata = string.split(parameters)
+ if len(splitdata) == 2:
+ change_access_temp(splitdata[0], splitdata[1])
+ smsg(type, source, 'Temporary Access Change Successful')
+ elif len(splitdata) == 3:
+ change_access_perm(splitdata[0], splitdata[1])
+ smsg(type, source, 'Permanent Access Change Successful')
+ else:
+ smsg(type, source, 'Invalid Syntax')
+
+
+register_command_handler(handler_access_login, '!login', 0, 'Logs in as admin.', '!login <password>', ['!login mypassword'])
+register_command_handler(handler_access_login, '!logout', 0, 'Logs out of admin.', '!logout', ['!logout'])
+register_command_handler(handler_access_view_access, '!view_access', 0, 'Returns access level of specified JID. JID defaults to requester.', '!view_access [JID]', ['!view_access', '!view_access mikem@jabber.org'])
+register_command_handler(handler_access_set_access, '!set_access', 100, 'Sets the access level of specified JID to specified level. If a third parameter is defined, the change will be permanent, otherwise it will reset when Neutron exits.', '!set_access <JID> <level#> [permanent]', ['!set_access mikem@jabber.org 100', '!set_access mikem@jabber.org 100 blabla'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/chatbot_nick_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,8 @@
+#$ neutron_plugin 01
+
+def handler_chatbot_nick_leave(groupchat, nick):
+ if nick == 'ChatBot':
+ join_groupchat(groupchat, 'ChatBot')
+ msg(groupchat, 'Take that, ChatBot!')
+
+#register_leave_handler(handler_chatbot_nick_leave)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/dns_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,27 @@
+#$ neutron_plugin 01
+
+import socket
+
+def dns_query(query):
+ try:
+ int(query[-1])
+ except ValueError:
+ try:
+ return socket.gethostbyname(query)
+ except socket.gaierror:
+ return 'Unable to Resolve'
+ else:
+ try:
+ (hostname, aliaslist, ipaddrlist) = socket.gethostbyaddr(query)
+ except socket.herror:
+ return 'Unable to Resolve'
+ return hostname + ' ' + string.join(aliaslist) + ' ' + string.join(aliaslist)
+
+def handler_dns_dns(type, source, parameters):
+ if parameters.strip():
+ result = dns_query(parameters)
+ smsg(type, source, result)
+ else:
+ smsg(type, source, 'Invalid Syntax')
+
+register_command_handler(handler_dns_dns, '!dns', 0, 'Returns the DNS lookup for a host or IP address.', '!dns <host/IP>', ['!dns jabber.org', '!dns 127.0.0.1'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/domain_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,18 @@
+#$ neutron_plugin 01
+
+import rwhois
+
+def handler_domain_domain(type, source, parameters):
+ rec = rwhois.WhoisRecord(parameters)
+ try:
+ rec.whois()
+ reply = 'Registered'
+ except 'NoSuchDomain', reason:
+ reply = 'AVAILABLE'
+ except socket.error, (ecode,reason):
+ reply = 'Socket Error'
+ except "TimedOut", reason:
+ reply = 'Timed Out'
+ smsg(type, source, reply)
+
+register_command_handler(handler_domain_domain, '!domain', 0, 'Returns information on specified domain.', '!domain <domain>', ['!domain jabber.org'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/eliza_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,13 @@
+#$ neutron_plugin 01
+
+import eliza
+therapist = eliza.eliza()
+
+def handler_eliza_en(type,source, body):
+
+ if type == 'public' and get_nick(source[1])!=source[2] and source[2]!='' and re.search('^'+get_nick(source[1])+':',body)!=None:
+ result=therapist.respond(body.replace(get_nick(source[1])+':','').strip())
+ smsg(type,source, result)
+ pass
+
+register_message_handler(handler_eliza_en)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/google_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,43 @@
+#$ neutron_plugin 01
+
+import google
+
+def google_remove_html(text):
+ nobold = text.replace('<b>', '').replace('</b>', '')
+ nobreaks = nobold.replace('<br>', ' ')
+ noescape = nobreaks.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"')
+ return noescape
+
+def google_search(query):
+ data = google.doGoogleSearch(query)
+ try:
+ first = data.results[0]
+ url = first.URL
+ title = google_remove_html(first.title)
+ if first.summary:
+ summary = google_remove_html(first.summary)
+ else:
+ summary = google_remove_html(first.snippet)
+ searchtime = str(round(data.meta.searchTime, 3))
+ total = str(data.meta.estimatedTotalResultsCount)
+ return url + ' - ' + title + ' - ' + summary + ' (' + searchtime + 'sec) (' + total + ' sites)'
+ except:
+ return 'No Results'
+
+def handler_google_google(type, source, parameters):
+ results = google_search(parameters)
+ smsg(type, source, results)
+
+def handler_google_spell(type, source, parameters):
+ correction = google.doSpellingSuggestion(parameters)
+ if not correction:
+ correction = 'No Suggestion'
+ smsg(type, source, correction)
+
+def handler_google_jepsearch(type, source, parameters):
+ results = google_search(parameters + ' site:www.xmpp.org "/exensions/xep-"')
+ smsg(type, source, results)
+
+register_command_handler(handler_google_google, '!google', 0, 'Looks up search terms on google.', '!google <query>', ['!google "mike mintz"'])
+register_command_handler(handler_google_spell, '!spell', 0, 'Returns a spelling suggestion from google.', '!spell <query>', ['!spell "pithon nutron"'])
+register_command_handler(handler_google_jepsearch, '!jepsearch', 0, 'Searches google for a JEP.', '!jep <query>', ['!google "jep-0001"'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/log_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,172 @@
+#$ neutron_plugin 01
+
+import re
+
+LOG_CACHE_FILE = 'dynamic/logcache.txt'
+
+initialize_file(LOG_CACHE_FILE, '{}')
+LOG_FILENAME_CACHE = eval(read_file(LOG_CACHE_FILE))
+
+def log_write_header(fp, source, (year, month, day, hour, minute, second, weekday, yearday, daylightsavings)):
+ fp.write("""<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<style type="text/css">
+<!--
+.timestamp {color: #AAAAAA;}
+.system {color: #009900; font-weight: bold;}
+.emote {color: #AA0099;}
+.self {color: #CC0000;}
+.normal {color: #0000AA;}
+h1 { color: #336699; font-family: sans-serif; border-bottom: #224466 solid 3pt; letter-spacing: 3px; margin-left: 20pt; }
+h2 { color: #663399; font-family: sans-serif; letter-spacing: 2px; text-align: center }
+//-->
+</style>
+</head>
+<body>
+<div style="color: #AAAAAA; text-align: right; font-family: monospace; letter-spacing: 3px">neutron log</div>
+<h1>""" + source + """</h1>
+<h2>""" + time.strftime('%A, %B %d, %Y', (year, month, day, hour, minute, second, weekday, yearday, daylightsavings)) + """</h2>
+<br />
+<tt>
+
+""")
+
+def log_write_footer(fp):
+ fp.write('\n</tt>\n</body>\n</html>')
+
+def log_get_fp(type, source, (year, month, day, hour, minute, second, weekday, yearday, daylightsavings)):
+ if type == 'public':
+ logdir = PUBLIC_LOG_DIR
+ else:
+ logdir = PRIVATE_LOG_DIR
+ if logdir[-1] == '/':
+ logdir = LOGDIR[:-1]
+ str_year = str(year)
+ str_month = str(month)
+ str_day = str(day)
+ filename = logdir + '/' + source + '/' + str_year + '/' + str_month + '/' + str_day + '.html'
+ alt_filename = logdir + '/' + source + '/' + str_year + '/' + str_month + '/' + str_day + '_alt.html'
+ if not os.path.exists(logdir):
+ os.mkdir(logdir)
+ if not os.path.exists(logdir + '/' + source):
+ os.mkdir(logdir + '/' + source)
+ if not os.path.exists(logdir + '/' + source + '/' + str_year):
+ os.mkdir(logdir + '/' + source + '/' + str_year)
+ if not os.path.exists(logdir + '/' + source + '/' + str_year + '/' + str_month):
+ os.mkdir(logdir + '/' + source + '/' + str_year + '/' + str_month)
+ if LOG_FILENAME_CACHE.has_key(source):
+ if LOG_FILENAME_CACHE[source] != filename:
+ fp_old = file(LOG_FILENAME_CACHE[source], 'a')
+ log_write_footer(fp_old)
+ fp_old.close()
+ if os.path.exists(filename):
+ fp = file(filename, 'a')
+ return fp
+ else:
+ LOG_FILENAME_CACHE[source] = filename
+ write_file(LOG_CACHE_FILE, str(LOG_FILENAME_CACHE))
+ fp = file(filename, 'w')
+ log_write_header(fp, source, (year, month, day, hour, minute, second, weekday, yearday, daylightsavings))
+ return fp
+ else:
+ if os.path.exists(filename):
+ LOG_FILENAME_CACHE[source] = filename
+ write_file(LOG_CACHE_FILE, str(LOG_FILENAME_CACHE))
+ fp = file(alt_filename, 'a')
+ # log_write_header(fp, source, (year, month, day, hour, minute, second, weekday, yearday, daylightsavings))
+ return fp
+ else:
+ LOG_FILENAME_CACHE[source] = filename
+ write_file(LOG_CACHE_FILE, str(LOG_FILENAME_CACHE))
+ fp = file(filename, 'w')
+ log_write_header(fp, source, (year, month, day, hour, minute, second, weekday, yearday, daylightsavings))
+ return fp
+
+def log_get_timestamp(hour, minute):
+ timestamp = '['
+ if hour < 10:
+ timestamp += '0'
+ timestamp += str(hour)
+ timestamp += ':'
+ if minute < 10:
+ timestamp += '0'
+ timestamp += str(minute)
+ timestamp += ']'
+ return timestamp
+
+def log_regex_url(matchobj):
+ # 06.03.05(Sun) slipstream@yandex.ru urls parser
+ return '<a href="' + matchobj.group(0) + '">' + matchobj.group(0) + '</a>'
+
+def log_handler_message(type, source, body):
+ if not body:
+ return
+ (year, month, day, hour, minute, second, weekday, yearday, daylightsavings) = time.gmtime()
+ if type == 'public' and PUBLIC_LOG_DIR:
+ groupchat = source[1]
+ nick = source[2]
+ # 06.03.05(Sun) slipstream@yandex.ru urls parser & line ends
+ body = body.replace('&', '&').replace('"', '"').replace('<', '<').replace('>', '>')
+ body = re.sub('(http|ftp)(\:\/\/[^\s<]+)', log_regex_url, body)
+ body = body.replace('\n', '<br />')
+ body = body.encode('utf-8');
+ nick = nick.encode('utf-8');
+ timestamp = log_get_timestamp(hour, minute)
+ fp = log_get_fp('public', groupchat, (year, month, day, hour, minute, second, weekday, yearday, daylightsavings))
+ fp.write('<font class="timestamp">' + timestamp + '</font> ')
+ if not nick:
+ fp.write('<font class="system">' + body + '</font><br />\n')
+ elif body[:3].lower() == '/me':
+ fp.write('<font class="emote">* ' + nick + body[3:] + '</font><br />\n')
+ else:
+ # 08.03.05(Tue) slipstream@yandex.ru encoding
+ if nick == get_nick(groupchat).encode('utf-8'):
+ fp.write('<font class="self"><' + nick + '></font> ')
+ else:
+ fp.write('<font class="normal"><' + nick + '></font> ')
+ fp.write(body + '<br />\n')
+ fp.close()
+ elif type == 'private' and PRIVATE_LOG_DIR:
+ jid = get_true_jid(source)
+ nick = string.split(jid, '@')[0]
+ # 06.03.05(Sun) slipstream@yandex.ru urls parser, line ends & encoding
+ body = body.replace('&', '&').replace('"', '"').replace('<', '<').replace('>', '>')
+ body = re.sub('(http|ftp)(\:\/\/[^\s<]+)', log_regex_url, body)
+ body = body.replace('\n', '<br />')
+ body = body.encode('utf-8');
+ nick = nick.encode('utf-8');
+ timestamp = log_get_timestamp(hour, minute)
+ fp = log_get_fp('private', jid, (year, month, day, hour, minute, second, weekday, yearday, daylightsavings))
+ fp.write('<font class="timestamp">' + timestamp + '</font> ')
+ if body[:3].lower() == '/me':
+ fp.write('<font class="emote">* ' + nick + body[3:] + '</font><br />\n')
+ else:
+ fp.write('<font class="normal"><' + nick + '></font> ' + body + '<br />\n')
+ fp.close()
+
+def log_handler_outgoing_message(target, body):
+ if GROUPCHATS.has_key(target) or not body:
+ return
+ (year, month, day, hour, minute, second, weekday, yearday, daylightsavings) = time.gmtime()
+ jid = get_true_jid(target)
+ nick = 'neutron'
+ # 06.03.05(Sun) slipstream@yandex.ru urls parser, line ends & encoding
+ body = body.replace('&', '&').replace('"', '"').replace('<', '<').replace('>', '>')
+ body = re.sub('(http|ftp)(\:\/\/[^\s<]+)', log_regex_url, body)
+ body = body.replace('\n', '<br />')
+ body = body.encode('utf-8');
+ nick = nick.encode('utf-8');
+ timestamp = log_get_timestamp(hour, minute)
+ fp = log_get_fp('private', jid, (year, month, day, hour, minute, second, weekday, yearday, daylightsavings))
+ fp.write('<font class="timestamp">' + timestamp + '</font> ')
+ if body[:3].lower() == '/me':
+ fp.write('<font class="emote">* ' + nick + body[3:] + '</font><br />\n')
+ else:
+ fp.write('<font class="self"><' + nick + '></font> ' + body + '<br />\n')
+ fp.close()
+
+if PUBLIC_LOG_DIR or PRIVATE_LOG_DIR:
+ register_message_handler(log_handler_message)
+if PRIVATE_LOG_DIR:
+ register_outgoing_message_handler(log_handler_outgoing_message)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/python_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,28 @@
+#$ neutron_plugin 01
+
+def handler_python_eval(type, source, parameters):
+ try:
+ return_value = str(eval(parameters))
+ except:
+ return_value = str(sys.exc_info()[0]) + ' - ' + str(sys.exc_info()[1])
+ smsg(type, source, return_value)
+
+def handler_python_exec(type, source, parameters):
+ if '\n' in parameters and parameters[-1] != '\n':
+ parameters += '\n'
+ try:
+ exec parameters in globals()
+ return_value = 'Successful Execution'
+ except:
+ return_value = str(sys.exc_info()[0]) + ' - ' + str(sys.exc_info()[1])
+ smsg(type, source, return_value)
+
+def handler_python_sh(type, source, parameters):
+ pipe = os.popen('sh -c ' + parameters)
+ #time.sleep(0.5)
+ return_value = pipe.read(1024)
+ smsg(type, source, return_value)
+
+register_command_handler(handler_python_eval, '!eval', 100, 'Evaluates and returns a Python expression.', '!eval <expression>', ['!eval 1+1'])
+register_command_handler(handler_python_exec, '!exec', 100, 'Runs a Python statement.', '!exec <statement>', ['!eval pass'])
+register_command_handler(handler_python_sh, '!sh', 100, 'Executes a shell command.', '!sh <command>', ['!sh ls'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/quote_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,16 @@
+#$ neutron_plugin 01
+
+import urllib
+
+QUOTE_FILE = 'static/quotes.txt'
+
+def handler_quote_quote(type, source, parameters):
+ reply = random.choice(open(QUOTE_FILE, 'r').readlines()).strip()
+ smsg(type, source, reply)
+
+def handler_quote_fortune(type, source, parameters):
+ reply = urllib.urlopen('http://www.hypothetic.org/fortune.php').read()[:2000]
+ smsg(type, source, reply)
+
+register_command_handler(handler_quote_quote, '!quote', 0, 'Gives a random quote.', '!quote', ['!quote'])
+register_command_handler(handler_quote_fortune, '!fortune', 0, 'Gives a random fortune.', '!fortune', ['!fortune'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/sg_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,39 @@
+#$ neutron_plugin 01
+
+
+def handler_SG_get(type, source, parameters):
+ groupchat = source[1]
+ iq = xmpp.Iq('get')
+ iq.setQueryNS('http://jabber.org/protocol/stats')
+ if parameters!='':
+ iq.setTo(parameters.strip())
+ else:
+ iq.setTo(SERVER)
+ parameters=SERVER
+ JCON.SendAndCallForResponse(iq,first_handler,{'parameters':parameters,'type':type,'source':source})
+
+def first_handler(coze,res,parameters,type,source):
+ #print par
+ payload=res.getQueryPayload()
+ if res.getType()=='error':
+ smsg(type,source,'Error '+res.getErrorCode()+ ': '+res.getError())
+ pass
+ elif res.getType()=='result':
+ iq = xmpp.Iq('get')
+ iq.setQueryNS('http://jabber.org/protocol/stats')
+ iq.setQueryPayload(payload)
+ iq.setTo(parameters.strip())
+ JCON.SendAndCallForResponse(iq,second_handler,{'parameters':parameters,'type':type,'source':source})
+
+def second_handler(coze,stats,parameters,type,source):
+ pay=stats.getQueryPayload()
+ if stats.getType()=='result':
+ result='Informations about ' + parameters + ':\n'
+ for stat in pay:
+ result=result+stat.getAttrs()['name']+': '+stat.getAttrs()['value'] + ' '+stat.getAttrs()['units'] + '\n'
+
+ smsg(type,source,result)
+
+
+register_command_handler(handler_SG_get, '!server_stats', 0, 'Returns server statistics according to JEP-0039.', '!server_stats <server>', ['!server_stats njs.netlab.cz'])
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/stock_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,18 @@
+#$ neutron_plugin 01
+
+import urllib
+
+def handler_stock_stock(type, source, parameters):
+ if parameters:
+ data = urllib.urlopen('http://finance.yahoo.com/d/quotes.csv?s=' + parameters + '&f=sl1d1t1c1ohgv&e=.csv').read()
+ data = data.replace('"', '')
+ (stock_name, stock_current, stock_date, stock_time, stock_change, stock_open, stock_high, stock_low, stock_volume) = string.split(data.strip(), ',')
+ if stock_change == 'N/A':
+ reply = 'No Match For: ' + parameters
+ else:
+ reply = stock_name + ': ' + stock_current + ' (' + stock_change + ') - Volume: ' + stock_volume + ' - High: ' + stock_high + ' - Low: ' + stock_low
+ else:
+ reply = 'Please Enter Stock Symbol'
+ smsg(type, source, reply)
+
+register_command_handler(handler_stock_stock, '!stock', 0, 'Returns information on a particular stock (provided by Yahoo).', '!stock <code>', ['!stock AOL'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/temperature_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,28 @@
+#$ neutron_plugin 01
+
+def handler_temperature_temperature(type, source, parameters):
+ if parameters:
+ splitdata = string.split(parameters)
+ try:
+ input_value = float(splitdata[0])
+ if len(splitdata) > 1:
+ unit_system = splitdata[1][0]
+ else:
+ unit_system = 'f'
+ except ValueError:
+ try:
+ input_value = float(splitdata[0][:-1])
+ except ValueError:
+ smsg(type, source, 'Syntax Error')
+ return
+ unit_system = splitdata[0][-1]
+ unit_system = string.lower(unit_system)
+ if unit_system == 'c':
+ reply = str(round(input_value * 9 / 5 + 32, 1)) + ' F'
+ else:
+ reply = str(round((input_value - 32) * 5 / 9, 1)) + ' C'
+ else:
+ reply = 'C=(F-32)*5/9 F=C*9/5+32'
+ smsg(type, source, reply)
+
+register_command_handler(handler_temperature_temperature, '!temperature', 0, 'Converts temperatures from Celcius to Fahrenheit and vice versa.', '!temperature <#> <C/F>', ['!temperature 10 F', '!temperature 29 C'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/time_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,23 @@
+#$ neutron_plugin 01
+
+def handler_time_date(type, source, parameters):
+ reply = time.strftime('%a %d %b %H:%M:%S UTC %Y', time.gmtime())
+ smsg(type, source, reply)
+
+def handler_time_swatch(type, source, parameters):
+ seconds_per_beat = 86.4
+ (hour, minute, second) = time.gmtime()[3:6]
+ gmt_seconds = (3600 * hour) + (60 * minute) + second
+ seconds = gmt_seconds + 3600
+ beats = float(seconds) / float(seconds_per_beat)
+ if beats < 10:
+ prefix = '00'
+ elif beats < 100:
+ prefix = '0'
+ else:
+ prefix = ''
+ reply = '@' + prefix + str(round(beats, 2))
+ smsg(type, source, reply)
+
+register_command_handler(handler_time_date, '!date', 0, 'Gives the current time and date.', '!date', ['!date'])
+#register_command_handler(handler_time_swatch, '!swatch', 0, 'Gives the current Swatch Internet time.', '!swatch', ['!swatch'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/userinfo_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,180 @@
+#$ neutron_plugin 01
+
+import thread
+import time
+
+LOCALDB_FILE = 'dynamic/localdb.txt'
+
+def handler_userinfo_join(groupchat, nick):
+ GROUPCHATS[groupchat][nick] = {'idle': time.time(), 'jid': groupchat + '/' + nick, 'fullname': None, 'nickname': None, 'email': None, 'url': None, 'client': None, 'version': None, 'os': None}
+
+ browse_iq = xmpp.Iq(groupchat + '/' + nick, 'get')
+ browse_iq.setQueryNS('jabber:iq:browse')
+ JCON.send(browse_iq)
+
+ time.sleep(2)
+
+ version_iq = xmpp.Iq(groupchat + '/' + nick, 'get')
+ version_iq.setQueryNS('jabber:iq:version')
+ JCON.send(version_iq)
+
+ time.sleep(2)
+
+ vcard_iq = xmpp.Iq(groupchat + '/' + nick, 'get')
+ vcard_iq.setQueryNS('vcard-temp')
+ JCON.send(vcard_iq)
+
+def handler_userinfo_message(type, source, body):
+ if type == 'public':
+ if GROUPCHATS.has_key(source[1]) and GROUPCHATS[source[1]].has_key(source[2]):
+ GROUPCHATS[source[1]][source[2]]['idle'] = time.time()
+
+def handler_userinfo_iq(iq):
+ type = iq.getType()
+ namespace = iq.getQueryNS()
+ if not namespace:
+ if iq.getTag('user'):
+ namespace = iq.getTag('user').getNamespace()
+ elif iq.getTag('VCARD') or iq.getTag('vCard') or iq.getTag('vcard'):
+ vcard = iq.getTag('VCARD') or iq.getTag('vCard') or iq.getTag('vcard')
+ namespace = vcard.getNamespace()
+ groupchat = iq.getFrom().getStripped()
+ nick = iq.getFrom().getResource()
+
+ if GROUPCHATS.has_key(groupchat) and GROUPCHATS[groupchat].has_key(nick):
+ if type == 'result':
+ if namespace == 'jabber:iq:browse':
+ if iq.getTag('user'):
+ GROUPCHATS[groupchat][nick]['jid'] = iq.getTag('user').getTag('user').getAttr('jid')
+ #fp = open('userlog.txt', 'a')
+ #fp.write(groupchat + '/' + nick + '\n' + GROUPCHATS[groupchat][nick]['jid'] + '\n\n')
+ #fp.close()
+ #if string.split(GROUPCHATS[groupchat][nick]['jid'], '/')[0] in ADMINS:
+ fp = open(LOCALDB_FILE, 'r')
+ localdb = eval(fp.read())
+ fp.close()
+ if GROUPCHATS[groupchat][nick]['jid'] and localdb.has_key(string.split(GROUPCHATS[groupchat][nick]['jid'], '/')[0]):
+ msg(groupchat, nick + ': ' + localdb[string.split(string.split(GROUPCHATS[groupchat][nick]['jid'], '/')[0], '/')[0]])
+ #elif localdb.has_key(nick):
+ # msg(groupchat, nick + ': ' + localdb[nick])
+ #else:
+ # msg(groupchat, nick + ': ' + 'Welcome')
+ elif namespace == 'vcard-temp':
+ vcard = iq.getTag('VCARD') or iq.getTag('vCard') or iq.getTag('vcard')
+ if vcard.getTag('FN'):
+ GROUPCHATS[groupchat][nick]['fullname'] = vcard.getTag('FN').getData()
+ elif vcard.getTag('N') and vcard.getTag('N').getTag('GIVEN') and vcard.getTag('N').getTag('FAMILY'):
+ GROUPCHATS[groupchat][nick]['fullname'] = vcard.getTag('N').getTag('GIVEN').getData() + ' ' + vcard.getTag('N').getTag('FAMILY').getData()
+ if vcard.getTag('NICKNAME'):
+ GROUPCHATS[groupchat][nick]['nickname'] = vcard.getTag('NICKNAME').getData()
+ if vcard.getTag('EMAIL'):
+ GROUPCHATS[groupchat][nick]['email'] = vcard.getTag('EMAIL').getData()
+ if vcard.getTag('URL'):
+ GROUPCHATS[groupchat][nick]['url'] = vcard.getTag('URL').getData()
+ elif namespace == 'jabber:iq:version':
+ info = iq.getTag('query')
+ GROUPCHATS[groupchat][nick]['client'] = info.getTag('name').getData()
+ GROUPCHATS[groupchat][nick]['version'] = info.getTag('version').getData()
+ GROUPCHATS[groupchat][nick]['os'] = info.getTag('os').getData()
+
+def handler_userinfo_whois(type, source, parameters):
+ groupchat = source[1]
+ if GROUPCHATS.has_key(groupchat) and GROUPCHATS[groupchat].has_key(parameters):
+ info = GROUPCHATS[groupchat][parameters]
+ reply = ''
+ if info.has_key('jid') and info['jid']:
+ reply += '<' + info['jid'] + '> '
+ if info.has_key('fullname') and info['fullname']:
+ reply += info['fullname'] + ' '
+ if info.has_key('nickname') and info['nickname']:
+ reply += '(' + info['nickname'] + ') '
+ if info.has_key('email') and info['email']:
+ reply += '<' + info['email'] + '> '
+ if info.has_key('client') and info['client']:
+ reply += '- ' + info['client'] + ' ' + info['version'] + ' - ' + info['os']
+ reply += ' [' + parameters + ']'
+ smsg(type, source, reply)
+ else:
+ smsg(type, source, 'User Not In Chat [' + parameters + ']')
+
+def handler_userinfo_idle(type, source, parameters):
+ if GROUPCHATS.has_key(source[1]) and GROUPCHATS[source[1]].has_key(parameters):
+ nick = parameters
+ groupchat = source[1]
+ idletime = int(time.time() - GROUPCHATS[groupchat][nick]['idle'])
+ reply = ''
+ seconds = idletime % 60
+ minutes = (idletime / 60) % 60
+ hours = (idletime / 3600) % 60
+ days = idletime / 216000
+ if days: reply += str(days) + 'd '
+ if hours: reply += str(hours) + 'h '
+ if minutes: reply += str(minutes) + 'm '
+ reply += str(seconds) + 's' + ' [' + parameters + ']'
+ else:
+ reply = 'Unknown' + ' [' + parameters + ']'
+ smsg(type, source, reply)
+
+def handler_userinfo_probe(type, source, parameters):
+ iq = xmpp.Iq(parameters, 'get')
+ iq.setQueryNS('jabber:iq:browse')
+ response = JCON.SendAndWaitForResponse(iq)
+ if response:
+ iqtype = response.getType()
+ else:
+ iqtype = 'error'
+ if iqtype == 'result':
+ reply = 'Online [' + parameters + ']'
+ else:
+ reply = 'Offline [' + parameters + ']'
+ smsg(type, source, reply)
+
+def handler_userinfo_getlast(type, source, parameters):
+ if GROUPCHATS.has_key(source[1]) and GROUPCHATS[source[1]].has_key(parameters):
+ nick = parameters
+ groupchat = source[1]
+ last_iq = xmpp.Iq(groupchat + '/' + nick, 'get')
+ last_iq.setQueryNS('jabber:iq:last')
+ last_result = JCON.SendAndWaitForResponse(last_iq)
+ if last_result and last_result.getType() == 'result':
+ idletime = int(last_result.getTag('query').getAttr('seconds'))
+ reply = ''
+ seconds = idletime % 60
+ minutes = (idletime / 60) % 60
+ hours = (idletime / 3600) % 60
+ days = idletime / 216000
+ if days: reply += str(days) + 'd '
+ if hours: reply += str(hours) + 'h '
+ if minutes: reply += str(minutes) + 'm '
+ reply += str(seconds) + 's' + ' [' + parameters + ']'
+ else:
+ reply = 'Unknown' + ' [' + parameters + ']'
+ else:
+ reply = 'Unknown'
+ smsg(type, source, reply)
+
+def handler_userinfo_gettime(type, source, parameters):
+ if GROUPCHATS.has_key(source[1]) and GROUPCHATS[source[1]].has_key(parameters):
+ nick = parameters
+ groupchat = source[1]
+ time_iq = xmpp.Iq(groupchat + '/' + nick, 'get')
+ time_iq.setQueryNS('jabber:iq:time')
+ time_result = JCON.SendAndWaitForResponse(time_iq)
+ if time_result and time_result.getType() == 'result':
+ timestring = time_result.getTag('query').getTag('display').getData()
+ timezone = time_result.getTag('query').getTag('tz').getData()
+ reply = timestring + ' - ' + timezone + ' [' + parameters + ']'
+ else:
+ reply = 'Unknown' + ' [' + parameters + ']'
+ else:
+ reply = 'Unknown' + ' [' + parameters + ']'
+ smsg(type, source, reply)
+
+register_join_handler(handler_userinfo_join)
+register_message_handler(handler_userinfo_message)
+register_iq_handler(handler_userinfo_iq)
+register_command_handler(handler_userinfo_whois, '!whois', 0, 'Gives information on specified groupchat user.', '!whois [nick]', ['!whois mikem'])
+register_command_handler(handler_userinfo_idle, '!idle', 0, 'Gives the idle time of a groupchat nick.', '!idle [nick]', ['!idle mikem'])
+register_command_handler(handler_userinfo_probe, '!probe', 0, 'Tells if a server, agent, or user is online.', '!probe [JID]', ['!probe mikem@jabber.org', '!probe jabber.org', '!probe msn.jabber.org'])
+register_command_handler(handler_userinfo_getlast, '!getlast', 0, 'Gives the iq:last idle reply of specified nick in groupchat.', '!getlast [nick]', ['!getlast mikem'])
+register_command_handler(handler_userinfo_gettime, '!gettime', 0, 'Gives the iq:time time reply of specified nick in groupchat.', '!gettime [nick]', ['!gettime mikem'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/vote_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,59 @@
+#$ neutron_plugin 01
+
+CURRENT_POLL = {}
+
+def handler_vote_vote(type, source, parameters):
+ global CURRENT_POLL
+ if GROUPCHATS.has_key(source[1]) and GROUPCHATS[source[1]].has_key(source[2]):
+ if CURRENT_POLL:
+ if isadmin(GROUPCHATS[source[1]][source[2]]['jid']) or not GROUPCHATS[source[1]][source[2]]['jid'] in CURRENT_POLL['jids']:
+ if CURRENT_POLL['options'].has_key(parameters.strip().lower()):
+ CURRENT_POLL['options'][parameters.strip().lower()] += 1
+ CURRENT_POLL['jids'].append(GROUPCHATS[source[1]][source[2]]['jid'])
+ smsg(type, source, 'Vote Counted')
+ else:
+ smsg(type, source, 'Option Not Available')
+ else:
+ smsg(type, source, 'You already voted.')
+ else:
+ smsg(type, source, 'There\'s no poll going on right now.')
+ else:
+ smsg(type, source, 'You must vote from the groupchat.')
+
+def handler_vote_newpoll(type, source, parameters):
+ global CURRENT_POLL
+ if CURRENT_POLL:
+ poll_text = 'New Poll (' + source[2] + ') - ' + CURRENT_POLL['question'] + '\n'
+ for option in CURRENT_POLL['options'].keys():
+ poll_text += ' * ' + option + '\n'
+ poll_text += 'To vote, type or message me the following: !vote <option>'
+ msg(source[1], poll_text)
+ else:
+ CURRENT_POLL = {'options': {}, 'question': parameters, 'jids': []}
+ smsg(type, source, 'Poll Created')
+
+def handler_vote_polloption(type, source, parameters):
+ global CURRENT_POLL
+ if CURRENT_POLL:
+ CURRENT_POLL['options'][parameters.strip().lower()] = 0
+ smsg(type, source, 'Option Added')
+ else:
+ smsg(type, source, 'Error: No Poll')
+
+def handler_vote_endpoll(type, source, parameters):
+ global CURRENT_POLL
+ if CURRENT_POLL:
+ poll_text = 'Poll Results (' + source[2] + ') - ' + CURRENT_POLL['question'] + '\n'
+ num = 1
+ for option in CURRENT_POLL['options'].keys():
+ poll_text += str(CURRENT_POLL['options'][option]) + ' - ' + option + '\n'
+ num += 1
+ msg(source[1], poll_text)
+ CURRENT_POLL = {}
+ else:
+ smsg(type, source, 'Error: No Poll')
+
+register_command_handler(handler_vote_vote, '!vote', 0, 'Casts a vote for current poll.', '!vote <option>', ['!vote yes'])
+register_command_handler(handler_vote_newpoll, '!newpoll', 100, 'Creates a new poll, or if options are added, submits the poll to current channel.', '!newpoll [question]', ['!newpoll Do you like turtles?', '!newpoll'])
+register_command_handler(handler_vote_polloption, '!polloption', 100, 'Adds an option to the current poll.', '!polloption <option>', ['!polloption yes'])
+register_command_handler(handler_vote_endpoll, '!endpoll', 100, 'Ends the poll and returns the results.', '!endpoll]', ['!endpoll'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/disabled/weather_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,43 @@
+#$ neutron_plugin 01
+
+import pymetar
+
+WEATHERCODE_FILE = 'static/weather.txt'
+
+def handler_weather_weather(type, source, parameters):
+ if not parameters:
+ smsg(type, source, 'Invalid Syntax')
+ return
+ info = pymetar.MetarReport(str(parameters).strip())
+ try:
+ location = info.getStationName()
+ celsius = str(round(info.getTemperatureCelsius(), 1))
+ fahrenheit = str(round(info.getTemperatureFahrenheit(), 1))
+ #humidity = str(round(info.getHumidity(), 1))
+ results = location + ' - ' + str(info.getWeather()) + ' - ' + celsius + 'C - ' + fahrenheit + 'F' # + ' - ' + humidity + '% Humdity'
+ except Exception, ex:
+ results = 'CHYBA!'
+ print ex.__str__
+ smsg(type, source, results)
+
+def handler_weather_weathercode(type, source, parameters):
+ if not parameters:
+ smsg(type, source, 'Invalid Syntax')
+ return
+ if len(parameters)<=2:
+ smsg(type, source, 'Query too short!')
+ return
+ results = ''
+ query = string.lower(parameters)
+ fp = open(WEATHERCODE_FILE, 'r')
+ lines = fp.readlines()
+ for line in lines:
+ if string.count(string.lower(line), query):
+ results += string.split(line, '=> ')[0]
+ if results:
+ smsg(type, source, results)
+ else:
+ smsg(type, source, 'No Results')
+
+register_command_handler(handler_weather_weather, '!weather', 0, 'Looks up weather conditions from NOAA.', '!weather <4-letter-weather-code>', ['!weather panc'])
+register_command_handler(handler_weather_weathercode, '!weathercode', 0, 'Looks up weather codes for use in !weather.', '!weathercode <query>', ['!weathercode anchorage'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/fact_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,36 @@
+#$ neutron_plugin 01
+
+ELEMENT_FILE = 'static/elements.txt'
+TLD_FILE = 'static/tlds.txt'
+
+def fact_element(query):
+ fp = open(ELEMENT_FILE, 'r')
+ while 1:
+ line = fp.readline()
+ if not line:
+ return 'Not Found'
+ (key, value) = string.split(line, ' ', 1)
+ if string.lower(query).strip() == string.lower(key).strip():
+ return value.strip()
+
+def fact_tld(query):
+ fp = open(TLD_FILE, 'r')
+ while 1:
+ line = fp.readline()
+ if not line:
+ return 'Not Found'
+ (key, value) = string.split(line, ': ', 1)
+ if string.lower(query).strip() == string.lower(key).strip():
+ return value.strip()
+
+def handler_fact_element(type, source, parameters):
+ result = fact_element(parameters.strip())
+ smsg(type, source, result)
+
+def handler_fact_tld(type, source, parameters):
+ result = fact_tld(parameters.strip())
+ smsg(type, source, result)
+
+#register_command_handler(handler_fact_element, '!element', 0, 'Returns the name and number of an atomic element code.', '!element <code>', ['!element Li'])
+
+register_command_handler(handler_fact_tld, '!tld', 0, 'Returns the location for a top level domain or a TLD for a location.', '!tld <location/TLD>', ['!tld com', '!tld antarctica'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/freshmeat_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,20 @@
+#$ neutron_plugin 01
+
+import urllib
+from xml.dom.minidom import parse, parseString
+
+def getVal(dom, var):
+ return dom.getElementsByTagName(var)[0].childNodes[0].nodeValue
+
+def handler_fm(type, source, pn):
+ data = urllib.urlopen('http://freshmeat.net/projects-xml/' + pn).read()
+ try:
+ dom = parseString(data)
+ reply = "*" + getVal(dom, "projectname_full")
+ reply += "* (" + getVal(dom, "rating") + ") "
+ reply += getVal(dom, "desc_full") + " " + getVal(dom, "url_homepage")
+ except:
+ reply = "This project not found on FreshMeat.net, sorry"
+ smsg(type, source, reply)
+
+register_command_handler(handler_fm, '!fm', 0, 'Gives information about program from FreshMeat.net', '!fm program', ['!fm', '!fm Gajim'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/help_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,24 @@
+#$ neutron_plugin 01
+
+def handler_help_help(type, source, parameters):
+ parameters = parameters.rstrip()
+ if parameters and COMMANDS.has_key(parameters):
+ reply = COMMANDS[parameters]['description'] + ' Usage: ' + COMMANDS[parameters]['syntax'] + '\nExamples:'
+ for example in COMMANDS[parameters]['examples']:
+ reply += '\n * ' + example
+ reply += '\nRequired Access Level: ' + str(COMMANDS[parameters]['access'])
+ else:
+ reply = 'Type !commands for a list of commands.'
+ smsg(type, source, reply)
+
+def handler_help_commands(type, source, parameters):
+ commandlist = []
+ for command in COMMANDS.keys():
+ if has_access(source, COMMANDS[command]['access']):
+ commandlist.append(command)
+ commandlist.sort()
+ commandlist = string.join(commandlist)
+ smsg('private', source, commandlist)
+
+register_command_handler(handler_help_help, 'help', 0, 'Send basic help message or gives information on specified command.', 'help [command]', ['help', 'help help'])
+register_command_handler(handler_help_commands, '!commands', 0, 'Send list of commands.', '!commands', ['!commands'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/presence_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,23 @@
+#$ neutron_plugin 01
+
+def handler_presence_presence(prs):
+ type = prs.getType()
+ who = prs.getFrom()
+ if not type:
+ type = 'available'
+ if type == 'subscribe':
+ JCON.send(xmpp.Presence(to=who, typ='subscribed'))
+ #JCON.send(xmpp.Presence(to=who, typ='subscribe'))
+ elif type == 'unsubscribe':
+ JCON.send(xmpp.Presence(to=who, typ='unsubscribed'))
+ #JCON.send(xmpp.Presence(to=who, typ='unsubscribe'))
+ elif type == 'subscribed':
+ pass
+ elif type == 'unsubscribed':
+ pass
+ elif type == 'available':
+ pass
+ elif type == 'unavailable':
+ pass
+
+register_presence_handler(handler_presence_presence)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/query_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,29 @@
+#$ neutron_plugin 01
+
+LOCALDB_FILE = 'dynamic/localdb.txt'
+
+initialize_file(LOCALDB_FILE, '{}')
+
+def handler_query_get(type, source, parameters):
+ localdb = eval(read_file(LOCALDB_FILE))
+ if localdb.has_key(string.lower(parameters)):
+ smsg(type, source, localdb[string.lower(parameters)] + ' [' + parameters + ']')
+ else:
+ smsg(type, source, 'Not Found [' + parameters + ']')
+
+def handler_query_set(type, source, parameters):
+ localdb = eval(read_file(LOCALDB_FILE))
+ keyval = string.split(parameters, '=', 1)
+ key = string.lower(keyval[0]).strip()
+ value = keyval[1].strip()
+ if not value:
+ if localdb.has_key(key):
+ del localdb[key]
+ smsg(type, source, key + ' Is Deleted')
+ else:
+ localdb[key] = keyval[1].strip()
+ smsg(type, source, key + ' == ' + keyval[1].strip())
+ write_file(LOCALDB_FILE, str(localdb))
+
+register_command_handler(handler_query_get, '!?', 0, 'Looks up a query in the local database.', '!? <query>', ['!? neutron', '!? multiple words'])
+register_command_handler(handler_query_set, '!!', 100, 'Sets a query in the local database.', '!! <query> = <definition>', ['!! neutron = the best!', '!! multiple words ='])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/rss_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,257 @@
+#$ neutron_plugin 01
+
+from xml.sax import make_parser, handler
+
+RSS_CACHE_FILE = 'dynamic/RSS_CACHE.txt'
+RSS_INTERVAL = 30
+RSS_QUERY_DELAY = 10
+RSS_ITEM_DELAY = 120
+
+RSS_CACHE = {}
+last_query = 0
+UNSENT_HEADLINES = []
+RSS_IS_ENABLED = 0
+
+initialize_file(RSS_CACHE_FILE, "{'channels': {}}")
+
+################################################################################
+
+import re
+def rss_remove_html(text):
+ exp = re.compile('<[^>]*>')
+ text = exp.sub('', text)
+ notags = text.replace('<', '<').replace('>', '>')
+ noescape = notags.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"')
+ noescape = noescape.replace('<p>', '')
+ noescape = noescape.replace('</p>', '')
+ noescape = noescape.replace('<p />', '').replace('<p/>', '')
+ return noescape
+
+""" OLD CODE: REMOVE LATER IF NEW FUNCTION (added 2005-10-12) WORKS
+def rss_remove_html(text):
+ notags = text.replace('<', '<').replace('>', '>')
+ noescape = notags.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"')
+ noescape = noescape.replace('<p>', '')
+ noescape = noescape.replace('</p>', '')
+ noescape = noescape.replace('<p />', '').replace('<p/>', '')
+ return noescape
+"""
+
+def rss_update_file():
+ global RSS_CACHE
+ write_file(RSS_CACHE_FILE, str(RSS_CACHE))
+
+def rss_read_file():
+ global RSS_CACHE
+ RSS_CACHE = eval(read_file(RSS_CACHE_FILE))
+
+def rss_add_channel(name, url):
+ global RSS_CACHE
+ if not RSS_CACHE['channels'].has_key(name):
+ RSS_CACHE['channels'][name] = {'url': url, 'lastitem': '', 'subscribers': [], 'title': name, 'link': '', 'description': name}
+ rss_update_file()
+ else:
+ RSS_CACHE['channels'][name]['url'] = url
+
+def rss_remove_channel(name):
+ global RSS_CACHE
+ if RSS_CACHE['channels'].has_key(name):
+ del RSS_CACHE['channels'][name]
+ rss_update_file()
+
+def rss_subscribe(name, jid):
+ global RSS_CACHE
+ if RSS_CACHE['channels'].has_key(name):
+ if not jid in RSS_CACHE['channels'][name]['subscribers']:
+ RSS_CACHE['channels'][name]['subscribers'].append(jid)
+ rss_update_file()
+
+def rss_unsubscribe(name, jid):
+ global RSS_CACHE
+ if RSS_CACHE['channels'].has_key(name):
+ if jid in RSS_CACHE['channels'][name]['subscribers']:
+ RSS_CACHE['channels'][name]['subscribers'].remove(jid)
+ rss_update_file()
+
+def rss_query_channels_loop():
+ RSS_IS_ENABLED = 1
+ while RSS_IS_ENABLED:
+ rss_query_channels()
+ time.sleep(RSS_ITEM_DELAY)
+ if len(UNSENT_HEADLINES):
+ random.shuffle(UNSENT_HEADLINES)
+ (channel, item) = UNSENT_HEADLINES.pop()
+ rss_dispatch_headline(channel, item)
+
+def rss_end_loop():
+ RSS_IS_ENABLED = 0
+
+def rss_query_channels():
+ global RSS_CACHE
+ global last_query
+ if time.time() > last_query + (RSS_INTERVAL * 60):
+ print 'Querying Channels'
+ last_query = time.time()
+ for channel in RSS_CACHE['channels']:
+ rss_query_channel(channel)
+ time.sleep(RSS_QUERY_DELAY)
+ print 'Finished Querying Headlines'
+
+def rss_query_channel(channel):
+ print 'Querying: "' + channel + '"'
+ parser = make_parser()
+ parser.setContentHandler(RSSHandler(channel))
+ try:
+ parser.parse(RSS_CACHE['channels'][channel]['url'])
+ except:
+ #raise
+ print 'error parsing: ' + channel
+
+def rss_dispatch_headlines(channel, info, items):
+ global RSS_CACHE
+ RSS_CACHE['channels'][channel]['title'] = info['title']
+ RSS_CACHE['channels'][channel]['link'] = info['link']
+ RSS_CACHE['channels'][channel]['description'] = info['description']
+ for item in items:
+ if item == RSS_CACHE['channels'][channel]['lastitem']:
+ break
+ else:
+ UNSENT_HEADLINES.append((channel, item))
+ print channel + ': Adding item to list.'
+ RSS_CACHE['channels'][channel]['lastitem'] = items[0]
+ rss_update_file()
+
+def rss_dispatch_headline(channel, item):
+ global RSS_CACHE
+ globaltitle = RSS_CACHE['channels'][channel]['title']
+ title = rss_remove_html(item['title'])
+ link = item['link']
+ description = rss_remove_html(item['description'])
+ reply = title + ' - '
+ if description:
+ reply += description + ' - '
+ reply += link
+ for groupchat in RSS_CACHE['channels'][channel]['subscribers']:
+ if GROUPCHATS.has_key(groupchat):
+ print channel + ': Sending Headline To: ' + groupchat
+ msg(groupchat, reply)
+
+################################################################################
+
+class RSSHandler(handler.ContentHandler):
+ def __init__(self, channel):
+ handler.ContentHandler.__init__(self)
+
+ self.channel = channel
+ self.info = {'title': '', 'link': '', 'description': ''}
+ self.items = []
+
+ self._text = ''
+ self._parent = None
+ self._title = ''
+ self._link = ''
+ self._description = ''
+
+ def startElement(self, name, attrs):
+ if name == 'channel' or name == 'item':
+ self._parent = name
+ self._text = ''
+
+ def endElement(self, name):
+ if self._parent == 'channel':
+ if name == 'title':
+ self.info['title'] = self._text
+ elif name == 'description':
+ self.info['description'] = self._text
+ elif name == 'link':
+ self.info['link'] = self._text
+
+ elif self._parent == 'item':
+ if name == 'title':
+ self._title = self._text
+ elif name == 'link':
+ self._link = self._text
+ elif name == 'description':
+ self._description = self._text
+ elif name == 'item':
+ self.items.append({'title': self._title, 'link': self._link, 'description': self._description})
+ self._title = ''
+ self._link = ''
+ self._description = ''
+
+ if name == 'rss' or name == 'rdf:RDF':
+ rss_dispatch_headlines(self.channel, self.info, self.items)
+
+ def characters(self, content):
+ self._text = self._text + content
+
+################################################################################
+
+rss_read_file()
+
+################################################################################
+
+def handler_rss_start(type, source, parameters):
+ thread.start_new(rss_query_channels_loop, ())
+ smsg(type, source, 'Enabled RSS')
+
+def handler_rss_stop(type, source, parameters):
+ rss_end_loop()
+ smsg(type, source, 'Disabled RSS')
+
+def handler_rss_add(type, source, parameters):
+ if len(string.split(parameters)) > 1:
+ (name, url) = string.split(parameters)
+ rss_add_channel(name, url)
+ smsg(type, source, 'Added: ' + name + ' - ' + url)
+ else:
+ smsg(type, source, 'Invalid Syntax')
+
+def handler_rss_remove(type, source, parameters):
+ if len(string.split(parameters)) > 0:
+ name = parameters
+ rss_remove_channel(name)
+ smsg(type, source, 'Removed: ' + name)
+ else:
+ smsg(type, source, 'Invalid Syntax')
+
+def handler_rss_subscribe(type, source, parameters):
+ if len(string.split(parameters)) > 1:
+ (name, jid) = string.split(parameters)
+ rss_subscribe(name, jid)
+ smsg(type, source, 'Subscribed: ' + jid + ' to ' + name)
+ else:
+ smsg(type, source, 'Invalid Syntax')
+
+def handler_rss_unsubscribe(type, source, parameters):
+ if len(string.split(parameters)) > 1:
+ (name, jid) = string.split(parameters)
+ rss_unsubscribe(name, jid)
+ smsg(type, source, 'Unsubscribed: ' + jid + ' from ' + name)
+ else:
+ smsg(type, source, 'Invalid Syntax')
+
+def handler_rss_info(type, source, parameters):
+ if parameters.strip():
+ name = parameters.strip()
+ message = name + ' - ' + RSS_CACHE['channels'][name]['url'] + ' - ' + RSS_CACHE['channels'][name]['title'] + ' - ' + RSS_CACHE['channels'][name]['link'] + ' - ' + RSS_CACHE['channels'][name]['description']
+ message += ' - Subscribers:'
+ for subscriber in RSS_CACHE['channels'][name]['subscribers']:
+ message += ' ' + subscriber
+ if not len(RSS_CACHE['channels'][name]['subscribers']):
+ message += 'NONE'
+ smsg(type, source, message)
+ else:
+ message = 'Channels:'
+ for channel in RSS_CACHE['channels'].keys():
+ message += ' ' + channel
+ smsg(type, source, message)
+
+register_command_handler(handler_rss_start, '!rss_start', 100, 'Enables the RSS headline feature.', '!rss_start', ['!rss_start'])
+register_command_handler(handler_rss_stop, '!rss_stop', 100, 'Disables the RSS headline feature.', '!rss_stop', ['!rss_stop'])
+register_command_handler(handler_rss_add, '!rss_add', 100, 'Adds an RSS channel.', '!rss_add <name> <url>', ['!rss_add slashdot http://www.slashdot.org/slashdot.rdf'])
+register_command_handler(handler_rss_remove, '!rss_remove', 100, 'Removes an RSS channel.', '!rss_add <name>', ['!rss_remove slashdot'])
+register_command_handler(handler_rss_subscribe, '!rss_subscribe', 100, 'Subscribes a channel to an RSS channel.', '!rss_subscribe <name> <jid>', ['!rss_subscribe slashdot jabber@conference.jabber.org'])
+register_command_handler(handler_rss_unsubscribe, '!rss_unsubscribe', 100, 'Unsubscribes a channel from an RSS channel.', '!rss_unsubscribe <name> <jid>', ['!rss_unsubscribe slashdot jabber@conference.jabber.org'])
+register_command_handler(handler_rss_info, '!rss_info', 0, 'Requests information on specified RSS channel or gets the list of channels.', '!rss_info [name]', ['!rss_info slashdot', '!rss_info'])
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plugins/wtf_plugin.py Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,26 @@
+#$ neutron_plugin 01
+
+import re
+
+WTF_FILE = 'static/wtf.txt'
+
+def handler_wtf(type, source, parameters):
+ #acronyms = open(WTF_FILE, 'r').readlines()
+
+ word = string.upper(parameters)+"\t"
+ reply = ""
+
+ reader = open(WTF_FILE,'r')
+ while 1:
+ line = reader.readline()
+ if not line:
+ break
+ if line.startswith(word):
+ reply = reply + re.sub("\t+", ": ", line)
+
+ if not reply:
+ reply = "Sorry, I don't know what "+parameters+" means..."
+
+ smsg(type, source, reply.rstrip())
+
+register_command_handler(handler_wtf, 'wtf', 0, 'Translates acronyms for you', 'wtf', ['wtf wtf'])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/elements.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,109 @@
+Ac Actinium 89
+Md Mendelevium 101
+Al Aluminum 13
+Hg Mercury 80
+Am Americium 95
+Mo Molybdenum 42
+Sb Antimony 51
+Ns Neilsborium 107
+Ar Argon 18
+Nd Neodymium 60
+As Arsenic 33
+Ne Neon 10
+At Astatine 85
+Np Neptunium 93
+Ba Barium 56
+Ni Nickel 28
+Bk Berkelium 97
+Nb Niobium 41
+Be Beryllium 4
+N Nitrogen 7
+Bi Bismuth 83
+No Nobelium 102
+B Boron 5
+Os Osmian 76
+Br Bromine 35
+O Oxygen 8
+Cd Cadmium 48
+Pd Palladium 46
+Ca Calcium 20
+P Phosphorus 15
+Cf Californium 98
+Pt Platinum 78
+C Carbon 6
+Pu Plutonium 94
+Ce Cerium 58
+Po Polonium 84
+Cs Cesium 55
+K Potassium 19
+Cl Chlorine 24
+Pr Praseodymium 59
+Cr Chromium 17
+Pm Promethium 61
+Co Cobalt 27
+Pa Protactinium 91
+Cu Copper 29
+Ra Radium 88
+Cm Curium 96
+Rn Radon 86
+Dy Dysprosium 66
+Re Rhenium 75
+Es Einsteinium 99
+Rh Rhodium 45
+Er Erbium 68
+Rb Rubidium 37
+Eu Europium 63
+Ru Ruthenium 44
+Fm Fermium 100
+Rf Rutherfordium 104
+F Flourine 9
+Sm Samarium 62
+Fr Francium 87
+Sc Scandium 21
+Gd Gadolinium 64
+Sg Seaborgium 106
+Ga Gallium 31
+Se Selenium 34
+Ge Germanium 32
+Si Silicon 14
+Au Gold 79
+Ag Silver 47
+Hf Hafnium 72
+Na Sodium 11
+Ha Hahnium 105
+Sr Strontium 38
+Hs Hassium 108
+S Sulfur 16
+He Helium 2
+Ta Tantalum 73
+Ho Holmium 67
+Tc Technetium 43
+H Hydrogen 1
+Te Tellurium 52
+In Indium 49
+Tb Terbium 65
+I Iodine 53
+Tl Thalium 81
+Ir Iridium 77
+Th Thorium 90
+Fe Iron 26
+Tm Thulium 69
+Kr Krypton 36
+Sn Tin 50
+La Lanthanum 57
+Ti Titanium 22
+Lr Lawrencium 103
+W Tungsten 74
+Pb Lead 82
+U Uranium 92
+Li Lithium 3
+V Vanadium 23
+Lu Lutetium 71
+Xi Xenon 54
+Mg Magnesium 12
+Yb Ytterbium 70
+Mn Manganese 25
+Yb Yttrium 39
+Mt Meitnerium 109
+Zn Zinc 30
+Zr Zirconium 40
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/quotes.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,1275 @@
+I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, it's a way of looking at life through the wrong end of a telescope. Which is what I do, and that enables you to laugh at life's realities.
+There is a road, no simple highway, between the dawn and the dark of night, and if you go, no one may follow, that path is for your steps alone.
+I wonder if I shall fall right through the earth! How funny it'll seem to come out among the people that walk with their heads downward!
+The world is a looking glass, and gives back to every man the reflection of his own face. Frown at it and it will in turn look sourly upon you; laugh at it and with it, and it is a jolly kind companion.
+People who know little are usually great talkers, while men who know much say little.
+A pessimist sees the difficulty in every opportunity; an optimist sees the opportunity in every difficulty.
+I've had a lover's quarrel with the world.
+I'd rather be a failure at something I love than a success at something I hate.
+No pessimest ever discovered the secrets of the stars, or sailed to an uncharted land, or opened a new heaven to the human spirit.
+One ought, every day at least, to hear a little song, read a good poem, see a fine picture and, if possible, speak a few reasonable words.
+It is normal to give away a little of one's life in order not to lose it all.
+Three o'clock is always too late or too early for anything you want to do.
+Do, or do not. There is no 'try'.
+Poetry and Hums aren't things which you get, they're things which get you. And all you can do is to go where they can find you.
+Finish each day and be done with it. Youhave done what you could; some blunders and absurdities have crept in; forget them as soon as you can. Tomorrow is a new day; you shall begin it serenely and with too high a spirit to be encumbered with your old nonsense.
+Old boys have their playthings as well as young ones, the difference is only in the price.
+Little surprises around everywhere, but nothing dangerous. Don't be alarmed.
+It's not very pleasant in my corner of the world at three o'clock in the morning. But for people who like cold, wet, ugly bits it is something rather special.
+There was a man from Sung who pulled at his rice plants because he was worried about their failure to grow.
+There were many ways of breaking a heart. Stories were full of hearts being broken by love, but what really broke a heart was taking away its dream - whatever that dream might be.
+I had rather attempt something great and fail, than to attempt nothing at all and succeed.
+If I had my life to live over, I would try to make more mistakes. I would relax. I would climb more mountains and swim more rivers. I would pick more daisies. I would have more actual troubles and fewer imaginary ones.
+The greatest pleasure in life is doing what people say you cannot do.
+There is no cure for birth and death save to enjoy the interval.
+We rest here while we can, but we hear the ocean calling in our dreams, And we know by the morning, the wind will fill our sails to test the seams, The calm is on the water and part of us would linger by the shore, For ships are safe in harbor, but that's not what ships are for.
+Analysis kills spontaneity. The grain once ground into flour springs and germinates no more.
+The game of life is not so much in holding a good hand as playing a poor hand well.
+One person with a belief is equal to a force of 99 who have only interests.
+You will never be happy if you continue to search for what happiness consists of. You will never live if you are looking for the meaning of life.
+The sharp edge of a razor is difficult to pass over; thus the wise say the path to Salvation is hard.
+I divide my time as follows: half the time I sleep, the other half I dream. I never dream when I sleep, for that would be a pity, for sleeping is the highest accomplishment of genius.
+The greatest mistake you can make in life is to be continually fearing you will make one.
+It is not necessary that you leave the house. Remain at your table and listen. Do not even listen, only wait. Do not even wait, be wholly still and alone. The world will present itself to you for its unmasking . . . in ecstasy it will writhe at your feet.
+Only those who dare to fail greatly can ever achieve greatly.
+I have seen yesterday, I love today, I am not afraid of tomorrow.
+I don't think there ever was a lazy man in this world. Every man has some sort of gift, and he prizes that gift beyond all others. He may be a professional billiard-player, or a Paderewski, or a poet - I don't care what it is. But whatever it is, he takes a native delight in exploiting that gift, and you will find it is difficult to beguile him away from it. Well, there are thousands of other interests occupying other men, but those interests don't appeal to the special tastes of the billiard champion or Paderewski. They are set down, therefore, as too lazy to do that or do this - to do, in short what they have no taste or inclination to do. In that sense, then I am phenomenally lazy. But when it comes to writing a book - I am not lazy. My family find it difficult to dig me out of my chair.
+I have learned at least this by my experiments: that if one advances confidenly in the direction of his dreams and endeavors to live the life which he has imagined, he will meet with a success unexpected in common hours.
+If nothing in life is a struggle then life itself will become one.
+A man walks through life painting a portrait, not of what he would have done, could have done, or should have done, but of what he did.
+Do Not follow where the path may lead. Go instead where there is no path, and leave a trail.
+All the Woulda-Coulda-Shouldas Layin' in the sun, Talkin' bout the things They woulda-coulda-shoulda done... But those Woulda-Coulda-Shouldas All ran away and hid From one little did.
+Joy, temperance, and repose, Slam the door on the doctor's nose.
+When they leave here they'll be completely restored to their normal terrible old selves. But maybe they'll be a little wiser for the wear.
+Thats always been my problem. People think I'm being vulgar when I'm being serious and serious when I'm being vulgar.
+The man on top of the mountain did not fall there.
+Come to the edge, he said. We are afraid, they said. Come to the edge, he said. They came, he pushed...and they flew.
+You should never doubt what no one is sure about.
+We are the music makers, and we are the dreamers of dreams.
+A mistake in judgment isn't fatal, but too much anxiety about judgment is.
+Security is mostly a superstition. It does not exist in nature, nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than outright exposure. Life is either a daring adventure or nothing.
+There is no course of life so weak and sottish as that which is managed by order, method, and discipline.
+Take your time, think a lot, think of everything you've got. For you will still be here tomorrow nut your dreams may not.
+Youth furnishes the materials and plans for the future. Maturity takes and cuts the stones; provided the so-called wisdom of old age doesn't destroy the genius of youth.
+I believe in getting into hot water; it keeps you clean.
+I sit beside the fire and think of all that I have seen, of meadow-flowers and butterflies. In summers that have been; Of yellow leaves and gossamer in autumns that there were, with morning mist and silver sun and wind upon my hair.
+The world stands aside to let anyone pass who knows where he is going.
+The activity of happiness must occupy an entire lifetime; for one swallow does not a summer make.
+Today equals the sum of yesterdays dreams and tomorrows memories.
+There are those that look at things the way they are, and ask why? I dream of things that never were, and ask why not.
+Serious-minded people have few ideas. People with ideas are never serious.
+You'll miss 100% of all the shots you don't take.
+To live you have to experiment, to have the ability to experiment you have to have confidence, to have confidence you have to be loved, to be loved you have to love.
+When I'm playful I use the meridians of longitude and parallels of latitude for a seine, and drag the Atlantic Ocean for whales. I scratch my head with the lightning and purr myself to sleep with the thunder.
+The troubles of the young are soon over; they leave no external mark. If you wound the tree in its youth the bark will quickly cover the gash; but when the tree is very old, peeling the bark off . . . you will see the scar there still.
+Everything has two sides --the outside that is ridiculous, and the inside that is solemn.
+People tend to think that life really does progress for everyone eventually, that people progress, but actually only some people progress. The rest of the people don't.
+The quality of life is determined by its activities
+I was wise enough to never grow up while fooling most people into believing I had.
+What lies behind us and what lies before us are tiny matters compared to what lies within us.
+Skate to where the puck is going, not to where it's been
+When you remember how hard it is to change yourself, you begin to understand what little chance we have of changing others.
+Before I knew the best part of my life had come, it had gone.
+After a time, you may find that "having" is not so pleasing a thing, after all, as "wanting." It is not logical, but it is often true.
+We don't live in the world of reality, we live in the world of how we perceive reality.
+The common ingredients of health and long life are: Great temperance, open air, Easy labor and little care.
+There is no such thing as a sudden heart-attack. It takes years of preparation.
+What a pity human beings can't exchange problems. Everyone knows exactly how to solve the other fellow's.
+Look not mournfully into the Past. It comes not back again. Wisely improve the Present. In is thine. Go forth to meet the shadowy Future, without fear, and a manly heart.
+Anybody can win unless there happens to be a second entry.
+Today is cash, tomorrow is a promissary note.
+It all comes down to one very simple choice.... Get busy livin' or get busy dyin'.
+If a little dreaming is dangerous, the cure for it is not to dream less but to dream more, to dream all the time.
+Whenever I climb I am followed by a dog called 'Ego'.
+Little things console us because little things afflict us.
+It was previously a question of finding out whether or not life had to have a meaning to be lived. It now becomes clear, on the contrary, that it will be lived all the better if it has no meaning.
+The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead; his eyes are closed.
+There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened.
+The greatest trick the devil ever played was convincing the world he didn't exist.
+He who stands of tiptoe is not steady. He who strides cannot maintain the pace.
+Man drives, but the Creator holds the reigns.
+Those who dream by day are cognizant of many things that escape those who dream only at night.
+The devil can site Scripture for his purpose.
+Eventually, all things merge into one, and a river runs through it. The river was cut by the world's great flood and runs over rocks from the basement of time. On some of the rocks are timeless raindrops. Under the rocks are the words, and some of the words are theirs.
+To swear off making mistakes is very easy. All you have to do is swear off having ideas.
+The world owes all its onward impulses to men ill at ease. The happy man confines himself within ancient limits.
+Talk about your plenty, talk about your ills, One man gathers what another man spills.
+Hold fast to dreams , for if dreams die, life is like a broken winged bird that cannot fly.
+There is a time for departure even when there's no certain place to go.
+I live in that solitude which is painful in youth, but delicious in the years of maturity.
+The noisiest drum has nothing in it but air.
+Still round the corner there may wait, A new road or a secret gate.
+We cannot tempt fate without eventually getting scorched by it.
+Hope is a good thing - maybe the best thing, and no good thing ever dies.
+Reach high, for stars lie hidden in your soul. Dream deep, for every dream precedes the goal.
+Age does not bring wisdom ... but it does give perspective . . . and the saddest perspective of all is to see far, far behind you, the temptations you've passed up.
+Heaven never helps the men who will not act.
+The sage manages affairs without action and spreads doctrines without words . . . By acting without action, all things will be in order.
+The sole root of mans' unhappiness is that man does not know how to sit and stay quietly in his room
+Smooth seas do not make skillful sailors.
+Often people attempt to live their lives backwards; they try to have more things, or more money, in order to do more of what they want, so they will be happier. The way it actually works is the reverse. You must first be who you really are, then do what you need to do, in order to have what you want.
+When a man won't listen to his conscience, it's usually because he doesn't want advice from a total stranger.
+There comes a time when suddenly you realize that laughter is something you remember and that you were the one laughing.
+There are too many books I haven't read, too many places I haven't seen, too many memories I haven't kept long enough.
+Time does not relinquish its rights, either over human beings or over mountains.
+If you stop searching, you stop living, because then you're dwelling in the past. If you're not reaching forward to any growth or future, you might as well be dead.
+Life only demands from you the strength you possess. Only one feat is possible. Not to have run away.
+Don't take life too seriously. You'll never get out alive.
+Everything that irritates us about others can lead us to an understanding of ourselves.
+It's never to late to have a happy childhood.
+You can't depend on your eyes when your imagination is out of focus.
+To be what we are, and to become what we are capable of becoming, is the only end of life.
+While one person hesitates because he feels inferior, the other is busy making mistakes and becoming superior.
+The story teller makes no choice. Soon you will not hear his voice. His job is to shed light, and not to master. Since the end is never told, we pay the teller off in gold, in hopes he will return, but he cannot be bought or sold.
+It is better to be high-spirited even though one makes more mistakes, than to be narrow-minded and all to prudent. Do not quench your inspiration and your imagination; do not become the slave of your model.
+If everything's under control, you're going too slow.
+No matter how far you have gone on the wrong road, turn back.
+Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.
+One lives in the hope of becoming a memory.
+In raising my children, I have lost my mind but found my soul.
+You can outdistance that which is running after you, but not what is running inside you.
+If you think nobody cares if you're alive, try missing a couple of car payments.
+One day at a time -- this is enough. Do not look back and grieve over the past, for it is gone; and do not be troubled about the future, for it has not yet come. Live in the present, and make it so beautiful that it will be worth remembering.
+A man who is 'of sound mind' is one who keeps the inner madman under lock and key.
+You grow up the day you have your first real laugh -- at yourself.
+A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort.
+A hundred years from now it will not matter what my bank account was, the sort of house I lived in, or the kind of car I drove... But the world may be different because I was important in the life of a child.
+The only Zen you find on the tops of mountains is the Zen you bring up there.
+Remain calm, serene, always in command of yourself. You will then find out how easy it is to get along.
+Sooner or later we must realize there is no station, no one place to arrive at once and for all. The true joy of life is the trip.
+If you want your dreams to come true, don't sleep.
+The minute you settle for less than you deserve, you get even less than you settled for.
+Ideas are like wandering sons. They show up when you least expect them.
+Dreams are renewable. No matter what our age or condition, there are still untapped possibilities within us and new beauty waiting to be born.
+When you finally go back to your old hometown, you find it wasn't the old home you missed but your childhood.
+Among my most prized possessions are words that I have never spoken.
+Seek freedom and become captive of your desires. Seek discipline and find your liberty.
+Isolation is aloneness that feels forced upon you, like a punishment. Solitude is aloneness you choose and embrace. I think great things can come out of solitude, out of going to a place where all is quiet except the beating of your heart.
+On the whole, age comes more gently to those who have some doorway into an abstract world-art, or philosophy, or learning-regions where the years are scarcely noticed and the young and old can meet in a pale truthful light.
+To rid ourselves of our shadows - who we are - we must step into either total light or total darkness.
+Happy campers you have been, happy campers you are, and happy campers you will always be.
+Millions long for immortality who do not know what to do with themselves on a rainy Sunday afternoon.
+I like to see you move with the rythm; I Like to see when you're dancin' from within.
+There is only one corner of the universe you can be certain of improving and that is your own self.
+He who wonders discovers that this in itself is wonder.
+A good traveler has no fixed plans, and is not intent on arriving.
+It is the sign of a dull mind to dwell upon the cares of the body, to prolong exercise, eating and drinking, and other bodily functions. These things are best done by the way; all your attention must be given to the mind.
+Life beats down and crushes the soul and art reminds you that you have one.
+One of the advantages of being disorderly is that one is constantly making exciting discoveries.
+As soon as man does not take his existence for granted, but beholds it as something unfathomably mysterious, thought begins.
+Reality is merely an illusion, albeit a very persistent one.
+If a person foolishly does me wrong, I will return to him the protection of my boundless love. The more evil that comes from him, the more good will go from me. I will always give off only the fragrance of goodness.
+This occupation with ideas of immortality is for people of rank, and especially for ladies who have nothing to do. But a man of real worth who has something to do here, and must toil and struggle to produce day by day, leaves the future world to itself, and is active and useful in this.
+A wee child toddling in a wonder world, I prefer to their dogma my excursions into the natural gardens where the voice of the Great Spirit is heard in the twittering of birds, the rippling of mighty waters, and the sweet breathing of flowers. If this is Paganism, then at present, at least, I am a Pagan.
+If you think you're too small to have an impact, try going to bed with a mosquito in the room.
+The hearts of the great can be changed.
+Never let the future disturb you. You will meet it, if you have to, with the same weapons of reason which today arm you against the present.
+The man who insists upon seeing with perfect clearness before he decides, never decides. Accept life and you must accept regret.
+Make the best use of what is in your power, and take the rest as it happens.
+Let yourself be open and life will be easier. A spoon of salt in a glass of water makes the water undrinkable. A spoon of salt in a lake is almost unnoticed.
+The worst things: To be in bed and sleep not, To want for one who comes not, To try to please and please not.
+Sanity is madness put to good uses; waking life is a dream controlled.
+Ventis secundis, tene cursum.
+Even in the presence of others, he was completely alone.
+Talk to every woman as if you loved her, and to every man as if he bored you, and at the end of your first season you will have the reputation of possessing the most perfect social tact.
+When a child asks you something, answer him, for goodness’ sake. But don’t make a production of it. Children are children, but they can spot an evasion quicker than adults, and evasion simply muddles ‘em.
+Be aware that young people have to be able to make their own mistakes and that times change.
+A daydream is a meal at which images are eaten. Some of us are gourmets, some gourmands, and a good many take their images precooked out of a can and swallow them down whole, absent-mindedly and with little relish.
+A man is not honest simply because he never had a chance to steal.
+The death of fear is in doing what you fear to do.
+Men create war to compete with women, who create life.
+A man dies still if he has done nothing, as one who has done much.
+The misfortune of the wise is better than the prosperity of the fool.
+To accuse others for one's own misfortunes is a sign of want of education. To accuse oneself shows that one's education has begun. To accuse neither oneself nor others shows that one's education is complete.
+A conservative is a man with two perfectly good legs who, however, has never learned how to walk forward.
+I'm a simple man. All I want is enough sleep for two normal men, enough whiskey for three, and enough women for four.
+Excess on occasion is exhilarating. It prevents moderation from acquiring the deadening effect of a habit.
+The sweetest of all sounds is praise.
+My opinions may have changed, but not the fact that I'm right.
+Even if I knew that tomorrow the world would go to pieces, I would still plant my apple tree.
+The will to win is worthless if you don't get paid for it.
+In the fight between you and the world, back the world.
+Every man alone is sincere; at the entrance of a second person hypocrisy begins.
+I enjoyed my own nature to the fullest, and we all know that there lies happiness, although, to soothe one another mutually, we occasionally pretend to condemn such joys as selfishness.
+I seated ugliness on my knee, and almost immediately grew tired of it.
+Everything has been figured out, except how to live.
+We should consider every day lost on which we have not danced at least once. And we should call every truth false which was not accompanied by at least one laugh.
+Objective evidence and certitude are doubtless very fine ideals to play with, but where on this moonlit and dream-visited planet are they found?
+Patience will achieve more than force.
+If you believe everything you read, you better not read.
+Against stupidity the very gods themselves contend in vain.
+When you live in the shadow of insanity, the appearance of another mind that thinks and acts as yours does is something close to a blessed event.
+Failures are divided into two classes--those who thought and never did, and those who did and never thought.
+Keep cool, but don't freeze.
+Words - so innocent and powerless as they are, as standing in a dictionary, how potent for good and evil they become in the hands of one who knows how to combine them.
+You can cheat an honest man but not make a fool out of him.
+You've got to be careful if you don't know where you are going, because you might not get there.
+A child of five would understand this. Send someone to fetch a child of five.
+By the time a man realizes that maybe his father was right, he usually has a son who thinks he's wrong.
+If you want a place in the sun you've got to put up with a few blisters
+The only limits are, as always, those of vision.
+In three words I can sum up everything I've learned about life. It goes on.
+Accept that some days you're the pigeon, and some days your're the statue.
+Better to be occasionally cheated than prpetually suspicious.
+Thing big thoughts but relish small pleasures.
+Success is how high you bounce when you hit bottom.
+A man's greatest strength develops at the point where he overcomes his greatest weakness.
+Between two evils, I always pick the one I never tried before.
+The moment of victory is much too short to live for that and nothing else.
+Perseverence is not a long race; it is many short races one after another.
+Inorder to make your dreams come true, you must awaken and take charge.
+I was too far out all my life, and not waving, but drowning.
+The mind makes a self made prison, while the heart makes a self taught lover.
+Silence is the haven of a purposeful mind.
+Poetry is the key to one of lifes biggest mysteries; the human mind.
+Never eat more than you can lift.
+Counting time is not so important as making time count.
+I can accept failure. Everyone fails at something. But l can't accept not trying.
+Once you face your fear, nothing is ever as hard as you think.
+If you plan for the worse and the worst does not come, what does come is at least better.
+We just don't recognize the most significant moments of our lives while they're happening.
+We don't change over time. We only become more ourselves.
+A journey of a thousand miles begins with one simple step.
+Failure is a word I simply don't accept!
+Don't feel sorry for yourself if you have taken the wrong road - turn around!
+Work like you don't need the money, love like you've never been hurt, and dance like no one is watching...
+God made the world, My Lord, and looked at it, and saw that it was good. Yes. But what if the world had looked back at him, to see whether he was goodor not?
+I thought for a minute, and I said, Well, I wanted to be a beautiful pearl, but I looked in the mirror and decided that wasn't in the cards. And then I said, Oh, well, maybe I can be an oyster, because the oyster makes the beautiful pearl.
+Remember not only to say the right thing in the right place, but far more difficult still, to leave unsaid the wrong thing at the tempting moment.
+Everyone has talent. What is rare is the courage to follow the talent to the dark place where it leads.
+Someone's boring me. I think it's me.
+The average person thinks he isn't.
+Your true value depends entirely on what you are compared with.
+Even if you"re on the right track, you'll get run over if you just sit there.
+Truly great madness cannot be achieved without significant intelligence.
+Imagination is the one weapon in the war against reality.
+The most wasted of all days is one without laughter.
+In these matters the only certainty is that nothing is certain.
+Always and never are two words you should always remember never to use.
+There is no such thing as a 'self-made' man. We are made up of thousands of others. Everyone who has ever done a kind deed for us, or spoken one word of encouragement to us, has entered into the make-up of our character and of our thoughts, as well as our success.
+The work goes on, the cause endures, the hope still lives and the dreams shall never die.
+Freedom is not worth having if it does not include the freedom to make mistakes.
+We learn from experience that men never learn anything from experience.
+Our lives improve only when we take chances -- and the first and most difficult risk we can take is to be honest with ourselves.
+If people did not sometimes do silly things, nothing intelligent would ever get done.
+I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center.
+Some of the world's greatest feats were accomplished by people not smart enought to know they were impossible.
+There's no fool like an old fool --- you can't beat experience.
+Every generation thinks it has the answers, and every generation is humbled by nature.
+No man really becomes a fool until he stops asking questions.
+The man who views the world at 50 the same as he did at 20 has wasted 30 years of his life.
+An unfortunate thing about this world is that the good habits are much easier to give up than the bad ones.
+A man is a success if he gets up in the morning and gets to bed at night, and in between he does what he wants to do.
+It wasn't until late in life that I discovered how easy it is to say 'I don't know'.
+There's only one corner of the universe you can be certain of improving, and that's your own self.
+If you can spend a perfectly useless afternoon in a perfectly useless manner, you have learned how to live.
+Excess on occasion is exhilarating. It prevents moderation from acquiring the deadening effect of a habit.
+Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.
+Some people come into our lives and quickly go. Others stay for a while and leave footprints on our hearts and we are never the same.
+I'm goin' where the wind don't blow so strange, maybe off on some high cold mountain chain.
+In order to make your dreams come true, you must awaken and take charge.
+I was too far out all my life, and not waving, but drowning.
+The mind makes a self made prison, while the heart makes a self taught lover.
+Silence is the haven of a purposeful mind.
+Once you face your fear, nothing is ever as hard as you think.
+We have two ears and one mouth so that we can listen twice as much as we speak.
+In the depth of winter, I finally learned that within me there lay an invincible summer.
+If you plan for the worse and the worst does not come, what does come is at least better.
+We just don't recognize the most significant moments of our lives while they're happening.
+That man is the richest whose pleasures are the cheapest.
+Don't feel sorry for yourself if you have taken the wrong road - turn around!
+Remember not only to say the right thing in the right place, but far more difficult still, to leave unsaid the wrong thing at the tempting moment.
+Everyone has talent. What is rare is the courage to follow the talent to the dark place where it leads.
+Your true value depends entirely on what you are compared with.
+Truly great madness cannot be achieved without significant intelligence.
+The most wasted of all days is one without laughter.
+The work goes on, the cause endures, the hope still lives and the dreams shall never die.
+We learn from experience that men never learn anything from experience.
+Our lives improve only when we take chances -- and the first and most difficult risk we can take is to be honest with ourselves.
+If people did not sometimes do silly things, nothing intelligent would ever get done.
+I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center.
+If you are drowning and all you can think about is the fact that you can't swim, you are certainly going to die.
+Life is like a rollercoaster, it has it's ups and downs, but when part of it is over, you wish you could do it again.
+In order to live free and happily you must sacrifice boredom. It is not always an easy sacrifice.
+Habits are safer than rules; you don't have to watch them. And you don't have to keep them either. They keep you.
+Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats.
+They may forget what you said, but they will never forget how you made them feel.
+A cynic is a person searching for an honest man, with a stolen lantern.
+It's hard to fight an enemy who has outposts in your head.
+It is better to be defeated on principle than to win on lies.
+You can get much farther with a kind word and a gun than you can with a kind word alone.
+You cannot prevent the birds of sorrow from flying over your head, but you can prevent them from building nests in your hair.
+Nicht wollen ist der Grund, nicht knnen nur der Vorwand.
+Somehow life doesn't always pay off to those who are most insistent.
+It ain't no sin to be glad you're alive.
+Making a record is like building a ship in a bottle. Playing a concert is like being in a rowboat on the ocean.
+Be sure you put your feet in the right place, then stand firm.
+To make a prairie, It takes clover and one bee, One clover, and a bee, and revery. The revery alone will do, If bees are few.
+Only those who attempt the absurd will achieve the impossible. I think it's in my basement...let me go upstairs and check.
+Don't cry when the sun is gone, because the tears won't let you see the stars.
+Always go to the bathroom when you have a chance.
+We must laugh at man to avoid crying for him.
+I have never been lost, but I will admit to being confused for several weeks.
+The man who rolls up his sleeves seldom loses his shirt.
+There is no exercise better for the heart than reaching down and lifting people up.
+Resolve to make each day the very best and don't let anyone get in your way. If they do, step on them.
+Believe those who are seeking the truth; doubt those who find it.
+In the book of life, the answers aren't in the back.
+A man who makes trouble for others is also making trouble for himself.
+I came, I saw, I conquered.
+Just surrender to the cycle of things, Give yourself to the waves of the Great Change, And when it is time to go, then simply go, Without any unnecessary fuss.
+We encounter the grinding wheels that sharpen our mental blades many places in life. Adversity, school, parents, spiritual guides, books, experience are all sharpening teachers. As we grow older, to stay sharp we must find new grindstones to whet and sharpen our potential and keep us at our brightest, most penetrating best.
+His best companions, innocence and health; And his best riches, ignorance of wealth.
+To fly, we have to have resistance.
+Never fear shadows. They simply mean that there's a light somewhere nearby.
+One friend in a lifetime is much; two are many; three are hardly possible.
+I either want less corruption, or more chance to participate in it.
+God grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.
+There is a great disturbance in the force.
+To fly, we have to have resistance.
+O, what a tangled web we weave, when first we practise to deceive.
+Reason often makes mistakes, but conscience never does.
+Life moves pretty fast, If you don't take a look around once and awhile, you could miss it.
+Life is as a jelly roll. When you think you have it eaten, it comes out the other end.
+No animal is so inexhaustable as an excited infant.
+Leftovers in their less visible form are called memories. Stored in the refrigerator of the mind and the cupboard of the heart.
+There was a time when a fool and his money were soon parted, but now it happens to everybody.
+We ought to do good to others as simply as a horse runs, or a bee makes honey, or a vine bears grapes season after season without thinking of the grapes it has borne.
+There wouldn't be a sky full of stars if we were all meant to wish on the same one.
+Setting an example for your children takes all the fun out of middle age. Conditions are never just right. People who delay action until all factors are favorable do nothing.
+Nobody can be so amusingly arrogant as a young man who has just discovered an old idea and thinks it is his own. When I hear somebody sigh, Life is hard, I am always tempted to ask, Compared to what?
+Take time to deliberate; but when the time for action arrives, stop thinking and go in. One man with courage makes a majority.
+Of those who say nothing, few are silent.
+When we walk to the edge of all the light we have and take the step into the darkness of the unknown, we must believe that one of two things will happen. There will be something solid for us to stand on or we will be taught to fly.
+Life is the acceptance of responsibilities or their evasion, it is a business of meeting obligations or avoiding them. To every man the choice is continually being offered, and by the manner of his choosing you may fairly measure him.
+How do I know that love of life is not a delusion after all? How do I know that he who dreads death is not as a child who has lost his way and does not know his way home?
+A little inaccuracy sometimes saves a ton of explanation.
+Age does not diminish the extreme disappointment of having a scoop of ice cream fall from the cone.
+The future you shall know when it has come; before then, forget it.
+Perhaps the truth depends on a walk around the lake.
+The robbed that smiles, steals something from the thief.
+We cannot waste time. We can only waste ourselves.
+There's never enough time to do all the nothing you want.
+If you don't know where you are going, you will probably end up somewhere else.
+Fall seven times, stand up eight.
+Let us be of good cheer, remembering that the misfortunes hardest to bear are those which will never happen.
+One problem with gazing too frequently into the past is that we may turn around to find the future has run out on us.
+The first sign of maturity is the discovery that the volume knob also turns to the left.
+If they give you ruled paper, write the other way.
+Beer is proof that God loves us and wants us to be happy.
+Time and memory are true artists; they remould reality nearer to the heart's desire.
+I have discovered that all human evil comes from this, man's being unable to sit still and quiet in a room alone.
+When one door closes, another opens; but we often look so long and so regretfully upon the closed door that we do not see the one which has opened for us.
+The worst bankrupt in the world is the person who has lost his enthusiasm.
+Imagination is the highest kite one can fly.
+Think it more satisfactory to live richly than die rich.
+To live is so startling it leaves little time for anything else.
+Stop a moment, cease your work, and look around you.
+Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable.
+A solitary, unused to speaking of what he sees and feels, has mental experiences which are at once more intense and less articulate than those of a gregarious man.
+I don't know what you could say about a day in which you have seen four beautiful sunsets.
+I don't know what you could say about a day in which you have seen four beautiful sunsets.
+It is a revenge the devil sometimes takes upon the virtuous, that he entraps them by the force of the very passion they have suppressed and think themselves superior to.
+You have not converted a man because you have silenced him.
+Everything flows; nothing remains.
+All commend patience, but none can endure to suffer.
+Money, the root of all evil...but the cure for all sadness.
+Advice is like snow -- the softer it falls, the longer it dwells upon, and the deeper in sinks into the mind.
+People generally quarrel because they cannot argue.
+He who angers you conquers you.
+The marvelous richness of human experience would lose something of rewarding joy if there were no limitations to overcome. The hilltop hour would not be half so wonderful if there were no dark valleys to traverse.
+Beware of the man who does not talk, and the dog that does not bark.
+For small creatures such as we the vastness is bearable only through love.
+Your life is the sum result of all the choices you make, both consciously and unconsciously. If you can control the process of choosing, you can take control of all aspects of your life. You can find the freedom that comes from being in charge of yourself.
+Habit and routine have an unbelievable power to waste and destroy.
+Life is the art of drawing sufficient conclusions from insufficient premises.
+To be what we are, and to become what we are capable of becoming, is the only end of life.
+All that we see or seem is but a dream within a dream.
+Life is like music; it must be composed by ear, feeling, and instinct, not by rule.
+Real poverty is less a state of income than a state of mind.
+You can't put the toothpaste back in the tube.
+We are most nearly ourselves when we achieve the seriousness of the child at play.
+Even if I knew that tomorrow the world would go to pieces, I would still plant my apple tree.
+The nice thing about egoists is that they don't talk about other people.
+Before the gates of excellence the high gods have placed sweat; long is the road thereto and rough and steep at first; but when the heights are reached, then there is ease, though grievously hard in the winning.
+Too often we give our children answers to remember rather than problems to solve.
+The only thing that makes life possible is permanent, intolerable uncertainty; not knowing what comes next.
+Paranoia is reality on a finer scale.
+It is only imperfection that complains of what is imperfect. The more perfect we are, the more gentle and quiet we become toward the defects of others.
+I have never in my life learned anything from any man who agreed with me.
+Go thy way, eat thy bread with joy, and drink thy wine with a merry heart; for God now accepteth thy works.
+A competent and self-confident person is incapable of jealousy in anything. Jealousy is invariably a symptom of neurotic insecurity.
+I believe that if you think about disaster, you will get it. Brood about death and you hasten your demise. Think positively and masterfully with confidence and faith, and life becomes more secure, more fraught with action, richer in achievement and experience.
+My research consists of studying the effects of putting somebody like me into a world like this.
+Whatever the theories may be of woman's dependence on man, in the supreme moments of her life he can not bear her burdens.
+Sun illuminates only the eye of the man, but shines into the eye and heart of the child.
+Most of us don't know what we want and spend our lives wondering why we don't get it.
+Each has his past shut in him like the leaves of a book known to him by heart and his friends can only read the title.
+A good time to keep your mouth shut is when you're in deep water.
+People change, not necessarily in negative ways. Sometimes goals and intentions in life aren't aligned. It's just choices we make in life. Otherwise, why aren't we with the person we were with in seventh grade?
+From what we get, we can make a living; what we give, however, makes a life.
+For fast acting relief ; try slowing down.
+The trouble with our times is that the future is not what it used to be.
+We are not permitted to choose the frame of our destiny. But what we put into it is ours.
+One can know a man from his laugh, and if you like a man's laugh before you know anything of him, you may confidently say that he is a good man.
+Silence is exhilarating at first--as noise is--but there is a sweetness to silence outlasting exhilaration, akin to the sweetness of listening and the velvet of sleep.
+When people are free to do as they please, they usually imitate each other.
+Time makes more converts than reason.
+There is only one success: to be able to spend your life in your own way, and not to give others absurd maddening claims upon it.
+The bigger the real-life problems, the greater the tendency for the discipline to retreat into a reassuring fantasy-land of abstract theory and technical manipulation.
+No man means all he says, and yet very few say all they mean, for words are slippery and thought is viscous.
+The age span 16-30 is crucial, for that is the period when life adds sweetness to itself, when talents, skills and attitudes are accumulated, sublimated, and sanctified. If the tonic of unselfish service is administered to the mind during this period, life mission is fulfilled - for the process of sublimation and sanctification will be hastened by this tonic.
+Probably the happiest period in life most frequently is in middle age, when the eager passions of youth are cooled, and the infirmities of age not yet begun; as we see that the shadows, which are at morning and evening so large, almost entirely disappear at midday.
+The universe is made of stories, not of atoms.
+It has long been an axiom of mine that the little things are infinitely the more important.
+While we are free to choose our actions, we are not free to choose the consequences of our actions.
+My advice to people today is as follows: If you take the game of life seriously, if you take your nervous system seriously, if you take your sense organs seriously, if you take the energy process seriously, you must turn on, tune in, and drop out.
+There are three ingredients in the good life: learning, earning and yearning.
+Few are those who see with their own eyes and feel with their own hearts
+There is only one success: to be able to spend your life in your own way, and not to give others absurd maddening claims upon it.
+It is sufficiently clear that all things are changed, and nothing really perishes, and that the sum of matter remains absolutely the same.
+The road up and the road down are one and the same.
+The badge of honesty. Having it lets you look at any man in the eye. Lacking it he won't look back. Keep this one at the top of your list.
+May the road rise to meet you. May the wind always be at your back. May the sun shine warm upon your face, the rains fall soft upon your fields, and, until we meet again, may God hold you in the palm of his hand.
+The fellow who thinks he knows it all is especially annoying to those of us who do.
+None are more hopelessly enslaved than those who falsely believe they are free.
+Women and cats will do as they please and men and dogs should relax and get used to the idea.
+Advice is what we ask for when we already know the answer but wish we didn't.
+Those who are awake all live in the same world. Those who are asleep live in their own worlds.
+The only people for me are the mad ones, the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn, like fabulous yellow roman candles exploding like spiders across the stars and in the middle you see the blue centerlight pop and everybody goes "Awww!
+We grow small trying to be great.
+Natives who beat drums to drive off evil spirits are objects of scorn to smart Americans who blow horns to break up traffic jams.
+He who joyfully marches to music in rank and file has already earned my contempt. He has been given a large brain by mistake. For him the spinal cord alone would fully suffice.
+Until now, modes of life have been based on the material servitude of the mass of people. Intellectual exploration, intellectual creativity, and the substance of personal freedom have been limited to minorities of the population. Intellectual exploration as a paid job has been limited to accredited social élites.
+The world is made of people who never quite get into the first team and who just miss the prizes at the flower show.
+The society of merchants can be defined as a society in which things disappear in favor of signs. When a ruling class measures its fortunes, not by the acre of land or the ingot of gold,but by the number of figures corresponding ideally to a certain number of exchange operations, it thereby condemns itself to setting a certain kind of humbug at the center of its experience and its universe. A society founded on signs is, in its essence, an artificial society in which man'scarnal truth is handled as something artificial.
+It has become appallingly obvious that our technology has exceeded our humanity.
+One death is a tragedy. A million deaths is a statistic.
+People demand freedom of speech as a compensation for the freedom of thought which they never use.
+Heredity is a splendid phenomenon that relievesus of responsibility for our shortcomings.
+We take what we want and leave the rest,just like your salad bar.
+Only dead fish go with the current.
+Aristotle taught that the brain exists merely to cool the bloodand is not involved in the process of thinking. This is true only of certain persons.
+As long as people will accept crap, it will be financially profitable to dispense it.
+The secret of being tiresome is to tell everything.
+It has been my experience that folks who have no vices have few virtues.
+Putting it in plain terms, the general public must be reduced to its traditional apathy and obedience, and driven from the arena of political debate and action, if democracy is to survive.
+You cannot strengthen the weak by weakening the strong. You cannot help small men by tearing down big men. You cannot help the poor by destroying the rich. You cannot lift the wage earner by pulling down the wage-payer. You cannot keep out of trouble by spending more than your income. You cannot further the brotherhood of man by inciting class hatreds. You cannot build character and courage by taking away a man's initiative and independence. You cannot help men permenantly by doing for them what they could and should do for themselves.
+The invention of the teenager was a mistake. Once you identify a period of life in which people get to stay out late but don't have to pay taxes - naturally, nobody wants to live any other way.
+Ten people who speak make more noise than ten thousand who are silent.
+It is natural to man to indulge in the illusion of hope. We are apt to shut our eyes against the painful truth, and listen to the song of that siren, till she transforms us into beasts.
+The concept of progress acts as a protective mechanism to shield us from the terrors of the future.
+Our crude civilization engenders a multitude of wants, and law-givers are ever at their wit's enddevising. The hall and the theater and the church have been invented, and compulsory education. Why not add compulsory recreation? Our forefathers forged chains of duty and habit, which bindus notwithstanding our boasted freedom, and we ourselves in desperation add link to link,groaning and making medicinal laws for relief. Yet few think of pure rest or of the healing powerof Nature.
+And what does the money machine eat to shit out? It eats youth, spontaneity, life, beauty and above all it eats creativity. It eats quality and shits out quantity.
+The world acquires value only through its extremes and endures only through moderation; extremists make the world great, the moderates give it stability.
+To talk much and arrive nowhere is the same as climbing a tree to catch a fish.
+There can be no truth since truth varies with different individuals and with each individual in different circumstances; there can be no communication with others because words interpret what seems to be and not what is; and, in the last resort, there can be no sanity since sanity demands a stable foundation.
+If all mankind minus one were of one opinion, mankind would be no more justified in silencing that one person than he, if he had the power, would be justified in silencing mankind.
+Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house. Time Enough for Love.
+The hallmark of our age is the tension between aspirations and sluggish institutions.
+The monster of advertisement. . . is a sort of octopus with innumerable tentacles. It. . . gathers in, through its thousand little suckers, all the gossip and slander and praise afloat, to spit out again at the public.'
+I praise loudly, I blame softly.
+Great men are they who see that spiritual is stronger than any material force, that thoughts rule the world.
+A man who keeps his word is worth much more.
+Human felicity is produced not so much by great pieces of good fortune that seldom happen, as by little advantages that occur each day.
+We are all in the gutter, but some of us are looking at the stars.
+Good sense is, of all things among men, the most equally distributed; for every one thinks himself so abundantly provided with it, that those even who are the most difficult to satisfy in everything else, do not usually desire a larger measure of this quality than they already possess.
+Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends.
+Wave upon wave of demented avengers march cheerfully out of obscurity into the dream. Have you heard the news? The dogs are dead. You'd better stay home and do as you're told. Get out of the road if you wanna grow old.
+Finding a cure for cancer and heart disease would be a major financial disaster which would bankrupt the social security system and the big insurance companies.
+When you have once seen the glow of happiness on the face of a beloved person, you know that a man can have no vocation but to awaken that light on the faces surrounding him; and you are torn by the thought of the unhappiness and night you cast, by the mere fact of living, in the hearts you encounter.
+The present state of the world and the whole of life is diseased. If I were a doctor and were asked for my advice, I should reply: Create Silence.
+Nobody realizes that some people expend tremendous energy merely to be normal.
+It does no harm just once in a while to acknowledge that the whole country isn't in flames, that there are people in the country besides politicians, entertainers, and criminals.
+Half the troubles of mankind come from ignorance, -- ignorance which is systematically organized with societies for its support and newspapers for its dissemination, -- ignorance which consists less in not knowing things, than in willfully ignoring the things that are already known.
+It may be true that the law cannot make a man love me. But it can keep him from lynching me, and I think that's pretty important.
+It's no measure of health to be well adjusted to a profoundly sick society.
+Advertising isn't a science. It's persuasion. And persuasion is an art.
+An economist is an expert who will know tomorrow why the things he predicted yesterday didn't happen today.
+The urbane activity which a man receives money is really marvellous, considering that we so earnestly believe money to be the root of all earthly ills, and that on no account can a monied man enter heaven. Ah! how cheerfully we consign ourselves to perdition!
+The great curse of our modern society is not so much the lack of money as the fact that the lack of money condemns a man to a squalid and incomplete existence.
+So far as I can see, the atomic bomb has deadened the finest feeling that has sustained humankind for ages... The moral to be legitimately drawn from the supreme tragedy of the bomb is that it will not be destroyed by counter-bombs, even violence cannot be by counter-violence. Human kind has to get out of violence only through nonviolence. Hatred can be overcome only by love. Counter-hatred only increases the surface as well as the depth of hatred.
+America has no north, no south, no east, no west. The sun rises over the hills and sets over the mountains, the compass just points up and down, and we can laugh now at the absurd notion of there being a north and a south. We are one and undivided.
+The true measure of a man is how he treats someone who can do him absolutely no good.
+Expecting the world to treat you fairly because you are a good person is a little like expecting a bull not to attack you because you are a vegetarian.
+We are living in a world today where lemonade is made from artificial flavors and furniture polish is made from real lemons...
+Those who stand for nothing fall for anything.
+The populace is by nature fickle. It is easy to persuade them of something, but very difficult to confirm them in that persuasion.
+There is nothing more uncommon than common sense.
+So many gods, so many creeds, So many paths that wind and wind, While just the art of being kind is all the sad world needs.
+Capitalism is the extraordinary belief that the nastiest of men, for the nastiest of reasons, will somehow work for the benefit of us all.
+Man walks the moon but his soul remains riveted to earth. Once upon a time it was the opposite.
+The amount of noise which anyone can bear undisturbed stands in inverse proportion to his mental capacity.
+Hypocrisy is the lubricant of society.
+In Germany they came first for the Communists, and I didn't speak up because I wasn't a Communist. Then they came for the Jews, and I didn't speak up because I wasn't a Jew. Then they came for the trade unionists, and I didn't speak up because I wasn't a trade unionist. Then they came for the Catholics, and I didn't speak up because I was a Protestant. Then they came for me, and by that time no one was left to speak up.
+Man has made use of his intelligence, he invented stupidity.
+Nothing is too high for the daring of mortals: we storm heaven itself in our folly.
+If triangles had a God, He'd have three sides.
+(In regards to China) "To trade with them is actually more corrosive than not.
+Before you kill something make sure you have something better to replace it with; something better than political opportunist slamming hate horse shit in the public park.
+When we get piled upon one another in large cities, as in Europe, we shall become as corrupt as Europe.
+We Arabs, especially the educated among us, look with deepest sympathy on the Zionist movement... We will wish the Jews a hearty welcome home... We are working together for a reformed and revised Near East, and our two movements complement one another. The movement is national and not imperialistic. There is room in Syria for us both. Indeed, I think that neither can be successful without the other.
+They will say you are on the wrong road, if it is your own.
+In every country where man is free to think and to speak, differences of opinion will arise from difference of perception, and the imperfection of reason; but these differences when permitted, as in this happy country, to purify themselves by free discussion, are but as passing clouds overspreading our land transiently and leaving our horizon more bright and serene.
+Football combines two of the worst things about American life. It is violence punctuated by committee meetings.
+Nothing is wrong with California that a rise in the ocean level wouldn't cure.
+The release of atomic energy has not created a new problem. It has merely made more urgent the necessity of solving an existing one.
+Some people like my advice so much that they frame it upon the wall instead of using it.
+The chief product of an automated society is a widespread and deepening sense of boredom.
+Money never made a man happy yet, nor will it. There is nothing in its nature to produce happiness. The more a man has, the more he wants. Instead of its filling a vacuum, it makes one.
+You do not destroy an idea by killing people; you replace it with a better one.
+As far as we can discern, the sole purpose of human existence is to kindle a light in the darkness of mere being.
+Only the wisest and the stupidest of men never change.
+Those that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.
+A true leader is hated by most, and respected by all. A follower is liked by all, and respected by none.
+Madness is rare in individuals; but in groups, political parties, nations, and eras it's the rule.
+A classic is something that everybody wants to have read and nobody wants to read.
+Any society that needs disclaimers has too many lawyers.
+What fools these mortals be.(Tanta Stultitia Mortalium Est.)
+Speak only well of people and you need never whisper.
+Few of us will have the greatness to bend history itself, but each of us can work to change a small portion ofevents, and in the total of these acts will be written the history of this generation.
+Nothing... is unchangeable but the inherent and inalienable rights of man."rights of man.
+Men willingly believe what they wish.
+Anyone can hold the helm when the sea is calm.
+The human mind treats a new idea the same way the body treats a strange protein; it rejects it.
+Before God we are all equally wise - and equally foolish.
+The future, according to some scientists, will be exactly like the past, only far more expensive.
+America may be unique in being a country which has leapt from barbarism to decadence without touching civilization.
+Never attribute to malice what can be adequately explained by stupidity.
+What a blessing it would be if we could open and shut our ears as easily as we open and shut our eyes!
+You probably wouldn't worry about what people think of you if you could know how seldom they do.
+I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use.
+Everybody lies, but it doesn't matter because nobody listens.
+The pure and simple truth is rarely pure and never simple.
+The meek shall inherit the Earth, but not its mineral rights.
+Boys will be boys, and so will a lot of middle-aged men.
+If God lived on earth, people would break his windows.
+The optimist thinks this is the best of all possible worlds. The pessimist fears it is true.
+You white people are so strange. We think it is very primitive for a child to have only two parents.
+The very powerful and the very stupid have one thing in common. Instead of altering their views to fit the facts, they alter the facts to fit their views
+No one ever went broke underestimating the taste of the American public.
+There are no exceptions to the rule that everybody likes to be an exception to the rule.
+Anyway, no drug, not even alcohol, causes the fundamental ills of society. If we're looking for the source of our troubles, we shouldn't test people for drugs, we should test them for stupidity, ignorance, greed and love of power.
+Man is the only animal that learns by being hypocritical. He pretends to be polite and then, eventually, he becomes polite.
+Speak only well of people and you need never whisper.
+Few of us will have the greatness to bend history itself, but each of us can work to change a small portion of events, and in the total of these acts will be written the history of this generation.
+Nothing... is unchangeable but the inherent and inalienable rights of man.
+Before God we are all equally wise - and equally foolish.
+What a blessing it would be if we could open and shut our ears as easily as we open and shut our eyes!
+I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use.
+If God lived on earth, people would break his windows.
+The dynamics of capitalism is postponement of enjoyment to the constantly postponed future.
+A market is the combined behavior of thousands of people responding to information, misinformation and whim.
+It's human nature to keep doing something as long as it's pleasureable and you can succeed at it--which is why the world population continues to double every 40 years.
+In some cases non-violence requires more militancy than violence.
+In the United States today, there is a pervasive tendency to treat children as adults, and adults as children. The options of children are thus steadily expanded, while those of adults are progressively constricted. The result is unruly children and childish adults.
+It is difficult to produce a television documentary that is both incisive and probing when every twelve minutes one is interrupted by twelve dancing rabbits singing about toilet paper.
+Let thy speech be better than silence, or be silent.
+Modern man thinks he loses something; time; when he does not do things quickly. Yet he does not know what to do with the time he gains; except kill it.
+When a man lies, he murders some part of the world. These are the pale deaths which men miscall their lives. All this I cannot bear to witness any longer. Cannot the kingdom of salvation take me home?
+Today, if you are not confused, you are just not thinking clearly.
+The world's as ugly as sin, and almost as delightful.
+Any fool can tell the truth, but it requires a man of some sense to know how to lie well.
+Men do not invent Myths. They only invent fables, and tell lies. True Myths create themselves, and find their expression in the men who serve their purpose.
+Compromise does not satisfy, but dissatisfies everybody; it does not lead to any general fulfillment, but to general frustration; those who try to become everything to all people end up by not being anything to anyone.
+Illegal aliens have always been a problem in the United States. Ask any Indian.
+Wallets are the fabricated items into which we put our fabricated money, which most people believe to be their possession of the realest value.
+The test for whether or not you can hold a job should not be the arrangement of your chromosomes.
+Sed quis custodiet ipsos custodes?
+It's a sad and stupid thing to have to proclaim yourself a revolutionary just to be a decent man.
+I always turn to the sports pages first, which records people's accomplishments. The front page has nothing but man's failures.
+Women are the only oppressed group in our society that lives in intimate association with their opressors.
+He that has learned how to obey will know how to command.
+No matter how much the cats fight, there still seems to be plenty of kittens.
+Every society honors its live conformists and its dead troublemakers.
+On the whole human beings want to be good, but not too good and not quite all the time. Who controls the past controls the future. Who controls the present controls the past.
+You can't separate peace from freedom because no one can be at peace unless he has his freedom.
+We live in a moment of history where change is so speeded up that we begin to see the present only when it is already disappearing.
+Don't knock the weather; nine-tenths of the people couldn't start a conversation if it didn't change once in a while.
+The world is so empty if one thinks only of mountains, rivers and cities; but to know someone here and there who thinks and feels with us, and though distant, is close to us in spirit - this makes the earth for us an inhabited garden
+That man can destroy life is just as miraculous a feat as that he can create it, for life is the miracle, the inexplicable. In the act of destruction, man sets himself above life; he transcends himself as a creature. Thus, the ultimate choice for a man, inasmuch as he is driven to transcend himself, is to create or to destroy, to love or to hate.
+Perhaps this is our strange and haunting paradox here in America -- that we are fixed and certain only when we are in movement.
+From each, according to his ability; to each, according to his need.
+I inhabit a weak, frail, decayed tenement battered by the winds and broken in on by the storms, and, from all I can learn, the landlord does not intend to repair.
+And be on they guard against the good and the just! They would fain curcify those who devise their own virtue -- they hate the lonesome ones.
+Of course, if you photograph the behavior of women and men at a particular time in history, in a particular situation, you will capture differences. But the error lies in inferring that a snapshot is a lasting picture. What women and men do at a moment in time tells us nothing about what women and men are in some unvarying sense - or about what they can be.
+The dynamics of capitalism is postponement of enjoyment to the constantly postponed future.
+The purpose of anthropology is to make the world safe for human differences.
+A dreamer is one who can only find his way by moonlight, and his punishment is that he sees the dawn before the rest of the world.
+You can't separate peace from freedom because no one can be at peace unless he has his freedom.
+I believe that any man's life will be filled with constant and unexpected encouragement, if he makes up his mind to do his level best each day, and as nearly as possible reaching the high water mark of pure and useful living.
+To desire and strive to be of some service to the world, to aim at doing something which shall really increase the happiness and welfare and virtue of humankind--this is a choice which is possible for all of us; and surely it is a good haven to sail for.
+The United States is unusual among the industrial democracies in the rigidity of the system of ideological control-indoctrination, we might say-exercised through the mass media.
+For a nation which has an almost evil reputation for bustle, bustle, bustle, and rush, rush, rush, we spend an enormous amount of time standing around in line in front of windows, just waiting.
+Beware the fury of a patient man.
+Promptitude is not only a duty, but is also a part of good manners; it is favorable to fortune, reputation, influence, and usefulness; a little attention and energy will form the habit, so as to make it easy and delightful.
+Television has brought back murder into the home - where it belongs.
+Americans will put up with anything provided it doesn't block traffic.
+It is well enough that people of the nation do not understand our banking and monetary system, for if they did, I believe there would be a revolution before tomorrow morning,
+Every generation laughs at the old fashions, but follows religiously the new.
+He worked like hell in the country so he could live in the city, where he worked like hell so he could live in the country.
+Anyone who can walk to the welfare office can walk to work.
+In regione caecorum rex est luscus.
+The things we fear most in organization - fluctuations, disturbances, imbalances - are the primary sources of creativity.
+The gods had condemned Sisyphus to ceaselessly rolling a rock to the top of a mountain, whence the stone would fall backof its own weight. They had thought with some reason that there is no more dreadful punishment than futile and hopeless labor.
+In 1974, I blacksmithed the now famous klunker from scavenged objects. Then I started to hear the high form of recognition:'You can't do that,' and, 'It won't work.' I knew I was onto something big.
+I haven't failed, I've found 10,000 ways that don't work.
+Great spirits have always encountered violent opposition from mediocre minds.
+A little nonsense now and then is relished by the wisest men
+Simply pushing harder within the old boundaries will not do
+I don't see much sense in that," said Rabbit. "No," said Pooh humbly, "there isn't. But therewas going to be when I began it. It's just that something happened to it along the way.
+Any man can make it with a job. It takes a real man to make it without one.
+Don't tell me how hard yo work. Tell me how much you get done.
+Do not make the mistake...of thinking that a worker is a slave and that he holds his job by his employer's permission. He does not hold it by permission - but by contract, that is, by a voluntary mutual agreement. A worker can quit his job; a slave cannot.
+We trained hard but it seemed that everytime we were beginning to form up into teams we were reorganized. I was to learn later in life that we tend to meet any new situation by reorganizing, and what a wonderful method it can be for creating the illusion of progress while actually producing confusion, inefficiency, and demoralization.
+Aim at perfection in everything, though in most things it is unattainable. However, they who aim at it, and persevere, will come much nearer to it than those whose despondency and laziness make them give it up as unattainable.
+Men often oppose a thing merely because they have had no agency in planning it, or because it may have been planned by those whom they dislike.
+They were so strong in their beliefs that there came a time when it hardly mattered what exactly those beliefs were; they all fused into a single stubbornness.
+It pays to be obvious, especially if you have a reputation for subtlety.
+In America, we hurry- which is well; but when the day's work is done, we go on thinking of losses and gains, we plan for the morrow, we even carry our business cares to bed with us...we burn up our energies with these excitements, and either die early or drop into a lean and mean old age at a time of life which they call a man's prime in Europe...What a robust people, what a nation of thinkers we might be, if we would only lay ourselves on the shelf occasionally and renew our edges!
+There is no pleasure in having nothing to do. The pleasure is having lots to do and not doing it.
+I was part of that strange race of people aptly described as spending their lives doing things they detest to make money they don't want to buy things they don't need to impress people they dislike.
+Now I don't know but I been told that it's hard to run with the weight of gold. Other hand, I've heard it said, It's just as hard with the weight of lead.
+Do what you love. Know your own bone; gnaw at it, bury it, unearth it, and gnaw it still.
+If you get to thinkin' you're a person of some influence, try orderin' somebody else's dog around.
+If it were desired to reduce man to nothing, it would be necessary only to give his work a character of uselessness.
+The uncreative mind can spot wrong answers, but it takes a very creative mind to spot wrong questions.
+One definition of insanity is to do the same thing, day-after-day, expecting different results.
+The finest workers in stone are not copper or steel tools, but the gentle touches of air and water working at their leisure with a liberal allowance of time.
+When people go to work, they shouldn't have to leave their hearts at home.
+Every day I shall put my papers in order and every day I shall say farewell. And the real farewell, when it comes, will only be a small outward confirmation of what has been accomplished within me from day to day.
+Progress always involves risk; you can't steal second base and keep your foot on first.
+One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important.
+If every day a man takes orders in silence from an incompetent superior, if every day he solemnly performs ritual acts which he privately finds ridiculous, if he unhesitatingly gives answers to questionnaires which are contrary to his real opinions and is prepared to deny his own self in public, if he sees no difficulty in feigning sympathy or even affection where, in fact, he feels only indifference or aversion, it still does not mean that he has entirely lost the use of one of the basic human senses, namely, the sense of humiliation.
+Eagles may soar but weasels don't get sucked into jet engines.
+Nothing will ever be attempted if all possible objections must first be overcome.
+You're only as good as the people you hire.
+If you see a snake, just kill it. Don't appoint a committee on snakes. Eagles don't flock - you have to find them one at a time.
+If people really liked to work, we'd still be plowing the land with sticks and transporting goods on our backs.
+All paid employments absorb and degrade the mind.
+There is real magic in enthusiasm. It spells the difference between mediocrity and accomplishment.
+Remember the two benefits of failure. First, if you do fail, you learn what doesn't work; and second, the failure gives you the opportunity to try a new approach.
+Man is free at the moment he wishes to be.
+The fellow who never makes a mistake takes his orders from one who does.
+A conservative is a man who believes that nothing should be done for the first time.
+We observe with undivided attention because the little nuances in the quality of one's service give a flawless measure of one's mind.
+To many time we confuse motion with progress.
+The best leader is the one who has sense enough to pick good men to do what he wants done, and the self-restraint to keep from meddling with them while they do it.
+What's really important in life? Sitting on a beach? Looking a the television eight hours a day? I think we have to appreciate that we're alive for only a limited period of time, and we'll spend most of our lives working. That being the case, I believe one of the most important priorities is to do whatever we do as well as we can. We should take pride in that.
+We have too many people who live without working, and we have altogether too many who work without living.
+I can't understand why people are frightened by new ideas. I'm frightened of old ones.
+Duty is the sublimest word in our language. Do your duty in all things. You cannot do more. You should never wish to do less.
+What is a committee? A group of the unwilling, picked from the unfit, to do the unnecessary.
+There is a time in the life of every problem when it is big enough to see, yet small enough to solve.
+Everything comes to those who hustle while he waits.
+To get something done a committee should consist of no more than three people, two of whom are absent.
+If it weren't for the last minute, a lot of things wouldn't get done.
+Those who agree with us may not be right but we admire their astuteness.
+A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity ofcomplete fools
+Why be a man when you can be a success?
+Yesterday I was a dog. Today I'm a dog. Tomorrow I'll probably still be a dog. Sigh! There's so little hope for advancement.
+Don't tell people how to do things. Tell them what to do and let them surprise you with their results.
+The entrepreneur is essentially a visualizer and an actualizer... He can visualize something, and when he visualizes it he sees exactly how to make it happen.
+By working faithfully eight hours a day, you may get to be a boss and work twelve hours a day.
+For every complex problem, there is a solution that is simple, neat, and wrong.
+Be like a duck. Calm on the surface, but always paddling like the dickens underneath.
+Meetings are an addictive, highly self-indulgent activity that corporations and other large organizations habitually engage in only because they cannot actually masturbate.
+Constant dripping hollows out a stone.
+When a man says he approves of something in principle, it means he hasn't the slightest intention of carrying it out in practice.
+If you want to piss with the big dogs, you'd better learn to lift your leg first; otherwise you just might get pissed on.
+When in doubt, mumble; when in trouble, delegate; when in charge, ponder.
+You will soon break the bow if you keep it always stretched.
+Nothing is realy work unless you would rather be doing somethin else.
+There is no scarcity of opportunity to make a living at what you love; there’s only a scarcity of resolve to make it happen.
+There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there.
+A successful man is one who can lay a firm foundation with the bricks that others throw at him.
+There are four things that hold back human progress. Ignorance, stupidity, committees and accountants.
+I held a moment in my hand, brilliant as a star, fragile as a flower, a tiny sliver of one hour. I dripped it carelessly, Ah! I didn't know, I held opportunity.
+The best helping hand that you will ever receive is the one at the end of your own arm.
+No person can be a great leader unless he takes genuine joy in the successes of those under him.
+Undertake something that is difficult; it will do you good. Unless you try to do something beyond what you have already mastered, you will never grow.
+The quickest and shortest way to crush whatever laurels you have won is for you to rest on them.
+It isn't the incompetent who destroys an organization. The incompetent never gets in a position to destroy it. It is those who have achieved something and want to rest upon their achievements who are forever clogging things up.
+It must be remembered that there is nothing more difficult to plan, more doubtful of success, nor more dangerous to manage, than the creation of a new system. For the initiator has the enmity of all who would profit by the preservation of the old institutions and merely lukewarm defenders in those who would gain by the new ones.
+Going to work for a large company is like getting on a train. Are you going sixty miles an hour or is the train going sixty miles an hour and you're just sitting still?
+It is amazing what you can accomplish if you do not care who gets the credit.
+I will not condemn you for what you did yesterday, if you do it right today.
+Problems are only opportunities in work clothes.
+The genius of any slave system is found in the dynamics which isolate slaves from each other, obscure the reality of a common condition, and make united rebellion against the oppressor inconceivable.
+Authority without wisdom is like a heavy axe without an edge, fitter to bruise than polish.
+I like the system which lets a man quit when he wants to and wish it might prevail everywhere.
+The majority of business men are not capable of an original thought, simply because they cannot escape the tyranny of reason.
+Half the work that is done in this world is to make things appear what they are not.
+The highest reward for a person's toil is not what they get for it, but what they become by it.
+The poets have been mysteriously silent on the subject of cheese.
+It is generally agreed that 'Hello' is an appropriate greeting because if you entered a room and said 'Goodbye', it could confuse a lot of people.
+Cynics are well-informed optimists.
+Skippin' through the lily fields I came across an empty space. It trembled and exploded and left a bus stop in its place. The bus came by and I got on that's when it all began. There was cowboy Neal at the wheel of a bus to never-ever land.
+Lo Pan! Which Lo Pan; little old basketcase on wheels or the ten-foot tall roadblock?!
+Everywhere is walking distance if you have the time.
+Oh sleep ! it is a gentle thing, Beloved from pole to pole! To Mary Queen the praise be given! She sent the gentle sleep from Heaven, That slid into my soul.
+I don't think I'll travel anymore. Travel is nothing but an inconvenience. There is always enough trouble where you are.
+Interestingly, according to modern astronomers, space is finite. This is a very comforting thought -- particularly for people who can never remember where they have left things.
+God made the world, My Lord, and looked at it, and saw that it was good. Yes. But what if the world had looked back at him, to see whether he was good or not?
+If you don't like the way the river is flowing, don't jump in.
+Patience, n. A minor form of dispair, disguised as a virtue.
+The individual never asserts himself more than when he forgets himself.
+Too much work and too much energy kill a man just as effectively as too much assorted vice or too much drink.
+The courage of the poet is to keep ajar the door that leads into madness.
+Bigotry tries to keep truth safe in its hand; with a grip that kills it.
+He that hath a head of wax must not walk in the sun.
+I will make you shorter by a head.
+Sometimes our light goes out but is blown into flame by another human being. Each of us owes deepest thanks to those who have rekindled this light.
+An insincere and evil friend is more to be feared than a wild beast; a wild beast may wound your body, but an evil friend will wound your mind.
+One can't complain. I have my friends. Someone spoke to me only yesterday.
+Friendship is always a sweet responsibility, never an opportunity.
+Think twice before burdening a friend with a secret.
+Don't be dismayed at goodbyes. A farewell is necessary before you can meet again. And meeting again, after moments or lifetimes is certain for thoes who are friends.
+I don't know half of you half as well as I should like; and I like less than half of you half as well as you deserve..
+Keep away from people who try to belittle your ambitions. Small people always do that, but the really great make you feel that you, too, can become great.
+Life does not exist in the past nor does it exist in the future. Having a life is not about a lifetime of fond memories, making plans for the future or even what you're actually doing right now. Having a life is simply having the opportunity to do things now."Debbie Wolfflife"Creativity is inventing, experimenting, growing, taking risks, breaking rules, making mistakes, and having fun."Mary Lou Cooklearning"If you wish to travel far and fast, travel light. Take off all your envies, jealousies, unforgiveness, selfishness, and fears.
+Ladies and gentlemen, there are moments in the lives of nations and peoples when it is incumbent upon those known for their wisdom and clarity of vision to survey the problem, with all its complexities and vain memories,in a bold drive toward new horizons."Anwar al-Sadat, Former President of Egypt, from a speech to the Israeli Knesset, November 20,1977government"A smile is a window on your face to show your heart is at home.
+Don't walk in front of me, I may not follow; don't walk behind me, I may not lead; walk beside me, and just be my friend.
+Never exagerate your faults. Your friends will attend to that.
+A crust eaten in peace is better than a banquet partaken in anxiety.
+I say that habit's but a long practice, friend, And this becomes men's nature in the end.
+The people who are regarded as moral luminaries are those who forego ordinary pleasures themselves and find compensation in interfering with the pleasures of others.
+A man never discloses his own character so clearly as when he describes another's.
+There's nothing like a gleam of humor to reassure you that a fellow human being is ticking inside a strange face.
+You can't stay in your corner of the forest, waiting for others to come to you; you have to go to them sometimes.
+We cherish our friends not for their ability to amuse us, but for ours to amuse them.
+No enemy is so annoying as one who was a friend, or still is a friend, and there are many more of these than one would suspect.
+To become a good man, one must have faithful friends, or outright enemies.
+It is more shameful to mistrust one's friends than to be deceived by them.
+Every man should have a fair-sized cemetery in which to bury the faults of his friends.
+Each friend represents a world in us; a world possibly not born until they arrive, and it is only in meeting them that a new world is born.
+The reality of the other person is not in what he reveals to you, but in what he cannot reveal to you. Therefore, if you would understand him, listen not to what he says but rather what he does not say.
+Your friend is the man who knows all about you, and still likes you.
+Together forever, never apart. Maybe in distance but never at heart.
+If you look for the worst in people and expect to find it, you surely will.
+True friendship is like sound health; the value of it is seldom know until it be lost.
+We all take different paths in life, but no matter where we go, we take a little of each other everywhere.
+He who has a thousand friends has not a friend to spare, and he who has one enemy will meet him everywhere.
+Never offend people with style when you can offend them with substance.
+True friendship is like sound health; the value of it is seldom known until it be lost.
+There are very few people who do not become nore interesting when they stop talking.
+Be nice and smile to everyone you meet. You don't know what they are going through, and they may need that smile. And treasure it.
+Remember, we all stumble, every one of us. That's why it's a comfort to go hand in hand.
+Do you really want to see everyone again or should we keep the mystique of the corner in our minds?
+There are two ways of spreading light - to be the candle or the mirror that reflects it.
+The making of friends, who are real friends, is the best token we have of a man's success in life.
+A friend is someone who knows the song in your heart, and can sing it back to you when you have forgotten the words.
+Laughter is the shortest distance between two people.
+You can make more friends in two months by becoming interested in other people than you can in two years by trying to get other people interested in you.
+The potential for liberation inherent in the BBS as a tool for social projects has not yet been realized. The BBS Meganet involves untold thousands of e-mail enthusiasts who have so far not sent or received one real good.
+Internet is so big, so powerful and pointless that for some people it is a complete substitute for life.
+There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.
+Computers are useless. They can only give you answers.
+There is more to life than increasing speed.
+The machine does not isolate man from the great problems of nature but plunges him more deeply into them.
+Our scientific power has outrun our spiritual power. We have guided missiles and misguided men.'
+Computers have enabled people to make more mistakes faster than almost any invention in history, with the possible exception of tequila and hand guns.
+The real danger is not that computers will begin to think like men, but that men will begin to think like computers.
+It troubles me that we are so easily pressured by purveyors of technology into permitting so-called "progress" to alter our lives without attempting to control it -- as if technology were an irrepressible force of nature to which we must meekly submit.
+Our inventions are wont to be pretty toys, which distract our attention from serious things. They are but improved means to an unimproved end.
+Ours is the age which is proud of machines that think and suspicious of men who try to.
+You know, we can talk sometimes about managing our own evolution. About cloning people. About deciding how with genetic engineering we're going to improve ourselves. But how do we improve ourselves? We don't know. We've improved domestic animals a great way. We've got cows that give milk by the hundreds of gallons. We've got sheep that are wool...all the way through. We've got turkeys that are all breast.
+Time and space are modes by which we think and not conditions in which we live.
+Imagine a school with children that can read or write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live.
+It is only when they go wrong that machines remind you how powerful they are.
+Science may have found a cure for most evils; but it has found no remedy for the worst of them all- the apathy of human beings.
+The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' (I found it!) but 'That's funny...’.
+The charm of television entertainment is its ability to bridge the chasm between dinner and bedtime without mental destraction.
+I find television very educating. Every time somebody turns on the set, I go into the other room and read a book.
+A nuclear power plant is infinently safer than eating, because 300 people choke to death on food every year.
+If all the cars in the United States were placed end to end, it would probably be Labor Day Weekend.
+Technology is a way of organizing the universe so that man doesn't have to experience it.
+Is fuel efficiency really what we need most desperatelly? I say that what we really need is a car that can be shot when it breaks down.
+If all the cars in the United States were placed end to end, it would probably be Labor Day Weekend.
+Technology is a way of organizing the universe so that man doesn't have to experience it.
+I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
+The number of the beast - vi vi vi
+Television has changed a child from an irresistible force to an immovable object.
+Computers make it easy to do alot of things, but most of the things that make it easier to do don't need to be done.
+All of the biggest technological inventions created by man - the airplane, the automobile, the computer - says little about his intelligence, but speaks volumes about his laziness.
+I think we risk becoming the best informed society that has ever died of ignorance.
+Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
+For a smart material to be able to send out a more complex signal it needs to be nonlinear. If you hit a tuning fork twice as hard it will ring twice as loud but still at the same frequency. That's a linear response. If you hit a person twice as hard they're unlikely just to shout twice as loud. That property lets you learn more about the person than the tuning fork.
+Computers are composed of nothing more than logic gates stretched out to the horizon in a vast numerical irrigation system.
+I do not fear computers. I fear lack of them.
+The generation of random numbers is too important to be left to chance.
+If addiction is judged by how long a dumb animal will sit pressing a lever to get a 'fix' of something, to its own detriment, then I would conclude that Netnews is far more addictive than cocaine.
+The cloning of humans is on most of the lists of things to worry about from Science, along with behaviour control, genetic engineering, transplanted heads, computer poetry and the unrestrained growth of plastic flowers.
+For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled.
+Experience has shown that science frequently develops most fruitfully once we learn to examine the things that seem the simplest, instead of those that seem the most mysterious.
+The universe is not hostile, nor yet is it unfriendly. It is simply indifferent.
+Science differs from politics or religion, in precisely this one discipline: we agree in advance to simply reject our own findings when they have been shown to be in error.
+That's what's cool about working with computers. They don't argue, they remember everything and they don't drink all your beer.
+If addiction is judged by how long a dumb animal will sit pressing a lever to get a 'fix' of something, to its own detriment, then I would conclude that Netnews is far more addictive than cocaine.
+As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality.
+A nuclear power plant is infinitely safer than eating, because 300 people choke to death on food every year.
+I look forward to the invention of faster-than-light travel. What I'm not looking forward to is the long wait in the dark once I arrive at my destination.
+Talk not of wasted affection; affection never was wasted.
+Some people come into our lives and quickly go. Others stay for a while and leave footprints on our hearts and we are never ever the same.
+The holiest of all holidays are those kept by ourselves in silence and apart; The secret anniversaries of the heart.
+I only wish to be the fountain of love from which you drink, every drop promising eternal passion.
+Lust is when you love what you see. Love is when you lust for what's inside.
+Where is fancy bred? In the heart or in the head?
+I am about courting a girl I have had but little acquaintance with. How shall I come to a knowledge of her faults, and whether she has the virtues I imagine she has? Answer. Commend her among her female acquaintances.
+Love is an attempt to change a piece of the dream-world into reality.
+Love is the wisdom of the fool and the folly of the wise.
+Love is like a faucet, you can turn it off an' on, But when you think you've got it, it's done turned off and gone.
+Happiness is a butterfly which when pursued is just out of grasp... But if you will sit down quietly, it may alight upon you.
+Thou art gone from my gaze like a beautiful dream, And I seek thee in vain by the meadow and stream.
+The way to love anything is to realize that it might be lost.
+Love is a fire. But whether it is going to warm your hearth or burn down your house, you can never tell.
+You have to walk carefully in the beginning of love; the running across fields into your lover's arms can only come later when you're sure they won't laugh if you trip.
+A beautiful soul has no other merit, but it's exsistance.
+When the satisfaction or security of another person becomes as significant to one and ones own satifaction or security, then the state of love exists
+As for me, to love you alone, to make you happy, to do nothing which would contradict your wishes, this is my destiny and the meaning of my life.
+The difference between friendship and love is how much you can hurt each other.
+A ship is always referred to as she because it costs so much to keep one in paint and powder.
+I get this feeling we'll be together again. No straight lines make up my life, all roads have bends. No clear cut beginnings and so far no dead ends.
+You yourself, as much as anybody in the entire universe, deserve your love and affection.
+A thing of beauty is a joy forever; its lovliness increases; it will never pass into nothingness.
+Pride is one of the seven deadly sins; but it cannot be the pride of a mother in her children, for that is a compound of two cardinal virtues -- faith and hope.
+The fragrance always stays in the hand that gives the rose.
+Lots of people are willing to die for the person they love, which is a pity, for it is a much grander thing to live for that person.
+The greatest happiness of life is the conviction that we are loved - loved for ourselves, or rather, loved in spite of ourselves.
+I wear my wife's eyeglasses because she wants me to see things her way.
+Knowledge is gained by learning; trust by doubt; skill by practice; and love by love.
+What the world really needs is more love and less paperwork.
+All marriages are mixed marriages.
+True love never dies for it is lust that fades away. Love bonds for a lifetime but lust just pushes away.
+Love looks not with the eyes, but with the mind.....and therefore is winged Cupid painted blind.
+True is the grief you carry without witnesses.
+Intoxicated by the pleasure of seeing him, of hearing him speak, by the sweet awareness of his presence near me, by the even greater happieness of being able to make him happy, I lost all strength of mind and will; I had scarcely enough left to struggle, I had none to resist.
+LOVE, n. A temporary insanity curable by marriage or by removal of the patient from the influences under which he incurred the disorder.
+You can plant a dream.
+Most plain girls are virtuous because of the scarcity to be otherwise.
+It's the good girls who keep diaries; the bad girls never have the time
+Romance, like the rabbit at the dog track, is the elusive, fake, and never attained reward which, for the benefit and amusement of our masters, keeps us running and thinking in safe circles.
+The little I know, I owe to my ignorance. When a man steals your wife, there is no better revenge than to let him keep her.
+I will reveal to you a love potion, without medicine, without herbs, without any witch’s magic; if you want to be loved, then love.
+Sometimes it's a form of love just to talk to somebody that you have nothing in common with and still be fascinated by their presence.
+True Love is like ghosts,Everyone talks about but very few have seen.
+True Love is like ghosts,Everyone talks about but very few have seen.
+Hallow the body as a temple to comeliness and sanctify the heart as a sacrifice to love; love recompenses the adorers.
+We are each of us angels with only one wing, and we can only fly embracing each other.
+The hardest of all is learning to be a well of affection, and not a fountain; to show them we love them not when we feel like it, but when they do.
+Love involves a peculiar unfathomable combination of understanding and misunderstanding.
+Errors, like straws, upon the suface flow; He who would search for pearls must dive down below.
+Treasure the love you receive above all. It will survive long after your good health has vanished.
+The pleasure of all reading is doubled when one lives with another who shares the same books.
+Absence lessens half-hearted passions, and increases great ones, as the wind puts out candles and yet stirs up the fire.
+Love and desire are the spirit's wings to great deeds.
+When the fabric of the universe becomes unknown, it is the duty of the university to produce weavers.
+Spoon feeding in the long run teaches us nothing but the shape of the spoon.
+Tell me and I forget. Teach me and I remember. Involve me and I learn.
+My spelling is Wobbly. It's good spelling, but it Wobbles, and the letters get in the wrong places.
+One of the greatest joys known to man is to take a flight into ignorance in search of knowledge.
+I am what the librarians have made me with a little assistance from a professor of Greek and a few poets.
+If I were founding a university I would begin with a smoking room; next a dormitory; and then a decent reading room and a library. After that, if I still had more money that I couldn't use, I would hire a professor and get some text books.
+People who make no mistakes lack boldness and the spirit of adventure. They are the brakes on the wheels of progress.
+Gradualness, gradualness, and gradualness. From the very beginning of your work, school yourself to severe gradualness in the accumulation of knowledge.
+The ultimate result of shielding men from the effects of folly, is to fill the world with fools.
+Now that education is so easy, men are drilled for greatness, just as dogs are trained to retrieve. In this way we've discovered a new sort of genius, those great at being drilled. These are the people who are mainly spoiling the market.
+There are children playing in the street who could solve some of my top problems in physics, because they have modes of sensory perception that I lost long ago.
+You are not thinking. You are merely being logical.
+Logic, like whiskey, loses its beneficial effect when taken in too large quantities.
+A public library is the most enduring of memorials, the trustiest monument for the preservation of an event or a name or an affection; for it, and it only, is respected by wars and revolutions, and survives them.
+In the university they don't tell you that the greater part of the law is learning to tolerate fools.
+Let ignorance talk as it will, learning has its value.
+Genius means little more than the faculty of perceiving in an unhabitual way.
+He who asks a question may be a fool for five minutes, but he who never asks a question remains a fool forever.
+Real knowledge is to know the extent of ones ignorance.
+Man will occasionally stumble over the truth, but most of the time he will pick himself up and continue on.
+Second-hand knowledge of the self gathered from books or gurus can never emancipate a man until its truth is rightly investigated and applied; only direct realization will do that. Realize yourself, turning the mind inward.
+Irrationally held truths may be more harmful than reasoned errors.
+We all agree that your theory is crazy, but is it crazy enough?
+An error doesn't become a mistake until you refuse to correct it.
+The larger the island of knowledge, the longer the shoreline of wonder.
+The greatest challenge to any thinker is stating the problem in a way that will allow a solution.
+So, when on one side you hoist in Locke's head, you will go over that way; but now, on the other side, hoist in Kant's and you come back again; but in very poor plight. Thus some minds for ever keep trimming boat. Oh, ye foolish! Throw all these thunderheads overboard, and then you will float light and right.
+Anyone who conducts an argument by appealing to authority is not using his intelligence he is just using his memory.
+He who knows others is wise, He who knows himself is enlightened.
+In mathematics you don't understand things. You just get used to them.
+Our bombs are smarter than the average high school student. At least they can find Kuwait.
+Tweedledee: "Contrariwise. If it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic.
+There are many people who reach their conclusions about life like schoolboys; they cheat their master by copying the answer out of a book without having worked out the sum for themselves.
+Vir prudens non contra ventum mingit
+The test of a first-rate intelligence is the ability to hold two opposed ideas in mind at the same time and still retain the ability to function. One should, for example, be able to see that things are hopeless and yet be determined to make them otherwise.
+The mind is a dangerous weapon, even to the possessor, if he knows not discreetly how to use it.
+For every complex problem, there is a solution that is simple, neat, and wrong.
+I'll not listen to reason…. Reason always means that someone else has something to say.
+The only fool bigger than the person who knows it all is the person who argues with him.
+Language is a wonderful thing. It can be used to express thoughts, to conceal thoughts, but more often, to replace thinking.
+Slang is language which takes off its coat, spits on its hands -- and goes to work.
+An intellectual snob is someone who can listen to the William Tell Overture and not think of The Lone Ranger.
+The more we study the more we discover our ignorance.
+The difference between the right word and the almost right word is the difference between lightning and a lightning bug.
+Imagination is more important than knowledge...
+The difference between the right word and the almost right word is the difference between lightning and a lightning bug.
+I do not know what I appear to the world; but to myself I seem to have been only like a boy playing on a seashore, and diverting myself now and then by finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me.
+It is the mark of an educated mind to be able to entertain a thought without accepting it.
+An expert is a man who has made all the mistakes which can be made, in a narrow field.
+The true art of memory is the art of attention.
+It's a rash man who reaches a conclusion, before he gets to it.
+He that will not reason is a bigot, He that cannot reason is a fool, He that dares not reason is a slave.
+Censorship, like charity, should begin at home, but unlike charity, it should end there.
+Education makes people easy to lead, but difficult to drive; easy to govern, but impossible to enslave.
+My alphabet starts with this letter called yuzz. It's the letter I use to spell yuzz-a-ma-tuzz. You'll be sort of surprised what there is to be found once you go beyond 'Z' and start poking around!
+If a man's wit be wandering, let him study the mathematics.
+What's the use of a good quotation if you can't change it?
+There are two sorts of curiosity -- the momentary and the permanent. The momentary is concerned with the odd appearance on the surface of things. The permanent is attracted by the amazing and consecutive life that flows on beneath the surface of things.
+A professor can never better distinguish himself in his work than by encouraging a clever pupil, for the true discoverers are among them, as comets amongst the stars.
+A university is what a college becomes when the faculty loses interest in students.
+Genius is nothing but a great aptitude for patience.
+Education's purpose is to replace an empty mind with an open one.
+I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind; yet, strange, I am ungrateful to these teachers.
+The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn.
+The house is a castle which the king cannot enter.
+No house should ever be on any hill or on anything. It should be of the hill, belonging to it, so hill and house could live together each the happier for the other.
+Nobody untrained in geometry may enter my house.
+My mother had a great deal of trouble with me, but I think she enjoyed it.
+A good cook is like a sorceress who dispenses happiness.
+To all, to each, a fair good-night, And pleasing dreams, and slumbers light.
+We spend the first twelve months of our children's lives teaching them to walk and talk and the next twelve telling them to sit down and shut
+An order given in battle, an instruction issued by the master of a sailing ship, a cry for help, are as powerful in modifying the course of events as any other bodily act....You utter a vow or forge a signature and you may find yourself bound for life to a monestary, a woman or prison.
+On the whole, I haven't found men unduly loath to say, "I love you." The real trick is to get them to say, "Will you marry me?
+Love is an ideal thing, marriage is a real thing; a confusion of the real with the ideal never goes unpunished.
+I never believed in much, but I believed in you.
+Is not marriage an open question, when it is alleged, from the beginning of the world, that such as are in the institution wish to get out, and such as are out wish to get in?
+If women didn't exist, all the money in the world would have no meaning.
+In this world nothing can be said to be certain, except death and taxes.
+No man's life, liberty or property are safe while the legislature is in session.
+Maybe we can show government how to operate better as a result of better architecture.
+People that are really very weird can get into sensitive positions and have a tremendous impact on history
+America is a large, friendly dog in a very small room. Every time it wags its tail, it knocks over a chair.
+A power has risen up in the government greater than the people themselves, consisting of many and various and powerful interests, combined into one mass, and held together by the cohesive power of the vast surplus in the banks.
+Politics is but a narrow field, and that still narrower highway yonder leads to it. I some-times direct the traveler hither. If you would go to the political world, follow the great road, -- follow that market-man, keep his dust in your eyes, and it will lead you straight to it; for it, too, has its place merely, and does not occupy all space. I pass from it as from a bean-field into the forest, and it is forgotten. In one half-hour I can walk off to some portion of the earth's surface where a man does not stand from one year's end to another, and there, consequently, politics are not, for they are but as the cigar-smoke of a man.
+Terrorism is in good part an effect of government propaganda; it serves to deflect attention from governmental abuse toward a mostly imagined, highly dangerous outside enemy.
+Error is to be pitied and pardoned: it is the weakness of human nature. But vice is a foul blemish, not pardonable in any character.
+He uses statistics as a drunken man uses lamp posts -- for support rather than illumination.
+The work of internal government has become the task of controlling the thousands of fifth-rate men.
+The modesty in a sect is perhaps a singular instance in the history of mankind, every other sect supposing itself in a position of all truth, and that those who differ are so far in the wrong; like a man travelling in foggy weather, those at some distance before him on the road he sees wrapped up in the fog, as well as those behind him, and also the people in the fields on each side, but near him all appears clear, tho' in truth he is as much in the fog as any of them.
+If this country is to survive, the best-fed-nation myth had better be recognized for what it is: propaganda designed to produce wealth but not health.
+I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man.
+Democracy means simply the bludgeoning of the people by the people for the people.
+Freedom is the recognition that no single person, no single authority of government has a monopoly on the truth, but that every individual life is infinitely precious, that every one of us put on this world has been put there for a reason and has something to offer.
+The best argument against democracy is a five minute conversation with the average voter.
+In the United States the majority undertakes to supply a multitude of ready-made opinions for the use of individuals, who are thus relieved from the necessity of forming opinions of their own.
+Those who are too smart to engage in politics are punished by being governed by those who are dumber.
+To us the ashes of our ancestors are sacred and their resting place is hallowed ground. You wander far from the graves of your ancestors and seemingly without regret. Your religion was written upon tablets of stone by the iron finger of your God so that you could not forget. The Red Man could never comprehend or remember it. Our religion is the traditions of our ancestors -- the dreams of our old men, given them in solemn hours of the night by the Great Spirit; and the visions of our sachems, and is written in the hearts of our people.
+Bad officials are elected by good citizens who do not vote.
+Men willingly believe what they wish.
+The time is at hand when the wearing of a prayer shawl and skullcap will not bar a man from the White House - unless, of course, the man is Jewish.
+A jury consists of twelve persons chosen to decide who has the better lawyer.
+Next week there can't be any crisis. My schedule is already full.
+So long as governments set the example of killing their enemies, private citizens will occasionally kill theirs.
+The state is never so efficient as when it wants money.
+As I grow older, I pay less attention to what men say. I just watch what they do.
+Government is like a baby. An alimentary canal with a big appetite at one end and no sense of responsibility at the other.
+Democracy is the art and science of running the circus from the monkey cage.
+If I had to choose between a government without newspapers or newspapers without government, I should not hesitate to choose the later.
+The only purpose for which power can be rightfully exercised over any member of a civilized community, against his will, is to prevent harm to others. His own good, either physical or moral, is not a sufficient warrant.
+The Vice Presidency is sort of like the last cookie on the plate. Everybody insists he won't take it, but somebody always does.
+Half of the American people have never read a newspaper. Half never voted for President. One hopes it is the same
half.
+The government deficit is the difference between the amount of money the government spends and the amount it has the nerve to collect.
+You will find that the State is the kind of organization which, though it does big things badly, does small things badly, too.
+We don't want to go back to tomorrow, we want to go forward.
+Washington is a city of Southern efficiency and Northern charm.
+An incompetent attorney can delay a trial for months or years. A competent attornety can delay one even longer.
+When you have an efficient government, you have a dictatorship.
+It isn't that Liberals are ignorant. It's just that they know so much that isn't so.
+You will find that the State is the kind of organization which, though it does big things badly, does small things badly, too.
+The Chinese have two characters for our word crisis one means danger and the other opportunity.
+Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws.
+It is not power that corrupts, but fear- fear of losing power and fear of the scourge of those who wield it.
+The death of democracy is not likely to be an assassination from ambush. It will be a slow extinction from apathy, indifference, and undernourishment.
+Who's more foolish: the fool, or the fool who follows him?
+It is better to be defeated on principle than to win on lies.
+I was under medication when I made the decision to burn the tapes.
+The direct use of force is such a poor solution to any problem, it is generally employed only by small children and large nations.
+As Mankind becomes more liberal, they will be more apt to allow that all those who conduct themselves as worthy members of the community are equally entitled to the protections of civil government. I hope ever to see America among the foremost nations of justice and liberality.
+When you get right down to it, one of the most important tasks of a leader is to eliminate his people's excuse for failure.
+Taxation with representation ain't so hot either.
+I have no purpose, directly or indirectly, to interfere with the institution of slavery in the States where it exists. I believe I have no lawful right to do so, and I have no inclination to do so.
+Ours is a world of nuclear giants and ethical infants. If we continue to develop our technology without wisdom or prudence, our servant may prove to be our executioner.
+Leaders get out in front and stay there by raising the standards by which they judge themselves - and by which they are willing to be judged.
+The Constitution shall never be construed...to prevent the people of the United States who are peaceable citizens from keeping their own arms.
+When you're a lawyer, you expect your client to lie to you, but not when he is the president.
+Those who suppress freedom always do so in the name of law and order.
+If I wished to punish a province, I would have it governed by philosophers.
+It is a besetting vice of democracies to substitute public opinion for law. This is the usual form in which masses of men exhibit their tyranny.
+You have not converted a man because you have silenced him.
+We are going to win and the industrial West is going to lose out; there's not much you can do about it because the reasons for your failure are within yourselves.
+The warning message we sent the Russians was a calculated ambiguity that would be clearly understood.
+Democracy is the art of running the circus from the monkey cage.
+Political power grows out of the barrel of a gun.
+No man who ever held the office of President would congratulate a friend on obtaining it.
+The great nations have always acted like gangsters, and the small nations like prostitutes.
+I confess that there are several parts of this Constitution which I do not at present approve, but I am not sure I shall never approve them. For having lived long, I have experienced many instances of being obliged by better information, or fuller consideration, to change opinions even on important subjects, which I once thought right, but found to be otherwise.
+When you make your peace with authority, you become authority.
+Any institution which does not suppose the people good, and the magistrate corruptible, is evil.
+Riding trails with your dog restores a bond lost in some evolutionary belch. You travel at the same speed, over the same terrain, neither of you slowing to compensate for the other. You're equal playmates with mud in your teeth.
+I am often surprised by the cleverness, and now and again by the stupidity of my dog; and I have similar experiences with mankind.
+The problem with cats is that they get the same exact look whether they see a moth or an ax-murderer.
+He who is cruel to animals becomes hard also in his dealings with men. We can judge the heart of a man by his treatment of animals.
+Money will buy you a pretty good dog, but it won't buy the wag of his tail.
+Dogs are our link to paradise. They don't know evil or jealousy or discontent. To sit with a dog on a hillside on a glorious afternoon is to be back in Eden, where doing nothing was not boring--it was peace.
+Heaven goes by favor. If it went by merit, you would stay out and your dog would go in.
+If fortune drives the master forth, an outcast in the world, friendless and homeless, the faithful dog asks no higher privilege than that of accompanying him, to guard him against danger, to fight against his enemies.
+A dog wags its tail with its heart.
+A dog is the only thing on earth that loves you more than he loves himself.
+The great pleasure of a dog is that you may make a fool of yourself with him and not only will he not scold you but he will make a fool of himself too.
+There is no psychiatrist in the world like a puppy licking your face.
+If you think dogs can't count, try putting three dog biscuits in your pocket and then giving Fido only two of them.
+Did you ever notice when you blow in a dog's face he gets mad at you? But when you take him in a car he sticks his head out the window.
+One who sets the entire army in motion to chase an advantage will not attain it.
+Do not press an enemy at bay.
+If ignorant both of your enemy and yourself, you are certain to be in peril.
+The enemy will be tired and you will be rested if you lure him to you.
+Whoever fights monsters should see to it that in the process he doesn't become a monster.
+First, we're going to cut it off, then we're going to kill it.
+Sometimes nothing can be a pretty cool hand.
+A competent leader can get efficient service from poor troops while, on the contrary, an incapable leader can demoralize the best of troops.
+The only thing necessary for the triumph of evil is for good men to do nothing.
+Perception is strong and sight weak. In strategy it is important to see distant things as if they were close and to take a distanced view of close things.
+Yes, we have slain a large dragon. But we live now in a jungle filled with a bewildering variety of poisonous snakes. And in many ways, the dragon was easier to keep track of.
+There are not more than five primary colors (blue, yellow, red, white, and black), yet in combination they produce more hues than can ever been seen.
+One began to hear it said that World War I was the chemists' war, World War II was the physicists' war, World War III (may it never come) will be the mathematicians' war.
+Courage is not the absence of fear, but the mastery of it.
+On open ground, do not try to block the enemy's way. On the ground of intersecting highways, join hands with your allies.
+Beware of small expenses; small leaks can sink a big ship.
+To secure peace is to prepare for war.
+It is the fight alone that pleases us, not the victory.
+Their strength is to sit still.
+The god of Victory is said to be one-handed, but Peace gives victory to both sides.
+Silence is not always tact and it is tact that is golden, not silence.
+Never do anything when you are in a temper, for you will do everything wrong.
+We are not retreating; we are advancing in another direction.
+You can discover what your enemy fears most by observing the means he uses to frighten you.
+Victory goes to the player who makes the next-to-last mistake.
+Bicycles are almost as good as guitars for meeting girls.
+I saw the angel in the marble and carved until I set him free.
+The best current evidence is that media are mere vehicles that deliver instruction but do not influence student achievement any more than the truck that delivers groceries causes change in our nutrition.
+We would often be sorry if our wishes were gratified.
+Leisure time is that five or six hours when you sleep at night.
+This is the way I look when I'm sober. It's enough to make a person drink, don't you say?
+God made wine for great and small. Small fools drink too much. Great fools drink none at all!
+One reason why I don't drink is because I wish to know when I am having a good time.
+A bartender is a temporary pharmacists with a limited inventory.
+Twas a Woman who drove me to drink. And I never had the courtesy to thank her!
+The fact that a believer is happier than a skeptic is no more to the point than the fact that a drunken man is happier than a sober one.
+Booze may not be the answer, but it helps you to forget the question.
+I am a firm believer in the people. If given the truth, they can be depended upon to meet any national crisis. The great point is to bring them the real facts, and beer.
+Everybody should believe in something; I believe I'll have another drink.
+The world wants solace when it's grieved. I drink beer, but I'm not decieved.
+The trouble with jogging is that the ice falls out of your glass.
+The world wants solace when it's grieved. I drink beer, but I'm not decieved.
+An intelligent man is sometimes forced to be drunk to spend time with his fools.
+My experience through life has convinced me that, while moderation and temperance in all things are commendable and beneficial, abstinence from spirituous liquors is the best safeguard of morals and health.
+Get up and dance, get up and smile, get up and drink to the days that are gone in the shortest while.
+I am a firm believer in the people. If given the truth, they can be depended upon to meet any national crisis. The great point is to bring them the real facts, and beer.
+Sitting silent and looking wise cannot be compared to drinking wine and making a racket.
+The problem with the world is that everyone is a few drinks behind.
+I'm goin' where the wind don't blow so strange, maybe off on some high cold mountain chain
+A brave man likes the feel of nature onhis face", "Yeah and a wise man has enough sense toget in out of the rain
+Sunshine is delicious, rain is refreshing, wind braces up, snow is exhilarating; there is no such thing as bad weather just different kinds of good weather.
+When a man does a piece of work which is admired by all we say that it is wonderful; but when we see the changes of day and night, the sun, the moon, and the stars in the sky, and the changing seasons upon the earth, with their ripening fruits, anyone must realize that it is the work of someone more powerful than man.
+Two roads diverged in a woods,-- and I took the one less traveled by, And that has made all the difference.
+The Earth does not belong to us, we belong to the Earth.
+The mountains are fountains of men as well as of rivers, of glaciers, of fertile soil. The great poets, philosophers, prophets, able men whose thought and deeds have moved the world, have come down from the mountains.
+I feel an indescribable ecstasy and delirium in melting, as it were, into the system of beings, in identifying myself with the whole of nature.
+The clearest way to the Universe is through a forest wilderness.
+The planting of trees is the least self-centered of all that we can do. It is a purer act of faith than the procreation of children.
+Lady finger, dipped in moonlight, writing "What for?" across the morning sky. Sunlight splatters, dawn with answer, darkness shrugs and bids the day goodbye.
+I don't think of all the misery, but of the beauty that still remains...my advice is: Go outside, to the fields, enjoy nature and the sunshine, go out and try to recapture the happiness in yourself and in God. Think of all the beauty that's still left in and around you and be happy.
+Though my soul may sit in darkness, it will arise in perfect light. I have loved the stars too fondly to be fearful of the night.
+Even trees do not die without a groan.
+The only problem with the speed of light, is it gets here too early in the morning.
+Remember that the most beautiful things in the world are the most useless; peacocks and lilies, for example.
+Summer afternoon -- summer afternoon; to me those have always been the two most beautiful words in the English language.
+I am...a mushroom; On whom the dew of heaven drops now and then.
+One of the healthiest ways to gamble is with a spade and a package of garden seeds.
+Till now man has been up against Nature, from now on he will be up against his own nature.
+To find the universal elements enough; to find the air and the water exhilarating; to be refreshed by a morning walk or an evening saunter. . .to be thrilled by the stars at night; to be elated over a bird's nest or a wildflower in spring - - these are some of the rewards of the simple life.
+The Creator has an inordinate fondness for beetles.
+Space isn't remote at all. It's only an hour's drive away if your car could go straight upwards.
+We love this earth as a newborn loves its mother's heartbeat. So, if we sell you our land, love it as we have loved it. Care for it, as we have cared for it. Hold in your mind the memory of the land as it is when you receive it. Preserve the land for all children, and love it, as God loves us.
+Nature, to be commanded, must be obeyed.
+He is richest who is content with the least, for content is the wealth of nature.
+Heredity is what sets the parents of a teenager wondering about each other.
+We do not inherit this land from our ancestors; we borrow it from our children.
+The tree which moves some to tears of joy is in the eyes of others only a green thing that stands in the way. Some see nature all ridicule and deformity...and some scarce see nature at all. But to the eyes of the man of imagination, nature is imagination itself.
+God loved the birds and invented trees. Man loved the birds and invented cages.
+Don't cry when the sun is gone, because the tears won't let you see the stars.
+It wasn't the Exxon Valdez captain's driving that caused the Alaskan oil spill. It was yours.
+The use of solar energy has not been opened up because the oil industry does not own the sun.
+If you talk to the animals they will talk with you and you will know each other. If you do not talk to them you will not know them and what you do not know, you will fear. What one fears, one destroys.
+One does not sell the land people walk on.
+It suddenly struck me that that tiny pea, pretty and blue, was the Earth. I put up my thumb and shut one eye, and my thumb blotted out the planet Earth. I didn't feel like a giant. I felt very, very small.
+There is only one nature - the division into science and engineering is a human imposition, not a natural one. Indeed, the division is a human failure; it reflects our limited capacity to comprehend the whole.
+Climb the mountains and get their good tidings. Nature's peace will flow into you as sunshine flows into trees. The winds will blow their own freshness into you, and the storms their energy, while cares will drop away from you like the leaves of Autumn.
+If you live on this land, and you have ancestors sleeping in this land, I believe that makes you a native to this land. It has nothing to do with the color of your skin. I was not raised to look at people racially. What I was taught is that we're flowers in the Great Spirit's garden. We share a common root, and the root is Mother Earth.
+A man has made at least a start on discovering the meaning of human life when he plants shade trees under which he knows full well he will never sit.
+On every mountain height is rest.
+No bird soars too high if he soars with his own wings.
+The Earth laughs in flowers.
+Swift or smooth, broad as the Hudson or narrow enough to scrape your gunwales, every river is a world of its own, unique in pattern and personality. Each mile on a river will take you further from home than a hundred miles on a road.
+Now I see the secret of making the best person, it is to grow in the open air and to eat and sleep with the earth.
+To the fool, he who speaks wisdom will sound foolish.
+It's amazing how much "mature wisdom" resembles being too tired.
+Pooh hasn't much Brain, but he never comes to any harm. He does silly things and they turn out right.
+The only laws of matter are those that our minds must fabricate and the only laws of mind are fabricated for it by matter.
+To make oneself an object, to make oneself passive, is a very different thing from being a passive object.
+As a rule, he or she who has the most information will have the greatest success in life.
+It is better to debate a question without settling it than to settle a question without debating it.
+A scientist can hardly meet with anything more undesirable than to have the foundations give way just as the work is finished. I was put in this position by a letter from Mr. Bertrand Russell when the work was nearly through the press.
+In theory, there is no difference between theory and practice. But, in practice, there is.
+As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality.
+You can tell whether a man is clever by his answers. You can tell whether a man is wise by his questions.
+Life is good for only two things, discovering mathematics and teaching mathematics.
+The simplest schoolboy is now familiar with facts for which Archimedes would have sacrificed his life.
+Advice is like snow; the softer it falls the longer it dwells upon, and the deeper it sinks into the mind.
+I not only use all the brains that I have, but all that I can borrow.
+A fool sees not the same tree that a wise man sees.
+In order to seek truth it is necessary once in the course of our life to doubt as far as possible all things.
+It is a good thing for an uneducated man to read books of quotations.
+No man's knowledge here can go beyond his experience.
+The shortest path between two truths in the real domain passes through the complex domain.
+God not only plays dice. He also sometimes throws the dice where they cannot be seen.
+When a man faces his Maker, he will have to account for the pleasures of life he failed to experience.
+Religion is the best armour in the world, but the worst cloak.
+If there is no God, who pops up the next Kleenex?
+God is the tangential point between zero and infinity.
+If you begin to live life looking for the God that is all around you, every moment becomes a prayer.
+People need religion. It's a vehicle for a moral tradition. A crucial role. Nothing can take its place.
+We turn to God for help when our foundations are shaking, only to learn that it is God who is shaking them.
+Somebody recently figured out that we have 35 million laws to enforce the ten commandments.
+I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use.
+We are all connected to everyone and everything in the universe. Therefore, everything one does as an individual affects the whole. All thoughts, words, images, prayers, blessings, and deeds are listened to by all that is.
+They [those who believe that "there are men on the other side of the earth"] fail to observe that even if the world is held to be global or rounded in shape, or if some process of reasoning should prove this to be the case, it would still not necessarily follow that the land on the opposite side is not covered by masses of water.
+The idea that we shall be welcomed as new members into the galactic community is as unlikely as the idea that the oyster will be welcomed as a new member into the human community. We're probably not even edible.
+Blessed is he who makes his companions laugh.
+The Universe should be deemed an immense Being, always living, always moved and always moving in an eternal activity inherent in itself, and which, subordinate to no foreign cause, is communicated to all its parts, connects them together, and makes the world of things a complete and perfect whole.
+The double law of attraction and radiation or of sympathy and antipathy, of fixedness and movement, which is the principle of Creation, and the perpetual cause of life.
+Lasciate ogni speranza voi ch'entrate!
+In dwelling, live close to the ground. In thinking, keep to the simple. In conflict, be fair and generous. In governing, don't try to control. In work, do what you enjoy. In family life, be completely present.
+It is a wise father who knows his child. But maybe it's a very wise child who takes the times to know his father.
+Attachment is the great fabricator of illusions; reality can be attained only by someone who is detached.
+Relationships are hard. It's like a full-time job, and we should treat it like one. If your boyfriend or girlfriend wants to leave you, they should give you two weeks' notice. There should be severance pay, and before they leave you, they should have to find you a temp.
+The best way to get most husbands to do something is to suggest that perhaps they're too old to do it.
+A man likes his wife to be just clever enough to appreciate his cleverness, and just stupid enough to admire it.
+I ain't ever had a job. I just always played baseball.
+It is an ironic habit of human beings to run faster when we have lost our way.
+For Americans war is almost all of the time a nuisance, and military skill is a luxury like Mah-Jongg. But when the issue is brought home to them, war becomes as important, for the necessary period, as business or sport. And it is hard to decide which is likely to be the more ominous for the Axis -- an American decision that this is sport, or that it is business.
+Using drugs isn't cheating. It's stealing victory from someone who deserves it.
+Remember, Ginger Rogers did everything Fred Astaire did, but she did it backwards and in high heels.
+It is amazing what you can accomplish when you set out to do nothing.
+Never curse the darkness, only be inspired by it.
+Hope is a good breakfast, but it is a bad supper.
+He that wrestles with us strengthens our nerves and sharpens our skill. Our antagonist is our helper.
+Enjoy yourself. It's later than you think.
+Live every day as if it were your last and then some day you'll be right.
+Life is not lost by dying; life is lost minute by minute, day by dragging day, in all the thousand small uncaring ways.
+The only reason some people get lost in thought is because it is unfamiliar territory.
+It is never too late to be what you might have been.
+We are the music makers, and we are the dreamers of the dream. Wandering by lone sea breakers, and sitting by desolate streams. World losers and world forsakers, for whom the pale moon gleams. Yet we are movers and the shakers of the world forever it seems.
+A good listener tries to understand thoroughly what the other person is saying. In the end he may disagree sharply, but before he disagrees, he wants to know exactly what it is he is disagreeing with.
+When you are content to be simply yourself and don't compare or compete, everybody will respect you.
+Use what talent you possess: the woods would be very silent if no birds sang except those that sang best.
+The grand essentials to happiness in this life are something to do, something to love, and something to hope for.
+Reason often makes mistakes, but conscience never does.
+The last time somebody said, 'I find I can write much better with a word processor.', I replied, 'They used to say the same thing about drugs.
+Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself.
+A woman is like a tea bag. You never know how strong she is until she gets in hot water.
+You may have a fresh start at any moment you choose, for this thing we call failure is not the falling down, but the staying down.
+Only the dreamer shall understand realities, though in truth his dreaming must be not out of proportion to his waking.
+Blessed are those who can laugh at themselves, for they shall never cease to be amused.
+If you want better eyes, try to see the best in people.
+The shadows we see on the walls in front of us come from the flashlight we hold behind us.
+Success is that peace of mind that comes from knowing you've done everything in your power to become the very best you're capable of becoming.
+Success is counted sweetest ~ By those who ne'er succeed. To comprehend a nectar ~ Requires sorest need.
+hose who bring sunshine to the lives of others cannot keep it from themselves.
+If one does not know to which port one is sailing, no wind is favorable.
+Anyone who proposes to do good must not expect people to roll stones out of his way, but must accept his lot calmly if they even roll a few more upon it.
+Restlessness and discontent are the first necessities of progress.
+The death of fear is in doing what you fear to do.
+How far you go in life depends on your being tender with the young, compassionate with the aged, sympathetic with the striving, and tolerant of the weak and strong. Because some day in life you will have been all these.
+Men and women are not content to comfort themselves with tales of gods and giants, or to confine their thoughts to the daily affairs of life; they also build telescopes and satellites and accelerators, and sit at desks for endless hours working out the meaning of the data they gather.
+All men dream, but not equally. Those who dream by night, in the dusty recesses of their minds, awake in the day to find that it was vanity. But the dreamers of the day are dangerouus men, for they may act their dreams with open eyes to make it reality.
+You cannot stay on the summit forever; you have to come down again. So why bother in the first place? Just this: What is above knows what is below, but what is below does not know what is above. One climbs, one sees. One descends, one sees no longer, but one has seen. There is an art of conducting oneself in the lower regions by the memory of what one saw higher up. When one can no longer see, one can at least still know.
+A window of opportunity won't open itself.
+I've found that luck is quite predictable. If you want more luck, take more chances. Be more active. Show up more often.
+Besides pride, loyalty, discipline, heart, and mind, confidence is the key to all the locks.
+The winners in life think constantly in terms of I can, I will, and I am. Losers, on the other hand, concentrate their waking thoughts on what they should have or would have done, or what they can’t do.
+Our greatest glory consists not in never falling, but in rising every time we fall.
+You may be disappointed if you fail, but you are doomed if you don't try.
+What we see depends mainly on what we look for.
+We're here for a good time not a long time
+Laugh at your friends, and if your friends are sore; So much the better, you may laugh the more.
+I've been on so many blind dates, I should get a free dog.
+Seven days without laughter makes one weak.
+I'll play with it first and tell you what it is later.
+There might be some credit in being jolly.
+The intoxication of anger, like that of the grape, shows us to others, but hides us from ourselves.
+The more refined one is, the more unhappy.
+Enthusiasm is the inspiration of everything great. Without it no man is to be feared, and with it none despised.
+It is an inexorable Law of Nature that bad must follow good, that decline must follow a rise. To feel that we can rest on our achievements is a dangerous fallacy. Inner strength can overcome anything that occurs outside.
+There are souls in this world which have the gift of finding joy everywhere and of leaving it behind them when they go.
+The youth gets together the materials for a bridge to the moon, and at length the middle-aged man decides to make a woodshed with them.
+I will prepare, and some day my chance will come.
+He who limps is still walking.
+Extraordinary how potent cheap music is.
+What orators lack in depth they make up for in length.
+Keep your face to the sun and you will never see the shadows.
+Adventure is not outside a man, it is within.
+Blessed is the man who, having nothing to say, abstains from giving us wordy evidence of the fact.
+Money often costs to much.
+Prevention is better than cure.
+Win without boasting. Lose without excuse.
+I made my money by selling too soon.
+Our incomes are like our shoes; if too small, they gall and pinch us; but if too large, they cause us to stumble and to trip.
+The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding, go out to meet it.
+Good leaders are like baseball umpires; they go practically unnoticed when doing their jobs right.
+The cowards think of what they can lose, the heroes of what they can win.
+Good advice is always certain to be ignored, but that's no reason not to give it.
+There are two kinds of people who never amount to much: those who cannot do what they are told, and those who can do nothing else.
+It belongs to human nature to hate those you have injured.
+I will not condemn you for what you did yesterday, if you do it right today.
+You don't tell the quality of a master by the size of his crowds.
+Lack of will power has caused more failure than lack of intelligence or ability.
+In the beginner's mind there are many possibilities, but in the expert's mind there are few.
+Talk doesn't cook rice.
+Good words shall gain you honor in the marketplace, but good deeds shall gain you friends among men.
+Invincibility lies in the defense; the possibility of victory in the attack. One defends when his strength is inadequate; he attacks when it is abundant.
+Coming to an impasse, change, having changed, you will get through.
+The sound of the water says what I think.
+He who knows others is wise. He who knows himself is enlightened.
+The superior man acquaints himself with many sayings of antiquity and many deeds of the past, in order to strengthen his character thereby.
+Let a man avoid evil deeds as a man who loves life avoids poison.
+It is the sides of the mountain which sustain life, not the top.
+Balance is the natural state of life, because the basic characteristic of the fundamental element of life, pure consciousness, is complete balance.
+Philosophy is a battle against the bewitchment of our intelligence by means of language.
+I need a prison in order to dream of being free.
+Today it is me, tomorrow someone else. There is no day I am the same.
+I do not consider it an insult, but rather a compliment to be called an agnostic. I do not pretend to know where many ignorant men are sure--that is all that agnosticism means.
+It is the business of the future to be dangerous.... The major advances in civilization are processes that all but wreck the societies in which they occur.
+Philosophy, like Medicine, has many drugs, very few good remedies, and almost no specifics.
+The defining function of the artist is to cherish consciousness.
+I find in all the artists that I admire most a disturbing element, a distortion, giving evidence of a struggle . . . . In great art, this conflict is hidden, it is unresolved. All that is bursting with energy is disturbing - not perfect.
+Without freedom, no art; art lives only on the restrainst it imposes on itself, and dies of all others.
+Enthusiasm is the element of success in everything. It is the light that leads and the strength that lifts people on and up in the great struggles of scientific pursuits and of professional labor. It robs endurance of difficulty, and makes pleasure of duty.
+Everywhere I go I'm asked if I think the university stifles writers. My opinion is that they don't stifle enough of them. There's many a best-seller that could have been prevented by a good teacher.
+Up the airy mountain, Down the rushy glen, We daren't go a-hunting, For fear of little men.
+Don't wait to be noticed -- Being discovered by an influential patron would be ideal, but it's best not to depend on this. Become a discoverer yourself instead of passively hoping someone out there will notice you. While the show business artist needs a big break, the visual artist needs to concentrate on faithful practice of one work after another. Good work will eventually be noticed.
+I wish they would only take me as I am.
+Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.
+To invent, you need a good imagination and a pile of junk.
+If the Aborigine drafted an I.Q. test, all of Western civilization would presumably flunk it.
+Whoever controls the media, controls the mind.
+The greatest composer does not sit down to work because he is inspired, but becomes inspired because he is working.
+Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.
+Without Elvis, none of us could have made it.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/tlds.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,530 @@
+AF: afghanistan
+AL: albania
+AQ: antarctica
+DZ: algeria
+AS: american samoa
+AD: andorra
+AO: angola
+AG: antigua and barbuda
+AZ: azerbaijan
+AR: argentina
+AU: australia
+AT: austria
+BS: bahamas
+BH: bahrain
+AM: armenia
+HU: hungary
+IS: iceland
+IN: india
+ID: indonesia
+IR: iran
+IQ: iraq
+IE: ireland
+IL: israel
+IT: italy
+JM: jamaica
+JP: japan
+JO: jordan
+KZ: kazakhstan
+KE: kenya
+KI: kiribati
+KP: north korea
+KR: south korea
+KW: kuwait
+KG: kyrgyzstan
+LA: lao
+LA: laos
+LV: latvia
+LB: lebanon
+LS: lesotho
+LR: liberia
+LY: libyan arab jamahiriya
+LY: lybia
+LI: liechtenstein
+LT: lithuania
+LU: luxembourg
+MO: macau
+MK: macedonia
+MG: madagascar
+MW: malawi
+MY: malaysia
+MV: maldives
+ML: mali
+MT: malta
+MH: marshall islands
+MQ: martinique
+MR: mauritania
+MU: mauritius
+MX: mexico
+FM: micronesia
+MD: moldova
+MC: monaco
+MN: mongolia
+MS: montserrat
+MA: morocco
+MZ: mozambique
+MM: myanmar
+NA: namibia
+NR: nauru
+NP: nepal
+NL: netherlands
+AN: netherlands antilles
+NT: neutral zone
+NC: new caledonia
+NZ: new zealand
+NI: nicaragua
+NE: niger
+NG: nigeria
+NU: niue
+NF: norfolk island
+MP: northern mariana islands
+NO: norway
+OM: oman
+PK: pakistan
+PW: palau
+PA: panama
+PG: papua new guinea
+PG: papua
+PG: new guinea
+PY: paraguay
+PE: peru
+PH: philippines
+PN: pitcairn
+PL: poland
+PT: portugal
+PR: puerto rico
+BD: bangladesh
+QA: qatar
+RE: reunion
+RO: romania
+RU: russian federation
+RW: rwanda
+KN: saint kitts and nevis
+LC: saint lucia
+VC: saint vincent and the grenadines
+WS: samoa
+SM: san marino
+BB: barbados
+ST: sao tome and principe
+SA: saudi arabia
+SN: senegal
+SC: seychelles
+SL: sierra leone
+SG: singapore
+SI: slovenia
+SB: solomon islands
+SO: somalia
+ZA: south africa
+BY: belarus
+ES: spain
+LK: sri lanka
+SH: st helena
+PM: st pierre and miquelon
+SD: sudan
+SR: suriname
+SJ: svalbard and jan mayen islands
+SZ: swaziland
+SE: sweden
+CH: switzerland
+BE: belgium
+CH: cantons of helvetia
+CH: confederation helvetique
+SY: syrian arab republic
+SY: syria
+TW: taiwan
+TJ: tajikistan
+TZ: tanzania
+TH: thailand
+TG: togo
+TK: tokelau
+BZ: belize
+TO: tonga
+TT: trinidad and tobago
+TN: tunisia
+TR: turkey
+TM: turkmenistan
+TC: turks and caicos islands
+TV: tuvalu
+UG: uganda
+UA: ukrainian ssr
+AE: united arab emirates
+BJ: benin
+UK: united kingdom
+GB: great britain
+US: united states of america
+US: united states
+UM: united states minor outlying islands
+UY: uruguay
+SU: ussr
+SU: soviet union
+UZ: uzbekistan
+VU: vanuatu
+BM: bermuda
+VA: vatican
+VA: vatican city state
+VE: venezuela
+VN: viet nam
+VI: virgin islands (us)
+VG: virgin islands (uk)
+WF: wallis and futuna islands
+EH: western sahara
+YE: yemen
+YU: yugoslavia
+BT: bhutan
+ZR: zaire
+ZM: zambia
+ZW: zimbabwe
+COM: commercial organization (us)
+EDU: educational institution (us)
+NET: networking organization (us)
+MIL: military (us)
+ORG: non-profit organization (us)
+GOV: government (us)
+KP: korea - democratic people's republic of
+BO: bolivia
+KR: korea - republic of
+LA: lao peoples' democratic republic
+SU: russia
+SK: slovakia
+CZ: czech
+ARPA: arpanet (us military)
+BA: bosnia
+BW: botswana
+BV: bouvet island
+BR: brazil
+IO: british indian ocean territory
+BN: brunei darussalam
+BN: brunei
+BG: bulgaria
+BF: burkina faso
+BI: burundi
+BY: byelorussian ssr
+KH: cambodia
+CM: cameroon
+CA: canada
+CV: cap verde
+KY: cayman islands
+CF: central african republic
+TD: chad
+CL: chile
+CN: china
+CX: christmas island
+CC: cocos (keeling) islands
+CO: colombia
+KM: comoros
+CG: congo
+CK: cook islands
+CR: costa rica
+AW: aruba
+CI: cote d'ivoire
+HR: croatia
+HR: hrvatska
+CU: cuba
+CY: cyprus
+CS: czechoslovakia
+DK: denmark
+DJ: djibouti
+DM: dominica
+DO: dominican republic
+TP: east timor
+EC: ecuador
+EG: egypt
+AI: anguilla
+SV: el salvador
+GQ: equatorial guinea
+EE: estonia
+ET: ethiopia
+FK: falkland islands
+FK: malvinas
+FO: faroe islands
+FJ: fiji
+FI: finland
+FR: france
+GF: french guiana
+PF: french polynesia
+TF: french southern territories
+GA: gabon
+GM: gambia
+GE: georgia
+DE: germany
+DE: deutschland
+GH: ghana
+GI: gibraltar
+GR: greece
+GL: greenland
+GD: grenada
+GP: guadeloupe
+GU: guam
+GT: guatemala
+GN: guinea
+GW: guinea bissau
+GY: gyana
+HT: haiti
+HM: heard and mc donald islands
+HN: honduras
+HK: hong kong
+afghanistan: AF
+albania: AL
+antarctica: AQ
+algeria: DZ
+american samoa: AS
+andorra: AD
+angola: AO
+antigua and barbuda: AG
+azerbaijan: AZ
+argentina: AR
+australia: AU
+austria: AT
+bahamas: BS
+bahrain: BH
+armenia: AM
+hungary: HU
+iceland: IS
+india: IN
+indonesia: ID
+iran: IR
+iraq: IQ
+ireland: IE
+israel: IL
+italy: IT
+jamaica: JM
+japan: JP
+jordan: JO
+kazakhstan: KZ
+kenya: KE
+kiribati: KI
+north korea: KP
+south korea: KR
+kuwait: KW
+kyrgyzstan: KG
+lao: LA
+laos: LA
+latvia: LV
+lebanon: LB
+lesotho: LS
+liberia: LR
+libyan arab jamahiriya: LY
+lybia: LY
+liechtenstein: LI
+lithuania: LT
+luxembourg: LU
+macau: MO
+macedonia: MK
+madagascar: MG
+malawi: MW
+malaysia: MY
+maldives: MV
+mali: ML
+malta: MT
+marshall islands: MH
+martinique: MQ
+mauritania: MR
+mauritius: MU
+mexico: MX
+micronesia: FM
+moldova: MD
+monaco: MC
+mongolia: MN
+montserrat: MS
+morocco: MA
+mozambique: MZ
+myanmar: MM
+namibia: NA
+nauru: NR
+nepal: NP
+netherlands: NL
+netherlands antilles: AN
+neutral zone: NT
+new caledonia: NC
+new zealand: NZ
+nicaragua: NI
+niger: NE
+nigeria: NG
+niue: NU
+norfolk island: NF
+northern mariana islands: MP
+norway: NO
+oman: OM
+pakistan: PK
+palau: PW
+panama: PA
+papua new guinea: PG
+papua: PG
+new guinea: PG
+paraguay: PY
+peru: PE
+philippines: PH
+pitcairn: PN
+poland: PL
+portugal: PT
+puerto rico: PR
+bangladesh: BD
+qatar: QA
+reunion: RE
+romania: RO
+russian federation: RU
+rwanda: RW
+saint kitts and nevis: KN
+saint lucia: LC
+saint vincent and the grenadines: VC
+samoa: WS
+san marino: SM
+barbados: BB
+sao tome and principe: ST
+saudi arabia: SA
+senegal: SN
+seychelles: SC
+sierra leone: SL
+singapore: SG
+slovenia: SI
+solomon islands: SB
+somalia: SO
+south africa: ZA
+belarus: BY
+spain: ES
+sri lanka: LK
+st helena: SH
+st pierre and miquelon: PM
+sudan: SD
+suriname: SR
+svalbard and jan mayen islands: SJ
+swaziland: SZ
+sweden: SE
+switzerland: CH
+belgium: BE
+cantons of helvetia: CH
+confederation helvetique: CH
+syrian arab republic: SY
+syria: SY
+taiwan: TW
+tajikistan: TJ
+tanzania: TZ
+thailand: TH
+togo: TG
+tokelau: TK
+belize: BZ
+tonga: TO
+trinidad and tobago: TT
+tunisia: TN
+turkey: TR
+turkmenistan: TM
+turks and caicos islands: TC
+tuvalu: TV
+uganda: UG
+ukrainian ssr: UA
+united arab emirates: AE
+benin: BJ
+united kingdom: UK
+great britain: GB
+united states of america: US
+united states: US
+united states minor outlying islands: UM
+uruguay: UY
+ussr: SU
+soviet union: SU
+uzbekistan: UZ
+vanuatu: VU
+bermuda: BM
+vatican: VA
+vatican city state: VA
+venezuela: VE
+viet nam: VN
+virgin islands (us): VI
+virgin islands (uk): VG
+wallis and futuna islands: WF
+western sahara: EH
+yemen: YE
+yugoslavia: YU
+bhutan: BT
+zaire: ZR
+zambia: ZM
+zimbabwe: ZW
+commercial organization (us): COM
+educational institution (us): EDU
+networking organization (us): NET
+military (us): MIL
+non-profit organization (us): ORG
+government (us): GOV
+korea - democratic people's republic of: KP
+bolivia: BO
+korea - republic of: KR
+lao peoples' democratic republic: LA
+russia: SU
+slovakia: SK
+czech: CZ
+arpanet (us military): ARPA
+bosnia: BA
+botswana: BW
+bouvet island: BV
+brazil: BR
+british indian ocean territory: IO
+brunei darussalam: BN
+brunei: BN
+bulgaria: BG
+burkina faso: BF
+burundi: BI
+byelorussian ssr: BY
+cambodia: KH
+cameroon: CM
+canada: CA
+cap verde: CV
+cayman islands: KY
+central african republic: CF
+chad: TD
+chile: CL
+china: CN
+christmas island: CX
+cocos (keeling) islands: CC
+colombia: CO
+comoros: KM
+congo: CG
+cook islands: CK
+costa rica: CR
+aruba: AW
+cote d'ivoire: CI
+croatia: HR
+hrvatska: HR
+cuba: CU
+cyprus: CY
+czechoslovakia: CS
+denmark: DK
+djibouti: DJ
+dominica: DM
+dominican republic: DO
+east timor: TP
+ecuador: EC
+egypt: EG
+anguilla: AI
+el salvador: SV
+equatorial guinea: GQ
+estonia: EE
+ethiopia: ET
+falkland islands: FK
+malvinas: FK
+faroe islands: FO
+fiji: FJ
+finland: FI
+france: FR
+french guiana: GF
+french polynesia: PF
+french southern territories: TF
+gabon: GA
+gambia: GM
+georgia: GE
+germany: DE
+deutschland: DE
+ghana: GH
+gibraltar: GI
+greece: GR
+greenland: GL
+grenada: GD
+guadeloupe: GP
+guam: GU
+guatemala: GT
+guinea: GN
+guinea bissau: GW
+gyana: GY
+haiti: HT
+heard and mc donald islands: HM
+honduras: HN
+hong kong: HK
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/weather.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,5859 @@
+AGGL => Santa Cruz (Santa Cruz)
+AGGM => Munda (Munda)
+ANAU => Nauru (Nauru)
+AYMD => Madang (Madang)
+AYPY => Moresby (Moresby)
+AYWK => Wewak (Wewak)
+BGAM => Tasiilaq (Tasiilaq)
+BGAS => Angisoq (Angisoq)
+BGAT => Aputiteeq (Aputiteeq)
+BGBW => Narsarsuaq (Narsarsuaq)
+BGCO => Constable Pynt (Constable Pynt)
+BGDB => Daneborg (Daneborg)
+BGDH => Danmarkshavn (Danmarkshavn)
+BGEM => Egedesminde (Egedesminde)
+BGFH => Frederikshaab (Frederikshaab)
+BGGD => Groennedal (Groennedal)
+BGGH => Godthaab / Nuuk (Godthaab)
+BGHB => Holsteinsborg (Holsteinsborg)
+BGJH => Julianehaab (Julianehaab)
+BGJN => Jacobshavn Lufthavn (Jacobshavn Lufthavn)
+BGKK => Kulusuk Lufthavn (Kulusuk Lufthavn)
+BGKT => Cape Tobin (Cape Tobin)
+BGPC => Prins Christian Sund (Prins Christian Sund)
+BGSC => Scoresbysund (Scoresbysund)
+BGSF => Sdr Stroemfjord (Sdr Stroemfjord)
+BGTL => Thule A. B. (Thule A. B.)
+BIAR => Akureyri (Akureyri)
+BIEG => Egilsstadir (Egilsstadir)
+BIGR => Grimsey (Grimsey)
+BIHN => Akurnes (Akurnes)
+BIKF => Keflavikurflugvollur (Keflavikurflugvollur)
+BIRG => Raufarhofn (Raufarhofn)
+BIRK => Reykjavik (Reykjavik)
+BIST => Stykkisholmur (Stykkisholmur)
+BIVM => Vestmannaeyjar (Vestmannaeyjar)
+BIVO => Skjaldthingsstadir (Skjaldthingsstadir)
+BIX1 => Biloxi, Keesler, Navu (Biloxi)
+BIX2 => Biloxi, Keesler, Navu (Biloxi)
+BIX3 => Biloxi, Keesler, Navu (Biloxi)
+CTPP => Camp Canargus (Camp Canargus)
+CWAC => Nitinat Lake (Nitinat Lake)
+CWAD => Cape Mudge Light House (Cape Mudge Light House)
+CWAE => Whistler (Whistler)
+CWAF => Ile Rouge (Ile Rouge)
+CWAG => La Scie, Nfld. (La Scie)
+CWAH => Amherst, N. S. (Amherst)
+CWAJ => Erieau (Erieau)
+CWAN => Amphitrite Point (Amphitrite Point)
+CWAQ => Coronach Spc (Coronach Spc)
+CWAR => Argentia, Nfld (Argentia)
+CWAS => Pam Rocks (Pam Rocks)
+CWAU => Dryad Point Light House (Dryad Point Light House)
+CWAV => Sundre (Sundre)
+CWAX => St. Anthony, Nfld. (St. Anthony)
+CWBA => Banff, Alta. (Banff)
+CWBE => Killarney (Killarney)
+CWBF => Burgeo (Burgeo)
+CWBG => Big Creek (Big Creek)
+CWBI => Britt, Ont. (Britt)
+CWBJ => Inner Whalebacks (Inner Whalebacks)
+CWBK => Caribou Point (Caribou Point)
+CWBL => Bachelors Island (Bachelors Island)
+CWBM => Beaverlodge (Beaverlodge)
+CWBO => Brooks (Brooks)
+CWBR => B, R (B)
+CWBT => Longue Point De Mongue (Longue Point De Mongue)
+CWBV => Beaven Island, N. S. (Beaven Island)
+CWBY => Port Menier, Que. (Port Menier)
+CWBZ => St Anicet (St Anicet)
+CWCA => Cartwright, Nfld. (Cartwright)
+CWCB => Nanakwa Shoals (Nanakwa Shoals)
+CWCD => Saskatoon Kernen (Saskatoon Kernen)
+CWCH => Atikokan (Atikokan)
+CWCI => Caribou Island, Ont. (Caribou Island)
+CWCJ => Pukaskwa (Pukaskwa)
+CWCL => Clinton, B. C. (Clinton)
+CWCM => Carberry Mcdc (Carberry Mcdc)
+CWCN => Malloch Dome (Malloch Dome)
+CWCO => Collingwood (Collingwood)
+CWCQ => Chatham (Chatham)
+CWCS => Cote-Ste-Cath Mot (Cote-Ste-Cath Mot)
+CWCT => Coronation (Coronation)
+CWCU => Barrie, Ont. (Barrie)
+CWCX => Clut Lake (Clut Lake)
+CWDA => Englee (Englee)
+CWDB => Burwash (Burwash)
+CWDC => Uranium City, Sask. (Uranium City)
+CWDE => Lac Benoit (Lac Benoit)
+CWDF => Oliphant \ Ont (Oliphant \ Ont)
+CWDH => Daniel's Harbour, Nfld (Daniel's Harbour)
+CWDI => Badger, Nfld (Badger)
+CWDJ => Regina University (Regina University)
+CWDK => Claresholm (Claresholm)
+CWDL => Dease Lake B. C. (Dease Lake B. C.)
+CWDM => Chevery, Que. (Chevery)
+CWDN => Wasaga Beach (Wasaga Beach)
+CWDO => Twillingate (Twillingate)
+CWDP => Manouane-Est (Manouane-Est)
+CWDQ => La Tuque (La Tuque)
+CWDS => St. Lawrence, Nfld. (St. Lawrence)
+CWDT => Chute Des Passes (Chute Des Passes)
+CWDU => Cop Upper (Cop Upper)
+CWDV => Upsala, Ont. (Upsala)
+CWDZ => Drumheller East (Drumheller East)
+CWEA => Pinawa (Pinawa)
+CWEB => Estevan Point, B. C. (Estevan Point)
+CWEC => Welcome Island (Welcome Island)
+CWEE => Chamouchouane (Chamouchouane)
+CWEF => Saint Paul Island (Saint Paul Island)
+CWEG => Alberta Weather Centre (Alberta Weather Centre)
+CWEH => Eastend Cypress, Sask (Eastend Cypress)
+CWEI => Melita, Man (Melita)
+CWEJ => Bow Drill Iii (Bow Drill Iii)
+CWEK => Grey Islet (Grey Islet)
+CWEL => Entrance Island (Entrance Island)
+CWEO => Lac Eon, Que (Lac Eon)
+CWEP => East Point, P. E. I (East Point)
+CWEQ => Swan River, Man. (Swan River)
+CWER => Ile D'Orleans (Ile D'Orleans)
+CWET => Egbert (Egbert)
+CWEU => Eureka, N. W. T. (Eureka)
+CWEV => Ellice River (Ellice River)
+CWEW => L'Assomption (L'Assomption)
+CWEZ => Saturna Island (Saturna Island)
+CWFD => Cape Dyer, N. W. T. (Cape Dyer)
+CWFE => Elk Island National Park (Elk Island National Park)
+CWFF => Melfort (Melfort)
+CWFG => Sartine Island (Sartine Island)
+CWFH => St. Shotts (St. Shotts)
+CWFJ => Cardston (Cardston)
+CWFL => Fort Reliance (Fort Reliance)
+CWFM => Chatham Point Lighthouse (Chatham Point Lighthouse)
+CWFN => Cree Lake (Cree Lake)
+CWFP => Nain (Nain)
+CWFQ => Frelighsburg (Frelighsburg)
+CWFR => Horsefly River, Bc (Horsefly River)
+CWFU => Little Macatina (Little Macatina)
+CWFW => Baie Comeau (Baie Comeau)
+CWFX => Colville Lake (Colville Lake)
+CWFY => Conne River (Conne River)
+CWFZ => Fort Reliance, Nwt (Fort Reliance)
+CWGB => Ballenas Island (Ballenas Island)
+CWGD => Goderich (Goderich)
+CWGF => Garden River (Garden River)
+CWGH => Grenadier Island (Grenadier Island)
+CWGJ => Montreal River Radar Site (Montreal River Radar Site)
+CWGL => Lagoon City (Lagoon City)
+CWGM => Waterton Park Gate (Waterton Park Gate)
+CWGN => Gretna, Man. (Gretna)
+CWGP => Pemberton (Pemberton)
+CWGQ => Roquemaure (Roquemaure)
+CWGR => Iles-De-La-Madelein (Iles-De-La-Madelein)
+CWGT => Sisters Island (Sisters Island)
+CWGV => Carp Radar Site (Carp Radar Site)
+CWGW => Sparwood (Sparwood)
+CWGY => Esther 1 (Esther 1)
+CWGZ => Grise Fiord (Grise Fiord)
+CWHA => Highvale (Highvale)
+CWHC => Vancouver (Vancouver)
+CWHE => Ellerslie (Ellerslie)
+CWHH => Hunters Point Mar (Hunters Point Mar)
+CWHI => Three Hills (Three Hills)
+CWHL => Holland Rock (Holland Rock)
+CWHM => Varennes (Varennes)
+CWHN => Jimmy Lake (Jimmy Lake)
+CWHO => Hopedale (Hopedale)
+CWHP => Heath Point (Heath Point)
+CWHS => Bernard Harbour (Bernard Harbour)
+CWHT => Haines Junction (Haines Junction)
+CWHU => Star Brook (Star Brook)
+CWHV => Beauceville (Beauceville)
+CWHW => Comfort Cove, Nfld. (Comfort Cove)
+CWHY => Mont-Orford (Mont-Orford)
+CWIC => Isachsen (Isachsen)
+CWID => Fort Providence (Fort Providence)
+CWIE => Indian River (Indian River)
+CWIF => Quatsino Light Station (Quatsino Light Station)
+CWII => Victoria Beach (Victoria Beach)
+CWIJ => Lupin, N. W. T. (Lupin)
+CWIK => Broadview, Sask. (Broadview)
+CWIM => Upsala Radar Site (Upsala Radar Site)
+CWIO => Iskut River (Iskut River)
+CWIQ => Primrose Lake (Primrose Lake)
+CWIR => Victoria Marine (Victoria Marine)
+CWIT => Saint Clothilde (Saint Clothilde)
+CWIW => Watrous East (Watrous East)
+CWIX => Mistook (Mistook)
+CWIY => St Leonard (St Leonard)
+CWIZ => L'Acadie (L'Acadie)
+CWJA => Jasper, Alta. (Jasper)
+CWJC => Ennadai Lake (Ennadai Lake)
+CWJD => Grand Rapids, Man. (Grand Rapids)
+CWJH => Southend (Southend)
+CWJI => Assiniboia (Assiniboia)
+CWJM => Upper Rideau Lake (Upper Rideau Lake)
+CWJN => Herschel Island (Herschel Island)
+CWJO => Jonquiere (Jonquiere)
+CWJP => Porter Lake (Porter Lake)
+CWJR => Creston (Creston)
+CWJT => St Jovite (St Jovite)
+CWJU => Langara, B. C. (Langara)
+CWJW => Jasper Warden (Jasper Warden)
+CWJX => Leader (Leader)
+CWJY => Yathkyed Lake (Yathkyed Lake)
+CWJZ => Dubawnt Lake (Dubawnt Lake)
+CWKD => Bonnard (Bonnard)
+CWKE => Pelly Bay (Pelly Bay)
+CWKH => Malahat (Malahat)
+CWKI => Kitimat (Kitimat)
+CWKK => Katatota Island (Katatota Island)
+CWKO => Rockglen, Sask. (Rockglen)
+CWKR => King Radar Site (King Radar Site)
+CWKU => Whiskey (Whiskey)
+CWKV => Hope Slide (Hope Slide)
+CWKW => Cape Kakkiviak (Cape Kakkiviak)
+CWKX => Dease Lake (Dease Lake)
+CWLB => Lac La Biche, Alta. (Lac La Biche)
+CWLE => Lucky Lake (Lucky Lake)
+CWLF => Lansdowne House (Lansdowne House)
+CWLG => Little Chicago (Little Chicago)
+CWLI => Liverpool Bay (Liverpool Bay)
+CWLM => Victoria (Victoria)
+CWLO => Shilo (Shilo)
+CWLP => Herbert Island (Herbert Island)
+CWLQ => Nipissing (Nipissing)
+CWLS => Mount Forest, Ont. (Mount Forest)
+CWLT => Alert, N. W. T. (Alert)
+CWLV => Waskesiu Lake (Waskesiu Lake)
+CWLX => Longstaff Bluff, N. W. T. (Longstaff Bluff)
+CWLY => Lytton, B. C. (Lytton)
+CWLZ => Candle Lake (Candle Lake)
+CWMA => Masset A (Masset A)
+CWMD => Mould Bay Camp (Mould Bay Camp)
+CWME => Cathedral Point (Cathedral Point)
+CWMH => Mary's Harbour, Nfld. (Mary's Harbour)
+CWMI => Miscou Island, N. B. (Miscou Island)
+CWMJ => Maniwaki (Maniwaki)
+CWMM => P. Meadows (P. Meadows)
+CWMN => Mcgill Radar Site (Mcgill Radar Site)
+CWMP => Powder Lake (Powder Lake)
+CWMQ => Maplecreek (Maplecreek)
+CWMR => Merry Island (Merry Island)
+CWMS => Mcinnes Island, B. C. (Mcinnes Island)
+CWMT => Lac La Martre (Lac La Martre)
+CWMU => Rampart River (Rampart River)
+CWMV => St Charles Creek (St Charles Creek)
+CWMW => Maniwaki, Que. (Maniwaki)
+CWMX => Mildred Lake (Mildred Lake)
+CWMZ => Western Island (Western Island)
+CWNB => S. E. Shoal (S. E. Shoal)
+CWNC => Cobourg, Ont. (Cobourg)
+CWND => Pelly Island (Pelly Island)
+CWNH => Riviere Du Loup, Que. (Riviere Du Loup)
+CWNI => Nipterk Base (Nipterk Base)
+CWNK => Carman U Of M (Carman U Of M)
+CWNL => Great Duck Island (Great Duck Island)
+CWNM => Nelson (Nelson)
+CWNO => Satah River (Satah River)
+CWNP => Nakusp (Nakusp)
+CWNQ => Nicolet (Nicolet)
+CWNR => Nakiska Ridgetop (Nakiska Ridgetop)
+CWNT => Turtle Mountain (Turtle Mountain)
+CWNW => Haldane River (Haldane River)
+CWNX => Nechako River (Nechako River)
+CWNZ => Nagagami, Ont. (Nagagami)
+CWOA => Camsell River, N. W. T. (Camsell River)
+CWOB => Brevoort Island (Brevoort Island)
+CWOC => New Carlisle1 (New Carlisle1)
+CWOD => Normandin (Normandin)
+CWOE => Onefour (Onefour)
+CWOH => Ste Agathe Des Mont (Ste Agathe Des Mont)
+CWOI => Ivvavik Park (Ivvavik Park)
+CWOK => Elbow (Elbow)
+CWOL => Sable Island Man (Sable Island Man)
+CWON => Dawson (Dawson)
+CWOU => Primrose Lake 2 (Primrose Lake 2)
+CWOY => Wynyard (Wynyard)
+CWPA => Henderickson (Henderickson)
+CWPB => Beausoleil Island (Beausoleil Island)
+CWPC => Port Colborne (Port Colborne)
+CWPD => Parc Des Laurentid (Parc Des Laurentid)
+CWPH => Inukjuak, Que (Inukjuak)
+CWPI => Pine Island (Pine Island)
+CWPJ => Point Escuminac (Point Escuminac)
+CWPK => Parent, Que. (Parent)
+CWPL => Pickle Lake, Ont. (Pickle Lake)
+CWPO => Pilot Mound, Man. (Pilot Mound)
+CWPQ => Montreal-Est (Montreal-Est)
+CWPR => Princeton (Princeton)
+CWPS => Long Point (Long Point)
+CWPU => Puntzi Mountain, B. C. (Puntzi Mountain)
+CWPY => Fort Chipewyan (Fort Chipewyan)
+CWQC => Port Alberni, B. C. (Port Alberni)
+CWQE => Toronto Headland (Toronto Headland)
+CWQF => Rabbit Kettle (Rabbit Kettle)
+CWQG => Valcartier (Valcartier)
+CWQH => Lennoxville (Lennoxville)
+CWQJ => Sedco 710 (Sedco 710)
+CWQK => Race Rocks (Race Rocks)
+CWQL => Lethbridge (Lethbridge)
+CWQM => Cap Rouge (Cap Rouge)
+CWQO => Ile Bicquette (Ile Bicquette)
+CWQP => Point Petre, Ont. (Point Petre)
+CWQQ => Lacombe Cda (Lacombe Cda)
+CWQR => Ice Auxiliary Perroquets (Ice Auxiliary Perroquets)
+CWQS => Kindakun Rocks, B. C. (Kindakun Rocks)
+CWQV => Puinte Claveau (Puinte Claveau)
+CWQW => Cape Whittle (Cape Whittle)
+CWQY => Hanbury River (Hanbury River)
+CWQZ => Quesnel (Quesnel)
+CWRA => Cape Race, Nfld (Cape Race)
+CWRD => Red Earth (Red Earth)
+CWRF => Pelly Bay 1 (Pelly Bay 1)
+CWRJ => Rosetown East, Sask (Rosetown East)
+CWRK => Bancroft (Bancroft)
+CWRM => Rocky House (Rocky House)
+CWRN => Hart Island (Hart Island)
+CWRO => Rose Spit (Rose Spit)
+CWRP => Nicholson Peninsul (Nicholson Peninsul)
+CWRQ => Trois Rivieres (Trois Rivieres)
+CWRT => Crowsnest (Crowsnest)
+CWRU => Solander Island (Solander Island)
+CWRV => Camrose (Camrose)
+CWRW => Fourchu Head (Fourchu Head)
+CWRY => Milk River (Milk River)
+CWRZ => Cap D'Espoir (Cap D'Espoir)
+CWSA => Sable Island, N. S. (Sable Island)
+CWSD => Summerside (Summerside)
+CWSE => Edmonton Stony Plain Alta. (Edmonton Stony Plain Alta.)
+CWSF => Cap Madeleine (Cap Madeleine)
+CWSG => Cap Chat (Cap Chat)
+CWSH => Sousa Crk Avt (Sousa Crk Avt)
+CWSI => Simcoe, Ont. (Simcoe)
+CWSK => Squamish, B. C (Squamish)
+CWSL => Salmon Arm (Salmon Arm)
+CWSO => Exeter Radar Site (Exeter Radar Site)
+CWSP => Sheringham (Sheringham)
+CWSQ => Aulvik National Park (Aulvik National Park)
+CWSR => Spiritwood West, Sask (Spiritwood West)
+CWSS => St. Stephen, N. B. (St. Stephen)
+CWST => La Pocatiere (La Pocatiere)
+CWSV => Blue River (Blue River)
+CWSW => Sparwood / Elk Valley (Sparwood)
+CWSY => Sachs Harbour, N. W. T. (Sachs Harbour)
+CWSZ => Fisher Branch (Fisher Branch)
+CWTA => Mc Tavish (Mc Tavish)
+CWTB => Border, Que. (Border)
+CWTC => Ethelda Bay (Ethelda Bay)
+CWTD => Robertson Lake (Robertson Lake)
+CWTE => Trout Lake (Trout Lake)
+CWTF => Beartooth Island (Beartooth Island)
+CWTG => Pointe Des Monts (Pointe Des Monts)
+CWTN => Cap Tourmente (Cap Tourmente)
+CWTO => Toronto Aes Hq (Toronto Aes Hq)
+CWTY => Trois Rivieres (Trois Rivieres)
+CWTZ => Toronto Island (Toronto Island)
+CWUL => Quebec Fcst Office (Quebec Fcst Office)
+CWUM => Faro, Y. T. (Faro)
+CWUP => Cape Hooper, N. W. T. (Cape Hooper)
+CWUR => Truro, N. S. (Truro)
+CWUS => Summerland (Summerland)
+CWUT => Shoal Lake (Shoal Lake)
+CWUU => Mackar Inlet (Mackar Inlet)
+CWUW => Dewar Lakes, N. W. T. (Dewar Lakes)
+CWUY => Rouyn (Rouyn)
+CWVA => Bonavista, Nfld. (Bonavista)
+CWVC => Swift Current (Swift Current)
+CWVD => Broughton Island (Broughton Island)
+CWVE => Valleyfield (Valleyfield)
+CWVI => Vegreville (Vegreville)
+CWVK => Vernon, B. C. (Vernon)
+CWVN => Val Marie Southeast, Sask (Val Marie Southeast)
+CWVO => Vauxhall Cda (Vauxhall Cda)
+CWVP => Cypress Hills Park (Cypress Hills Park)
+CWVQ => Ste Anne De Bell 1 (Ste Anne De Bell 1)
+CWVT => Buffalo Narrows, Sask. (Buffalo Narrows)
+CWVV => Vic. Hartland (Vic. Hartland)
+CWVY => Villeroy Radar Site (Villeroy Radar Site)
+CWWA => W Vancouver (W Vancouver)
+CWWB => Burlington Piers (Burlington Piers)
+CWWC => Collins Bay (Collins Bay)
+CWWE => Western Head, N. S. (Western Head)
+CWWF => Weyburn (Weyburn)
+CWWK => White Rock (White Rock)
+CWWL => Bonilla Island (Bonilla Island)
+CWWM => Grant (Grant)
+CWWN => Peawanuck (Peawanuck)
+CWWO => Willow Creek (Willow Creek)
+CWWP => Wasagaming, Man. (Wasagaming)
+CWWS => George Island (George Island)
+CWWU => Ingenika Point (Ingenika Point)
+CWWV => Killinek (Killinek)
+CWWX => Cove Island (Cove Island)
+CWWZ => Port Weller, Ont. (Port Weller)
+CWXA => Bow Valley (Bow Valley)
+CWXI => Ferolle Point (Ferolle Point)
+CWXJ => Bull Arm (Bull Arm)
+CWXL => Bow Island (Bow Island)
+CWXM => Helmcken Island (Helmcken Island)
+CWXO => Rowan Gorilla Iii (Rowan Gorilla Iii)
+CWXP => Pangnirtung (Pangnirtung)
+CWXV => Back River (Back River)
+CWXW => Alexis River (Alexis River)
+CWYB => N. Bay Weather Office (N. Bay Weather Office)
+CWYE => Outlook Pfra (Outlook Pfra)
+CWYG => Charlottetown (Charlottetown)
+CWYH => Rae Lakes (Rae Lakes)
+CWYJ => Victoria University (Victoria University)
+CWYL => Yoho Park (Yoho Park)
+CWYM => Cape Mercy (Cape Mercy)
+CWYO => Wynyard, Sask. (Wynyard)
+CWYY => Osoyoos (Osoyoos)
+CWZA => Agassiz (Agassiz)
+CWZB => Port-Aux-Basques, Nfld. (Port-Aux-Basques)
+CWZD => Scudder Point (Scudder Point)
+CWZG => Banff (Banff)
+CWZL => Cumshewa Island (Cumshewa Island)
+CWZN => Sagona Island (Sagona Island)
+CWZT => Dauphin (Dauphin)
+CWZV => Virginia Falls (Virginia Falls)
+CWZW => Teslin (Teslin)
+CWZZ => Saglek Bay (Saglek Bay)
+CYAD => La Grande Iii (La Grande Iii)
+CYAH => La Grande Iv, Que. (La Grande Iv)
+CYAJ => Komakuk Beach (Komakuk Beach)
+CYAM => Sault Ste Marie, Ont. (Sault Ste Marie)
+CYAS => Kangirsuk (Kangirsuk)
+CYAW => Shearwater, N. S. (Shearwater)
+CYAY => Saint Anthony (Saint Anthony)
+CYAZ => Tofino (Tofino)
+CYBB => Pelly Bay (Pelly Bay)
+CYBC => Baie Comeau, Que. (Baie Comeau)
+CYBD => Bella Coola (Bella Coola)
+CYBG => Bagotville, Que. (Bagotville)
+CYBK => Baker Lake, N. W. T. (Baker Lake)
+CYBL => Campbell River (Campbell River)
+CYBR => Brandon, Man. (Brandon)
+CYBU => Nipawin, Sask. (Nipawin)
+CYBV => Berens River (Berens River)
+CYBW => Calgary / Springbank (Calgary)
+CYBX => Blanc Sablon, Que. (Blanc Sablon)
+CYCA => Cartwright Man (Cartwright Man)
+CYCB => Cambridge Bay, N. W. T. (Cambridge Bay)
+CYCD => Nanaimo (Nanaimo)
+CYCG => Castlegar (Castlegar)
+CYCH => Chatham Can-Mil (Chatham Can-Mil)
+CYCL => Charlo, N. B. (Charlo)
+CYCO => Coppermine, N. W. T. (Coppermine)
+CYCP => Blue River, B. C. (Blue River)
+CYCQ => Chetwynd (Chetwynd)
+CYCS => Chesterfield Inlet (Chesterfield Inlet)
+CYCT => Coronation (Coronation)
+CYCX => Gagetown Can-Mil (Gagetown Can-Mil)
+CYCY => Clyde, N. W. T. (Clyde)
+CYDA => Dawson, Y. T. (Dawson)
+CYDB => Burwash (Burwash)
+CYDC => Princeton (Princeton)
+CYDF => Deer Lake, Nfld. (Deer Lake)
+CYDM => Ross River (Ross River)
+CYDN => Dauphin, Man. (Dauphin)
+CYDP => Nain, Nfld (Nain)
+CYDQ => Dawson Creek (Dawson Creek)
+CYED => Edmonton Namao Alta. (Edmonton Namao Alta.)
+CYEG => Edmonton, Alta. (Edmonton)
+CYEK => Arviat (Arviat)
+CYEL => Elliot Lake (Elliot Lake)
+CYEN => Estevan, Sask. (Estevan)
+CYET => Edson, Alta. (Edson)
+CYEU => Eureka Man (Eureka Man)
+CYEV => Inuvik, N. W. T. (Inuvik)
+CYFB => Iqaluit, N. W. T. (Iqaluit)
+CYFC => Fredericton, N. B. (Fredericton)
+CYFO => Flin Flon (Flin Flon)
+CYFR => Fort Resolution (Fort Resolution)
+CYFS => Fort Simpson, N. W. T. (Fort Simpson)
+CYFT => Makkovik (Makkovik)
+CYGE => Golden (Golden)
+CYGH => Fort Good Hope (Fort Good Hope)
+CYGK => Kingston, Ont. (Kingston)
+CYGL => La Grande Riviere, Que (La Grande Riviere)
+CYGM => Gimli Industrial, Man (Gimli Industrial)
+CYGP => Gaspe, Que. (Gaspe)
+CYGQ => Geraldton, Ont. (Geraldton)
+CYGR => Iles De La Madeleineque. (Iles De La Madeleineque.)
+CYGT => Igloolik (Igloolik)
+CYGV => Havre St Pierre (Havre St Pierre)
+CYGW => Kuujjuarapik, Que. (Kuujjuarapik)
+CYGX => Gillam, Man. (Gillam)
+CYHA => Quaqtaq (Quaqtaq)
+CYHB => Hudson Bay, Sask. (Hudson Bay)
+CYHD => Dryden (Dryden)
+CYHE => Hope, B. C. (Hope)
+CYHH => Nemiscau (Nemiscau)
+CYHI => Holman Island (Holman Island)
+CYHK => Gjoa Haven (Gjoa Haven)
+CYHM => Hamilton (Hamilton)
+CYHU => Saint Hubert (Saint Hubert)
+CYHY => Hay River, N. W. T. (Hay River)
+CYHZ => Halifax (Halifax)
+CYID => Digby (Digby)
+CYIK => Ivujivik (Ivujivik)
+CYIO => Pond Inlet, N. W. T. (Pond Inlet)
+CYIV => Island Lake, Man. (Island Lake)
+CYJF => Fort Liard (Fort Liard)
+CYJT => Stephenville, Nfld. (Stephenville)
+CYKA => Kamloops, B. C. (Kamloops)
+CYKD => Aklavik (Aklavik)
+CYKF => Waterloo Well (Waterloo Well)
+CYKG => Kangiqsujuaq (Kangiqsujuaq)
+CYKJ => Key Lake (Key Lake)
+CYKL => Schefferville, Que. (Schefferville)
+CYKO => Akulivik (Akulivik)
+CYKQ => Waskaganish (Waskaganish)
+CYKY => Kindersley, Sask. (Kindersley)
+CYKZ => Toronto Buttonville (Toronto Buttonville)
+CYLC => Kimmirut A Nwt (Kimmirut A Nwt)
+CYLD => Chapleau (Chapleau)
+CYLJ => Meadow Lake, Sask. (Meadow Lake)
+CYLL => Lloydminister, Alta. (Lloydminister)
+CYLT => Alert (Alert)
+CYLU => Kangiksualujjuaq A (Kangiksualujjuaq A)
+CYLW => Kelowna (Kelowna)
+CYMA => Mayo (Mayo)
+CYMD => Mould Bay, N. W. T. (Mould Bay)
+CYMH => Mary's Harbour (Mary's Harbour)
+CYMJ => Moose Jaw, Sask. (Moose Jaw)
+CYML => Charlevoix (Charlevoix)
+CYMM => Fort Mcmurray, Alta. (Fort Mcmurray)
+CYMO => Moosonee, Ont. (Moosonee)
+CYMT => Chibougamau-Chapais, Que (Chibougamau-Chapais)
+CYMU => Umiujaq (Umiujaq)
+CYMX => Montreal / Mirabel (Montreal)
+CYNA => Natashquan, Que. (Natashquan)
+CYND => Gatineau (Gatineau)
+CYNE => Norway House, Man. (Norway House)
+CYNM => Matagami, Que. (Matagami)
+CYOC => Old Crow (Old Crow)
+CYOD => Cold Lake, Alta. (Cold Lake)
+CYOJ => High Level, Alta (High Level)
+CYOW => OttawaL. Ont. (OttawaL. Ont.)
+CYOY => Valcartier (Valcartier)
+CYPA => Prince Albert, Sask. (Prince Albert)
+CYPC => Paulatuk (Paulatuk)
+CYPD => Port Hawkesbury (Port Hawkesbury)
+CYPE => Peace River, Alta. (Peace River)
+CYPG => Portage Southport A (Portage Southport A)
+CYPH => Inukjuak (Inukjuak)
+CYPL => Pickle Lake Man (Pickle Lake Man)
+CYPN => Port Menier Man (Port Menier Man)
+CYPQ => Peterborough (Peterborough)
+CYPR => Prince Rupert, B. C. (Prince Rupert)
+CYPW => Powell River (Powell River)
+CYPX => Povungnituq (Povungnituq)
+CYPY => Fort Chipewyan, Alta. (Fort Chipewyan)
+CYPZ => Burns Lake (Burns Lake)
+CYQA => Muskoka, Ont. (Muskoka)
+CYQB => Quebec, Que (Quebec)
+CYQD => The Pas, Man. (The Pas)
+CYQF => Red Deer, Alta. (Red Deer)
+CYQG => Windsor, Ont. (Windsor)
+CYQH => Watson Lake, Y. T. (Watson Lake)
+CYQI => Yarmouth, N. S. (Yarmouth)
+CYQK => Kenora, Ont. (Kenora)
+CYQL => Lethbridge, Alta. (Lethbridge)
+CYQM => Moncton, N. B. (Moncton)
+CYQQ => Comox, B. C. (Comox)
+CYQR => Regina, Sask. (Regina)
+CYQT => Thunder Bay, Ont. (Thunder Bay)
+CYQU => Grande Prairie, Alta. (Grande Prairie)
+CYQV => Yorkton, Sask. (Yorkton)
+CYQW => North Battleford, Sask. (North Battleford)
+CYQX => Gander, Nfld. (Gander)
+CYQY => Sydney, N. S. (Sydney)
+CYQZ => Quesnel (Quesnel)
+CYRB => Resolute, N. W. T. (Resolute)
+CYRJ => Roberval, Que. (Roberval)
+CYRL => Red Lake, Ont. (Red Lake)
+CYRM => Rocky Mountain House, Alta (Rocky Mountain House)
+CYRT => Rankin Inlet, N. W. T. (Rankin Inlet)
+CYRV => Revelstoke, B. C. (Revelstoke)
+CYSA => Sable Island (Sable Island)
+CYSB => Sudbury, Ont. (Sudbury)
+CYSC => Sherbrooke, Que. (Sherbrooke)
+CYSD => Suffield (Suffield)
+CYSF => Stony Rapids (Stony Rapids)
+CYSJ => Saint John, N. B. (Saint John)
+CYSK => Sanikiluaq (Sanikiluaq)
+CYSL => Saint Leonard (Saint Leonard)
+CYSM => Fort Smith, N. W. T. (Fort Smith)
+CYSN => Saint Catharines (Saint Catharines)
+CYSR => Nanisivik (Nanisivik)
+CYSU => Summerside Can-Mil (Summerside Can-Mil)
+CYSY => Sachs Harbour (Sachs Harbour)
+CYTE => Cape Dorset, N. W. T. (Cape Dorset)
+CYTH => Thompson Weather Office, Man (Thompson Weather Office)
+CYTJ => Terrace Bay (Terrace Bay)
+CYTL => Big Trout Lake (Big Trout Lake)
+CYTQ => Tasiujaq A (Tasiujaq A)
+CYTR => Trenton, Ont. (Trenton)
+CYTS => Timmins, Ont. (Timmins)
+CYTZ => Toronto Island (Toronto Island)
+CYUA => Shingle Point, Y. T. (Shingle Point)
+CYUB => Tuktoyaktuk (Tuktoyaktuk)
+CYUI => Cape Young (Cape Young)
+CYUJ => Lady Franklin Point, N. W. T. (Lady Franklin Point)
+CYUK => Byron Bay (Byron Bay)
+CYUL => Montreal / Dorval, Que (Montreal)
+CYUQ => Jenny Lind Island (Jenny Lind Island)
+CYUS => Shepherd Bay, N. W. T. (Shepherd Bay)
+CYUT => Repulse Bay (Repulse Bay)
+CYUV => Longstaff Blf (Longstaff Blf)
+CYUX => Hall Beach, N. W. T. (Hall Beach)
+CYUY => Rouyn (Rouyn)
+CYVC => La Ronge, Sask (La Ronge)
+CYVM => Broughton Island (Broughton Island)
+CYVO => Val D'Or, Que. (Val D'Or)
+CYVP => Kuujjuaq, Que. (Kuujjuaq)
+CYVQ => Norman Wells, N. W. T. (Norman Wells)
+CYVR => Vancouver, B. C. (Vancouver)
+CYVT => Buffalo Narrows Man (Buffalo Narrows Man)
+CYVV => Wiarton, Ont. (Wiarton)
+CYWA => Petawawa, Ont. (Petawawa)
+CYWG => Winnipegman. (Winnipegman.)
+CYWH => Victoria Harbour (Victoria Harbour)
+CYWJ => Fort Franklin (Fort Franklin)
+CYWK => Wabush Lake, Nfld. (Wabush Lake)
+CYWL => Williams Lake, B. C. (Williams Lake)
+CYWO => Lupin (Lupin)
+CYWV => Wainwright (Wainwright)
+CYWY => Wrigley (Wrigley)
+CYXC => Cranbrook, B. C. (Cranbrook)
+CYXD => Edmonton Municipal Alta. (Edmonton Municipal Alta.)
+CYXE => Saskatoon, Sask. (Saskatoon)
+CYXH => Medicine Hat, Alta. (Medicine Hat)
+CYXJ => Fort St John, B. C. (Fort St John)
+CYXL => Sioux Lookout, Ont. (Sioux Lookout)
+CYXN => Whale Cove (Whale Cove)
+CYXP => Pangnirtung (Pangnirtung)
+CYXQ => Beaver Creek (Beaver Creek)
+CYXR => Earlton, Ont. (Earlton)
+CYXS => Prince George, B. C. (Prince George)
+CYXT => Terrace, B. C. (Terrace)
+CYXU => London, Ont. (London)
+CYXX => Abbotsford, B. C. (Abbotsford)
+CYXY => Withehorse, Y. T. (Withehorse)
+CYXZ => Wawa, Ont. (Wawa)
+CYYB => North Bay, Ont. (North Bay)
+CYYC => Calgary, Alta. (Calgary)
+CYYD => Smithers, B. C. (Smithers)
+CYYE => Fort Nelson, B. C. (Fort Nelson)
+CYYF => Penticton, B. C. (Penticton)
+CYYG => Charlottetown, P. E. I. (Charlottetown)
+CYYH => Spence Bay (Spence Bay)
+CYYJ => Victoriab. C. (Victoriab. C.)
+CYYL => Lynn Lake, Man. (Lynn Lake)
+CYYN => Swift Current, Sask. (Swift Current)
+CYYQ => Churchill, Man. (Churchill)
+CYYR => Goose, Nfld. (Goose)
+CYYT => St. John's, Nfld (St. John's)
+CYYU => Kapuskasing, Ont. (Kapuskasing)
+CYYW => Armstrong, Ont. (Armstrong)
+CYYY => Mont Joli, Que. (Mont Joli)
+CYYZ => Toronto PearsonL. Ont. (Toronto PearsonL. Ont.)
+CYZE => Gore Bay, Ont. (Gore Bay)
+CYZF => Yellowknife, N. W. T. (Yellowknife)
+CYZG => Salliut (Salliut)
+CYZH => Slave Lake, Alta (Slave Lake)
+CYZP => Sandspit, B. C. (Sandspit)
+CYZR => Sarnia (Sarnia)
+CYZS => Coral Harbour, N. W. T. (Coral Harbour)
+CYZT => Port Hardy, B. C. (Port Hardy)
+CYZU => Whitecourt, Alta. (Whitecourt)
+CYZV => Sept-Iles, Que. (Sept-Iles)
+CYZW => Teslin, Y. T. (Teslin)
+CYZX => Greenwood, N. S. (Greenwood)
+CYZY => Mackenzie, B. C. (Mackenzie)
+CZAG => La Grande Iv Remote Environment Automatic Data Acquisition Concept (La Grande Iv Remote Environment Automatic Data Acquisition Concept)
+CZBF => Bathurst (Bathurst)
+CZDI => Churchill Falls (Churchill Falls)
+CZEM => Eastmain River (Eastmain River)
+CZFA => Faro (Faro)
+CZFM => Fort Mcpherson (Fort Mcpherson)
+CZFN => Fort Norman (Fort Norman)
+CZNB => North Bay Remote Environment Automatic Data Acquisition Concept (North Bay Remote Environment Automatic Data Acquisition Concept)
+CZOC => Old Crow (Old Crow)
+CZPC => Pincher Creek (Pincher Creek)
+CZPK => Paulatuk (Paulatuk)
+CZST => Stewart (Stewart)
+CZUB => Tuktoyaktuk (Tuktoyaktuk)
+CZUE => Cape Parry, N. W. T. (Cape Parry)
+CZUM => Churchill Falls, Nfld. (Churchill Falls)
+CZVL => Edmonton / Villeneuve (Edmonton)
+CZWN => Wainwright (Wainwright)
+DAAD => Bou-Saada (Bou-Saada)
+DAAE => Bejaia (Bejaia)
+DAAF => Aoulef (Aoulef)
+DAAG => Dar-El-Beida (Dar-El-Beida)
+DAAJ => Djanet (Djanet)
+DAAP => Illizi (Illizi)
+DAAS => Setif (Setif)
+DAAT => Tamanrasset / Aguenna (Tamanrasset)
+DAAV => Jijel Achouat (Jijel Achouat)
+DAAY => Mecheria (Mecheria)
+DABB => Annaba (Annaba)
+DABC => Constantine (Constantine)
+DABP => Skikda (Skikda)
+DABS => Tebessa (Tebessa)
+DABT => Batna (Batna)
+DAFI => Djelfa (Djelfa)
+DAOB => Tiaret (Tiaret)
+DAOF => Tindouf (Tindouf)
+DAOI => Chlef (Chlef)
+DAON => Tlemcen Zenata (Tlemcen Zenata)
+DAOO => Oran / Es Senia (Oran)
+DAOR => Bechar (Bechar)
+DAUA => Adrar (Adrar)
+DAUB => Biskra (Biskra)
+DAUE => El Golea (El Golea)
+DAUG => Ghardaia (Ghardaia)
+DAUH => Hassi-Messaoud (Hassi-Messaoud)
+DAUI => In Salah North (In Salah North)
+DAUK => Touggourt (Touggourt)
+DAUL => Laghouat (Laghouat)
+DAUO => El Oued (El Oued)
+DAUT => Timimoun (Timimoun)
+DAUU => Ouargla (Ouargla)
+DAUZ => In Amenas (In Amenas)
+DBBB => Cotonou (Cotonou)
+DBBC => Bohicon (Bohicon)
+DBBK => Kandi (Kandi)
+DBBN => Natitingou (Natitingou)
+DBBP => Parakou (Parakou)
+DBBS => Save (Save)
+DFCC => Ouahigouya (Ouahigouya)
+DFCO => Boromo (Boromo)
+DFCP => Po (Po)
+DFEE => Dori (Dori)
+DFEF => Fada N'Gourma (Fada N'Gourma)
+DFFD => Ouagadougou (Ouagadougou)
+DFOD => Dedougou (Dedougou)
+DFOG => Gaoua (Gaoua)
+DFOO => Bobo-Dioulasso (Bobo-Dioulasso)
+DGAA => Accra (Accra)
+DGAD => Ada (Ada)
+DGAH => Ho (Ho)
+DGAK => Akuse (Akuse)
+DGAS => Saltpond (Saltpond)
+DGAT => Tema (Tema)
+DGKA => Akim Oda (Akim Oda)
+DGKK => Koforidua (Koforidua)
+DGLB => Bole (Bole)
+DGLE => Tamale (Tamale)
+DGLN => Navrongo (Navrongo)
+DGLW => Wa (Wa)
+DGLY => Yendi (Yendi)
+DGSB => Sefwi Bekwai (Sefwi Bekwai)
+DGSI => Kumasi (Kumasi)
+DGSN => Sunyani (Sunyani)
+DGSW => Wenchi (Wenchi)
+DGTK => Takoradi (Takoradi)
+DGTX => Axim (Axim)
+DIAD => Adiake (Adiake)
+DIAP => Abidjan (Abidjan)
+DIBK => Bouake (Bouake)
+DIBU => Bondoukou (Bondoukou)
+DIDK => Dimbokro (Dimbokro)
+DIDL => Daloa (Daloa)
+DIGA => Gagnoa (Gagnoa)
+DIKO => Korhogo (Korhogo)
+DIMN => Man (Man)
+DIOD => Odienne (Odienne)
+DISP => San Pedro (San Pedro)
+DISS => Sassandra (Sassandra)
+DITB => Tabou (Tabou)
+DIYO => Yamoussoukro (Yamoussoukro)
+DNBI => Bida (Bida)
+DNCA => Calabar (Calabar)
+DNGU => Gusau (Gusau)
+DNIB => Ibadan (Ibadan)
+DNIL => Ilorin (Ilorin)
+DNJO => Jos (Jos)
+DNKA => Kaduna (Kaduna)
+DNKN => Kano (Kano)
+DNMK => Makurdi (Makurdi)
+DNMM => Lagos / Ikeja (Lagos)
+DNOS => Oshogbo (Oshogbo)
+DNPO => Port Harcourt (Port Harcourt)
+DNSO => Sokoto (Sokoto)
+DNYO => Yola (Yola)
+DNZA => Zaria (Zaria)
+DRRB => Birni-N'Konni (Birni-N'Konni)
+DRRG => Gaya (Gaya)
+DRRI => Bilma (Bilma)
+DRRL => Tillabery (Tillabery)
+DRRM => Maradi (Maradi)
+DRRN => Niamey-Aero (Niamey-Aero)
+DRRT => Tahoua (Tahoua)
+DRZA => Agadez (Agadez)
+DRZF => Diffa (Diffa)
+DRZG => Goure (Goure)
+DRZM => Maine-Soroa (Maine-Soroa)
+DRZR => Zinder (Zinder)
+DTKA => Tabarka (Tabarka)
+DTMB => Habib Bourguiba (Habib Bourguiba)
+DTTA => Tunis-Carthage (Tunis-Carthage)
+DTTB => Bizerte (Bizerte)
+DTTD => Remada (Remada)
+DTTF => Gafsa (Gafsa)
+DTTG => Gabes (Gabes)
+DTTJ => Djerba Mellita (Djerba Mellita)
+DTTK => Kairouan (Kairouan)
+DTTL => Kelibia (Kelibia)
+DTTM => Monastir-Skanes (Monastir-Skanes)
+DTTN => Jendouba (Jendouba)
+DTTR => El Borma (El Borma)
+DTTX => Sfax El-Maou (Sfax El-Maou)
+DTTZ => Tozeur (Tozeur)
+DXAK => Atakpame (Atakpame)
+DXMG => Mango (Mango)
+DXNG => Niamtougou (Niamtougou)
+DXSK => Sokode (Sokode)
+DXTA => Tabligbo (Tabligbo)
+DXXX => Lome (Lome)
+EBAW => Antwerpen / Deurne (Antwerpen)
+EBBE => Beauvechain (Beauvechain)
+EBBL => Kleine Brogel (Kleine Brogel)
+EBBR => Bruxelles National (Bruxelles National)
+EBBT => Brasschaat (Brasschaat)
+EBBX => Bertrix Bel-Afb (Bertrix Bel-Afb)
+EBCI => Charleroi / Gosselies (Charleroi)
+EBCV => Chievres (Chievres)
+EBDT => Schaffen (Schaffen)
+EBFN => Koksijde (Koksijde)
+EBFS => Florennes (Florennes)
+EBGT => Gent / Industrie-Zone (Gent)
+EBLB => Elsenborn (Elsenborn)
+EBLG => Bierset (Bierset)
+EBMB => Melsbroek Bel-Afb (Melsbroek Bel-Afb)
+EBMT => Munte (Munte)
+EBOS => Oostende (Oostende)
+EBSP => Spa / La Sauveniere (Spa)
+EBST => Sint-Truiden (Sint-Truiden)
+EBSU => St-Hubert (St-Hubert)
+EBTN => Goetsenhoven (Goetsenhoven)
+EBWE => Weelde Military (Weelde Military)
+EBZW => Genk (Genk)
+EDAC => Altenburg Nobitz (Altenburg Nobitz)
+EDAH => Heringsdorf (Heringsdorf)
+EDDB => Berlin-Schoenefeld (Berlin-Schoenefeld)
+EDDC => Dresden-Klotzsche (Dresden-Klotzsche)
+EDDE => Erfurt-Bindersleben (Erfurt-Bindersleben)
+EDDF => Frankfurt / M-Flughafen (Frankfurt)
+EDDG => Muenster / Osnabrueck (Muenster)
+EDDH => Hamburg-Fuhlsbuettel (Hamburg-Fuhlsbuettel)
+EDDI => Berlin-Tempelhof (Berlin-Tempelhof)
+EDDK => Koeln / Bonn (Koeln)
+EDDL => Duesseldorf (Duesseldorf)
+EDDM => Munich / Riem (Munich)
+EDDN => Nuernberg (Nuernberg)
+EDDP => Leipzig-Schkeuditz (Leipzig-Schkeuditz)
+EDDR => Saarbruecken / Ensheim (Saarbruecken)
+EDDS => Stuttgart-Echterdingen (Stuttgart-Echterdingen)
+EDDT => Berlin-Tegel (Berlin-Tegel)
+EDDV => Hannover (Hannover)
+EDDW => Bremen (Bremen)
+EDFH => Hahn (Hahn)
+EDHI => Hamburg-Finkenwerder (Hamburg-Finkenwerder)
+EDHK => Kiel / Holtenau Civilian (Kiel)
+EDHL => Luebeck-Blankensee (Luebeck-Blankensee)
+EDLN => Monchengladbach (Monchengladbach)
+EDLP => Paderborn / Lippstadt (Paderborn)
+EDLW => Dortmund / Wickede (Dortmund)
+EDMA => Augsburg (Augsburg)
+EDMO => Oberpfaffenhofen (Oberpfaffenhofen)
+EDNY => Friedrichshafen (Friedrichshafen)
+EDQD => Bayreuth (Bayreuth)
+EDQM => Hof (Hof)
+EDTZ => Konstanz (Konstanz)
+EDVE => Braunschweig (Braunschweig)
+EDVK => Kassel / Calden (Kassel)
+EDWD => Lemwerder (Lemwerder)
+EDXW => Westerland / Sylt (Westerland)
+EDZE => Essen (Essen)
+EFHA => Halli (Halli)
+EFHF => Helsinki-Malmi (Helsinki-Malmi)
+EFHK => Helsinki-Vantaa (Helsinki-Vantaa)
+EFHL => Hailuoto (Hailuoto)
+EFHT => Ahtari (Ahtari)
+EFIL => Ilmajoki (Ilmajoki)
+EFIV => Ivalo (Ivalo)
+EFJO => Joensuu (Joensuu)
+EFJY => Jyvaskyla (Jyvaskyla)
+EFKA => Kauhava (Kauhava)
+EFKE => Kemi (Kemi)
+EFKI => Kajaani (Kajaani)
+EFKK => Kruunupyy (Kruunupyy)
+EFKS => Kuusamo (Kuusamo)
+EFKT => Kittila (Kittila)
+EFKU => Kuopio (Kuopio)
+EFMA => Mariehamn / Aland Island (Mariehamn)
+EFMI => Mikkeli (Mikkeli)
+EFOU => Oulu (Oulu)
+EFPE => Pello (Pello)
+EFPO => Pori (Pori)
+EFPU => Pudasjarvi (Pudasjarvi)
+EFRO => Rovaniemi (Rovaniemi)
+EFSA => Savonlinna (Savonlinna)
+EFSO => Sodankyla (Sodankyla)
+EFSU => Suomussalmi (Suomussalmi)
+EFTP => Tampere / Pirkkala (Tampere)
+EFTU => Turku (Turku)
+EFUT => Utti (Utti)
+EFVA => Vaasa (Vaasa)
+EFVI => Viitasaari (Viitasaari)
+EFVR => Varkaus (Varkaus)
+EGAA => Belfast / Aldergrove (Belfast)
+EGAC => Belfast / Harbour (Belfast)
+EGAE => Eglinton / Londonderr (Eglinton)
+EGBB => Birmingham / (Birmingham /)
+EGBE => Coventry (Coventry)
+EGBJ => Staverton Private (Staverton Private)
+EGCC => Manchester (Manchester)
+EGDB => Plymouth (Plymouth)
+EGDC => Chivenor (Chivenor)
+EGDG => Saint Mawgan (Saint Mawgan)
+EGDK => Kemble (Kemble)
+EGDL => Lyneham (Lyneham)
+EGDM => Boscombe Down (Boscombe Down)
+EGDP => Portland / Rnas (Portland)
+EGDR => Culdrose (Culdrose)
+EGDX => St Athan (St Athan)
+EGDY => Yeovilton (Yeovilton)
+EGFF => Cardiff-Wales (Cardiff-Wales)
+EGFH => Swansea (Swansea)
+EGGD => Bristol / Lulsgate (Bristol)
+EGGP => Liverpool (Liverpool)
+EGGW => Luton (Luton)
+EGHD => Plymouth / Roborough (Plymouth)
+EGHE => Scilly, Saint Mary'S (Scilly)
+EGHH => Bournemouth (Bournemouth)
+EGHI => Southampton / Weather Centre (Southampton)
+EGJA => Alderney / Channel Island (Alderney)
+EGJB => Guernsey (Guernsey)
+EGJJ => Jersey (Jersey)
+EGKA => Shoreham (Shoreham)
+EGKB => Biggin Hill (Biggin Hill)
+EGKK => London / Gatwick (London)
+EGLC => London City (London City)
+EGLF => Farnborough (Farnborough)
+EGLL => London / Heathrow (London)
+EGMC => Southend-On-Sea (Southend-On-Sea)
+EGMD => Lydd (Lydd)
+EGNC => Carlisle (Carlisle)
+EGNH => Blackpool (Blackpool)
+EGNJ => Humberside (Humberside)
+EGNL => Walney Island (Walney Island)
+EGNM => Leeds And Bradford (Leeds And Bradford)
+EGNR => Hawarden (Hawarden)
+EGNS => Isle Of Man / Ronaldsway (Isle Of Man)
+EGNT => Newcastle (Newcastle)
+EGNV => Tees-Side (Tees-Side)
+EGNX => East Midlands (East Midlands)
+EGOD => Llanbedr (Llanbedr)
+EGOM => Spadeadam (Spadeadam)
+EGOP => Pembrey Sands (Pembrey Sands)
+EGOS => Shawbury (Shawbury)
+EGOV => Valley (Valley)
+EGOY => West Freugh (West Freugh)
+EGPA => Kirkwall (Kirkwall)
+EGPB => Sumburgh Cape (Sumburgh Cape)
+EGPC => Wick (Wick)
+EGPD => Aberdeen / Dyce (Aberdeen)
+EGPE => Inverness / Dalcross (Inverness)
+EGPF => Glasgow (Glasgow)
+EGPH => Edinburgh (Edinburgh)
+EGPK => Prestwick (Prestwick)
+EGPL => Benbecula (Benbecula)
+EGPM => Scatsa / Shetland Island (Scatsa)
+EGPN => Dundee / Riverside (Dundee)
+EGPO => Stornoway (Stornoway)
+EGPT => Perth / Scone (Perth)
+EGPU => Tiree (Tiree)
+EGPW => Unst Island (Unst Island)
+EGQA => Tain Range (Tain Range)
+EGQJ => Machrihanish (Machrihanish)
+EGQK => Kinloss (Kinloss)
+EGQL => Leuchars (Leuchars)
+EGQM => Boulmer (Boulmer)
+EGQS => Lossiemouth (Lossiemouth)
+EGRB => London Weather Centre (London Weather Centre)
+EGRR => Bracknell / Beaufort Park (Bracknell)
+EGSC => Cambridge (Cambridge)
+EGSH => Norwich Weather Centre (Norwich Weather Centre)
+EGSS => Stansted (Stansted)
+EGTC => Cranfield (Cranfield)
+EGTE => Exeter (Exeter)
+EGTG => Filton Private (Filton Private)
+EGTH => Hatfeild Private (Hatfeild Private)
+EGUA => Upper Heyford (Upper Heyford)
+EGUB => Benson (Benson)
+EGUC => Aberporth (Aberporth)
+EGUF => Farnborough Military (Farnborough Military)
+EGUL => Lakenheath (Lakenheath)
+EGUM => Manston (Manston)
+EGUN => Mildenhall (Mildenhall)
+EGUP => Sculthorpe Af Met (Sculthorpe Af Met)
+EGUW => Wattisham (Wattisham)
+EGUY => Wyton (Wyton)
+EGVA => Fairford (Fairford)
+EGVG => Woodbridge (Woodbridge)
+EGVI => Greenham Common (Greenham Common)
+EGVJ => Bentwaters (Bentwaters)
+EGVN => Brize Norton (Brize Norton)
+EGVO => Odiham (Odiham)
+EGVP => Middle Wallop (Middle Wallop)
+EGWC => Cosford (Cosford)
+EGWU => Northolt (Northolt)
+EGWZ => Alconbury (Alconbury)
+EGXC => Coningsby (Coningsby)
+EGXD => Disforth (Disforth)
+EGXE => Leeming (Leeming)
+EGXF => Cowden (Cowden)
+EGXG => Church Fenton (Church Fenton)
+EGXH => Honington (Honington)
+EGXJ => Cottesmore (Cottesmore)
+EGXN => Newton (Newton)
+EGXT => Wittering (Wittering)
+EGXU => Linton-On-Ouse (Linton-On-Ouse)
+EGXV => Leconfield (Leconfield)
+EGXW => Waddington (Waddington)
+EGXZ => Topcliffe (Topcliffe)
+EGYC => Coltishall (Coltishall)
+EGYD => Cranwell (Cranwell)
+EGYE => Barkston Heath (Barkston Heath)
+EGYH => Holbeach (Holbeach)
+EGYM => Marham (Marham)
+EGYP => Mount Pleasant (Mount Pleasant)
+EGYW => Wainfleet (Wainfleet)
+EHAM => Amsterdam Schiphol (Amsterdam Schiphol)
+EHBK => Maastricht Zuid Limburg (Maastricht Zuid Limburg)
+EHDB => De Bilt (De Bilt)
+EHDL => Deelen (Deelen)
+EHEH => Eindhoven (Eindhoven)
+EHGG => Groningen Eelde (Groningen Eelde)
+EHGR => Gilze-Rijen (Gilze-Rijen)
+EHKD => De Kooy (De Kooy)
+EHLW => Leeuwarden (Leeuwarden)
+EHRD => Rotterdam Zestienhoven (Rotterdam Zestienhoven)
+EHSB => Soesterberg (Soesterberg)
+EHTW => Twenthe (Twenthe)
+EHVB => Valkenburg (Valkenburg)
+EHVK => Volkel (Volkel)
+EHVL => Vlieland (Vlieland)
+EHWO => Woensdrecht (Woensdrecht)
+EICK => Cork (Cork)
+EIDW => Dublin (Dublin)
+EIME => Casement Aerodrome (Casement Aerodrome)
+EINN => Shannon (Shannon)
+EKAH => Tirstrup (Tirstrup)
+EKAT => Anholt Island (Anholt Island)
+EKAV => Avno Danish (Avno Danish)
+EKBI => Billund Lufthavn (Billund Lufthavn)
+EKCH => Koebenhavn / Kastrup (Koebenhavn)
+EKEB => Esbjerg (Esbjerg)
+EKHO => Lindtorp (Lindtorp)
+EKHS => Hadsund (Hadsund)
+EKKA => Karup (Karup)
+EKMB => Maribo Lufthavn (Maribo Lufthavn)
+EKOD => Odense / Beldringe (Odense)
+EKRK => Koebenhavn / Roskilde (Koebenhavn)
+EKRN => Roenne (Roenne)
+EKSB => Soenderborg Lufthavn (Soenderborg Lufthavn)
+EKSN => Sindal Flyveplads (Sindal Flyveplads)
+EKSP => Skrydstrup (Skrydstrup)
+EKST => Sydfyns Flyveplads (Sydfyns Flyveplads)
+EKSV => Skive Lufthavn (Skive Lufthavn)
+EKTS => Thisted Lufthavn (Thisted Lufthavn)
+EKVA => Vandel (Vandel)
+EKVD => Vamdrup (Vamdrup)
+EKVG => Soervaag / Vagar (Soervaag)
+EKVJ => Stauning Lufthavn (Stauning Lufthavn)
+EKVL => Vaerloese (Vaerloese)
+EKYT => Aalborg (Aalborg)
+ELLX => Luxembourg / Luxembourg (Luxembourg)
+ENAL => Alesund / Vigra (Alesund)
+ENAN => Andoya (Andoya)
+ENAS => Ny-Alesund Ii (Ny-Alesund Ii)
+ENAT => Alta Lufthavn (Alta Lufthavn)
+ENBJ => Bjornoya (Bjornoya)
+ENBL => Forde / Bringeland (Forde)
+ENBM => Voss-Bo (Voss-Bo)
+ENBN => Bronnoysund / Bronnoy (Bronnoysund)
+ENBO => Bodo Vi (Bodo Vi)
+ENBR => Bergen / Flesland (Bergen)
+ENBS => Batsfjord (Batsfjord)
+ENBV => Berlevag (Berlevag)
+ENCN => Kristiansand / Kjevik (Kristiansand)
+ENDI => Dagali (Dagali)
+ENDU => Bardufoss (Bardufoss)
+ENEK => Ekofisk Oil Platform (Ekofisk Oil Platform)
+ENEV => Evenes (Evenes)
+ENFB => Oslo / Fornebu (Oslo)
+ENFG => Fagernes Leirin (Fagernes Leirin)
+ENFL => Floro (Floro)
+ENFR => Frigg (Frigg)
+ENGC => Gullfax Platform (Gullfax Platform)
+ENGM => Oslo / Gardermoen (Oslo)
+ENHD => Haugesund / Karmoy (Haugesund)
+ENHF => Hammerfest (Hammerfest)
+ENHK => Hasvik (Hasvik)
+ENHO => Hopen (Hopen)
+ENHV => Honningsvag / Valan (Honningsvag)
+ENJA => Jan Mayen (Jan Mayen)
+ENKA => Kautokeino (Kautokeino)
+ENKB => Kristiansund / Kvernberget (Kristiansund)
+ENKR => Kirkenes Lufthavn (Kirkenes Lufthavn)
+ENLI => Lista Flyplass (Lista Flyplass)
+ENLK => Leknes (Leknes)
+ENMH => Mehamn (Mehamn)
+ENML => Molde / Aro (Molde)
+ENMS => Mosjoen Kjaerstad (Mosjoen Kjaerstad)
+ENNA => Banak (Banak)
+ENNK => Narvik Iii (Narvik Iii)
+ENNM => Namsos Lufthavn (Namsos Lufthavn)
+ENNO => Notodden (Notodden)
+ENOA => Oseberg (Oseberg)
+ENOL => Orland Iii (Orland Iii)
+ENOV => Orsta-Volda / Hovden (Orsta-Volda)
+ENRA => Mo I Rana / Rossvoll (Mo I Rana)
+ENRM => Rorvik / Ryum (Rorvik)
+ENRO => Roros Lufthavn (Roros Lufthavn)
+ENRS => Rost Flyplass (Rost Flyplass)
+ENRY => Rygge (Rygge)
+ENSB => Svalbard Lufthavn (Svalbard Lufthavn)
+ENSD => Sandane / Anda (Sandane)
+ENSG => Sogndal / Haukasen (Sogndal)
+ENSH => Svolvaer / Helle (Svolvaer)
+ENSK => Storkmarknes / Skagen (Storkmarknes)
+ENSN => Skien-Geiteryggen (Skien-Geiteryggen)
+ENSO => Stord / Soerstokken (Stord)
+ENSR => Sorkjosen (Sorkjosen)
+ENSS => Svartnes (Svartnes)
+ENST => Sandnessjoen / Stokka (Sandnessjoen)
+ENTC => Tromso / Langnes (Tromso)
+ENTO => Torp (Torp)
+ENVA => Trondheim / Vaernes (Trondheim)
+ENVD => Vadso (Vadso)
+ENZV => Stavanger / Sola (Stavanger)
+EPGD => Gdansk-Rebiechowo (Gdansk-Rebiechowo)
+EPKK => Krakow (Krakow)
+EPKO => Koszalin (Koszalin)
+EPKT => Katowice (Katowice)
+EPPO => Poznan (Poznan)
+EPRZ => Rzeszow-Jasionka (Rzeszow-Jasionka)
+EPSC => Szczecin (Szczecin)
+EPSK => Slupsk (Slupsk)
+EPWA => Warszawa-Okecie (Warszawa-Okecie)
+EPWR => Wroclaw Ii (Wroclaw Ii)
+EPZG => Zielona Gora (Zielona Gora)
+ESCF => Linkoping / Malmen (Linkoping)
+ESCL => Soderhamn (Soderhamn)
+ESCM => Uppsala (Uppsala)
+ESDA => Ljungbyhed (Ljungbyhed)
+ESDB => Angelholm (Angelholm)
+ESDF => Ronneby (Ronneby)
+ESGG => Goteborg / Landvetter (Goteborg)
+ESGJ => Jonkoping Flygplats (Jonkoping Flygplats)
+ESGP => Goteborg / Save (Goteborg)
+ESGR => Skovde Flygplats (Skovde Flygplats)
+ESGT => Trollhattan Private (Trollhattan Private)
+ESIB => Satenas (Satenas)
+ESKM => Siljan / Mora (Siljan)
+ESKN => Skavasta / Stockholm (Skavasta)
+ESMK => Kristianstad / Everod (Kristianstad)
+ESMQ => Kalmar (Kalmar)
+ESMS => Malmo / Sturup (Malmo)
+ESMT => Halmstad Swedish (Halmstad Swedish)
+ESMV => Hagshult (Hagshult)
+ESMX => Vaxjo (Vaxjo)
+ESNG => Gallivare (Gallivare)
+ESNJ => Jokkmokk (Jokkmokk)
+ESNK => Kramfors Flygplats (Kramfors Flygplats)
+ESNN => Sundsvall-Harnosand Flygplats (Sundsvall-Harnosand Flygplats)
+ESNO => Ornskoldsvik (Ornskoldsvik)
+ESNQ => Kiruna (Kiruna)
+ESNS => Skelleftea (Skelleftea)
+ESNU => Umea Flygplats (Umea Flygplats)
+ESOE => Orebro Private (Orebro Private)
+ESOW => Vasteras / Hasslo (Vasteras)
+ESPA => Lulea / Kallax (Lulea)
+ESPC => Ostersund / Froson (Ostersund)
+ESPD => Gunnarn (Gunnarn)
+ESPE => Vidsel (Vidsel)
+ESSA => Stockholm / Arlanda (Stockholm)
+ESSB => Stockholm / Bromma (Stockholm)
+ESSD => Borlange (Borlange)
+ESSF => Hultsfred Swedish (Hultsfred Swedish)
+ESSK => Gavle / Sandviken (Gavle)
+ESSL => Linkoping / Saab (Linkoping)
+ESSP => Norrkoping (Norrkoping)
+ESSQ => Karlstad Flygplats (Karlstad Flygplats)
+ESSV => Visby Flygplats (Visby Flygplats)
+ETAD => Spangdahlem (Spangdahlem)
+ETAR => Ramstein (Ramstein)
+ETAS => Sembach United States Air Force Operated Base In Foreign Country (Sembach United States Air Force Operated Base In Foreign Country)
+ETBA => Aachen / Merzbruck (Aachen)
+ETCE => Mebstetten / Albstadt (Mebstetten)
+ETEB => Ansbach / Katterbach (Ansbach)
+ETEH => Bad Kreuznach (Bad Kreuznach)
+ETEU => Giebelstadt (Giebelstadt)
+ETGB => Bergen (Bergen)
+ETGG => Gluecksburg / Meierwik (Gluecksburg)
+ETGI => Idar-Oberstein (Idar-Oberstein)
+ETGK => Kuemmersruck (Kuemmersruck)
+ETGM => Meppen (Meppen)
+ETGW => Wittstock (Wittstock)
+ETGY => Kalkar (Kalkar)
+ETGZ => Messstetten (Messstetten)
+ETHA => Altenstadt (Altenstadt)
+ETHB => Bueckeburg (Bueckeburg)
+ETHC => Celle (Celle)
+ETHE => Rheine-Bentlage (Rheine-Bentlage)
+ETHF => Fritzlar (Fritzlar)
+ETHI => Itzehoe (Itzehoe)
+ETHL => Laupheim (Laupheim)
+ETHM => Mendig (Mendig)
+ETHN => Niederstetten (Niederstetten)
+ETHR => Roth (Roth)
+ETHS => Fassberg (Fassberg)
+ETHT => Cottbus Flugplatz (Cottbus Flugplatz)
+ETIC => Grafenwoehr (Grafenwoehr)
+ETID => Hanau (Hanau)
+ETIE => Heidelberg (Heidelberg)
+ETIH => Hohenfels (Hohenfels)
+ETIK => Illesheim (Illesheim)
+ETIN => Kitzingen Usa \ Af (Kitzingen Usa \ Af)
+ETME => Eggebek (Eggebek)
+ETMK => Kiel-Holtenau (Kiel-Holtenau)
+ETMN => Nordholz (Nordholz)
+ETND => Diepholz (Diepholz)
+ETNG => Geilenkirchen (Geilenkirchen)
+ETNH => Hohn (Hohn)
+ETNJ => Jever (Jever)
+ETNL => Laage (Laage)
+ETNN => Noervenich (Noervenich)
+ETNP => Hopsten (Hopsten)
+ETNR => Preschen (Preschen)
+ETNS => Schleswig-Jagel (Schleswig-Jagel)
+ETNT => Wittmundhaven (Wittmundhaven)
+ETNU => Trollenhagen (Trollenhagen)
+ETNW => Wunstorf (Wunstorf)
+ETOR => Coleman Mannheim (Coleman Mannheim)
+ETOU => Wiesbaden (Wiesbaden)
+ETSA => Landsberg (Landsberg)
+ETSB => Buechel (Buechel)
+ETSE => Erding (Erding)
+ETSF => Fuerstenfeldbruck (Fuerstenfeldbruck)
+ETSH => Holzdorf (Holzdorf)
+ETSI => Ingolstadt (Ingolstadt)
+ETSL => Lechfeld (Lechfeld)
+ETSM => Memmingen (Memmingen)
+ETSN => Neuburg / Donau (Neuburg)
+ETSP => Pferdsfeld (Pferdsfeld)
+ETUL => Laarbruch (Laarbruch)
+ETUN => Nordhorn (Nordhorn)
+ETUO => Guetersloh (Guetersloh)
+ETUR => Brueggen (Brueggen)
+EVRA => Riga (Riga)
+EYVI => Vilnius (Vilnius)
+FAAB => Alexander Bay (Alexander Bay)
+FAAN => Aliwal North (Aliwal North)
+FABL => Bloemfontein J. B. M. Hertzog (Bloemfontein J. B. M. Hertzog)
+FABM => Bethlehem (Bethlehem)
+FABY => Beaufort West (Beaufort West)
+FACL => Carolina (Carolina)
+FACT => Cape Town D. F. Malan (Cape Town D. F. Malan)
+FACV => Calvinia (Calvinia)
+FADA => De Aar (De Aar)
+FADN => Durban Louis Botha (Durban Louis Botha)
+FAEL => East London (East London)
+FAEO => Ermelo (Ermelo)
+FAFF => Frankfort (Frankfort)
+FAFR => Fraserburg (Fraserburg)
+FAGB => Gobabis (Gobabis)
+FAGE => Gough Island (Gough Island)
+FAGG => George (George)
+FAGM => Johannesburg / Rand (Johannesburg)
+FAGR => Graaff Reinet (Graaff Reinet)
+FAHS => Hoedspruit (Hoedspruit)
+FAIR => Pretoria Irene (Pretoria Irene)
+FAJS => Jan Smuts (Jan Smuts)
+FAKM => Kimberley (Kimberley)
+FALA => Lanseria Civ / Mil (Lanseria Civ)
+FALT => Lichtenburg (Lichtenburg)
+FALW => Langebaanweg (Langebaanweg)
+FALY => Ladysmith (Ladysmith)
+FAMB => Middelburg (Middelburg)
+FAME => Marion Island (Marion Island)
+FAMG => Margate (Margate)
+FAMM => Mmabatho (Mmabatho)
+FAMO => Mossel Bay Cape Saint Blaize (Mossel Bay Cape Saint Blaize)
+FANC => Newcastle (Newcastle)
+FANS => Nelspruit (Nelspruit)
+FAOB => Overberg (Overberg)
+FAOH => Oudtshoorn (Oudtshoorn)
+FAPB => Pietersburg (Pietersburg)
+FAPE => Port Elizabeth (Port Elizabeth)
+FAPH => Phalaborwa (Phalaborwa)
+FAPI => Pietersburg Civil (Pietersburg Civil)
+FAPJ => Port St Johns (Port St Johns)
+FAPM => Pietermaritzburg (Pietermaritzburg)
+FAPR => Pretoria (Pretoria)
+FAQT => Queenstown (Queenstown)
+FARB => Richard Bay (Richard Bay)
+FASB => Springbok (Springbok)
+FATC => Tristan Da Cunha (Tristan Da Cunha)
+FATZ => Tzaneen (Tzaneen)
+FAUP => Upington (Upington)
+FAUT => Umtata (Umtata)
+FAVB => Vryburg (Vryburg)
+FAVR => Vredendal (Vredendal)
+FAVY => Vryheid (Vryheid)
+FAWB => Wonderboom / Pretoria (Wonderboom)
+FAWK => Waterkloof Lmb (Waterkloof Lmb)
+FAWM => Welkom (Welkom)
+FAWW => Windhoek (Windhoek)
+FBFT => Francistown (Francistown)
+FBGZ => Ghanzi (Ghanzi)
+FBJW => Jwaneng (Jwaneng)
+FBKE => Kasane (Kasane)
+FBLT => Letlhakane (Letlhakane)
+FBMN => Maun (Maun)
+FBSK => Seretse Khama (Seretse Khama)
+FBSN => Sua-Pan (Sua-Pan)
+FBSW => Shakawe (Shakawe)
+FBTE => Tshane (Tshane)
+FBTS => Tsabong (Tsabong)
+FCBB => Brazzaville / Maya-Maya (Brazzaville)
+FCBD => Djambala (Djambala)
+FCBM => Mouyondzi (Mouyondzi)
+FCBO => M'Pouya (M'Pouya)
+FCBS => Sibiti (Sibiti)
+FCOG => Gamboma (Gamboma)
+FCOI => Impfondo (Impfondo)
+FCOM => Makoua (Makoua)
+FCOS => Souanke (Souanke)
+FCOU => Ouesso (Ouesso)
+FCPA => Makabana (Makabana)
+FCPL => Loubomo (Loubomo)
+FCPP => Pointe-Noire (Pointe-Noire)
+FDMS => Manzini / Matsapa (Manzini)
+FEFA => Alindao (Alindao)
+FEFB => Obo (Obo)
+FEFF => Bangui (Bangui)
+FEFG => Bangassou (Bangassou)
+FEFI => Birao (Birao)
+FEFL => Bossembele (Bossembele)
+FEFM => Bambari (Bambari)
+FEFN => N'Dele (N'Dele)
+FEFO => Bouar (Bouar)
+FEFR => Bria (Bria)
+FEFS => Bossangoa (Bossangoa)
+FEFT => Berberati (Berberati)
+FEFY => Yalinga (Yalinga)
+FHAW => Wide Awake Field Ascension Island (Wide Awake Field Ascension Island)
+FIMP => Plaisance Mauritius (Plaisance Mauritius)
+FIMR => Rodrigues (Rodrigues)
+FJDG => Diego Garcia (Diego Garcia)
+FKAB => Banyo (Banyo)
+FKAF => Bafia (Bafia)
+FKAG => Abong-Mbang (Abong-Mbang)
+FKAL => Lomie (Lomie)
+FKAM => Meiganga (Meiganga)
+FKAN => Nkongsamba (Nkongsamba)
+FKAO => Betare-Oya (Betare-Oya)
+FKAY => Yoko (Yoko)
+FKKA => Maroua-Salak (Maroua-Salak)
+FKKB => Kribi (Kribi)
+FKKC => Tiko (Tiko)
+FKKD => Douala Obs. (Douala Obs.)
+FKKF => Mamfe (Mamfe)
+FKKI => Batouri (Batouri)
+FKKM => Koundja (Koundja)
+FKKN => Ngaoundere (Ngaoundere)
+FKKR => Garoua (Garoua)
+FKKV => Bamenda (Bamenda)
+FKKY => Younde Ii (Younde Ii)
+FKYS => Yaounde (Yaounde)
+FLBA => Mbala (Mbala)
+FLCH => Choma (Choma)
+FLCP => Chipata (Chipata)
+FLIK => Isoka (Isoka)
+FLKB => Kawambwa (Kawambwa)
+FLKO => Kaoma (Kaoma)
+FLKS => Kasama (Kasama)
+FLKW => Kabwe (Kabwe)
+FLLC => Lusaka City (Lusaka City)
+FLLD => Lundazi (Lundazi)
+FLLI => Livingstone (Livingstone)
+FLLS => Lusakaairport (Lusakaairport)
+FLMA => Mansa (Mansa)
+FLMG => Mongu (Mongu)
+FLMP => Mpika (Mpika)
+FLMW => Mwinilunga (Mwinilunga)
+FLND => Ndola (Ndola)
+FLPA => Kasempa (Kasempa)
+FLPE => Petauke (Petauke)
+FLPO => Kabompo (Kabompo)
+FLSE => Serenje (Serenje)
+FLSN => Senanga (Senanga)
+FLSS => Sesheke (Sesheke)
+FLSW => Solwezi (Solwezi)
+FLZB => Zambezi (Zambezi)
+FMCH => Hahaya (Hahaya)
+FMCV => Ouani Anjouan (Ouani Anjouan)
+FMCZ => Dzaoudzi / Pamanzi Mayotte (Dzaoudzi)
+FMEE => Saint-Denis / Gillot (Saint-Denis)
+FMEP => Saint-Pierre (Saint-Pierre)
+FMME => Antsirabe (Antsirabe)
+FMMH => Mahanoro (Mahanoro)
+FMMI => Antananarivo / Ivato (Antananarivo)
+FMMO => Maintirano (Maintirano)
+FMMS => Sainte-Marie Aerodrome (Sainte-Marie Aerodrome)
+FMMT => Tamatave (Tamatave)
+FMMV => Morondava (Morondava)
+FMNA => Diego-Suarez (Diego-Suarez)
+FMND => Andapa (Andapa)
+FMNH => Antalaha (Antalaha)
+FMNL => Analalava (Analalava)
+FMNM => Majunga (Majunga)
+FMNN => Fascene Nossi-Be (Fascene Nossi-Be)
+FMNQ => Besalampy (Besalampy)
+FMNS => Sambava (Sambava)
+FMNV => Vohemar (Vohemar)
+FMSD => Fort-Dauphin (Fort-Dauphin)
+FMSF => Fianarantsoa (Fianarantsoa)
+FMSG => Farafangana (Farafangana)
+FMSM => Mananjary (Mananjary)
+FMSO => Ranohira (Ranohira)
+FMSR => Morombe (Morombe)
+FMST => Tulear (Tulear)
+FNBG => Monbaca Benguela (Monbaca Benguela)
+FNCA => Cabinda (Cabinda)
+FNHU => Huambo Nova Lisboa (Huambo Nova Lisboa)
+FNKU => Bie Silva Porto (Bie Silva Porto)
+FNLU => Luanda (Luanda)
+FOGM => Mouila (Mouila)
+FOGR => Lambarene (Lambarene)
+FOOB => Bitam (Bitam)
+FOOC => Cocobeach (Cocobeach)
+FOOD => Moanda (Moanda)
+FOOE => Mekambo (Mekambo)
+FOOG => Port-Gentil (Port-Gentil)
+FOOK => Makokou (Makokou)
+FOOL => Libreville (Libreville)
+FOOM => Mitzic (Mitzic)
+FOON => Franceville / Mvengue (Franceville)
+FOOR => Lastoursville (Lastoursville)
+FOOT => Tchibanga (Tchibanga)
+FOOY => Mayumba (Mayumba)
+FPPR => Principe (Principe)
+FPST => S. Tome (S. Tome)
+FQBR => Beira (Beira)
+FQCB => Cuamba (Cuamba)
+FQCH => Chimoio (Chimoio)
+FQIN => Inhambane (Inhambane)
+FQLC => Lichinga (Lichinga)
+FQLU => Lumbo (Lumbo)
+FQMA => Maputo / Mavalane (Maputo)
+FQMP => Mocimboa Da Praia (Mocimboa Da Praia)
+FQNP => Nampula (Nampula)
+FQPB => Pemba (Pemba)
+FQQL => Quelimane (Quelimane)
+FQTE => Tete (Tete)
+FQTT => Tete / Chingozi (Tete)
+FQVL => Vilanculos (Vilanculos)
+FQXA => Xai Xai (Xai Xai)
+FSIA => Seychellesr-National (Seychellesr-National)
+FSSS => Seychelles Rawinsonde Station (Seychelles Rawinsonde Station)
+FTTA => Sarh (Sarh)
+FTTC => Abeche (Abeche)
+FTTD => Moundou (Moundou)
+FTTJ => Ndjamena (Ndjamena)
+FTTK => Bokoro (Bokoro)
+FTTL => Bol-Berim (Bol-Berim)
+FTTN => Am-Timan (Am-Timan)
+FTTP => Pala (Pala)
+FTTY => Faya (Faya)
+FVBB => Beitbridge (Beitbridge)
+FVBI => Binga (Binga)
+FVBU => Bulawayo (Bulawayo)
+FVCH => Chipinge (Chipinge)
+FVCZ => Buffalo Range (Buffalo Range)
+FVFA => Victoria Falls (Victoria Falls)
+FVGO => Gokwe (Gokwe)
+FVHA => Harare Kutsaga (Harare Kutsaga)
+FVKA => Karoi (Karoi)
+FVKB => Kariba (Kariba)
+FVMT => Mutoko (Mutoko)
+FVMV => Masvingo (Masvingo)
+FVRU => Rusape (Rusape)
+FVTL => Gweru (Gweru)
+FVWN => Hwange National Park (Hwange National Park)
+FWCL => Chileka (Chileka)
+FWCT => Chitipa (Chitipa)
+FWDZ => Dedza (Dedza)
+FWKA => Karonga (Karonga)
+FWKI => Lilongwe (Lilongwe)
+FWKK => Nkhota Kota (Nkhota Kota)
+FWMG => Mangochi (Mangochi)
+FWMY => Monkey Bay (Monkey Bay)
+FWMZ => Mzimba (Mzimba)
+FWSM => Salima (Salima)
+FWUU => Mzuzu (Mzuzu)
+FXMM => Maseru / Moshoeshoe (Maseru)
+FXMU => Maseru-Mia (Maseru-Mia)
+FYGF => Grootfontein (Grootfontein)
+FYKT => Keetmanshoop (Keetmanshoop)
+FYLZ => Luderitz / Diaz Point (Luderitz)
+FYRK => Rooikop Saaf / Civ (Rooikop Saaf)
+FYRU => Rundu (Rundu)
+FYWH => J. G. Strijdom (J. G. Strijdom)
+FZAA => Kinshasa / N'Djili (Kinshasa)
+FZAG => Moanda (Moanda)
+FZAM => Matadi (Matadi)
+FZAN => Inga (Inga)
+FZBA => Inongo (Inongo)
+FZBO => Bandundu (Bandundu)
+FZCA => Kikwit (Kikwit)
+FZCS => Kenge (Kenge)
+FZEA => Mbandaka (Mbandaka)
+FZFK => Gemena (Gemena)
+FZGN => Boende (Boende)
+FZIA => Kisangani (Kisangani)
+FZMB => Butembo (Butembo)
+FZNA => Goma (Goma)
+FZNC => Rutshuru (Rutshuru)
+FZOA => Kindu (Kindu)
+FZQA => Lubumbashi-Luano (Lubumbashi-Luano)
+FZQM => Kolwezi (Kolwezi)
+FZRA => Manono (Manono)
+FZRF => Kalemie (Kalemie)
+FZRQ => Kongolo (Kongolo)
+FZSA => Kamina / Base (Kamina)
+FZUA => Kananga (Kananga)
+FZUK => Tshikapa (Tshikapa)
+FZVA => Lodja (Lodja)
+FZVI => Lusambo (Lusambo)
+FZVS => Ilebo (Ilebo)
+FZWA => Mbuji-Mayi (Mbuji-Mayi)
+GABG => Bougouni (Bougouni)
+GABS => Bamako / Senou (Bamako)
+GAGO => Gao (Gao)
+GAHB => Hombori (Hombori)
+GAKA => Kenieba (Kenieba)
+GAKL => Kidal (Kidal)
+GAKO => Koutiala (Koutiala)
+GAKT => Kita (Kita)
+GAKY => Kayes (Kayes)
+GAMB => Mopti (Mopti)
+GAMK => Menaka (Menaka)
+GANK => Nara (Nara)
+GANR => Nioro Du Sahel (Nioro Du Sahel)
+GASG => Segou (Segou)
+GASK => Sikasso (Sikasso)
+GASN => San (San)
+GATB => Tombouctou (Tombouctou)
+GATS => Tessalit (Tessalit)
+GBYD => Banjul / Yundum (Banjul)
+GCFV => Fuerteventura / Aeropuerto (Fuerteventura)
+GCHI => Hierro / Aeropuerto (Hierro)
+GCLA => La Palma / Aeropuerto (La Palma)
+GCLP => Las Palmas De Gran Canaria / Gando (Las Palmas De Gran Canaria)
+GCRR => Lanzarote / Aeropuerto (Lanzarote)
+GCTS => Tenerife Sur (Tenerife Sur)
+GCXO => Tenerife / Los Rodeos (Tenerife)
+GEML => Melilla (Melilla)
+GFLL => Lungi (Lungi)
+GGBF => Bafata (Bafata)
+GGOV => Bissau Aeroport (Bissau Aeroport)
+GMAA => Agadir (Agadir)
+GMAD => Agadir Al Massira (Agadir Al Massira)
+GMAT => Tan-Tan (Tan-Tan)
+GMFF => Fes-Sais (Fes-Sais)
+GMFI => Ifrane (Ifrane)
+GMFK => Errachidia (Errachidia)
+GMFM => Meknes (Meknes)
+GMFN => Nador (Nador)
+GMFO => Oujda (Oujda)
+GMFZ => Taza (Taza)
+GMMC => Casablanca (Casablanca)
+GMME => Rabat-Sale (Rabat-Sale)
+GMMF => Sidi Ifni (Sidi Ifni)
+GMMI => Essaouira (Essaouira)
+GMMN => Nouasseur (Nouasseur)
+GMMS => Safi (Safi)
+GMMX => Marrakech (Marrakech)
+GMMY => Kenitra (Kenitra)
+GMMZ => Ouarzazate (Ouarzazate)
+GMTA => Al Hoceima (Al Hoceima)
+GMTN => Tetuan / Sania Ramel (Tetuan)
+GMTT => Tanger Aerodrome (Tanger Aerodrome)
+GOGG => Ziguinchor (Ziguinchor)
+GOGK => Kolda (Kolda)
+GOGS => Cap-Skirring (Cap-Skirring)
+GOOD => Diourbel (Diourbel)
+GOOG => Linguere (Linguere)
+GOOK => Kaolack (Kaolack)
+GOOY => Dakar / Yoff (Dakar)
+GOSM => Matam (Matam)
+GOSP => Podor (Podor)
+GOSS => Saint-Louis (Saint-Louis)
+GOTK => Kedougou (Kedougou)
+GOTT => Tambacounda (Tambacounda)
+GQNA => Aioun El Atrouss (Aioun El Atrouss)
+GQNB => Boutilimit (Boutilimit)
+GQND => Tidjikja (Tidjikja)
+GQNF => Kiffa (Kiffa)
+GQNI => Nema (Nema)
+GQNJ => Akjoujt (Akjoujt)
+GQNK => Kaedi (Kaedi)
+GQNN => Nouakchott (Nouakchott)
+GQNR => Rosso (Rosso)
+GQPA => Atar (Atar)
+GQPP => Nouadhibou (Nouadhibou)
+GQPT => Bir Moghrein (Bir Moghrein)
+GSVO => Villa Cisneros (Villa Cisneros)
+GUCY => Conakry / Gbessia (Conakry)
+GUFH => Faranah / Badala (Faranah)
+GUID => Kindia (Kindia)
+GUKU => Kissidougou (Kissidougou)
+GULB => Labe (Labe)
+GUMA => Macenta (Macenta)
+GUNZ => N'Zerekore (N'Zerekore)
+GUOK => Boke (Boke)
+GUSI => Siguiri (Siguiri)
+GUXD => Kankan (Kankan)
+GVAC => Sal (Sal)
+HAAB => Addis Ababa (Addis Ababa)
+HAAG => Agordat (Agordat)
+HAAM => Arba Minch (Arba Minch)
+HAAW => Awash (Awash)
+HAAX => Axum (Axum)
+HABC => Baco / Bako (Baco)
+HABD => Bahar Dar (Bahar Dar)
+HADC => Combolcha (Combolcha)
+HADM => Debremarcos (Debremarcos)
+HADR => Dire Dawa (Dire Dawa)
+HAGH => Ghinnir / Ginir (Ghinnir)
+HAGN => Gondar (Gondar)
+HAGO => Gode (Gode)
+HAGR => Gore (Gore)
+HAHM => Harar Meda (Harar Meda)
+HAJJ => Jiggiga (Jiggiga)
+HAJM => Jimma (Jimma)
+HAKD => Kabre Dare Military (Kabre Dare Military)
+HALA => Awassa (Awassa)
+HAMK => Makale (Makale)
+HAML => Masslo / Meslo (Masslo)
+HAMS => Massawa (Massawa)
+HANG => Neghelli (Neghelli)
+HASB => Assab (Assab)
+HASO => Assosa / Asosa (Assosa)
+HATS => Tessenei / Teseney (Tessenei)
+HBBA => Bujumbura (Bujumbura)
+HCMM => Mogadiscio (Mogadiscio)
+HCMN => Belet Uen (Belet Uen)
+HDAM => Djibouti \ Ambouli (Djibouti \ Ambouli)
+HEAR => El Arish (El Arish)
+HEAT => Asyut (Asyut)
+HEAX => Alexandria / Nouzha (Alexandria)
+HECA => Cairo (Cairo)
+HEGN => Hurguada (Hurguada)
+HELX => Luxor (Luxor)
+HEMM => Mersa Matruh (Mersa Matruh)
+HEPS => Port Said (Port Said)
+HESH => Sharm El Sheikhintl (Sharm El Sheikhintl)
+HESN => Asswan (Asswan)
+HETR => El Tor (El Tor)
+HFFF => Djibouti (Djibouti)
+HHAS => Asmara (Asmara)
+HKEL => Eldoret (Eldoret)
+HKEM => Embu (Embu)
+HKGA => Garissa (Garissa)
+HKIS => Isiolo (Isiolo)
+HKJK => Nairobi / Kenyatta (Nairobi)
+HKKG => Kakamega (Kakamega)
+HKKI => Kisumu (Kisumu)
+HKKR => Kericho (Kericho)
+HKKS => Kisii (Kisii)
+HKKT => Kitale (Kitale)
+HKLO => Lodwar (Lodwar)
+HKLU => Lamu (Lamu)
+HKMA => Mandera (Mandera)
+HKMB => Marsabit (Marsabit)
+HKME => Meru (Meru)
+HKML => Malindi (Malindi)
+HKMO => Mombasa (Mombasa)
+HKMU => Makindu (Makindu)
+HKMY => Moyale (Moyale)
+HKNC => Nairobi / Dagoretti (Nairobi)
+HKNI => Nyeri (Nyeri)
+HKNK => Nakuru (Nakuru)
+HKNO => Narok (Narok)
+HKNW => Nairobi / Wilson (Nairobi)
+HKNY => Nanyuki (Nanyuki)
+HKVO => Voi (Voi)
+HKWJ => Wajir (Wajir)
+HLGT => Ghat (Ghat)
+HLKF => Kufra (Kufra)
+HLLB => Benina (Benina)
+HLLS => Sebha (Sebha)
+HLLT => Tripolir-National (Tripolir-National)
+HLTD => Ghadames (Ghadames)
+HRYG => Gisenyi (Gisenyi)
+HRYR => Kigali (Kigali)
+HSAT => Atbara (Atbara)
+HSDN => Dongola (Dongola)
+HSDZ => Damazine (Damazine)
+HSFS => El Fasher (El Fasher)
+HSGF => Gedaref (Gedaref)
+HSGN => Geneina (Geneina)
+HSKA => Kassala (Kassala)
+HSKI => Kosti (Kosti)
+HSLI => Kadugli (Kadugli)
+HSNL => Nyala (Nyala)
+HSNR => Sennar (Sennar)
+HSOB => El Obeid (El Obeid)
+HSPN => Port Sudan (Port Sudan)
+HSRN => Renk (Renk)
+HSSJ => Juba (Juba)
+HSSM => Malakal (Malakal)
+HSSP => Port Sudan (Port Sudan)
+HSSS => Khartoum (Khartoum)
+HSSW => Wadi Halfa (Wadi Halfa)
+HTAR => Arusha (Arusha)
+HTBU => Bukoba (Bukoba)
+HTDA => Dar Es Salaam (Dar Es Salaam)
+HTDO => Dodoma (Dodoma)
+HTIR => Iringa (Iringa)
+HTKA => Kigoma (Kigoma)
+HTKI => Kilwa Masoko (Kilwa Masoko)
+HTKJ => Kilimanjaro (Kilimanjaro)
+HTMB => Mbeya (Mbeya)
+HTMG => Morogoro (Morogoro)
+HTMO => Mombo (Mombo)
+HTMS => Moshi (Moshi)
+HTMT => Mtwara (Mtwara)
+HTMU => Musoma (Musoma)
+HTMW => Mwanza (Mwanza)
+HTNA => Nachingwea (Nachingwea)
+HTPE => Pemba / Karume (Pemba)
+HTSE => Same (Same)
+HTSO => Songea (Songea)
+HTSY => Shinyanga (Shinyanga)
+HTTB => Tabora (Tabora)
+HTTG => Tanga (Tanga)
+HTZA => Zanzibar / Kisauni (Zanzibar)
+HUAR => Arua (Arua)
+HUEN => Entebbe (Entebbe)
+HUFP => Fort Portal (Fort Portal)
+HUGU => Gulu (Gulu)
+HUJI => Jinja (Jinja)
+HUKB => Kabale (Kabale)
+HUKS => Kasese (Kasese)
+HULI => Lira (Lira)
+HUMA => Mbarara (Mbarara)
+HUMI => Masindi (Masindi)
+HUMO => Moroto (Moroto)
+HUSO => Soroti (Soroti)
+HUTO => Tororo (Tororo)
+K01R => Claiborne Range, Airways Facilities Sector (Claiborne Range)
+K01T => High Island (High Island)
+K03Y => Hallock (Hallock)
+K07S => Deer Park, Deer Park (Deer Park)
+K0B9 => Goat Island Remote Automatic Meteorological Observing System (Goat Island Remote Automatic Meteorological Observing System)
+K0E4 => Payson (Payson)
+K0L3 => Zuma Beach (Zuma Beach)
+K0V1 => Custer, Custer County (Custer)
+K0W8 => Chincoteague (Chincoteague)
+K0Y2 => Sturgeon Bay (Sturgeon Bay)
+K12B => New Castles (New Castles)
+K12N => Andover, Aeroflex-Andover (Andover)
+K13A => Nogales Automatic Meteorological Observing System (Nogales Automatic Meteorological Observing System)
+K13G => Niagara (Niagara)
+K14B => Great Duck Island (Great Duck Island)
+K14C => Frankfort (Frankfort)
+K15B => Halfway Rock (Halfway Rock)
+K15C => Milwaukee (Milwaukee)
+K16B => Heron Neck (Heron Neck)
+K16C => Kenosha (Kenosha)
+K17C => Ludington (Ludington)
+K18B => Monhegan / Manana Island (Monhegan)
+K18C => Michigan City (Michigan City)
+K18N => New London Ledge (New London Ledge)
+K19C => Muskegon (Muskegon)
+K19D => Mora Municipal (Mora Municipal)
+K19G => Buffalo (Buffalo)
+K19R => Ship Shoal Platform (Ship Shoal Platform)
+K1B7 => Boothville Heliport (Boothville Heliport)
+K1F0 => Ardmore, Ardmore Downtown Executive (Ardmore)
+K1G7 => Mississippi Canyon (Mississippi Canyon)
+K1J1 => Saint Simon Island (Saint Simon Island)
+K1J2 => Tybee (Tybee)
+K1J3 => Ponce De Leon Inlet (Ponce De Leon Inlet)
+K1J4 => Cape San Blas (Cape San Blas)
+K1J5 => Santa Rosa (Santa Rosa)
+K1K5 => Elkhart / Elkhart-Morton County (Elkhart)
+K1L2 => Santa Monica Pier (Santa Monica Pier)
+K1O5 => Montague (Montague)
+K1V1 => Rifle (Rifle)
+K1V4 => Saint Johnsbury (Saint Johnsbury)
+K1W9 => Wrightsville Beach (Wrightsville Beach)
+K20B => Rockland (Rockland)
+K20C => Saint Joseph (Saint Joseph)
+K20G => Ashtabula (Ashtabula)
+K20J => West Jonesport (West Jonesport)
+K21C => Sheboygan (Sheboygan)
+K21G => Marblehead (Marblehead)
+K23B => Seguin Island (Seguin Island)
+K23G => Cleveland (Cleveland)
+K24B => West Quoddy Head (West Quoddy Head)
+K24G => Toledo (Toledo)
+K25B => Portsmouth (Portsmouth)
+K25G => Erie (Erie)
+K26B => Isle Of Shoals (Isle Of Shoals)
+K26G => Rochester (Rochester)
+K27B => Cape Neddick (Cape Neddick)
+K27G => Lorain (Lorain)
+K27U => Salmon (Salmon)
+K27Y => Grand Marais (Grand Marais)
+K28G => Oswego (Oswego)
+K28K => Grncyn Blk52 (Grncyn Blk52)
+K28T => Sabine Pass (Sabine Pass)
+K28Y => North Manitou Shoal (North Manitou Shoal)
+K29B => Boston / Hull (Boston)
+K29G => Ravenna / Portage County (Ravenna)
+K29Y => Devils Island Light Station (Devils Island Light Station)
+K2B8 => Portland Head (Portland Head)
+K2C2 => White Sands (White Sands)
+K2DP => Dare County Gunnery Range (Dare County Gunnery Range)
+K2G6 => Meadville, Port Meadville (Meadville)
+K2H1 => Huntington B. Oil (Huntington B. Oil)
+K2I4 => Columbus / Bolton Field (Columbus)
+K2L6 => Marina Del Rey (Marina Del Rey)
+K2L7 => Solana Beach (Solana Beach)
+K2PJ => Poinsett Range, Sumpter (Poinsett Range)
+K2S9 => Willapa (Willapa)
+K2U7 => Stanley, Stanley Ranger Station (Stanley)
+K2V9 => Gunnison (Gunnison)
+K2WX => Buffalo (Buffalo)
+K30B => Sandwich (Sandwich)
+K30G => Saginaw River (Saginaw River)
+K30N => Faulkner Island (Faulkner Island)
+K30Y => Duluth (Duluth)
+K31B => Chatham (Chatham)
+K31G => Belle Isle (Belle Isle)
+K31Y => Eagle (Eagle)
+K32N => Little Gulf Island Light Station (Little Gulf Island Light Station)
+K32Y => Portage (Portage)
+K33B => Buzzards Bay (Buzzards Bay)
+K33G => Port Huron (Port Huron)
+K34B => Gloucester (Gloucester)
+K34N => Eatons Neck (Eatons Neck)
+K34Y => Marquette (Marquette)
+K35B => Merrimac River (Merrimac River)
+K36B => Race Point (Race Point)
+K36Y => Point Betsie / Frankfort (Point Betsie)
+K37B => Scituate (Scituate)
+K37W => Erwin, Harnett County (Erwin)
+K38Y => Saint Ignace (Saint Ignace)
+K39Y => Tawas Point (Tawas Point)
+K3B1 => Greenville, Greenville Municipal (Greenville)
+K3B2 => Marshfield (Marshfield)
+K3B6 => Eugene Island 330 (Eugene Island 330)
+K3DU => Drummond (Drummond)
+K3HE => Howell (Howell)
+K3HT => Harlowton (Harlowton)
+K3KM => Wichita, Colonel James Jabara (Wichita)
+K3L3 => Newport Beach (Newport Beach)
+K3O6 => Treasure Island (Treasure Island)
+K3OI => Lamoni (Lamoni)
+K3RN => Graying Air Force Range (Graying Air Force Range)
+K3S2 => Aurora State (Aurora State)
+K3SE => Spencer (Spencer)
+K3TH => Thompson Falls (Thompson Falls)
+K3V8 => Venice Heliport (Venice Heliport)
+K3W4 => Swansboro / Bogue (Swansboro)
+K40B => Clayton Lake (Clayton Lake)
+K40G => Grand Canyon, Valle (Grand Canyon)
+K40J => Perry-Foley, Perry-Foley (Perry-Foley)
+K40N => Chester County (Chester County)
+K40Y => Thunder Bay Island (Thunder Bay Island)
+K41G => Bath (Bath)
+K41I => Eugene Island (Eugene Island)
+K43F => Litchfield Municipal (Litchfield Municipal)
+K43S => West Point (West Point)
+K44N => Millbrook / Sky Acres (Millbrook)
+K44W => Diamond Shoals (Diamond Shoals)
+K44Y => Sault Ste. Marie (Sault Ste. Marie)
+K45B => Brant Point (Brant Point)
+K45N => Bay Shore / Fire Island (Bay Shore)
+K45W => Oracoke (Oracoke)
+K48N => Montauk Point (Montauk Point)
+K49N => East Moriches (East Moriches)
+K4BK => Brookings (Brookings)
+K4BL => Blanding (Blanding)
+K4BQ => Broadus (Broadus)
+K4CB => Cuddleback Gunnery Range (Cuddleback Gunnery Range)
+K4CR => Corona / Lincoln (Corona)
+K4DG => Douglas (Douglas)
+K4HV => Hanksville (Hanksville)
+K4L7 => Hermosa Beach Pier (Hermosa Beach Pier)
+K4LW => Lakeview (Lakeview)
+K4MR => Melrose Gunnery Range (Melrose Gunnery Range)
+K4MY => Moriarty (Moriarty)
+K4OM => Omak (Omak)
+K4SL => Torreon (Torreon)
+K4SU => Superior Valley Gunnery Range (Superior Valley Gunnery Range)
+K4SV => Strevell (Strevell)
+K4V5 => Durango (Durango)
+K50N => Rockaway (Rockaway)
+K50Q => Farallon Island (Farallon Island)
+K51N => Short Beach (Short Beach)
+K51Q => San Francisco Pbs (San Francisco Pbs)
+K52N => Wildwood (Wildwood)
+K52Q => Davis Point (Davis Point)
+K53D => Glenwood (Glenwood)
+K53Q => Pillar Pt / El Granda (Pillar Pt)
+K53S => Point Wilson (Point Wilson)
+K54N => Manasquan Inl (Manasquan Inl)
+K54Q => Castroville / Moss (Castroville)
+K55N => Atlantic City (Atlantic City)
+K56N => Sandy Hook (Sandy Hook)
+K5I3 => Pikeville Remote Automatic Meteorological Observing System (Pikeville Remote Automatic Meteorological Observing System)
+K5J0 => John Day, John Day State (John Day)
+K5L8 => Long Beach (Long Beach)
+K5R0 => East Addition B323 (East Addition B323)
+K61N => Indian River (Indian River)
+K61W => Annapolis (Annapolis)
+K62G => Wilmette Marines (Wilmette Marines)
+K62W => Cape Henry (Cape Henry)
+K63G => Chicago / Calumet (Chicago)
+K63W => Milford Haven (Milford Haven)
+K64W => Parramore Beach (Parramore Beach)
+K65W => Thomas Point (Thomas Point)
+K66W => Cove Point (Cove Point)
+K67B => Castle Hill (Castle Hill)
+K67W => Stillpond (Stillpond)
+K6A3 => Andrews, Andrews-Murphy (Andrews)
+K6L9 => Huntington Beach (Huntington Beach)
+K6R6 => Dryden, Terrel County (Dryden)
+K75S => Burlington / Mt Vern (Burlington)
+K76S => Oak Airpark (Oak Airpark)
+K77M => Malta (Malta)
+K77W => Cape Lookout (Cape Lookout)
+K78W => South Port / Oak Island (South Port)
+K79J => Andalusia, Andalusia-Opp Municipal (Andalusia)
+K79W => Oregon Inlet (Oregon Inlet)
+K7A9 => Plains / Peterson Field (Plains)
+K7B5 => West Cameron 587A (West Cameron 587A)
+K7R1 => Venice, Venice Heliport (Venice)
+K7R2 => Leeville (Leeville)
+K7R3 => Amelia / Lake Palourd (Amelia)
+K7R4 => Intracoastal City (Intracoastal City)
+K7R5 => Cameron Heliport (Cameron Heliport)
+K7R8 => South Marsh Island (South Marsh Island)
+K82S => Cape Disappointment (Cape Disappointment)
+K83S => Coos Bay (Coos Bay)
+K84J => Folly Beach Long Range Navigation (Folly Beach Long Range Navigation)
+K84Q => Blunts Reef (Blunts Reef)
+K84S => Grays (Grays)
+K85J => Georgetown (Georgetown)
+K85Q => Santa Cruz (Santa Cruz)
+K85S => Siuslaw River (Siuslaw River)
+K86J => Sullivans Island (Sullivans Island)
+K86Q => St George Reef (St George Reef)
+K86S => Smith Island (Smith Island)
+K87Q => Point Piedras Blanca (Point Piedras Blanca)
+K87S => Quillayute River (Quillayute River)
+K88Q => Samoa / Humboldt Bay (Samoa)
+K88S => Tillamook Bay (Tillamook Bay)
+K89Q => Point Arena (Point Arena)
+K8B9 => Egg Rock Light Station (Egg Rock Light Station)
+K8D3 => Sisseton, Sisseton Municipal (Sisseton)
+K8R0 => Pascagoula (Pascagoula)
+K8R1 => Mobile Point (Mobile Point)
+K8R3 => Southwest Pass (Southwest Pass)
+K8R5 => Grand Isle (Grand Isle)
+K8R6 => Calcasieu (Calcasieu)
+K8R7 => Sabine Pass (Sabine Pass)
+K8R8 => Freeport (Freeport)
+K8Y8 => Crane Lake (Crane Lake)
+K90S => Umpqua River (Umpqua River)
+K91Q => Point Blunt (Point Blunt)
+K91S => Alki Point (Alki Point)
+K92Q => Bodega Bay (Bodega Bay)
+K92S => Cape Blanco (Cape Blanco)
+K93Q => Pigeon Point (Pigeon Point)
+K93S => Cape Flattery (Cape Flattery)
+K94B => Wood Island Light Station (Wood Island Light Station)
+K94Q => Point Bonita (Point Bonita)
+K95B => Cape Vincent (Cape Vincent)
+K95Q => Point Pinos (Point Pinos)
+K95S => Yaquina Bay (Yaquina Bay)
+K96B => Owl's Head Light Station (Owl's Head Light Station)
+K96Q => Trinidad Head (Trinidad Head)
+K96S => New Dungeness (New Dungeness)
+K97Q => Point Reyes (Point Reyes)
+K97S => Point No Point (Point No Point)
+K98Q => Rio Vista (Rio Vista)
+K99M => Moorhead, Moorhead Municipal (Moorhead)
+K99Q => Port Chicago (Port Chicago)
+K99S => Point Robinson (Point Robinson)
+K9B2 => Newport (Newport)
+K9B5 => Bear Island (Bear Island)
+K9BB => Wells (Wells)
+K9F2 => Fourchon (Fourchon)
+K9L0 => Dana Point (Dana Point)
+K9R0 => Galveston (Galveston)
+K9R1 => Port Aransas (Port Aransas)
+K9V9 => Chamberlain, Chamberlain Municipal (Chamberlain)
+KA21 => Portage Glacier, Portage Visitor Center (Portage Glacier)
+KAAO => Wichita, Colonel James Jabara (Wichita)
+KAAT => Alturas (Alturas)
+KABE => Allentown, Lehigh Valley (Allentown)
+KABI => Abilene, Abilene Regional (Abilene)
+KABQ => Albuquerque, Albuquerque (Albuquerque)
+KABR => Aberdeen, Aberdeen Regional (Aberdeen)
+KABX => Albuquerque Nexrad (Albuquerque Nexrad)
+KABY => Albany, Southwest Georgia Regional (Albany)
+KACB => Bellaire, Antrim County (Bellaire)
+KACK => Nantucket, Nantucket Memorial (Nantucket)
+KACT => Waco, Waco Regional (Waco)
+KACV => Arcata / Eureka, Arcata (Arcata)
+KACY => Atlantic City, Atlantic City (Atlantic City)
+KADG => Adrian, Lenawee County (Adrian)
+KADM => Ardmore Municipal (Ardmore Municipal)
+KADQ => Kodiak, Kodiak (Kodiak)
+KADS => Dallas / Addison (Dallas)
+KADU => Audubon, Audubon County (Audubon)
+KADW => Camp Springs / Andrews (Camp Springs)
+KAEG => Albuquerque, Double Eagle II (Albuquerque)
+KAEL => Albert Lea (Albert Lea)
+KAEX => Alexandria, Alexandria (Alexandria)
+KAFF => Air Force Academy (Air Force Academy)
+KAFJ => Washington (Washington)
+KAFN => Jaffrey, Jaffrey Municipal-Silver Ranch (Jaffrey)
+KAFW => Fort Worth, Fort Worth Alliance (Fort Worth)
+KAGC => Pittsburgh, Allegheny County (Pittsburgh)
+KAGR => Avon Park Gunnery Range (Avon Park Gunnery Range)
+KAGS => Augusta, Bush Field (Augusta)
+KAHN => Athens, Athens (Athens)
+KAIA => Alliance, Alliance Municipal (Alliance)
+KAID => Anderson Municipal (Anderson Municipal)
+KAIG => Antigo - Lang (Antigo - Lang)
+KAIO => Atlantic (Atlantic)
+KAIT => Aitkin NDB (Aitkin NDB)
+KAIZ => Kaiser Memorial (Kaiser Memorial)
+KAKH => Gastonia, Gastonia Municipal (Gastonia)
+KAKO => Akron, Akron-Washington County (Akron)
+KAKQ => Wakefield, Wakefield Municipal (Wakefield)
+KAKR => Akron, Akron Fulton (Akron)
+KAKW => Klawock, Klawock (Klawock)
+KALB => Albany, Albany County (Albany)
+KALI => Alice, Alice (Alice)
+KALM => Alamogordo-White (Alamogordo-White)
+KALN => Alton / St. Louis Regional (Alton)
+KALO => Waterloo, Waterloo Municipal (Waterloo)
+KALS => Alamosa, San Luis Valley Regional (Alamosa)
+KALW => Walla Walla, Walla Walla Regional (Walla Walla)
+KAMA => Amarillo, Amarillo (Amarillo)
+KAMG => Alma, Bacon County (Alma)
+KAMN => Alma, Gratiot Community (Alma)
+KAMW => Ames, Ames Municipal (Ames)
+KAMX => Miami Nexrad (Miami Nexrad)
+KANB => Anniston, Anniston Metropolitan (Anniston)
+KAND => Anderson, Anderson County (Anderson)
+KANE => Minneapolis / Blaine (Minneapolis)
+KANJ => Sault Ste. Marie (Sault Ste. Marie)
+KANN => Annette, Annette Island (Annette)
+KANW => Ainsworth Municipal (Ainsworth Municipal)
+KAOH => Lima, Lima Allen County (Lima)
+KAOO => Altoona, Altoona-Blair County (Altoona)
+KAPA => Denver, Centennial (Denver)
+KAPC => Napa, Napa County (Napa)
+KAPF => Naples Municipal (Naples Municipal)
+KAPG => Phillips Army Air Field / Aberdeen (Phillips Army Air Field)
+KAPN => Alpena, Alpena County Regional (Alpena)
+KAPV => Apple Valley (Apple Valley)
+KAQP => Appleton, Appleton Municipal (Appleton)
+KAQQ => Apalachicola, Apalachicola (Apalachicola)
+KAQW => North Adams, Harriman-And-West (North Adams)
+KARA => New Iberia, Acadiana Regional (New Iberia)
+KARB => Ann Arbor, Ann Arbor Municipal (Ann Arbor)
+KARG => Walnut Ridge (Walnut Ridge)
+KARR => Aurora, Aurora Municipal (Aurora)
+KART => Watertown, Watertown (Watertown)
+KARV => Minocqua / Woodruff (Minocqua)
+KASD => Slidell, Slidell (Slidell)
+KASE => Aspen, Aspen-Pitkin County (Aspen)
+KASG => Springdale Municipal (Springdale Municipal)
+KASH => Nashua / Boire Field (Nashua)
+KASJ => Ahoskie, Tri-County (Ahoskie)
+KAST => Astoria, Astoria Regional (Astoria)
+KASX => Ashland, Kennedy Memorial (Ashland)
+KATL => Atlanta, Hartsfield Atlanta (Atlanta)
+KATS => Artesia, Artesia Municipal (Artesia)
+KATT => Camp Mabry / Austin City (Camp Mabry)
+KATW => Appleton / Outagamie (Appleton)
+KATX => Seattle NEXRAD (Seattle NEXRAD)
+KATY => Watertown, Watertown Municipal (Watertown)
+KAUB => Auburn University Automatic Meteorological Observing System (Auburn University Automatic Meteorological Observing System)
+KAUG => Augusta, Augusta State (Augusta)
+KAUH => Aurora, Aurora Municipal (Aurora)
+KAUM => Austin Municipal (Austin Municipal)
+KAUO => Auburn-Opelika (Auburn-Opelika)
+KAUS => Bergstrom, Austin-Bergstrom (Bergstrom)
+KAUW => Wausau, Wausau Downtown (Wausau)
+KAVC => South Hill, Mecklenburg-Brunswick Regional (South Hill)
+KAVL => Asheville, Asheville Regional (Asheville)
+KAVP => Wilkes-Barre - Scranton, Wilkes-Barre / Scranton (Wilkes-Barre - Scranton)
+KAVX => Avalon, Catalina (Avalon)
+KAWG => Washington (Washington)
+KAWH => Wildhorse Reservation / Elko (Wildhorse Reservation)
+KAWI => Wainwright, Wainwright (Wainwright)
+KAWO => Arlington Municipal (Arlington Municipal)
+KAXA => Algona (Algona)
+KAXN => Alexandria, Chandler Field (Alexandria)
+KAXO => Grand Isle (Grand Isle)
+KAYE => Fort Devens / Ayer (Fort Devens)
+KAYS => Waycross / Ware County, Ga (Waycross)
+KAZO => Kalamazoo, Kalamazoo / Battle Creek (Kalamazoo)
+KB23 => Battle Mountain (Battle Mountain)
+KBAB => Beale / Marysvile (Beale)
+KBAD => Barksdale (Barksdale)
+KBAF => Westfield, Barnes Municipal (Westfield)
+KBAK => Columbus / Balkalar (Columbus)
+KBAX => Bad Axe, Huron County Memorial (Bad Axe)
+KBAZ => New Braunfels, New Braunfels Municipal (New Braunfels)
+KBBB => Benson Municipal (Benson Municipal)
+KBBW => Broken Bow, Broken Bow Municipal (Broken Bow)
+KBCB => Virginia Tech (Virginia Tech)
+KBCE => Bryce Canyon, Bryce Canyon (Bryce Canyon)
+KBCG => Butte La Rose (Butte La Rose)
+KBDE => Baudette, Baudette (Baudette)
+KBDF => Bradford / Rinkenberg (Bradford)
+KBDL => Windsor Locks, Bradley (Windsor Locks)
+KBDR => Bridgeport, Sikorsky Memorial (Bridgeport)
+KBED => Bedford, Hanscom Field (Bedford)
+KBEH => Benton, Southwest Michigan Regional (Benton)
+KBET => Bethel, Bethel (Bethel)
+KBFD => Bradford, Bradford Regional (Bradford)
+KBFF => Scottsbluff, Heilig Field (Scottsbluff)
+KBFI => Seattle, Seattle Boeing Field (Seattle)
+KBFL => Bakersfield, Meadows Field (Bakersfield)
+KBFM => Mobile, Mobile Downtown (Mobile)
+KBFW => Silver Bay (Silver Bay)
+KBGD => Borger, Hutchinson County (Borger)
+KBGM => Binghamton, Binghamton Regional (Binghamton)
+KBGR => Bangor, Bangor (Bangor)
+KBHB => Bar (Bar)
+KBHK => Baker, Baker Municipal (Baker)
+KBHM => Birmingham, Birmingham (Birmingham)
+KBHX => Eureka NEXRAD (Eureka NEXRAD)
+KBID => Block Island (Block Island)
+KBIE => Beatrice Municipal (Beatrice Municipal)
+KBIF => Biggs Army Air Field / Ft. Bliss (Biggs Army Air Field)
+KBIG => Delta Junction / Ft. Greely, Allen Army Air Field (Delta Junction)
+KBIH => Bishop, Bishop (Bishop)
+KBIL => Billings, Billings Logan (Billings)
+KBIS => Bismarck, Bismarck Municipal (Bismarck)
+KBIV => Holland, Tulip City (Holland)
+KBIX => Keesler / Biloxi (Keesler)
+KBJC => Broomfield / Jeffco (Broomfield)
+KBJI => Bemidji (Bemidji)
+KBJJ => Wooster, Wayne County (Wooster)
+KBKE => Baker, Baker Municipal (Baker)
+KBKF => Buckley Air National Guard Base / Denver (Buckley Air National Guard Base)
+KBKL => Cleveland, Burke Lakefront (Cleveland)
+KBKT => Ft. Pickett / Blackstone (Ft. Pickett)
+KBKV => Brooksville, Hernando County (Brooksville)
+KBKW => Beckley, Raleigh County Memorial (Beckley)
+KBKX => Brookings (Brookings)
+KBLF => Bluefield, Mercer County (Bluefield)
+KBLH => Blythe, Blythe (Blythe)
+KBLI => Bellingham, Bellingham (Bellingham)
+KBLM => Belmar-Farmdale (Belmar-Farmdale)
+KBLU => Emigrant Gap, Blue Canyon Nyack (Emigrant Gap)
+KBLV => Scott / Belleville (Scott)
+KBLX => Billing Yell Nexrad (Billing Yell Nexrad)
+KBMG => Bloomington, Monroe County (Bloomington)
+KBMI => Bloomington / Normal (Bloomington)
+KBML => Berlin, Berlin Municipal (Berlin)
+KBMQ => Burnet, Burnet Municipal Craddock Field (Burnet)
+KBMX => Birmingham Nexrad (Birmingham Nexrad)
+KBNA => Nashville, Nashville (Nashville)
+KBNO => Burns, Burns Municipal (Burns)
+KBNW => Boone Municipal (Boone Municipal)
+KBNY => Burney (Burney)
+KBOI => Boise, Boise Air Terminal (Boise)
+KBOS => Boston, Logan (Boston)
+KBOW => Bartow Municipal (Bartow Municipal)
+KBOX => Boston Nexrad (Boston Nexrad)
+KBPI => Big Piney, Big Piney-Marbleton (Big Piney)
+KBPK => Mountain Home, Baxter County Regional (Mountain Home)
+KBPT => Beaumont / Port Arthur, Jefferson County (Beaumont)
+KBQK => Brunswick / Glynco (Brunswick)
+KBRD => Brainerd, Brainerd-Crow Wing County Regional (Brainerd)
+KBRL => Burlington, Burlington Regional (Burlington)
+KBRO => Brownsville, Brownsville / South Padre Island (Brownsville)
+KBTL => Battle Creek, Kellogg (Battle Creek)
+KBTM => Butte, Mooney (Butte)
+KBTP => Butler County (Butler County)
+KBTR => Baton Rouge, Baton Rouge Metropolitan, Ryan Field (Baton Rouge)
+KBTT => Bettles, Bettles (Bettles)
+KBTV => Burlington, Burlington (Burlington)
+KBUF => Buffalo, Greater Buffalo (Buffalo)
+KBUO => Beaumont (Beaumont)
+KBUR => Burbank, Burbank-Glendale-Pasadena (Burbank)
+KBUY => Burlington, Burlington Alamance Regional (Burlington)
+KBVE => Boothville (Boothville)
+KBVI => Beaver Falls (Beaver Falls)
+KBVO => Bartlesville, Bartlesville Municipal (Bartlesville)
+KBVX => Batesville (Batesville)
+KBVY => Beverly, Beverly Municipal (Beverly)
+KBWD => Brownwood Municipal (Brownwood Municipal)
+KBWG => Bowling Green, Bowling Green-Warren County Regional (Bowling Green)
+KBWI => Baltimore, Baltimore-Washington (Baltimore)
+KBYG => Buffalo, Buffalo Johnson County (Buffalo)
+KBYH => Eaker (Eaker)
+KBYI => Burley, Burley Municipal (Burley)
+KBYS => Bicycle Lake U. S. Army Airfield, Ca (Bicycle Lake U. S. Army Airfield)
+KBZN => Bozeman, Gallatin Field (Bozeman)
+KC19 => Holland / Tulip City (Holland)
+KC58 => Two Rivers (Two Rivers)
+KC73 => Dixon / Walgreen Field (Dixon)
+KC96 => Winter Park Resort (Winter Park Resort)
+KCAD => Cadillac / Wexford County (Cadillac)
+KCAE => Columbia, Columbia Metropolitan (Columbia)
+KCAG => Craig, Craig-Moffat (Craig)
+KCAK => Akron, Akron-Canton Regional (Akron)
+KCAO => Clayton, Clayton Municipal Airpark (Clayton)
+KCAR => Caribou, Caribou Municipal (Caribou)
+KCAV => Clarion (Clarion)
+KCBF => Council Bluffs (Council Bluffs)
+KCBG => Cambridge Municipal (Cambridge Municipal)
+KCBM => Columbus (Columbus)
+KCCO => Newnan, Newnan Coweta County (Newnan)
+KCCR => Concord, Buchanan Field (Concord)
+KCCX => State College Nexrad (State College Nexrad)
+KCCY => Charles City (Charles City)
+KCDC => Cedar City, Cedar City Municipal (Cedar City)
+KCDD => Crane Lake, Scotts Seaplane Base (Crane Lake)
+KCDH => Camden / Harrell Field (Camden)
+KCDJ => Chillicothe, Chillicothe Agri-Science Center (Chillicothe)
+KCDR => Chadron, Chadron Municipal (Chadron)
+KCDS => Childress, Childress Municipal (Childress)
+KCDV => Cordova, Smith (Cordova)
+KCDW => Caldwell, Essex County (Caldwell)
+KCEC => Crescent City (Crescent City)
+KCEF => Chicopee Falls / Westover (Chicopee Falls)
+KCEU => Clemson, Clemson-Oconee County (Clemson)
+KCEW => Crestview, Sikes (Crestview)
+KCEZ => Cortez, Cortez-Montezuma County (Cortez)
+KCFV => Coffeyville, Coffeyville Municipal (Coffeyville)
+KCGF => Cleveland / Cuyahoga (Cleveland)
+KCGI => Cape Girardeau, Cape Girardeau Regional (Cape Girardeau)
+KCGX => Chicago / Meigs (Chicago)
+KCGZ => Casa Granda (Casa Granda)
+KCHA => Chattanooga, Lovell Field (Chattanooga)
+KCHH => Chatham (Chatham)
+KCHI => Chicago (Chicago)
+KCHO => Charlottesville, Charlottesville-Albemarle (Charlottesville)
+KCHS => Charleston, Charleston (Charleston)
+KCIC => Chico Municipal (Chico Municipal)
+KCID => Cedar Rapids, Cedar Rapids Municipal (Cedar Rapids)
+KCIN => Carroll (Carroll)
+KCIU => Chippewa (Chippewa)
+KCJR => Culpeper, Culpeper County (Culpeper)
+KCKB => Clarksburg, Clarksburg Benedum (Clarksburg)
+KCKC => Grand Marais, Grand Marais/Cook County (Grand Marais)
+KCKL => Centreville (Centreville)
+KCKN => Crookston Municipal Field (Crookston Municipal Field)
+KCKV => Clarksville, Outlaw Field (Clarksville)
+KCLE => Cleveland, Cleveland-Hopkins (Cleveland)
+KCLI => Clintonville, Clintonville Municipal (Clintonville)
+KCLL => College Station, Easterwood Field (College Station)
+KCLM => Port Angeles, William R. Fairchild (Port Angeles)
+KCLT => Charlotte, Charlotte / Douglas (Charlotte)
+KCMA => Camarillo, Camarillo (Camarillo)
+KCMH => Columbus, Port Columbus (Columbus)
+KCMI => Champaign / Urbana, University Of Illinois-Willard (Champaign)
+KCMX => Hancock, Houghton County Memorial (Hancock)
+KCMY => McCoy United States Army Air Field (McCoy United States Army Air Field)
+KCNC => Chariton (Chariton)
+KCNK => Concordia, Blosser Municipal (Concordia)
+KCNM => Carlsbad, Cavern City Air Terminal (Carlsbad)
+KCNO => Chino, Chino (Chino)
+KCNU => Chanute, Chanute Martin Johnson (Chanute)
+KCNY => Moab, Canyonlands Field (Moab)
+KCOD => Cody (Cody)
+KCOE => Coeur D'Alene (Coeur D'Alene)
+KCOF => Cocoa / Patrick (Cocoa)
+KCON => Concord, Concord Municipal (Concord)
+KCOQ => Cloquet (Cloquet)
+KCOS => Colorado Springs, City Of Colorado Springs Municipal (Colorado Springs)
+KCOT => Cotulla, Cotulla-La Salle County (Cotulla)
+KCOU => Columbia, Columbia Regional (Columbia)
+KCPK => Chesapeake, Chesapeake Municipal (Chesapeake)
+KCPR => Casper, Natrona County (Casper)
+KCPS => Cahokia / St. Louis, St. Louis Downtown-Parks (Cahokia)
+KCQC => Clines Corners (Clines Corners)
+KCQM => Cook, Cook Municipal (Cook)
+KCQN => Chattanooga / Daisy (Chattanooga)
+KCQT => Los Angeles / USC Campus Downtown (Los Angeles)
+KCQV => Colville Municipal (Colville Municipal)
+KCQX => Chatham, Chatham Municipal (Chatham)
+KCRE => North Myrtle Beach, Grand Strand (North Myrtle Beach)
+KCRG => Jacksonville, Craig Municipal (Jacksonville)
+KCRP => Corpus Christi, Corpus Christi (Corpus Christi)
+KCRQ => Carlsbad, McClellan-Palomar (Carlsbad)
+KCRS => Corsicana, Campbell Field-Corsicana Municipal (Corsicana)
+KCRW => Charleston, Yeager (Charleston)
+KCSG => Columbus, Columbus Metropolitan (Columbus)
+KCSL => Camp San Luis (Camp San Luis)
+KCSM => Clinton, Clinton-Sherman (Clinton)
+KCSQ => Creston (Creston)
+KCSV => Crossville, Crossville Memorial (Crossville)
+KCTB => Cut Bank (Cut Bank)
+KCTO => Calverton / Grumman (Calverton)
+KCTY => Cross City, Cross City (Cross City)
+KCUB => Columbia, Columbia Owens Downtown (Columbia)
+KCUT => Custer, Custer County (Custer)
+KCVG => Covington / Cincinnati, Cincinnati / Northern Kentucky (Covington)
+KCVN => Clovis Municipal (Clovis Municipal)
+KCVO => Corvallis Municipal (Corvallis Municipal)
+KCVS => Cannon / Clovis (Cannon)
+KCWA => Mosinee / Central Wisconsin (Mosinee)
+KCWF => Chenault Airpark (Chenault Airpark)
+KCWI => Clinton Municipal (Clinton Municipal)
+KCXO => Conroe, Montgomery County (Conroe)
+KCXY => Harrisburg, Capital City (Harrisburg)
+KCYS => Cheyenne, Cheyenne (Cheyenne)
+KCZD => Cozad Municipal (Cozad Municipal)
+KCZK => Cascade Locks State (Cascade Locks State)
+KCZZ => Campo (Campo)
+KD07 => Faith (Faith)
+KD45 => Warroad (Warroad)
+KD97 => South St. Paul Municipal (South St. Paul Municipal)
+KDAA => Fort Belvoir (Fort Belvoir)
+KDAB => Daytona Beach, Daytona Beach Regional (Daytona Beach)
+KDAG => Daggett, Barstow-Daggett (Daggett)
+KDAL => Dallas, Dallas Love Field (Dallas)
+KDAN => Danville, Danville Regional (Danville)
+KDAW => Rochester, Skyhaven (Rochester)
+KDAX => Sacramento Nexrad (Sacramento Nexrad)
+KDAY => Dayton, Cox Dayton (Dayton)
+KDBQ => Dubuque, Dubuque Regional (Dubuque)
+KDCA => Washington DC, Reagan National (Washington DC)
+KDCU => Decatur, Pryor Field (Decatur)
+KDDC => Dodge City, Dodge City Regional (Dodge City)
+KDDH => Bennington, Bennington Morse State (Bennington)
+KDEC => Decatur, Decatur (Decatur)
+KDEE => Deering, Deering (Deering)
+KDEH => Decorah (Decorah)
+KDEN => Denver, Denver (Denver)
+KDEQ => De Queen, Helms Sevier County (De Queen)
+KDET => Detroit, Detroit City (Detroit)
+KDEW => Deer Park, Deer Park (Deer Park)
+KDFI => Defiance, Defiance Memorial (Defiance)
+KDFW => Dallas / Fort Worth, Dallas / Fort Worth (Dallas)
+KDGW => Douglas, Converse County (Douglas)
+KDHN => Dothan, Dothan (Dothan)
+KDHT => Dalhart, Dalhart Municipal (Dalhart)
+KDIK => Dickinson, Dickinson Municipal (Dickinson)
+KDIX => Philadelphia NEXRAD (Philadelphia NEXRAD)
+KDKK => Dunkirk, Chautauqua County / Dunkirk (Dunkirk)
+KDKX => Knoxville Downtown (Knoxville Downtown)
+KDLF => Laughlin, Laughlin Auxiliary Airfield (Laughlin)
+KDLH => Duluth, Duluth (Duluth)
+KDLL => Baraboo, Baraboo Wisconsin Dells (Baraboo)
+KDLN => Dillon, Dillon (Dillon)
+KDLS => The Dalles, The Dalles Municipal (The Dalles)
+KDMA => Davis-Monthan (Davis-Monthan)
+KDMH => Baltimore, Inner (Baltimore)
+KDMN => Deming, Deming Municipal (Deming)
+KDMO => Sedalia, Sedalia Memorial (Sedalia)
+KDMX => Des Moines Nexrad (Des Moines Nexrad)
+KDNL => Augusta, Daniel Field (Augusta)
+KDNN => Dalton, Dalton Municipal (Dalton)
+KDNR => Denver / Stapleton, Co. (Denver)
+KDNS => Denison (Denison)
+KDNV => Danville, Vermilion County (Danville)
+KDOV => Dover (Dover)
+KDPA => Chicago / West Chicago, Dupage (Chicago)
+KDPG => Dugway Proving Grounds (Dugway Proving Grounds)
+KDPL => Kenansville, Duplin County (Kenansville)
+KDRA => Mercury, Desert Rock (Mercury)
+KDRO => Durango, Durango-La Plata County (Durango)
+KDRT => Del Rio, Del Rio (Del Rio)
+KDSM => Des Moines, Des Moines (Des Moines)
+KDSV => Dansville, Dansville Municipal (Dansville)
+KDTL => Detroit Lakes (Detroit Lakes)
+KDTN => Shreveport, Shreveport Downtown (Shreveport)
+KDTO => Denton, Denton Municipal (Denton)
+KDTS => Destin, Destin-Ft. Walton Beach (Destin)
+KDTW => Detroit, Detroit Metropolitan Wayne County (Detroit)
+KDTX => Detroit NEXRAD (Detroit NEXRAD)
+KDUG => Douglas Bisbee (Douglas Bisbee)
+KDUJ => Du Bois (Du Bois)
+KDVL => Devils Lake (Devils Lake)
+KDVN => Davenport, Davenport Municipal (Davenport)
+KDVT => Phoenix, Phoenix-Deer Valley Municipal (Phoenix)
+KDWH => Houston, Hooks Memorial (Houston)
+KDXR => Danbury, Danbury Municipal (Danbury)
+KDXX => Madison, Madison-Lac Qui Parle County (Madison)
+KDYL => Doylestown, Doylestown (Doylestown)
+KDYR => Dyersburg (Dyersburg)
+KDYS => Abilene, Dyess (Abilene)
+KDYT => Duluth, Sky (Duluth)
+KE28 => Northrup Landing Strip (Northrup Landing Strip)
+KE33 => Chama (Chama)
+KE74 => Safford Automatic Meteorological Observing System (Safford Automatic Meteorological Observing System)
+KEAA => Eagle, Eagle (Eagle)
+KEAR => Kearney Municipal (Kearney Municipal)
+KEAT => Wenatchee, Pangborn Memorial (Wenatchee)
+KEAU => Eau Claire County (Eau Claire County)
+KEAX => Pleasant NEXRAD (Pleasant NEXRAD)
+KEBS => Webster City (Webster City)
+KECG => Elizabeth City, Elizabeth City Coast Guard Air Station (Elizabeth City)
+KEDE => Edenton, Northeastern Regional (Edenton)
+KEDW => Edwards (Edwards)
+KEED => Needles (Needles)
+KEEN => Keene / Dillant (Keene)
+KEEO => Meeker, Meeker (Meeker)
+KEET => Alabaster, Shelby County (Alabaster)
+KEEW => Neenah (Neenah)
+KEFC => Belle Fourche, Belle Fourche Municipal (Belle Fourche)
+KEFD => Houston / Ellington (Houston)
+KEFT => Monroe, Monroe Municipal (Monroe)
+KEGE => Eagle County Regional (Eagle County Regional)
+KEGI => Duke Field / Eglin Auxiliary (Duke Field)
+KEGV => Eagle River, Eagle River Union (Eagle River)
+KEHA => Elkhart (Elkhart)
+KEHR => Henderson City (Henderson City)
+KEKA => Eureka (Eureka)
+KEKM => Elkhart Municipal (Elkhart Municipal)
+KEKN => Elkins, Elkins-Randolph County-Jennings Randolph Field (Elkins)
+KEKO => Elko, Elko Municipal-Harris Field (Elko)
+KELD => El Dorado, South Arkansas Regional (El Dorado)
+KELM => Elmira, Elmira / Corning Regional (Elmira)
+KELN => Ellensburg, Ellensburg Bowers Field (Ellensburg)
+KELO => Ely Municipal (Ely Municipal)
+KELP => El Paso, El Paso (El Paso)
+KELY => Ely, Ely (Ely)
+KELZ => Wellsville, Wellsville Municipal (Wellsville)
+KEMP => Emporia, Emporia Municipal (Emporia)
+KEMT => El Monte (El Monte)
+KEND => Vance / Enid (Vance)
+KENN => Nenana, Nenana Municipal (Nenana)
+KENV => Wendover / Air Force Auxillary Field (Wendover)
+KENW => Kenosha, Kenosha Regional (Kenosha)
+KENX => Albany NEXRAD (Albany NEXRAD)
+KEOK => Keokuk Municipal (Keokuk Municipal)
+KEPH => Ephrata, Ephrata Municipal (Ephrata)
+KEPO => Eastport (Eastport)
+KEPZ => Santa Teresa (Santa Teresa)
+KEQY => Monroe, Monroe (Monroe)
+KERI => Erie, Erie (Erie)
+KERV => Kerrville Municipal (Kerrville Municipal)
+KERY => Newberry, Luce County (Newberry)
+KESC => Escanaba (Escanaba)
+KESF => Alexandria, Alexandria Esler Regional (Alexandria)
+KESN => Easton / Newman Field (Easton)
+KEST => Estherville, Estherville Municipal (Estherville)
+KESX => Las Vegas Nexrad (Las Vegas Nexrad)
+KETB => West Bend, West Bend Municipal (West Bend)
+KETH => Wheaton NDB (Wheaton NDB)
+KEUG => Eugene, Mahlon Sweet Field (Eugene)
+KEUL => Caldwell (Caldwell)
+KEVM => Eveleth Municipal (Eveleth Municipal)
+KEVV => Evansville, Evansville Regional (Evansville)
+KEVW => Evanston, Evanston-Uninta County Burns Field (Evanston)
+KEWB => New Bedford, New Bedford Regional (New Bedford)
+KEWK => Newton (Newton)
+KEWN => New Bern, Craven County Regional (New Bern)
+KEWR => Newark, Newark (Newark)
+KEWX => San Antonio Nexrad (San Antonio Nexrad)
+KEYE => Indianapolis, Eagle Creek Airpark (Indianapolis)
+KEYW => Key West, Key West (Key West)
+KEZF => Shannon (Shannon)
+KF10 => Henryetta Municipal (Henryetta Municipal)
+KF30 => Sulphur Municipal (Sulphur Municipal)
+KF39 => Sherman-Denison (Sherman-Denison)
+KFAF => Fort Eustis / Felker (Fort Eustis)
+KFAM => Farmington (Farmington)
+KFAR => Fargo, Hector (Fargo)
+KFAT => Fresno, Fresno Air Terminal (Fresno)
+KFAY => Fayetteville, Fayetteville Regional (Fayetteville)
+KFBG => Fort Bragg / Simmons Army Airfield (Fort Bragg)
+KFBL => Faribault Municipal (Faribault Municipal)
+KFCA => Kalispell, Glacier Park (Kalispell)
+KFCH => Fresno-Chandler (Fresno-Chandler)
+KFCL => Fort Collins (Fort Collins)
+KFCM => Minneapolis, Flying Cloud (Minneapolis)
+KFCS => Fort Carson (Fort Carson)
+KFCX => Roanoke NEXRAD (Roanoke NEXRAD)
+KFDR => Frederick, Frederick Municipal (Frederick)
+KFDY => Findlay (Findlay)
+KFET => Fremont Municipal (Fremont Municipal)
+KFFC => Atlanta, Peachtree City-Falcon Field (Atlanta)
+KFFL => Fair Field (Fair Field)
+KFFM => Fergus Falls (Fergus Falls)
+KFFO => Dayton / Wright-Patterson (Dayton)
+KFFT => Frankfort, Capital City (Frankfort)
+KFFZ => Mesa / Falcon Field (Mesa)
+KFHR => Friday, Friday (Friday)
+KFHU => Fort Huachuca (Fort Huachuca)
+KFIG => Clearfield, Clearfield-Lawrence (Clearfield)
+KFIT => Fitchburg, Fitchburg Municipal (Fitchburg)
+KFKL => Franklin (Franklin)
+KFKN => Franklin / J B Rose (Franklin)
+KFLD => Fond Du Lac, Fond Du Lac County (Fond Du Lac)
+KFLG => Flagstaff, Flagstaff Pulliam (Flagstaff)
+KFLL => Fort Lauderdale, Fort Lauderdale / Hollywood (Fort Lauderdale)
+KFLO => Florence, Florence Regional (Florence)
+KFLP => Flippin (Flippin)
+KFLV => Fort Leavenworth (Fort Leavenworth)
+KFME => Fort Meade / Tipton (Fort Meade)
+KFMH => Otis Air National Guard Base (Otis Air National Guard Base)
+KFMN => Farmington, Four Corners Regional (Farmington)
+KFMY => Fort Myers, Page Field (Fort Myers)
+KFNB => Falls City / Brenner (Falls City)
+KFNL => Fort Collins (Fort Collins)
+KFNT => Flint, Bishop (Flint)
+KFOD => Fort Dodge (Fort Dodge)
+KFOE => Topeka, Forbes Field (Topeka)
+KFOK => Westhampton Beach, The Gabreski (Westhampton Beach)
+KFOQ => Freeport (Freeport)
+KFOZ => Bigfork, Bigfork Municipal (Bigfork)
+KFPR => Fort Pierce, St. Lucie County (Fort Pierce)
+KFQD => Rutherfordton, Rutherford County-Marchman Field (Rutherfordton)
+KFRG => Farmingdale, Republic (Farmingdale)
+KFRI => Fort Riley (Fort Riley)
+KFRM => Fairmont Municipal (Fairmont Municipal)
+KFSD => Sioux Falls, Foss Field (Sioux Falls)
+KFSE => Fosston (Fosston)
+KFSI => Fort Sill (Fort Sill)
+KFSM => Fort Smith, Fort Smith Regional (Fort Smith)
+KFST => Fort Stockton, Fort Stockton-Pecos County (Fort Stockton)
+KFSW => Fort Madison (Fort Madison)
+KFTG => Denver Nexrad (Denver Nexrad)
+KFTK => Fort Knox (Fort Knox)
+KFTW => Fort Worth, Meacham (Fort Worth)
+KFTY => Atlanta, Fulton County-Brown Field (Atlanta)
+KFUL => Fullerton, Fullerton Municipal (Fullerton)
+KFVE => Frenchville, Northern Aroostook Regional (Frenchville)
+KFVX => Farmville (Farmville)
+KFWA => Fort Wayne, Fort Wayne (Fort Wayne)
+KFWD => Fort Worth (Fort Worth)
+KFWN => Sussex, Sussex (Sussex)
+KFWS => Dfw Nexrad (Dfw Nexrad)
+KFXE => Fort Lauderdale, Fort Lauderdale Executive (Fort Lauderdale)
+KFYV => Fayetteville, Drake Field (Fayetteville)
+KFZY => Fulton, Oswego County (Fulton)
+KGAD => Gadsden Municipal (Gadsden Municipal)
+KGAG => Gage, Gage (Gage)
+KGBD => Great Bend (Great Bend)
+KGBN => Gila Bend U. S. Army Airfield (Gila Bend U. S. Army Airfield)
+KGCC => Gillette, Gillette-Campbell County (Gillette)
+KGCK => Garden City, Garden City Regional (Garden City)
+KGCN => Grand Canyon, Grand Canyon National Park (Grand Canyon)
+KGDP => Pine Springs, Guadalupe Mountains National Park (Pine Springs)
+KGDV => Glendive (Glendive)
+KGED => Georgetown, Sussex County (Georgetown)
+KGEG => Spokane, Spokane (Spokane)
+KGEU => Glendale, Glendale Municipal (Glendale)
+KGEV => Jefferson, Ashe County (Jefferson)
+KGEY => Greybull, South Big Horn County (Greybull)
+KGEZ => Shelbyville, Shelbyville Municipal (Shelbyville)
+KGFA => Malmstrom (Malmstrom)
+KGFK => Grand Forks, Grand Forks (Grand Forks)
+KGFL => Glens Falls, Warren County (Glens Falls)
+KGGB => Golden Gate Bridge (Golden Gate Bridge)
+KGGG => Longview, Gregg County (Longview)
+KGGW => Glasgow, Glasgow (Glasgow)
+KGHW => Glenwood Automatic Surface Observing System (Glenwood Automatic Surface Observing System)
+KGIF => Winter Haven, Winter Haven's Gilbert (Winter Haven)
+KGJT => Grand Junction, Walker Field (Grand Junction)
+KGKJ => Meadville, Port Meadville (Meadville)
+KGKN => Gulkana, Gulkana (Gulkana)
+KGKY => Arlington, Arlington Municipal (Arlington)
+KGLD => Goodland, Renner Field (Goodland)
+KGLH => Greenville, Greenville Municipal (Greenville)
+KGLR => Gaylord, Otsego County (Gaylord)
+KGLS => Galveston, Scholes Field (Galveston)
+KGMU => Greenville, Greenville Downtown (Greenville)
+KGNA => Grand Marais, The Bay of Grand Marais (Grand Marais)
+KGNR => Greenville (Greenville)
+KGNT => Grants, Grants-Milan Municipal (Grants)
+KGNV => Gainesville, Gainesville Regional (Gainesville)
+KGOK => Guthrie, Guthrie Municipal (Guthrie)
+KGON => Groton / New London, Groton-New London (Groton)
+KGPT => Gulfport, Gulfport-Biloxi Regional (Gulfport)
+KGPZ => Grand Rapids (Grand Rapids)
+KGRB => Green Bay, Austin Straubel (Green Bay)
+KGRD => Greenwood, Greenwood County (Greenwood)
+KGRF => Fort Lewis / Gray U. S. Army Airfield (Fort Lewis)
+KGRI => Grand Island, Central Nebraska Regional (Grand Island)
+KGRK => Fort Hood / Gray U. S. Army Airfield (Fort Hood)
+KGRN => Gordon Municipal (Gordon Municipal)
+KGRR => Grand Rapids, Kent County (Grand Rapids)
+KGSB => Seymour-Johnson (Seymour-Johnson)
+KGSH => Goshen, Goshen Municipal (Goshen)
+KGSO => Greensboro, Piedmont Triad (Greensboro)
+KGSP => Greer, Greenville-Spartanburg (Greer)
+KGTB => Fort Drum / Wheeler-Sack U. S. Army Airfield (Fort Drum)
+KGTF => Great Falls, Great Falls (Great Falls)
+KGTR => Golden Tri (Golden Tri)
+KGTU => Georgetown (Georgetown)
+KGUC => Gunnison (Gunnison)
+KGUP => Gallup, Gallup Municipal (Gallup)
+KGUS => Grissom / Peru (Grissom)
+KGUY => Guymon / Guymon Municipal (Guymon)
+KGVL => Gainesville, Gilmer Memorial (Gainesville)
+KGVT => Greenville / Majors (Greenville)
+KGVW => Kansas City, Richards-Gebaur (Kansas City)
+KGWO => Greenwood, Greenwood-LeFlore (Greenwood)
+KGXY => Greeley / Weld (Greeley)
+KGYL => Glencoe, Glencoe Municipal (Glencoe)
+KGYR => Goodyear Municipal (Goodyear Municipal)
+KGYY => Gary Regional (Gary Regional)
+KGZH => Evergreen, Middleton Field (Evergreen)
+KH08 => High Island 264C (High Island 264C)
+KH32 => Southwest (Southwest)
+KH39 => High Island A572c (High Island A572c)
+KH92 => Hominy Municipal (Hominy Municipal)
+KHAO => Hamilton, Hamilton-Fairfield (Hamilton)
+KHAT => Cape Hatteras (Cape Hatteras)
+KHBG => Hattiesburg, Chain Municipal (Hattiesburg)
+KHBI => Asheboro, Asheboro Municipal (Asheboro)
+KHBR => Hobart, Hobart Municipal (Hobart)
+KHCD => Hutchinson (Hutchinson)
+KHCO => Hallock, Hallock Municipal (Hallock)
+KHDE => Brewster Field (Brewster Field)
+KHDN => Hayden / Yampa (Hayden)
+KHDO => Hondo, Hondo Municipal (Hondo)
+KHEF => Manassas Municipal (Manassas Municipal)
+KHEI => Hettinger, Hettinger Municipal (Hettinger)
+KHEY => Hanchey AHP / Ozark (Hanchey AHP)
+KHEZ => Natchez / Hardy (Natchez)
+KHFD => Hartford, Hartford-Brainard (Hartford)
+KHFF => Mackall U. S. Army Airfield (Mackall U. S. Army Airfield)
+KHGR => Hagerstown, Washington County Regional (Hagerstown)
+KHGX => Houston / Galviston Nexrad (Houston)
+KHHF => Canadian / Hemphill (Canadian)
+KHHR => Hawthorne, Hawthorne Municipal (Hawthorne)
+KHIB => Hibbing, Chisholm-Hibbing (Hibbing)
+KHIE => Whitefield, Mount Washington Regional (Whitefield)
+KHIF => Hill / Ogden (Hill)
+KHIO => Portland, Portland-Hillsboro (Portland)
+KHJO => Hanford, Hanford Municipal (Hanford)
+KHKA => Blytheville, Blytheville Municipal (Blytheville)
+KHKS => Jackson, Hawkins Field (Jackson)
+KHKY => Hickory, Hickory Regional (Hickory)
+KHLC => Hill City, Hill City Municipal (Hill City)
+KHLG => Wheeling, Wheeling Ohio County (Wheeling)
+KHLN => Helena, Helena Regional (Helena)
+KHLR => Fort Hood (Fort Hood)
+KHLX => Hillsville (Hillsville)
+KHMM => Hamilton / Ravalli County (Hamilton)
+KHMN => Holloman (Holloman)
+KHMS => Hanford (Hanford)
+KHNB => Huntingburg (Huntingburg)
+KHNS => Haines, Haines (Haines)
+KHOB => Hobbs / Lea County (Hobbs)
+KHOM => Homer, Homer (Homer)
+KHON => Huron, Huron Regional (Huron)
+KHOP => Fort Campbell U. S. Army Airfield (Fort Campbell U. S. Army Airfield)
+KHOT => Hot Springs, Memorial Field (Hot Springs)
+KHOU => Houston, Houston Hobby (Houston)
+KHPN => White Plains, Westchester County (White Plains)
+KHQM => Hoquiam, Bowerman (Hoquiam)
+KHRI => Hermiston, Hermiston Municipal (Hermiston)
+KHRJ => Erwin, Harnett County (Erwin)
+KHRL => Harlingen, Rio Grande Valley (Harlingen)
+KHRO => Harrison, Boone County (Harrison)
+KHRT => Hurlburt Field (Hurlburt Field)
+KHSE => Hatteras, Mitchell Field (Hatteras)
+KHSI => Hastings, Hastings Municipal (Hastings)
+KHSP => Hot Springs / Ingalls (Hot Springs)
+KHSS => Hot Springs (Hot Springs)
+KHST => Homestead (Homestead)
+KHSV => Huntsville, Huntsville / Jones Field (Huntsville)
+KHTH => Hawthorne Municipal (Hawthorne Municipal)
+KHTL => Houghton Lake, Roscommon County (Houghton Lake)
+KHTO => East Hampton, East Hampton (East Hampton)
+KHTS => Huntington, Tri-State (Huntington)
+KHUF => Terre Haute, Terre Haute - Hulman Field (Terre Haute)
+KHUL => Houlton, Houlton (Houlton)
+KHUM => Houma-Terrebonne (Houma-Terrebonne)
+KHUT => Hutchinson, Hutchinson Municipal (Hutchinson)
+KHVN => New Haven, Tweed-New Haven (New Haven)
+KHVR => Havre, Havre City-County (Havre)
+KHWD => Hayward, Hayward Air Terminal (Hayward)
+KHWO => Hollywood, North Perry (Hollywood)
+KHWV => Shirley, Brookhaven (Shirley)
+KHXD => Hilton Head (Hilton Head)
+KHYA => Hyannis, Barnstable Municipal-Boardman (Hyannis)
+KHYI => San Marcos, San Marcos Municipal (San Marcos)
+KHYR => Hayward, Hayward Municipal (Hayward)
+KHYS => Hays Municipal (Hays Municipal)
+KHZY => Ashtabula, Ashtabula County (Ashtabula)
+KIAB => McConnell (McConnell)
+KIAD => Washington DC, Washington-Dulles (Washington DC)
+KIAG => Niagara Falls, Niagara Falls (Niagara Falls)
+KIAH => Houston, Houstonrcontinental (Houston)
+KICL => Clarinda (Clarinda)
+KICT => Wichita, Wichita Mid-Continent (Wichita)
+KIDA => Idaho Falls, Fanning Field (Idaho Falls)
+KIDI => Indiana / Stewart Field (Indiana)
+KIEN => Pine Ridge, Pine Ridge (Pine Ridge)
+KIFP => Bullhead City, Laughlin/Bullhead (Bullhead City)
+KIGC => Charleston (Charleston)
+KIGM => Kingman, Kingman (Kingman)
+KIGX => Chapel Hill, Williams (Chapel Hill)
+KIJD => Willimantic, Windham (Willimantic)
+KIKR => Kirtland, Kirtland Auxiliary Field (Kirtland)
+KIKV => Ankeny, Ankeny Regional (Ankeny)
+KILE => Killeen Municipal (Killeen Municipal)
+KILG => Wilmington, New Castle County (Wilmington)
+KILI => Iliamna, Iliamna (Iliamna)
+KILL => Willmar / Rice (Willmar)
+KILM => Wilmington, New Hanover (Wilmington)
+KILN => Wilmington, Airborne Airpark (Wilmington)
+KIML => Imperial Municipal (Imperial Municipal)
+KIMT => Iron Mountain / Kingsford, Ford (Iron Mountain)
+KIND => Indianapolis, Indianapolis (Indianapolis)
+KINK => Wink, Winkler County (Wink)
+KINL => International Falls, Falls (International Falls)
+KINS => Indian Springs Gunnery Range (Indian Springs Gunnery Range)
+KINT => Winston Salem, Smith Reynolds (Winston Salem)
+KINW => Winslow, Winslow Municipal (Winslow)
+KINX => Tulsa Nexrad (Tulsa Nexrad)
+KIOW => Iowa City, Iowa City Municipal (Iowa City)
+KIPL => Imperial, Imperial County (Imperial)
+KIPT => Williamsport, Williamsport-Lycoming County (Williamsport)
+KIRK => Kirksville, Kirksville Regional (Kirksville)
+KIRS => Sturgis, Kirsch Municipal (Sturgis)
+KISN => Williston, Sloulin Field (Williston)
+KISO => Kinston / Stallings (Kinston)
+KISP => Islip, Long Island Mac Arthur (Islip)
+KISQ => Manistique, Schoolcraft County (Manistique)
+KISW => Wisconsin Rapids, Alexander Field South Wood County (Wisconsin Rapids)
+KITH => Ithaca / Tompkins County (Ithaca)
+KITR => Burlington, Carson County (Burlington)
+KIWA => Mesa, Williams Gateway (Mesa)
+KIWD => Ironwood (Ironwood)
+KIWI => Wiscasset, Wiscasset (Wiscasset)
+KIWS => West Houston / Lakeside (West Houston)
+KIXD => Olathe, New Century Aircenter (Olathe)
+KIYK => Inyokern (Inyokern)
+KIZA => Santa Ynez, Santa Ynez (Santa Ynez)
+KIZG => Fryeburg, Eastern Slopes Regional (Fryeburg)
+KJAC => Jackson Hole (Jackson Hole)
+KJAN => Jackson, Jackson (Jackson)
+KJAX => Jacksonville, Jacksonville (Jacksonville)
+KJBR => Jonesboro, Jonesboro Municipal (Jonesboro)
+KJCT => Junction, Kimble County (Junction)
+KJDN => Jordan, Jordan (Jordan)
+KJEF => Jefferson City, Jefferson City Memorial (Jefferson City)
+KJER => Jerome, Jerome County (Jerome)
+KJFK => New York, Kennedy (New York)
+KJHW => Jamestown (Jamestown)
+KJKL => Jackson, Carroll (Jackson)
+KJLN => Joplin, Joplin Regional (Joplin)
+KJMR => Mora, Mora Municipal (Mora)
+KJMS => Jamestown, Jamestown Municipal (Jamestown)
+KJNW => Newport (Newport)
+KJOT => Joliet Park District (Joliet Park District)
+KJST => Johnstown, Johnstown-Cambria County (Johnstown)
+KJVL => Janesville / Rock County (Janesville)
+KJWX => Fort Ritchie (Fort Ritchie)
+KJXN => Jackson / Reynolds (Jackson)
+KJYG => St. James, St. James Municipal (St. James)
+KJYM => Hillsdale, Hillsdale Municipal (Hillsdale)
+KJYO => Leesburg / Godfrey (Leesburg)
+KKAL => Kaltag, Kaltag (Kaltag)
+KKLS => Kelso-Longview (Kelso-Longview)
+KKVL => Kivalina, Kivalina (Kivalina)
+KL10 => San Clemente (San Clemente)
+KL13 => Point Loma / Cabrillo (Point Loma)
+KL14 => Cabrillo Beach (Cabrillo Beach)
+KL21 => Scripps Pier / La Jol (Scripps Pier)
+KL27 => Santa Catalina Island (Santa Catalina Island)
+KL34 => Oceanside (Oceanside)
+KL40 => High Island A489b (High Island A489b)
+KL46 => Anacapa Island (Anacapa Island)
+KL55 => Malibu Beach (Malibu Beach)
+KL58 => Mission Beach (Mission Beach)
+KL79 => Oxnard / Channel Island (Oxnard)
+KL82 => Terminal Island (Terminal Island)
+KL97 => Point Vincente (Point Vincente)
+KL98 => El Capitan Beach (El Capitan Beach)
+KLAA => Lamar, Lamar Municipal (Lamar)
+KLAF => Lafayette, Purdue University (Lafayette)
+KLAL => Lakeland Regional (Lakeland Regional)
+KLAM => Los Alamos (Los Alamos)
+KLAN => Lansing, Capital City (Lansing)
+KLAR => Laramie, Laramie Regional (Laramie)
+KLAS => Las Vegas, McCarran (Las Vegas)
+KLAW => Lawton, Lawton Municipal (Lawton)
+KLAX => Los Angeles, Los Angeles (Los Angeles)
+KLBB => Lubbock, Lubbock (Lubbock)
+KLBE => Latrobe / Westmorland (Latrobe)
+KLBF => North Platte, North Platte Regional (North Platte)
+KLBL => Liberal Municipal (Liberal Municipal)
+KLBT => Lumberton, Lumberton Municipal (Lumberton)
+KLBX => Angleton / Lake Jackson, Brazoria County (Angleton)
+KLCH => Lake Charles, Lake Charles Regional (Lake Charles)
+KLCI => Laconia Municipal (Laconia Municipal)
+KLCK => Rickenbacker Air National Guard Base (Rickenbacker Air National Guard Base)
+KLDS => Leeds (Leeds)
+KLEB => Lebanon, Lebanon Municipal (Lebanon)
+KLEE => Leesburg, Leesburg Municipal (Leesburg)
+KLEW => Auburn-Lewiston (Auburn-Lewiston)
+KLEX => Lexington, Blue Grass (Lexington)
+KLFI => Langley (Langley)
+KLFK => Lufkin, Angelina County (Lufkin)
+KLFT => Lafayette, Lafayette Regional (Lafayette)
+KLGA => New York, La Guardia (New York)
+KLGB => Long Beach, Long Beach (Long Beach)
+KLGD => La Grande (La Grande)
+KLGU => Logan, Logan-Cache (Logan)
+KLHD => Anchorage, Lake Hood Sea Plane Base (Anchorage)
+KLHQ => Lancaster, Fairfield County (Lancaster)
+KLHU => Lake Havasu (Lake Havasu)
+KLHW => Ft. Stewart (Ft. Stewart)
+KLHX => La Junta, La Junta Municipal (La Junta)
+KLIC => Limon, Limon Municipal (Limon)
+KLIT => Little Rock, Adams Field (Little Rock)
+KLIX => Slidell (Slidell)
+KLIZ => Loring / Limeston (Loring)
+KLJF => Litchfield, Litchfield Municipal (Litchfield)
+KLKV => Lakeview (Lakeview)
+KLLJ => Challis, Challis (Challis)
+KLLQ => Monticello, Monticello Municipal (Monticello)
+KLMT => Klamath Falls, Klamath Falls (Klamath Falls)
+KLND => Lander (Lander)
+KLNK => Lincoln, Lincoln Municipal (Lincoln)
+KLNN => Willoughby (Willoughby)
+KLNP => Wise / Lonesome Pine (Wise)
+KLNR => Lone Rock, Tri-County Regional (Lone Rock)
+KLNS => Lancaster, Lancaster (Lancaster)
+KLOL => Lovelock, Derby Field (Lovelock)
+KLOR => Fort Rucker, Lowe Army Heliport (Fort Rucker)
+KLOT => Chicago Nexrad (Chicago Nexrad)
+KLOU => Louisville, Bowman Field (Louisville)
+KLOZ => London, London-Corbin-Magee Field (London)
+KLPC => Lompoc (Lompoc)
+KLPR => Lorain / Elyria, Lorain County Regional (Lorain)
+KLRD => Laredo (Laredo)
+KLRF => Little Rock (Little Rock)
+KLRJ => Le (Le)
+KLRU => Las Cruces (Las Cruces)
+KLRX => Elko Nexrad (Elko Nexrad)
+KLSD => Lexington / Creech (Lexington)
+KLSE => La Crosse, La Crosse Municipal (La Crosse)
+KLSF => Fort Benning (Fort Benning)
+KLSV => Nellis (Nellis)
+KLTS => Altus (Altus)
+KLTX => Wilmington Nexrad (Wilmington Nexrad)
+KLUF => Luke / Phoenix (Luke)
+KLUK => Cincinnati, Cincinnati Municipal Lunken Field (Cincinnati)
+KLVJ => Houston, Clover Field (Houston)
+KLVK => Livermore, Livermore Municipal (Livermore)
+KLVM => Livingston, Mission Field (Livingston)
+KLVN => Minneapolis, Airlake (Minneapolis)
+KLVS => Las Vegas, Las Vegas Municipal (Las Vegas)
+KLVX => Louisville Nexrad (Louisville Nexrad)
+KLWB => Lewisburg / Greenbrier (Lewisburg)
+KLWC => Lawrence, Lawrence Municipal (Lawrence)
+KLWD => Lamoni, Lamoni Municipal (Lamoni)
+KLWM => Lawrence, Lawrence Municipal (Lawrence)
+KLWS => Lewiston, Lewiston-Nez Perce County (Lewiston)
+KLWT => Lewistown Municipal (Lewistown Municipal)
+KLWV => Lawrenceville, Lawrenceville-Vincennes (Lawrenceville)
+KLWX => Baltimore / DC Nexrad (Baltimore)
+KLXL => Little Falls (Little Falls)
+KLXN => Lexington, Jim Kelly Field (Lexington)
+KLXV => Leadville, Lake County (Leadville)
+KLYH => Lynchburg, Lynchburg Regional (Lynchburg)
+KLZK => North Little Rock / Municipal, Ar. (North Little Rock)
+KM39 => Mount Ida, Ouachita Seed Orchard (Mount Ida)
+KMAE => Madera, Madera Municipal (Madera)
+KMAF => Midland, Midland (Midland)
+KMAI => Marianna, Marianna Municipal (Marianna)
+KMAX => Medford Nexrad (Medford Nexrad)
+KMBG => Mobridge, Mobridge Municipal (Mobridge)
+KMBL => Manistee (Manistee)
+KMBS => Saginaw, MBSy (Saginaw)
+KMCB => McComb, McComb / Pike County (McComb)
+KMCC => McClellan (McClellan)
+KMCD => Macinac Island, Mackinac Island (Macinac Island)
+KMCE => Merced, Merced Municipal (Merced)
+KMCF => Macdill, Fl. (Macdill)
+KMCG => McGrath, McGrath (McGrath)
+KMCI => Kansas City, Kansas City (Kansas City)
+KMCK => McCook, McCook Municipal (McCook)
+KMCN => Macon, Middle Georgia Regional (Macon)
+KMCO => Orlando, Orlando (Orlando)
+KMCW => Mason City, Mason City Municipal (Mason City)
+KMDH => Carbondale / Murphysboro, Southern Illinois (Carbondale)
+KMDT => Harrisburg, Harrisburg (Harrisburg)
+KMDW => Chicago, Chicago Midway (Chicago)
+KMDZ => Medford, Taylor County (Medford)
+KMEB => Maxton, Laurinburg-Maxton (Maxton)
+KMEH => Meacham, Meacham (Meacham)
+KMEI => Meridian, Key Field (Meridian)
+KMEM => Memphis, Memphis (Memphis)
+KMER => Merced / Castle (Merced)
+KMFD => Mansfield, Mansfield Lahm Municipal (Mansfield)
+KMFE => McAllen, Miller (McAllen)
+KMFI => Marshfield, Marshfield Municipal (Marshfield)
+KMFR => Medford, Rogue Valley (Medford)
+KMFV => Melfa / Accomack (Melfa)
+KMGE => Marietta / Dobbins (Marietta)
+KMGG => Maple Lake, Maple Lake Municipal (Maple Lake)
+KMGJ => Montgomery, Orange County (Montgomery)
+KMGM => Montgomery, Dannelly Field (Montgomery)
+KMGW => Morgantown, Morgantown Municipal-Hart Field (Morgantown)
+KMGY => Dayton, Dayton General South (Dayton)
+KMHE => Mitchell, Mitchell Municipal (Mitchell)
+KMHK => Manhattan, Manhattan Municipal (Manhattan)
+KMHN => Mullen / Hooker County (Mullen)
+KMHR => Mather Field (Mather Field)
+KMHS => Mount Shasta (Mount Shasta)
+KMHT => Manchester, Manchester (Manchester)
+KMHV => Mojave (Mojave)
+KMHX => Newport (Newport)
+KMIA => Miami, Miami (Miami)
+KMIB => Minot (Minot)
+KMIC => Minneapolis, Crystal (Minneapolis)
+KMIE => Muncie, Delaware County-Johnson Field (Muncie)
+KMIV => Millville, Millville Municipal (Millville)
+KMIW => Marshalltown, Marshalltown Municipal (Marshalltown)
+KMJQ => Jackson Municipal (Jackson Municipal)
+KMKC => Kansas City, Kansas City Downtown (Kansas City)
+KMKE => Milwaukee, General Mitchell (Milwaukee)
+KMKG => Muskegon, Muskegon County (Muskegon)
+KMKJ => Marion / Wytheville (Marion)
+KMKK => Kaunakakai, Molokai (Kaunakakai)
+KMKL => Jackson, McKellar-Sipes Regional (Jackson)
+KMKO => Muskogee, Davis Field (Muskogee)
+KMKT => Mankato (Mankato)
+KMKX => Milwaukee NEXRAD (Milwaukee NEXRAD)
+KMLB => Melbourne, Melbourne (Melbourne)
+KMLC => McAlester, McAlester Regional (McAlester)
+KMLD => Malad City (Malad City)
+KMLF => Milford, Milford Municipal (Milford)
+KMLI => Moline, Quad-City (Moline)
+KMLP => Mullan Pass, Mullan Pass Vor (Mullan Pass)
+KMLS => Miles City, Wiley Field (Miles City)
+KMLT => Millinocket, Millinocket Municipal (Millinocket)
+KMLU => Monroe, Monroe Regional (Monroe)
+KMMH => Mammoth / June Lakes (Mammoth)
+KMMK => Meriden, Meriden Markham Municipal (Meriden)
+KMML => Marshall / Ryan (Marshall)
+KMMO => Marseilles Island (Marseilles Island)
+KMMT => McEntire Air National Guard Weather Facility Base (McEntire Air National Guard Weather Facility Base)
+KMMU => Morristown Municipal (Morristown Municipal)
+KMMV => McMinnville, McMinnville Municipal (McMinnville)
+KMNI => Manning / Cooper Regional (Manning)
+KMNM => Menominee (Menominee)
+KMNN => Marion, Marion Municipal (Marion)
+KMOB => Mobile, Mobile Regional (Mobile)
+KMOD => Modesto, Modesto City-County-Sham Field (Modesto)
+KMOT => Minot, Minot (Minot)
+KMOX => Morris Municipal (Morris Municipal)
+KMPO => Mount Pocono, Pocono Mountains Municipal (Mount Pocono)
+KMPV => Barre / Montpelier, Knapp State (Barre)
+KMQE => East Milton (East Milton)
+KMQI => Manteo / Dare County Regional (Manteo)
+KMQM => Monida (Monida)
+KMQT => Marquette (Marquette)
+KMQY => Smyrna (Smyrna)
+KMRB => Martinsburg, Eastern West Virginia Regional (Martinsburg)
+KMRC => Columbia / Maury County (Columbia)
+KMRF => Marfa (Marfa)
+KMRH => Beaufort, Smith Field (Beaufort)
+KMRI => Anchorage, Merrill Field (Anchorage)
+KMRJ => Mineral Point, Iowa County (Mineral Point)
+KMRN => Morganton, Morganton-Lenior (Morganton)
+KMRX => Morristown Nexrad (Morristown Nexrad)
+KMRY => Monterey, Monterey Peninsula (Monterey)
+KMSL => Muscle Shoals, North West Alabama Regional (Muscle Shoals)
+KMSN => Madison, Dane County Regional-Truax Field (Madison)
+KMSO => Missoula, Missoula (Missoula)
+KMSP => Minneapolis, Minneapolis-St. Paul (Minneapolis)
+KMSS => Massena, Massena-Richards Field (Massena)
+KMSV => Monticello (Monticello)
+KMSX => Missoula NEXRAD (Missoula NEXRAD)
+KMSY => New Orleans, New Orleans (New Orleans)
+KMTC => Selfridge Air National Guard Base (Selfridge Air National Guard Base)
+KMTH => Marathon, Marathon (Marathon)
+KMTJ => Montrose, Montrose Regional (Montrose)
+KMTN => Baltimore / Martin (Baltimore)
+KMTO => Mattoon / Charleston, Coles County Memorial (Mattoon)
+KMTP => Montauk, Montauk (Montauk)
+KMTV => Martinsville (Martinsville)
+KMTW => Manitowoc Municipal (Manitowoc Municipal)
+KMTX => Salt Lake Nexrad (Salt Lake Nexrad)
+KMUI => Muir Army Air Field / Indiantown (Muir Army Air Field)
+KMUO => Mountain Home (Mountain Home)
+KMUT => Muscatine (Muscatine)
+KMUX => Monterey NEXRAD (Monterey NEXRAD)
+KMVE => Montevideo (Montevideo)
+KMVL => Morrisville, Morrisville-Stowe State (Morrisville)
+KMVN => Mount Vernon (Mount Vernon)
+KMVY => Vineyard Haven, Marthas Vineyard (Vineyard Haven)
+KMWA => Marion Regional (Marion Regional)
+KMWC => Milwaukee / Timmerman (Milwaukee)
+KMWH => Moses Lake, Grant County (Moses Lake)
+KMWK => Mount Airy, Mount Airy/Surry County (Mount Airy)
+KMWL => Mineral Wells, Mineral Wells (Mineral Wells)
+KMWM => Windom, Windom Municipal (Windom)
+KMWN => Mount Washington (Mount Washington)
+KMWS => Mount Wilson (Mount Wilson)
+KMWT => Mount Ida (Mount Ida)
+KMXF => Maxwell / Montgomery (Maxwell)
+KMXO => Monticello Municipal (Monticello Municipal)
+KMYF => San Diego, Montgomery Field (San Diego)
+KMYL => McCall, McCall (McCall)
+KMYR => Myrtle Beach (Myrtle Beach)
+KMYV => Marysville, Yuba County (Marysville)
+KMZH => Moose Lake, Moose Lake Carlton County (Moose Lake)
+KN00 => Fulton, Oswego County (Fulton)
+KN11 => New Haven (New Haven)
+KN28 => Ambrose / Ft. Tilden (Ambrose)
+KN60 => Garrison (Garrison)
+KN78 => Barnegat (Barnegat)
+KN80 => Ocean City, Ocean City Municipal (Ocean City)
+KN84 => Bronx / Execution (Bronx)
+KN91 => Cape May (Cape May)
+KNAE => Astor, Bombing Range Detachment Astor (Astor)
+KNAK => Annapolis, United States Naval Academy (Annapolis)
+KNBC => Beaufort, Marine Corps Air Station (Beaufort)
+KNBE => Dallas United States Naval Air Station (Dallas United States Naval Air Station)
+KNBG => New Orleans, Naval Air Station (New Orleans)
+KNBJ => Barin, Barin Field, Naval Air Facility (Barin)
+KNBQ => Kings Bay, Naval Station (Kings Bay)
+KNBT => Piney Island, Bt-11 Bombing Range (Piney Island)
+KNCA => Jacksonville, New River, Marine Corps Air Station (Jacksonville)
+KNDZ => Milton, Whiting Field South (Milton)
+KNED => Winner, Wiley Field (Winner)
+KNEL => Lakehurst Naval Air Station (Lakehurst Naval Air Station)
+KNEW => New Orleans, New Orleans Lakefront (New Orleans)
+KNEX => Charleston Nise (Charleston Nise)
+KNFE => Fentress, Naval Auxiliary Landing Field (Fentress)
+KNFG => Oceanside, Camp Pendleton, Marine Corps Air Station (Oceanside)
+KNFJ => Milton, Choctaw Pensacola, Naval Auxiliary Landing Field (Milton)
+KNFL => Fallon, Naval Air Station (Fallon)
+KNFW => Fort Worth, Naval Air Station (Fort Worth)
+KNGP => Corpus Christi, Naval Air Station (Corpus Christi)
+KNGU => Norfolk, Naval Air Station (Norfolk)
+KNGW => Corpus Christi, Cabiness Field, Naval Auxiliary Landing Field (Corpus Christi)
+KNGZ => Alameda Naval Air Station (Alameda Naval Air Station)
+KNHK => Patuxent River, Naval Air Station (Patuxent River)
+KNHZ => Brunswick, Naval Air Station (Brunswick)
+KNID => China Lake, Naval Air Facility (China Lake)
+KNIP => Jacksonville, Naval Air Station (Jacksonville)
+KNIS => Cherry Point, Marine Corps Air Station (Cherry Point)
+KNJK => El Centro, Naval Air Facility (El Centro)
+KNJM => Swansboro, Bogue Field, Marine Corps Auxiliary Landing Field (Swansboro)
+KNJW => Meridian Range, B (Meridian Range)
+KNKT => Cherry Point, Marine Corps Air Station (Cherry Point)
+KNKX => San Diego, Miramar, Naval Air Station (San Diego)
+KNLC => Lemoore, Naval Air Station (Lemoore)
+KNLT => Atlantic, Atlantic Field Outlying Landing Field (Atlantic)
+KNMM => Meridian, Naval Air Station (Meridian)
+KNMT => McMullen, McMullen Target Site (McMullen)
+KNNZ => Point Sur (Point Sur)
+KNOG => Orange Grove, Naval Auxiliary Landing Field (Orange Grove)
+KNOW => Port Angeles Coast Guard Air Station (Port Angeles Coast Guard Air Station)
+KNPA => Pensacola, Naval Air Station (Pensacola)
+KNQA => Millington, Millington Municipal (Millington)
+KNQI => Kingsville, Naval Air Station (Kingsville)
+KNQX => Key West, Naval Air Station (Key West)
+KNRA => Coupeville, Outlying Landing Field (Coupeville)
+KNRB => Mayport, Naval Air Facility (Mayport)
+KNRC => Crows Landing Naval Auxiliary Landing Field (Crows Landing Naval Auxiliary Landing Field)
+KNRS => Imperial Beach, Naval Auxiliary Landing Field (Imperial Beach)
+KNSE => Milton, Whiting Field North (Milton)
+KNSI => San Nicholas Island (San Nicholas Island)
+KNTD => Point Mugu, Naval Air Warfare Center (Point Mugu)
+KNTU => Virginia Beach, Oceana, Naval Air Station (Virginia Beach)
+KNUC => San Clemente, Naval Auxiliary Landing Field (San Clemente)
+KNUI => St. Inigoes, Webster Field, Naval Electronic Systems Engineering Activity (St. Inigoes)
+KNUQ => Mountain View, Moffett Field (Mountain View)
+KNUW => Whidbey Island, Naval Air Station (Whidbey Island)
+KNVT => Corpus Christi, Waldron Outlying Landing Field (Corpus Christi)
+KNXP => Twenty-Nine Palms, Marine Corps Air-Ground Combat Center (Twenty-Nine Palms)
+KNXX => Willow Grove, Naval Air Station (Willow Grove)
+KNYC => New York City, Central Park (New York City)
+KNYG => Quantico, Marine Corps Air Facility (Quantico)
+KNYL => Yuma, Marine Corps Air Station (Yuma)
+KNZC => Cecil, Naval Air Station (Cecil)
+KNZY => San Diego, North Island, Naval Air Station (San Diego)
+KO18 => Hanford, Hanford Municipal (Hanford)
+KO64 => Fort Bragg (Fort Bragg)
+KO72 => Point Cabrillo (Point Cabrillo)
+KO87 => Shelter Cove (Shelter Cove)
+KOAJ => Jacksonville (Jacksonville)
+KOAK => Oakland, Metropolitan Oakland (Oakland)
+KOAX => Valley (Valley)
+KOCF => Ocala Municipal (Ocala Municipal)
+KOCH => Nacogdoches (Nacogdoches)
+KOCW => Washington, Warren Field (Washington)
+KODO => Odessa, Odessa-Schlemeyer Field (Odessa)
+KODX => Ord / Sharp Field (Ord)
+KOEB => Coldwater, Branch County Memorial (Coldwater)
+KOEO => Osceola, L O Simenstad Municipal (Osceola)
+KOFF => Omaha / Offutt (Omaha)
+KOFK => Norfolk, Stefan Memorial (Norfolk)
+KOFP => Ashland, Hanover County Municipal (Ashland)
+KOGA => Ogallala, Searle Field (Ogallala)
+KOGB => Orangeburg, Orangeburg Municipal (Orangeburg)
+KOGD => Ogden, Ogden-Hinckley (Ogden)
+KOGS => Ogdensburg (Ogdensburg)
+KOHX => Nashville NEXRAD (Nashville NEXRAD)
+KOJC => Olathe, Johnson County Executive (Olathe)
+KOKB => Oceanside, Oceanside Municipal (Oceanside)
+KOKC => Oklahoma City, Will Rogers World (Oklahoma City)
+KOKH => Oceanside, Oceanside Municipal (Oceanside)
+KOKK => Kokomo (Kokomo)
+KOKV => Winchester Regional (Winchester Regional)
+KOKX => N. Y. City NEXRAD (N. Y. City NEXRAD)
+KOLD => Old Town / Dewitt Field (Old Town)
+KOLE => Olean Municipal (Olean Municipal)
+KOLF => Wolf Point, Clayton (Wolf Point)
+KOLM => Olympia, Olympia (Olympia)
+KOLS => Nogales, Nogales (Nogales)
+KOLU => Columbus Municipal (Columbus Municipal)
+KOLZ => Oelwen (Oelwen)
+KOMA => Omaha, Eppley Airfield (Omaha)
+KOMK => Omak, Omak (Omak)
+KONA => Winona Municipal (Winona Municipal)
+KONL => O'Neill / Baker Field (O'Neill)
+KONM => Socorro Municipal (Socorro Municipal)
+KONO => Ontario, Ontario Municipal (Ontario)
+KONP => Newport Municipal (Newport Municipal)
+KONT => Ontario, Ontario (Ontario)
+KONZ => Detroit/Grosse Ile, Grosse Ile (Detroit/Grosse Ile)
+KOPF => Miami, Opa Locka (Miami)
+KOQT => Oak Ridge (Oak Ridge)
+KOQU => N. Kingston / Quonset (N. Kingston)
+KORB => Orr (Orr)
+KORC => Orange City (Orange City)
+KORD => Chicago, Chicago-O'Hare (Chicago)
+KORE => Orange, Orange Municipal (Orange)
+KORF => Norfolk, Norfolk (Norfolk)
+KORH => Worcester, Worcester Regional (Worcester)
+KORL => Orlando, Orlando Executive (Orlando)
+KOSC => Wurtsmith (Wurtsmith)
+KOSH => Oshkosh, Wittman Regional (Oshkosh)
+KOSU => Columbus, Ohio State University (Columbus)
+KOTG => Worthington (Worthington)
+KOTH => North Bend (North Bend)
+KOTM => Ottumwa, Ottumwa Industrial (Ottumwa)
+KOUN => Norman / Max Westheimer (Norman)
+KOVE => Oroville, Oroville Municipal (Oroville)
+KOVS => Boscobel, Boscobel (Boscobel)
+KOWA => Owatonna (Owatonna)
+KOWB => Owensboro / Daviess (Owensboro)
+KOWD => Norwood, Norwood Memorial (Norwood)
+KOWY => Owyhee (Owyhee)
+KOXB => Ocean City, Ocean City Municipal (Ocean City)
+KOXC => Oxford (Oxford)
+KOXR => Oxnard, Oxnard (Oxnard)
+KOXV => Knoxville (Knoxville)
+KOZR => Cairns Army Air Field / Ozark (Cairns Army Air Field)
+KOZW => Howell, Livingston County (Howell)
+KP00 => Tenneco Platform (Tenneco Platform)
+KP01 => Ajo Municipal (Ajo Municipal)
+KP02 => Poplar Bluff, Mo. (Poplar Bluff)
+KP06 => Bullhead City (Bullhead City)
+KP07 => Sanderson (Sanderson)
+KP11 => Devils Lake (Devils Lake)
+KP21 => Main Pass B68 (Main Pass B68)
+KP22 => Vermilion B131 (Vermilion B131)
+KP24 => Roseglen (Roseglen)
+KP25 => Vermilion B215 (Vermilion B215)
+KP26 => Grand Isle B95 (Grand Isle B95)
+KP28 => Medicine Lodge, Medicine Lodge (Medicine Lodge)
+KP30 => West Cameron (West Cameron)
+KP35 => Spickard (Spickard)
+KP38 => Caliente (Caliente)
+KP39 => Pequot Lake (Pequot Lake)
+KP43 => Ventura (Ventura)
+KP44 => Santa Barbara (Santa Barbara)
+KP47 => Chetco River (Chetco River)
+KP58 => Port Hope (Port Hope)
+KP59 => Copper (Copper)
+KP60 => Yellowstone Lake (Yellowstone Lake)
+KP61 => Grand Marais (Grand Marais)
+KP65 => Lukeville (Lukeville)
+KP67 => Lidgerwood Remote Automatic Meteorological Observing System (Lidgerwood Remote Automatic Meteorological Observing System)
+KP68 => Eureka (Eureka)
+KP69 => Lowell (Lowell)
+KP75 => Manistique (Manistique)
+KP88 => Rome Automatic Meteorological Observing System (Rome Automatic Meteorological Observing System)
+KP92 => Salt Point (Salt Point)
+KPAE => Everett, Snohomish County (Everett)
+KPAH => Paducah, Barkley Regional (Paducah)
+KPAM => Tyndall (Tyndall)
+KPAO => Palo Alto (Palo Alto)
+KPAQ => Palmer, Palmer Municipal (Palmer)
+KPBF => Pine Bluff, Grider Field (Pine Bluff)
+KPBG => Plattsburgh (Plattsburgh)
+KPBH => Phillips / Price County (Phillips)
+KPBI => West Palm Beach, Palm Beach (West Palm Beach)
+KPBV => St. George Island, New St. George (St. George Island)
+KPBZ => Pittsburgh Nexrad (Pittsburgh Nexrad)
+KPCU => Picayune / Pearl River (Picayune)
+KPDC => Prairie Du Chien, Prairie Du Chien Municipal (Prairie Du Chien)
+KPDK => Atlanta, De Kalb-Peachtree (Atlanta)
+KPDT => Pendleton, Eastern Oregon Regional At Pendleton (Pendleton)
+KPDX => Portland, Portland (Portland)
+KPEF => Peterson (Peterson)
+KPEO => Penn Yan, Penn Yan (Penn Yan)
+KPFC => Pacific City State (Pacific City State)
+KPFN => Panama City, Panama City-Bay County (Panama City)
+KPGA => Page, Page Municipal (Page)
+KPGD => Punta Gorda, Charlotte County (Punta Gorda)
+KPGL => Pascagoula / Jackson (Pascagoula)
+KPGV => Pitt-Greenville (Pitt-Greenville)
+KPHD => New Philadelphia, Harry Clever Field (New Philadelphia)
+KPHF => Newport News, Newport News / Williamsburg (Newport News)
+KPHL => Philadelphia, Philadelphia (Philadelphia)
+KPHN => St. Clair County (St. Clair County)
+KPHP => Philip, Philip (Philip)
+KPHX => Phoenix, Phoenix Sky (Phoenix)
+KPIA => Peoria, Greater Peoria Regional (Peoria)
+KPIB => Pine Belt Regional (Pine Belt Regional)
+KPIE => St. Petersburg / Clearwater, St. Petersburg / Clearwater (St. Petersburg)
+KPIH => Pocatello, Pocatello Regional (Pocatello)
+KPIL => Port Isabel, Port Isabel-Cameron County (Port Isabel)
+KPIR => Pierre, Pierre Regional (Pierre)
+KPIT => Pittsburgh, Pittsburgh (Pittsburgh)
+KPJB => Payson (Payson)
+KPJI => Point Judith (Point Judith)
+KPKB => Parkersburg / Wilson (Parkersburg)
+KPKD => Park Rapids, Park Rapids Municipal (Park Rapids)
+KPKF => Park Falls (Park Falls)
+KPLB => Plattsburgh, Clinton County (Plattsburgh)
+KPLN => Pellston, Pellston Regional (Pellston)
+KPMD => Palmdale, Palmdale Production Flight Plant (Palmdale)
+KPMP => Pompano Beach, Pompano Beach Airpark (Pompano Beach)
+KPNC => Ponca City, Ponca City Municipal (Ponca City)
+KPNE => Philadelphia, Northeast Philadelphia (Philadelphia)
+KPNM => Princeton (Princeton)
+KPNS => Pensacola, Pensacola Regional (Pensacola)
+KPOB => Pope (Pope)
+KPOC => La Verne / Brackett (La Verne)
+KPOE => Fort Polk (Fort Polk)
+KPOF => Poplar Bluff, Poplar Bluff Municipal (Poplar Bluff)
+KPOU => Poughkeepsie, Dutchess County (Poughkeepsie)
+KPPF => Parsons, Tri-City (Parsons)
+KPQI => Presque Isle (Presque Isle)
+KPQL => Pascagoula, Lott (Pascagoula)
+KPQN => Pipestone (Pipestone)
+KPRB => Paso Robles, Paso Robles Municipal (Paso Robles)
+KPRC => Prescott, Love Field (Prescott)
+KPRX => Paris / Cox Field (Paris)
+KPSC => Pasco, Tri-Cities (Pasco)
+KPSF => Pittsfield, Pittsfield Municipal (Pittsfield)
+KPSK => Dublin / New River Valley (Dublin)
+KPSM => Pease / Portsmouth (Pease)
+KPSP => Palm Springs, Palm Springs Regional (Palm Springs)
+KPSX => Palacios Municipal (Palacios Municipal)
+KPTB => Petersburg (Petersburg)
+KPTK => Pontiac, Oakland County (Pontiac)
+KPTN => Patterson Memorial (Patterson Memorial)
+KPTT => Pratt Municipal (Pratt Municipal)
+KPTV => Porterville (Porterville)
+KPTW => Pottstown, Pottstown Limerick (Pottstown)
+KPUB => Pueblo, Pueblo Memorial (Pueblo)
+KPUC => Price, Carbon County (Price)
+KPUW => Pullman / Moscow, Pullman / Moscow Regional (Pullman)
+KPUX => Pueblo NEXRAD (Pueblo NEXRAD)
+KPVC => Provincetown (Provincetown)
+KPVD => Providence, Green State (Providence)
+KPVU => Provo Municipal (Provo Municipal)
+KPWA => Oklahoma City, Wiley Post (Oklahoma City)
+KPWC => Pine River, Pine River Regional (Pine River)
+KPWG => Mc Gregor (Mc Gregor)
+KPWK => Chicago / Wheeling, Pal-Waukee (Chicago)
+KPWM => Portland, Portland Jetport (Portland)
+KPWT => Bremerton National (Bremerton National)
+KPYM => Plymouth, Plymouth Municipal (Plymouth)
+KPZQ => Presque Isle / Rogers (Presque Isle)
+KRAC => Racine, Batten (Racine)
+KRAD => Warroad (Warroad)
+KRAL => Riverside, Riverside Municipal (Riverside)
+KRAP => Rapid City, Rapid City Regional (Rapid City)
+KRAX => Raleigh NEXRAD (Raleigh NEXRAD)
+KRBD => Dallas, Redbird (Dallas)
+KRBG => Roseburg, Roseburg Regional (Roseburg)
+KRBL => Red Bluff, Red Bluff Municipal (Red Bluff)
+KRCA => Ellsworth (Ellsworth)
+KRDD => Redding, Redding Municipal (Redding)
+KRDG => Reading, Reading Regional (Reading)
+KRDK => Red Oak (Red Oak)
+KRDM => Redmond (Redmond)
+KRDR => Grand Forks (Grand Forks)
+KRDU => Raleigh / Durham, Raleigh-Durham (Raleigh)
+KRED => Red Lodge (Red Lodge)
+KREE => Reese / Lubbock (Reese)
+KREO => Rome, Rome (Rome)
+KRFD => Rockford, Greater Rockford (Rockford)
+KRGK => Red Wing, Red Wing Municipal (Red Wing)
+KRGX => Reno NEXRAD (Reno NEXRAD)
+KRHI => Rhinelander, Rhinelander-Oneida County (Rhinelander)
+KRHV => San Jose / Reid / Hillv (San Jose)
+KRIC => Richmond, Richmond (Richmond)
+KRIE => Rice Lake Municipal (Rice Lake Municipal)
+KRIL => Rifle, Garfield County Regional (Rifle)
+KRIV => Riverside / March (Riverside)
+KRIW => Riverton, Riverton Regional (Riverton)
+KRJO => San Marcos (San Marcos)
+KRKD => Rockland / Knox (Rockland)
+KRKP => Rockport, Aransas County (Rockport)
+KRKS => Rock Springs (Rock Springs)
+KRLX => Charleston (Charleston)
+KRME => Griffiss / Rome (Griffiss)
+KRMG => Rome, R. B. Russell (Rome)
+KRMY => Marshall, Brooks Field (Marshall)
+KRND => Randolph (Randolph)
+KRNH => New Richmond, New Richmond Municipal (New Richmond)
+KRNM => Ramona, Ramona (Ramona)
+KRNO => Reno, Reno Tahoe (Reno)
+KRNT => Renton, Renton Municipal (Renton)
+KROA => Roanoke, Roanoke Regional (Roanoke)
+KROC => Rochester, Greater Rochester (Rochester)
+KROG => Rogers (Rogers)
+KROS => Rush City, Rush City Regional (Rush City)
+KROW => Roswell, Roswell Industrial Air Center (Roswell)
+KROX => Roseau Municipal (Roseau Municipal)
+KRPD => Rice Lake, Rice Lake Regional-Carl's Field (Rice Lake)
+KRPE => Sabine Pass (Sabine Pass)
+KRQB => Big Rapids, Roben-Hood (Big Rapids)
+KRQE => Window Rock, Window Rock (Window Rock)
+KRRF => New Port Richey, Tampa Bay Executive (New Port Richey)
+KRRL => Merrill, Merrill Municipal (Merrill)
+KRRT => Warroad, Warroad-Swede Carlston Field (Warroad)
+KRSL => Russell, Russell Municipal (Russell)
+KRST => Rochester, Rochester Municipal (Rochester)
+KRSW => Fort Myers, Southwest Florida (Fort Myers)
+KRTN => Raton, Raton Municipal \ Crews Field (Raton)
+KRTX => Portland NEXRAD (Portland NEXRAD)
+KRUE => Russellville, Russellville Municipal (Russellville)
+KRUM => Rumford (Rumford)
+KRUQ => Salisbury, Rowan County (Salisbury)
+KRUT => Rutland State (Rutland State)
+KRVL => Reedsville / Mifflin (Reedsville)
+KRVS => Tulsa, Jones Jr. (Tulsa)
+KRWF => Redwood Falls, Redwood Falls Municipal (Redwood Falls)
+KRWI => Rocky Mount, Rocky Mount-Wilson (Rocky Mount)
+KRWL => Rawlins Municipal (Rawlins Municipal)
+KRXE => Rexburg, Rexburg-Madison County (Rexburg)
+KRYV => Watertown (Watertown)
+KRZZ => Roanoke Rapids, Halifax County (Roanoke Rapids)
+KS02 => Ship Shoal B224a (Ship Shoal B224a)
+KS06 => Mullan (Mullan)
+KS14 => Spencer (Spencer)
+KS21 => Sunriver (Sunriver)
+KS29 => Salida (Salida)
+KS38 => Burrows Island (Burrows Island)
+KS47 => Tilamook (Tilamook)
+KS53 => Destruction Island (Destruction Island)
+KS58 => South Timbalier (South Timbalier)
+KS65 => Ship Shoal 198g (Ship Shoal 198g)
+KS80 => Grangeville (Grangeville)
+KS88 => Arlington (Arlington)
+KSAC => Sacramento, Sacramento Executive (Sacramento)
+KSAD => Safford, Safford Municipal (Safford)
+KSAF => Santa Fe, Santa Fe County Municipal (Santa Fe)
+KSAN => San Diego, San Diego-Lindbergh Field (San Diego)
+KSAT => San Antonio, San Antonio (San Antonio)
+KSAV => Savannah, Savannah (Savannah)
+KSAW => Gwinn, Sawyer (Gwinn)
+KSAZ => Staples, Staples Municipal (Staples)
+KSBA => Santa Barbara, Santa Barbara Municipal (Santa Barbara)
+KSBD => Norton / San Bern (Norton)
+KSBM => Sheboygan, Sheboygan County Memorial (Sheboygan)
+KSBN => South Bend, Michiana Regional (South Bend)
+KSBP => San Luis Obispo, San Luis Obispo County-Mc Chesney Field (San Luis Obispo)
+KSBS => Steamboat Springs (Steamboat Springs)
+KSBY => Salisbury, Salisbury-Wicomico County Regional (Salisbury)
+KSCC => Deadhorse, Deadhorse (Deadhorse)
+KSCH => Schenectady (Schenectady)
+KSCK => Stockton, Stockton Metropolitan (Stockton)
+KSDA => Shenandoah Municipal (Shenandoah Municipal)
+KSDB => Sandberg (Sandberg)
+KSDF => Louisville, Standiford Field (Louisville)
+KSDL => Scottsdale, Scottsdale (Scottsdale)
+KSDM => San Diego, Brown Field Municipal (San Diego)
+KSDY => Sidney-Richland (Sidney-Richland)
+KSEA => Seattle, Seattle-Tacoma (Seattle)
+KSEE => San Diego / Gillespie (San Diego)
+KSEG => Selinsgrove, Penn Valley (Selinsgrove)
+KSEM => Craig Field / Selma (Craig Field)
+KSEP => Stephenville / Clark Field Municipal, Tx. (Stephenville)
+KSET => St. Charles, St. Charles County Smartt (St. Charles)
+KSEZ => Sedona (Sedona)
+KSFB => Orlando / Sanford (Orlando)
+KSFD => Winner - Bob Wiley Field (Winner - Bob Wiley Field)
+KSFF => Spokane, Felts Field (Spokane)
+KSFM => Sanford Municipal (Sanford Municipal)
+KSFO => San Francisco, San Francisco (San Francisco)
+KSFQ => Suffolk, Suffolk Municipal (Suffolk)
+KSFZ => Pawtucket (Pawtucket)
+KSGF => Springfield, Springfield Regional (Springfield)
+KSGH => Springfield Municipal (Springfield Municipal)
+KSGJ => St. Augustine, St. Augustine (St. Augustine)
+KSGR => Houston, Sugar Land Municipal/Hull Field (Houston)
+KSGS => South St. Paul, South St. Paul Municipal-Richard E. Fleming Field (South St. Paul)
+KSGT => Stuttgart (Stuttgart)
+KSGU => Saint George (Saint George)
+KSHD => Staunton / Shenandoah (Staunton)
+KSHI => Ashtabula, Ashtabula County (Ashtabula)
+KSHL => Sheldon (Sheldon)
+KSHN => Shelton, Shelton Sanderson Field (Shelton)
+KSHP => Sheppard (Sheppard)
+KSHR => Sheridan, Sheridan County (Sheridan)
+KSHV => Shreveport, Shreveport Regional (Shreveport)
+KSIL => Slidell Radar Site (Slidell Radar Site)
+KSIY => Montague / Siskiyou (Montague)
+KSJC => San Jose, San Jose (San Jose)
+KSJN => St. Johns, St. Johns Industrial Airpark (St. Johns)
+KSJT => San Angelo, Mathis Field (San Angelo)
+KSJU => San Juan, Marin (San Juan)
+KSKA => Fairchild (Fairchild)
+KSKC => Waukesha (Waukesha)
+KSKF => Kelly (Kelly)
+KSKX => Taos Municipal (Taos Municipal)
+KSLB => Storm Lake (Storm Lake)
+KSLC => Salt Lake City, Salt Lake City (Salt Lake City)
+KSLE => Salem, McNary Field (Salem)
+KSLG => Siloam Springs (Siloam Springs)
+KSLI => Los Alamitos U. S. Army Airfield (Los Alamitos U. S. Army Airfield)
+KSLK => Saranac Lake, Adirondack Regional (Saranac Lake)
+KSLN => Salina, Salina Municipal (Salina)
+KSLO => Salem-Leckrone (Salem-Leckrone)
+KSLW => Smithville / Wooster (Smithville)
+KSME => Somerset (Somerset)
+KSMF => Sacramento, Sacramento (Sacramento)
+KSMN => Salmon / Lemhi (Salmon)
+KSMO => Santa Monica, Santa Monica Municipal (Santa Monica)
+KSMP => Stampede Pass (Stampede Pass)
+KSMQ => Somerville, Somerset (Somerville)
+KSMX => Santa Maria, Santa Maria Public (Santa Maria)
+KSNA => Santa Ana, John Wayne-Orange County (Santa Ana)
+KSNP => St. Paul Island, St. Paul Island (St. Paul Island)
+KSNS => Salinas, Salinas Municipal (Salinas)
+KSNT => Stanley (Stanley)
+KSNY => Sidney, Sidney Municipal (Sidney)
+KSOP => Southern Pines (Southern Pines)
+KSOV => Seldovia, Seldovia (Seldovia)
+KSOW => Show Low Municipal (Show Low Municipal)
+KSPA => Spartanburg Memorial (Spartanburg Memorial)
+KSPB => Scappoose, Scappoose Industrial Airpark (Scappoose)
+KSPD => Springfield, Comanche National Grassland (Springfield)
+KSPF => Spearfish / Clyde Ice (Spearfish)
+KSPG => St. Petersburg, Whitted (St. Petersburg)
+KSPI => Springfield, Capital (Springfield)
+KSPS => Wichita Falls, Sheppard (Wichita Falls)
+KSPW => Spencer, Spencer Municipal (Spencer)
+KSQI => Sterling Rockfalls (Sterling Rockfalls)
+KSQL => San Carlos (San Carlos)
+KSRF => Hamilton U. S. Army Airfield (Hamilton U. S. Army Airfield)
+KSRN => South Marsh 268A (South Marsh 268A)
+KSRQ => Sarasota / Bradenton, Sarasota-Bradenton (Sarasota)
+KSRR => Ruidoso Regional (Ruidoso Regional)
+KSSC => Shaw (Shaw)
+KSSF => San Antonio, Stinson Municipal (San Antonio)
+KSSI => Brunswick, McKinnon (Brunswick)
+KSSU => White Sulphur Sprng (White Sulphur Sprng)
+KSTC => St. Cloud, St. Cloud Municipal (St. Cloud)
+KSTE => Stevens Point, Stevens Point Municipal (Stevens Point)
+KSTJ => St. Joseph, Rosecrans Memorial (St. Joseph)
+KSTL => St. Louis, Lambert-St. Louis (St. Louis)
+KSTP => St. Paul, St. Paul Downtown Holman Field (St. Paul)
+KSTS => Santa Rosa, Santa Rosa Sonoma County (Santa Rosa)
+KSTT => Charlotte Amalie, King (Charlotte Amalie)
+KSTX => Christiansted, Hamilton (Christiansted)
+KSUE => Sturgeon Bay (Sturgeon Bay)
+KSUN => Hailey / Friedman Memorial (Hailey)
+KSUS => St. Louis, Spirit Of St. Louis (St. Louis)
+KSUU => Fairfield / Travis (Fairfield)
+KSUW => Superior, Richard I. Bong (Superior)
+KSUX => Sioux City, Sioux Gateway (Sioux City)
+KSVC => Silver City / Grant (Silver City)
+KSVE => Susanville Municipal (Susanville Municipal)
+KSVH => Statesville, Statesville Municipal (Statesville)
+KSVN => Hunter U. S. Army Airfield (Hunter U. S. Army Airfield)
+KSWD => Seward, Seward (Seward)
+KSWF => Newburgh / Stewart (Newburgh)
+KSWO => Stillwater, Stillwater Municipal (Stillwater)
+KSXT => Sexton Summit, (Sexton Summit)
+KSYR => Syracuse, Syracuse Hancock (Syracuse)
+KSZL => Whiteman (Whiteman)
+KSZN => Santa Cruz Island (Santa Cruz Island)
+KT46 => South Brazos A70 (South Brazos A70)
+KT62 => Tooele (Tooele)
+KTAD => Trinidad / Animas Co. (Trinidad)
+KTAL => Tanana, Calhoun Memorial (Tanana)
+KTAN => Taunton, Taunton Municipal (Taunton)
+KTBN => Fort Leonard Wood (Fort Leonard Wood)
+KTBW => Tampa Bay Area (Tampa Bay Area)
+KTCC => Tucumcari, Tucumcari Municipal (Tucumcari)
+KTCL => Tuscaloosa, Tuscaloosa Municipal (Tuscaloosa)
+KTCM => Tacoma / McChord (Tacoma)
+KTCS => Truth Or Consequences, Truth Or Consequences Municipal (Truth Or Consequences)
+KTDO => Toledo-Winlock Memorial (Toledo-Winlock Memorial)
+KTDZ => Toledo, Metcalf Field (Toledo)
+KTEB => Teterboro, Teterboro (Teterboro)
+KTEW => Mason, Mason Jewett Field (Mason)
+KTEX => Telluride Regional (Telluride Regional)
+KTFX => Great Falls Nexrad (Great Falls Nexrad)
+KTHV => York, York (York)
+KTIK => Tinker (Tinker)
+KTIW => Tacoma, Tacoma Narrows (Tacoma)
+KTIX => Titusville (Titusville)
+KTKA => Talkeetna, Talkeetna (Talkeetna)
+KTKI => McKinney, McKinney Municipal (McKinney)
+KTLH => Tallahassee, Tallahassee Regional (Tallahassee)
+KTLX => Oklahoma City Nexrad (Oklahoma City Nexrad)
+KTMB => Miami, Kendall-Tamiami Executive (Miami)
+KTNU => Newton Municipal (Newton Municipal)
+KTNX => Tonopah Test Range (Tonopah Test Range)
+KTOA => Torrance Municipal (Torrance Municipal)
+KTOB => Dodge Center, Dodge Center (Dodge Center)
+KTOI => Troy, Troy Municipal (Troy)
+KTOL => Toledo, Toledo Express (Toledo)
+KTOP => Topeka, Philip Billard Municipal (Topeka)
+KTOR => Torrington, Torrington Municipal (Torrington)
+KTPA => Tampa, Tampa (Tampa)
+KTPH => Tonopah, Tonopah (Tonopah)
+KTPL => Temple / Miller (Temple)
+KTQE => Tekamah, Tekamah Municipal (Tekamah)
+KTRI => Bristol / Johnson / Kingsport, Tri-City Regional (Bristol)
+KTRK => Truckee-Tahoe (Truckee-Tahoe)
+KTRL => Terrell, Terrell Municipal (Terrell)
+KTRM => Palm Springs, Thermal (Palm Springs)
+KTTD => Portland, Portland-Troutdale (Portland)
+KTTF => Monroe, Custer (Monroe)
+KTTN => Trenton, Mercer County (Trenton)
+KTTS => NASA Shuttle Facility (NASA Shuttle Facility)
+KTUL => Tulsa, Tulsa (Tulsa)
+KTUP => Tupelo, Tupelo Municipal-Lemons (Tupelo)
+KTUS => Tucson, Tucson (Tucson)
+KTVC => Traverse City, Cherry Capital (Traverse City)
+KTVF => Thief River (Thief River)
+KTVL => South Lake Tahoe, Lake Tahoe (South Lake Tahoe)
+KTVR => Vicksburg, Vicksburg / Tallulah Regional (Vicksburg)
+KTWF => Twin Falls, Joslin Field-Magic Valley Regional (Twin Falls)
+KTWM => Twos (Twos)
+KTWX => Topeka NEXRAD (Topeka NEXRAD)
+KTXK => Texarkana, Texarkana Regional-Webb Field (Texarkana)
+KTYR => Tyler, Tyler Pounds Field (Tyler)
+KTYS => Knoxville, McGhee Tyson (Knoxville)
+KTZR => Columbus, Bolton Field (Columbus)
+KU15 => Challis, Challis (Challis)
+KU16 => Eagle Range (Eagle Range)
+KU17 => Bullfrog Marina (Bullfrog Marina)
+KU24 => Delta (Delta)
+KU28 => Green River Range (Green River Range)
+KU31 => Austin (Austin)
+KU67 => Roosevelt (Roosevelt)
+KU71 => Vernal (Vernal)
+KU73 => Jerome, Jerome County (Jerome)
+KU78 => Soda Springs / Tigert (Soda Springs)
+KUAO => Aurora, Aurora State (Aurora)
+KUCA => Utica, Oneida County (Utica)
+KUES => Waukesha, Waukesha County (Waukesha)
+KUEX => Grand Island Nexrad (Grand Island Nexrad)
+KUGN => Chicago / Waukegan, Waukegan Regional (Chicago)
+KUIL => Quillayute, Quillayute State (Quillayute)
+KUIN => Quincy Municipal / Baldwin (Quincy Municipal)
+KUKF => North Wilkesboro, Wilkes County (North Wilkesboro)
+KUKI => Ukiah Municipal (Ukiah Municipal)
+KULM => New Ulm Municipal (New Ulm Municipal)
+KUNO => West Plains, West Plains Municipal (West Plains)
+KUNU => Juneau, Dodge County (Juneau)
+KUNV => State College (State College)
+KUTS => Huntsville, Huntsville Municipal (Huntsville)
+KUUU => Newport, Newport State (Newport)
+KUZA => Rock Hill, Rock Hill - York County (Rock Hill)
+KVAD => Moody (Moody)
+KVAY => Mount Holly, South Jersey Regional (Mount Holly)
+KVBG => Vandenberg (Vandenberg)
+KVBT => Bentonville (Bentonville)
+KVCB => Vacaville, Nut Tree (Vacaville)
+KVCT => Victoria, Victoria Regional (Victoria)
+KVCV => George / Victorvi (George)
+KVDI => Vidalia, Vidalia Municipal (Vidalia)
+KVEL => Vernal, Vernal (Vernal)
+KVGT => Las Vegas, North Las Vegas (Las Vegas)
+KVIH => Rolla / Vichy, Rolla National (Rolla)
+KVIS => Visalia Municipal (Visalia Municipal)
+KVJI => Abingdon (Abingdon)
+KVKS => Vicksburg Municipal (Vicksburg Municipal)
+KVLD => Valdosta Regional (Valdosta Regional)
+KVNY => Van Nuys, Van Nuys (Van Nuys)
+KVOK => Volk / Camp Douglas (Volk)
+KVPC => Cartersville, Cartersville (Cartersville)
+KVPS => Valparaiso / Eglin (Valparaiso)
+KVPZ => Valparaiso, Porter County Municipal (Valparaiso)
+KVQN => Volens (Volens)
+KVRB => Vero Beach, Vero Beach Municipal (Vero Beach)
+KVRX => Vermillion Area (Vermillion Area)
+KVSF => Springfield, Hartness State Springfield (Springfield)
+KVTA => Newark, Newark Heath (Newark)
+KVTN => Valentine, Miller Field (Valentine)
+KVTX => Los Angeles Nexrad (Los Angeles Nexrad)
+KVUO => Vancouver, Pearson Airpark (Vancouver)
+KVUW => Eugene Island (Eugene Island)
+KVVV => Ortonville, Ortonville Muncipal-Martinson Field (Ortonville)
+KVWU => Waskish, Waskish Municipal (Waskish)
+KW08 => Weirwood / Kellam Field (Weirwood)
+KW30 => Ocean City (Ocean City)
+KW39 => Norfolk / Chesapeak (Norfolk)
+KW44 => Asheboro, Asheboro Municipal (Asheboro)
+KW51 => Cape Charles (Cape Charles)
+KW63 => Clarksville / Marks (Clarksville)
+KW71 => Smith Point / Sunnybank (Smith Point)
+KW76 => West Cameron B522 (West Cameron B522)
+KW77 => Sanford, Sanford-Lee County Brick Field (Sanford)
+KW99 => Petersburg, Grant County (Petersburg)
+KWAL => Wallops Island, Wallops Flight Facility (Wallops Island)
+KWDD => Belle River (Belle River)
+KWDG => Enid / Woodring Municipal (Enid)
+KWEY => West Yellowstone (West Yellowstone)
+KWJF => Lancaster / Fox Field (Lancaster)
+KWLD => Winfield / Arkansas City, Strother Field (Winfield)
+KWMC => Winnemucca, Winnemucca Municipal (Winnemucca)
+KWRB => Warner Robins (Warner Robins)
+KWRI => Mcguire (Mcguire)
+KWRL => Worland, Worland Municipal (Worland)
+KWST => Westerly, Westerly State (Westerly)
+KWVI => Watsonville, Watsonville Municipal (Watsonville)
+KWVL => Waterville (Waterville)
+KWWD => Wildwood (Wildwood)
+KWWR => West Woodward (West Woodward)
+KWYS => West Yellowstone (West Yellowstone)
+KX53 => Clewiston (Clewiston)
+KX80 => Jupiter Inlet (Jupiter Inlet)
+KX81 => Lake Worth Inlet (Lake Worth Inlet)
+KX82 => Fort Pierce (Fort Pierce)
+KX84 => Islamorada (Islamorada)
+KX86 => Fowey Rocks (Fowey Rocks)
+KX87 => Miami Beach (Miami Beach)
+KX88 => Marathon (Marathon)
+KX89 => Ft. Myers Beach (Ft. Myers Beach)
+KX90 => Venice Long Range Navigation (Venice Long Range Navigation)
+KX91 => Egmont Key (Egmont Key)
+KXCN => Green Canyon 184 (Green Canyon 184)
+KXMR => Cape Kennedy (Cape Kennedy)
+KXNA => Fayetteville/Springdale, Northwest Arkansas Regional (Fayetteville/Springdale)
+KXVG => Longville, Longville Municipal (Longville)
+KXVW => Vandenberg Range (Vandenberg Range)
+KY12 => Airlake (Airlake)
+KY22 => Lemmon (Lemmon)
+KY26 => Mobridge (Mobridge)
+KYAK => Yakutat, Yakutat (Yakutat)
+KYIP => Detroit, Willow Run (Detroit)
+KYKM => Yakima, Yakima Air Terminal (Yakima)
+KYKN => Yankton (Yankton)
+KYLD => Chapleau A (Chapleau A)
+KYNG => Youngstown, Youngstown-Warren Regional (Youngstown)
+KYUM => Yuma / Yuma (Yuma)
+KZAB => Albuquerque Radar Site (Albuquerque Radar Site)
+KZLC => Salt Lake City (Salt Lake City)
+KZSE => Auburn (Auburn)
+KZZV => Zanesville, Zanesville Municipal (Zanesville)
+LATI => Tirana (Tirana)
+LBBG => Burgas (Burgas)
+LBGO => Gorna Orechovista (Gorna Orechovista)
+LBPD => Plovdiv (Plovdiv)
+LBRS => Rousse (Rousse)
+LBSF => Sofia Observ. (Sofia Observ.)
+LBWN => Varna (Varna)
+LCEN => Ercan (Ercan)
+LCLK => Larnaca (Larnaca)
+LCNC => Athalassa (Athalassa)
+LCPH => Paphos (Paphos)
+LCRA => Akrotiri (Akrotiri)
+LDDD => Zagreb / Maksimir (Zagreb)
+LDDU => Dubrovnik / Cilipi (Dubrovnik)
+LDOC => Cepin (Cepin)
+LDOR => Slavonski Brod (Slavonski Brod)
+LDPL => Pula Aerodrome (Pula Aerodrome)
+LDRI => Rijeka / Omisalj (Rijeka)
+LDSH => Hvar (Hvar)
+LDSP => Split / Resnik (Split)
+LDVA => Varazdin (Varazdin)
+LDZA => Zagreb / Pleso (Zagreb)
+LDZD => Zadar / Zemunik (Zadar)
+LEAB => Albacete / Los Llanos (Albacete)
+LEAL => Alicante / El Altet (Alicante)
+LEAM => Almeria / Aeropuerto (Almeria)
+LEAS => Asturias / Aviles (Asturias)
+LEBA => Cordoba / Aeropuerto (Cordoba)
+LEBB => Bilbao / Sondica (Bilbao)
+LEBG => Burgos / Villafria (Burgos)
+LEBL => Barcelona / Aeropuerto (Barcelona)
+LEBZ => Badajoz / Talavera La Real (Badajoz)
+LECH => Calamocha (Calamocha)
+LECO => La Coruna / Alvedro (La Coruna)
+LECV => Madri-Colmenar (Madri-Colmenar)
+LEGE => Gerona / Costa Brava (Gerona)
+LEGR => Granada / Aeropuerto (Granada)
+LEGT => Madrid / Getafe (Madrid)
+LEHI => Hinojosa Del Duque (Hinojosa Del Duque)
+LEIB => Ibiza / Es Codola (Ibiza)
+LEJR => Jerez De La Fronteraaeropuerto (Jerez De La Fronteraaeropuerto)
+LELC => Murcia / San Javier (Murcia)
+LELL => Sabadell (Sabadell)
+LELN => Leon / Virgen Del Camino (Leon)
+LELO => Logrono / Agoncillo (Logrono)
+LEMD => Madrid / Barajas (Madrid)
+LEMG => Malaga / Aeropuerto (Malaga)
+LEMH => Menorca / Mahon (Menorca)
+LEMO => Moron De La Frontera (Moron De La Frontera)
+LEPA => Palma De Mallorca / Son San Juan (Palma De Mallorca)
+LEPP => Pamplona / Noain (Pamplona)
+LERI => Murcia / Alcantarilla (Murcia)
+LERS => Reus / Aeropuerto (Reus)
+LERT => Rota (Rota)
+LESA => Salamanca / Matacan (Salamanca)
+LESO => San Sebastian / Fuenterrabia (San Sebastian)
+LEST => Santiago / Labacolla (Santiago)
+LETO => Madrid / Torrejon (Madrid)
+LEVC => Valencia / Aeropuerto (Valencia)
+LEVD => Valladolid / Villanubla (Valladolid)
+LEVS => Madrid / Cuatro Vientos (Madrid)
+LEVT => Vitoria (Vitoria)
+LEVX => Vigo / Peinador (Vigo)
+LEXJ => Santander / Parayas (Santander)
+LEZA => Zaragoza United States Air Force Operated Base In Foreign Country (Zaragoza United States Air Force Operated Base In Foreign Country)
+LEZG => Zaragoza / Aeropuerto (Zaragoza)
+LEZL => Sevilla / San Pablo (Sevilla)
+LFAT => Le Touquet (Le Touquet)
+LFBA => Agen (Agen)
+LFBC => Cazaux (Cazaux)
+LFBD => Bordeaux / Merignac (Bordeaux)
+LFBE => Bergerac (Bergerac)
+LFBF => Toulouse / Francazal (Toulouse)
+LFBG => Cognac (Cognac)
+LFBH => La Rochelle (La Rochelle)
+LFBI => Poitiers (Poitiers)
+LFBK => Montlucon / Gueret (Montlucon)
+LFBL => Limoges (Limoges)
+LFBM => Mont-De-Marsan (Mont-De-Marsan)
+LFBN => Niort (Niort)
+LFBO => Toulouse / Blagnac (Toulouse)
+LFBP => Pau (Pau)
+LFBS => Biscarosse (Biscarosse)
+LFBT => Tarbes / Ossun (Tarbes)
+LFBV => Brive (Brive)
+LFBX => Perigueux (Perigueux)
+LFBY => Dax (Dax)
+LFBZ => Biarritz (Biarritz)
+LFCG => St-Girons (St-Girons)
+LFCI => Albi (Albi)
+LFCR => Rodez (Rodez)
+LFDH => Auch (Auch)
+LFFS => Suippes Range Met (Suippes Range Met)
+LFHP => Le Puy (Le Puy)
+LFIG => Cassagnes-Begonhes (Cassagnes-Begonhes)
+LFJL => Metz-Nancy-Lorraine (Metz-Nancy-Lorraine)
+LFKB => Bastia (Bastia)
+LFKC => Calvi (Calvi)
+LFKF => Figari (Figari)
+LFKJ => Ajaccio (Ajaccio)
+LFKS => Solenzara (Solenzara)
+LFLA => Auxerre (Auxerre)
+LFLB => Chambery / Aix-Les-Bains (Chambery)
+LFLC => Clermont-Ferrand (Clermont-Ferrand)
+LFLD => Bourges (Bourges)
+LFLL => Lyon / Satolas (Lyon)
+LFLM => Macon (Macon)
+LFLN => Saint-Yan (Saint-Yan)
+LFLQ => Montelimar (Montelimar)
+LFLS => Grenoble / St. Geoirs (Grenoble)
+LFLV => Vichy (Vichy)
+LFLW => Aurillac (Aurillac)
+LFLX => Chateauroux (Chateauroux)
+LFLY => Lyon / Bron (Lyon)
+LFMA => Aix Les Milles (Aix Les Milles)
+LFMC => Le Luc (Le Luc)
+LFMD => Cannes (Cannes)
+LFME => Nimes / Courbessac (Nimes)
+LFMH => St-Etienne Boutheon (St-Etienne Boutheon)
+LFMI => Istres (Istres)
+LFMK => Carcassonne (Carcassonne)
+LFML => Marseille / Marignane (Marseille)
+LFMN => Nice (Nice)
+LFMO => Orange (Orange)
+LFMP => Perpignan (Perpignan)
+LFMT => Montpellier (Montpellier)
+LFMU => Beziers / Vias (Beziers)
+LFMX => St-Auban-Sur-Durance (St-Auban-Sur-Durance)
+LFMY => Salon (Salon)
+LFNB => Mende / Brenoux (Mende)
+LFOB => Beauvais (Beauvais)
+LFOC => Chateaudun (Chateaudun)
+LFOE => Evreux (Evreux)
+LFOF => Alencon (Alencon)
+LFOH => La Heve (La Heve)
+LFOI => Abbeville (Abbeville)
+LFOJ => Orleans (Orleans)
+LFOP => Rouen (Rouen)
+LFOR => Chartres (Chartres)
+LFOS => Vittefleur / St. Vale (Vittefleur)
+LFOT => Tours (Tours)
+LFOW => Saint-Quentin (Saint-Quentin)
+LFPB => Paris / Le Bourget (Paris)
+LFPC => Creil Fafb (Creil Fafb)
+LFPG => Paris-Aeroport Charles De Gaulle (Paris-Aeroport Charles De Gaulle)
+LFPM => Melun (Melun)
+LFPN => Toussus Le Noble (Toussus Le Noble)
+LFPO => Paris-Orly (Paris-Orly)
+LFPV => Villacoublay (Villacoublay)
+LFPW => Paris Met Center (Paris Met Center)
+LFQB => Troyes (Troyes)
+LFQG => Nevers (Nevers)
+LFQH => Chatillon-Sur-Seine (Chatillon-Sur-Seine)
+LFQI => Cambrai (Cambrai)
+LFQQ => Lille (Lille)
+LFQV => Charleville (Charleville)
+LFRA => Angers (Angers)
+LFRB => Brest (Brest)
+LFRC => Cherbourg / Maupertus (Cherbourg)
+LFRD => Dinard (Dinard)
+LFRH => Lann Bihoue (Lann Bihoue)
+LFRI => La Roche-Sur-Yon (La Roche-Sur-Yon)
+LFRJ => Landivisiau (Landivisiau)
+LFRK => Caen (Caen)
+LFRL => Lanveoc Poulmic (Lanveoc Poulmic)
+LFRM => Le Mans (Le Mans)
+LFRN => Rennes (Rennes)
+LFRO => Lannion / Servel (Lannion)
+LFRQ => Quimper (Quimper)
+LFRS => Nantes (Nantes)
+LFRT => Saint-Brieuc (Saint-Brieuc)
+LFRU => Morlaix / Ploujean (Morlaix)
+LFRZ => St-Nazaire (St-Nazaire)
+LFSA => Besancon (Besancon)
+LFSB => Bale-Mulhouse (Bale-Mulhouse)
+LFSC => Colmar (Colmar)
+LFSD => Dijon (Dijon)
+LFSF => Metz / Frescaty (Metz)
+LFSI => St-Dizier (St-Dizier)
+LFSL => Toul / Rosieres (Toul)
+LFSN => Nancy / Essey (Nancy)
+LFSO => Nancy / Ochey (Nancy)
+LFSQ => Belfort (Belfort)
+LFSR => Reims (Reims)
+LFST => Strasbourg (Strasbourg)
+LFSX => Luxeuil (Luxeuil)
+LFTH => Hyeres (Hyeres)
+LFTU => St-Raphael (St-Raphael)
+LFTW => Nimes / Garons (Nimes)
+LFVP => Saint-Pierre (Saint-Pierre)
+LFXA => Amberieu (Amberieu)
+LFXI => Airport (Airport)
+LFYR => Romorantin (Romorantin)
+LGAD => Andravida (Andravida)
+LGAL => Alexandroupoli (Alexandroupoli)
+LGAT => Athinai (Athinai)
+LGBL => Anchialos (Anchialos)
+LGEL => Elefsis (Elefsis)
+LGHI => Chios (Chios)
+LGIR => Heraklion (Heraklion)
+LGKA => Kastoria (Kastoria)
+LGKF => Kefalhnia (Kefalhnia)
+LGKL => Kalamata (Kalamata)
+LGKO => Kos (Kos)
+LGKR => Kerkyra (Kerkyra)
+LGKV => Chrysoupoli (Chrysoupoli)
+LGKZ => Kozani (Kozani)
+LGLM => Limnos (Limnos)
+LGLR => Larissa (Larissa)
+LGMT => Mytilini (Mytilini)
+LGPZ => Aktion (Aktion)
+LGRD => Rhodes / Maritsa (Rhodes)
+LGRP => Rhodes (Rhodes)
+LGRX => Araxos (Araxos)
+LGSA => Souda (Souda)
+LGSK => Skiathos Island (Skiathos Island)
+LGSM => Samos (Samos)
+LGSR => Santorini Island (Santorini Island)
+LGTG => Tanagra (Tanagra)
+LGTP => Tripolis (Tripolis)
+LGTS => Thessaloniki (Thessaloniki)
+LGTT => Tatoi (Tatoi)
+LGZA => Zakinthos (Zakinthos)
+LHBC => Bekescsaba (Bekescsaba)
+LHBM => Budapest Met Center (Budapest Met Center)
+LHBP => Budapest / Ferihegy (Budapest)
+LHBS => Budaors (Budaors)
+LHDC => Debrecen (Debrecen)
+LHKE => Kecskemet (Kecskemet)
+LHKV => Kaposvar (Kaposvar)
+LHMC => Miskolc (Miskolc)
+LHNY => Nyiregyhaza / Napkor (Nyiregyhaza)
+LHPA => Papa (Papa)
+LHPP => Pecs / Pogany (Pecs)
+LHSA => Azentkilyszabadja (Azentkilyszabadja)
+LHSK => Siofok (Siofok)
+LHSN => Szolnok (Szolnok)
+LHSY => Szombathely (Szombathely)
+LHTA => Taszar (Taszar)
+LHTL => Tokol (Tokol)
+LHUD => Szeged (Szeged)
+LIBA => Amendola (Amendola)
+LIBC => Crotone (Crotone)
+LIBD => Bari / Palese Macchie (Bari)
+LIBE => Monte S. Angelo (Monte S. Angelo)
+LIBG => Grottaglie (Grottaglie)
+LIBH => Marina Di Ginosa (Marina Di Ginosa)
+LIBN => Lecce (Lecce)
+LIBP => Pescara (Pescara)
+LIBQ => Monte Scuro (Monte Scuro)
+LIBR => Brindisi (Brindisi)
+LIBS => Campobasso (Campobasso)
+LIBT => Termoli (Termoli)
+LIBU => Latronico (Latronico)
+LIBV => Gioia Del Colle (Gioia Del Colle)
+LIBW => Bonifati (Bonifati)
+LIBY => S. Maria Di Leuca (S. Maria Di Leuca)
+LIBZ => Potenza (Potenza)
+LICA => Lamezia Terme (Lamezia Terme)
+LICB => Comiso As Usaf (Comiso As Usaf)
+LICC => Catania / Fontanarossa (Catania)
+LICD => Lampedusa (Lampedusa)
+LICE => Enna (Enna)
+LICF => Messina (Messina)
+LICG => Pantelleria (Pantelleria)
+LICJ => Palermo / Punta Raisi (Palermo)
+LICL => Gela (Gela)
+LICM => Calopezzati (Calopezzati)
+LICO => Cozzo Spadaro (Cozzo Spadaro)
+LICP => Palermo Boccadifalco (Palermo Boccadifalco)
+LICR => Reggio Calabria (Reggio Calabria)
+LICT => Trapani / Birgi (Trapani)
+LICU => Ustica (Ustica)
+LICZ => Catania / Sigonella (Catania)
+LIEA => Alghero (Alghero)
+LIEB => Capo Bellavista (Capo Bellavista)
+LIEC => Capo Carbonara (Capo Carbonara)
+LIED => Decimomannu (Decimomannu)
+LIEE => Cagliari / Elmas (Cagliari)
+LIEF => Capo Frasca (Capo Frasca)
+LIEG => Guardiavecchia (Guardiavecchia)
+LIEH => Capo Caccia (Capo Caccia)
+LIEL => Capo S. Lorenzo (Capo S. Lorenzo)
+LIEN => Fonni (Fonni)
+LIEO => Olbia / Costa Smeralda (Olbia)
+LIEP => Perdasdefogu (Perdasdefogu)
+LIMC => Milano / Malpensa (Milano)
+LIME => Bergamo / Orio Al Serio (Bergamo)
+LIMF => Torino / Caselle (Torino)
+LIMG => Albenga (Albenga)
+LIMH => Pian Rosa (Pian Rosa)
+LIMJ => Genova / Sestri (Genova)
+LIMK => Torino / Bric Della Croce (Torino)
+LIML => Milano / Linate (Milano)
+LIMN => Novara / Cameri (Novara)
+LIMO => Monte Bisbino (Monte Bisbino)
+LIMS => Piacenza (Piacenza)
+LIMT => Passo Della Cisa (Passo Della Cisa)
+LIMU => Capo Mele (Capo Mele)
+LIMV => Passo Dei Giovi (Passo Dei Giovi)
+LIMY => Monte Malanotte (Monte Malanotte)
+LIPA => Aviano (Aviano)
+LIPB => Bolzano (Bolzano)
+LIPC => Cervia (Cervia)
+LIPD => Udine / Campoformido (Udine)
+LIPE => Bologna / Borgo Panigale (Bologna)
+LIPF => Ferrara (Ferrara)
+LIPH => Treviso / S. Angelo (Treviso)
+LIPI => Udine / Rivolto (Udine)
+LIPK => Forli (Forli)
+LIPL => Brescia / Ghedi (Brescia)
+LIPP => Dova Area Control Center (Dova Area Control Center)
+LIPQ => Ronchi Dei Legionari (Ronchi Dei Legionari)
+LIPR => Rimini (Rimini)
+LIPS => Treviso / Istrana (Treviso)
+LIPT => Vicenza (Vicenza)
+LIPX => Verona / Villafranca (Verona)
+LIPY => Falconara (Falconara)
+LIPZ => Venezia / Tessera (Venezia)
+LIQB => Arezzo (Arezzo)
+LIQC => Capri (Capri)
+LIQD => Porretta Pass (Porretta Pass)
+LIQI => Gran Sasso Mountain Range (Gran Sasso Mountain Range)
+LIQJ => Civitavecchia (Civitavecchia)
+LIQK => Capo Palinuro (Capo Palinuro)
+LIQN => Rieti (Rieti)
+LIQO => Monte Argentario (Monte Argentario)
+LIQP => Isola Di Palmaria (Isola Di Palmaria)
+LIQR => Radicofani (Radicofani)
+LIQV => Volterra (Volterra)
+LIQW => Sarzana / Luni (Sarzana)
+LIQZ => Ponza (Ponza)
+LIRA => Roma / Ciampino (Roma)
+LIRB => Vigna Di Valle (Vigna Di Valle)
+LIRE => Pratica Di Mare (Pratica Di Mare)
+LIRF => Roma Fiumicino (Roma Fiumicino)
+LIRG => Guidonia (Guidonia)
+LIRH => Frosinone (Frosinone)
+LIRI => Pontecagnano (Pontecagnano)
+LIRJ => M. Calamita (M. Calamita)
+LIRK => Monte Terminillo (Monte Terminillo)
+LIRL => Latina (Latina)
+LIRM => Grazzanise (Grazzanise)
+LIRN => Napoli / Capodichino (Napoli)
+LIRP => Pisa / S. Giusto (Pisa)
+LIRQ => Firenze / Peretola (Firenze)
+LIRS => Grosseto (Grosseto)
+LIRT => Trevico (Trevico)
+LIRU => Roma / Urbe (Roma)
+LIRV => Viterbo (Viterbo)
+LIRZ => Perugia (Perugia)
+LIVC => Monte Cimone (Monte Cimone)
+LIVD => Dobbiaco (Dobbiaco)
+LIVE => Resia Pass (Resia Pass)
+LIVF => Frontone (Frontone)
+LIVM => Punta Marina (Punta Marina)
+LIVO => Tarvisio (Tarvisio)
+LIVP => Paganella (Paganella)
+LIVR => Passo Rolle (Passo Rolle)
+LIVT => Trieste (Trieste)
+LIYW => Aviano Usaf (Aviano Usaf)
+LJLJ => Ljubljana / Brnik (Ljubljana)
+LJMB => Maribor / Slivnica (Maribor)
+LJMS => Murska Sobota (Murska Sobota)
+LJPZ => Portoroz (Portoroz)
+LKHO => Holesov (Holesov)
+LKKV => Karlovy Vary (Karlovy Vary)
+LKKZ => Kosice (Kosice)
+LKMT => Ostrava / Mosnov (Ostrava)
+LKPP => Piestany (Piestany)
+LKPR => Praha / Ruzyne (Praha)
+LKSL => Sliac (Sliac)
+LKTB => Brno / Turany (Brno)
+LLBG => Ben-Gurion (Ben-Gurion)
+LLBS => Beer-Sheva (Beer-Sheva)
+LLET => Eilat (Eilat)
+LLHA => Sde-Haifa Haifa (Sde-Haifa Haifa)
+LLJR => Jerusalem (Jerusalem)
+LLOV => Ovda (Ovda)
+LMML => Luqa (Luqa)
+LOLW => Wels (Wels)
+LOWG => Graz-Thalerhof-Flughafen (Graz-Thalerhof-Flughafen)
+LOWI => Innsbruck-Flughafen (Innsbruck-Flughafen)
+LOWK => Klagenfurt-Flughafen (Klagenfurt-Flughafen)
+LOWL => Linz / Hoersching-Flughafen (Linz)
+LOWS => Salzburg-Flughafen (Salzburg-Flughafen)
+LOWW => Wien / Schwechat-Flughafen (Wien)
+LOXA => Aigen Im Ennstal (Aigen Im Ennstal)
+LOXL => Horsching Aus-Afb (Horsching Aus-Afb)
+LOXS => Schwaz Heliport (Schwaz Heliport)
+LOXT => Tulln (Tulln)
+LOXZ => Zeltweg (Zeltweg)
+LPAZ => Santa Maria Acores (Santa Maria Acores)
+LPBG => Braganca (Braganca)
+LPBJ => Beja (Beja)
+LPFL => Flores Acores (Flores Acores)
+LPFR => Faro / Aeroporto (Faro)
+LPFU => Funchal / S. Catarina (Funchal)
+LPHR => Horta / Castelo Branco Acores (Horta)
+LPLA => Lajes Acores (Lajes Acores)
+LPPD => Ponta Delgada / Nordela Acores (Ponta Delgada)
+LPPR => Porto / Pedras Rubras (Porto)
+LPPS => Porto Santo (Porto Santo)
+LPPT => Lisboa / Portela (Lisboa)
+LPVR => Vila Real (Vila Real)
+LQBI => Bihac (Bihac)
+LQBK => Banja Luka (Banja Luka)
+LQLV => Livno (Livno)
+LQMO => Mostar (Mostar)
+LQSA => Sarajevo / Butmir (Sarajevo)
+LQTZ => Tuzla (Tuzla)
+LRAR => Arad (Arad)
+LRBC => Bacau (Bacau)
+LRBM => Baia Mare (Baia Mare)
+LRBS => Bucuresti / Imh (Bucuresti)
+LRCK => Kogalniceanu (Kogalniceanu)
+LRCL => Cluj-Napoca (Cluj-Napoca)
+LRCS => Caransebes (Caransebes)
+LRCV => Craiova (Craiova)
+LRIA => Iasi (Iasi)
+LROD => Oradea (Oradea)
+LROP => Bucuresti Otopeni (Bucuresti Otopeni)
+LRSB => Sibiu (Sibiu)
+LRSM => Satu Mare (Satu Mare)
+LRSV => Suceava / Salcea (Suceava)
+LRTC => Tulcea (Tulcea)
+LRTM => Tirgu Mures (Tirgu Mures)
+LRTR => Timisoara (Timisoara)
+LSGG => Geneve-Cointrin (Geneve-Cointrin)
+LSGL => Lausanne (Lausanne)
+LSGN => Neuchatel (Neuchatel)
+LSGS => Sion (Sion)
+LSMP => Payerne (Payerne)
+LSZA => Lugano (Lugano)
+LSZB => Bern / Belp (Bern)
+LSZH => Zurich-Kloten (Zurich-Kloten)
+LTAB => Ankara / Guvercin Lik (Ankara)
+LTAC => Ankara / Esenboga (Ankara)
+LTAD => Ankara / Etimesgut (Ankara)
+LTAE => Murted Tur-Afb (Murted Tur-Afb)
+LTAF => Adana / Sakirpasa (Adana)
+LTAG => Adana / Incirlik (Adana)
+LTAH => Afyon (Afyon)
+LTAI => Antalya (Antalya)
+LTAJ => Gaziantep (Gaziantep)
+LTAK => Iskenderun (Iskenderun)
+LTAN => Konya (Konya)
+LTAP => Merzifon (Merzifon)
+LTAQ => Samsun (Samsun)
+LTAR => Sivas (Sivas)
+LTAS => Zonguldak (Zonguldak)
+LTAT => Malatya / Erhac (Malatya)
+LTAU => Kayseri / Erkilet (Kayseri)
+LTAV => Sivrihisar (Sivrihisar)
+LTAW => Tokat (Tokat)
+LTAY => Cardak (Cardak)
+LTBA => Istanbul / Ataturk (Istanbul)
+LTBD => Aydin (Aydin)
+LTBE => Bursa (Bursa)
+LTBF => Balikesir (Balikesir)
+LTBG => Bandirma (Bandirma)
+LTBH => Canakkale (Canakkale)
+LTBI => Eskisehir (Eskisehir)
+LTBJ => Izmir / Adnan Menderes (Izmir)
+LTBL => Izmir / Cigli (Izmir)
+LTBM => Isparta (Isparta)
+LTBO => Usak (Usak)
+LTBQ => Topel Tur-Afb (Topel Tur-Afb)
+LTBS => Dalaman (Dalaman)
+LTBT => Akhisar (Akhisar)
+LTBU => Corlu (Corlu)
+LTBV => Bodrum (Bodrum)
+LTCA => Elazig (Elazig)
+LTCC => Diyarbakir (Diyarbakir)
+LTCD => Erzincan (Erzincan)
+LTCE => Erzurum (Erzurum)
+LTCF => Kars (Kars)
+LTCG => Trabzon (Trabzon)
+LTCH => Urfa (Urfa)
+LTCI => Van (Van)
+LTCJ => Batman (Batman)
+LTCK => Mus Tur-Afb (Mus Tur-Afb)
+LTFA => Izmir \ Kaklic (Izmir \ Kaklic)
+LWOH => Ohrid (Ohrid)
+LWSK => Skopje-Petrovec (Skopje-Petrovec)
+LXGB => Gibraltar (Gibraltar)
+LYBE => Beograd / Surcin (Beograd)
+LYLJ => Ljubljana / Brnik (Ljubljana)
+LYNI => Nis (Nis)
+LYPG => Podgorica Titograd (Podgorica Titograd)
+LYPR => Pristina (Pristina)
+LYPZ => Portoroz / Secovlje (Portoroz)
+LYTI => Podgorica / Golubovci (Podgorica)
+LYTV => Tivat (Tivat)
+LYVR => Vrsac (Vrsac)
+LZIB => Bratislava Ivanka (Bratislava Ivanka)
+LZTT => Poprad / Tatry (Poprad)
+MDBH => Barahona (Barahona)
+MDLR => La Romana (La Romana)
+MDPC => Punta Cana (Punta Cana)
+MDPP => Puerto Plata (Puerto Plata)
+MDSD => Las Americas (Las Americas)
+MDSI => San Isidro (San Isidro)
+MDST => Santiago (Santiago)
+MGFL => Flores (Flores)
+MGGT => Guatemala Aeropuertola Aurora (Guatemala Aeropuertola Aurora)
+MGHT => Huehuetenango (Huehuetenango)
+MGPB => Puerto Barrios (Puerto Barrios)
+MGQZ => Quezaltenango (Quezaltenango)
+MGSJ => San Jose (San Jose)
+MGZA => Zacapa (Zacapa)
+MHAM => Amapala (Amapala)
+MHCA => Catacamas (Catacamas)
+MHCH => Choluteca (Choluteca)
+MHIC => Islas Del Cisne (Islas Del Cisne)
+MHLC => La Ceiba (La Ceiba)
+MHLE => La Esperanza (La Esperanza)
+MHLM => La Mesa San Pedro Sula (La Mesa San Pedro Sula)
+MHNJ => Guanaja (Guanaja)
+MHPL => Puerto Lempira (Puerto Lempira)
+MHRO => Roatan (Roatan)
+MHSC => Nueva Ocotepeque (Nueva Ocotepeque)
+MHSR => Santa Rosa De Copan (Santa Rosa De Copan)
+MHTE => Tela (Tela)
+MHTG => Tegucigalpa (Tegucigalpa)
+MHYR => Yoro (Yoro)
+MKJP => Kingston / Norman Manley (Kingston)
+MKJS => Montego Bay / Sangster (Montego Bay)
+MMAA => Acapulco / G. Alvarez (Acapulco)
+MMAN => Aerop.rnacional Monterrey, N. L. (Aerop.rnacional Monterrey)
+MMAS => Aguascalientes, Ags. (Aguascalientes)
+MMBT => Bahias De Huatulco (Bahias De Huatulco)
+MMCB => Cuernavaca, Mor. (Cuernavaca)
+MMCE => Ciudad Del Carmen (Ciudad Del Carmen)
+MMCL => Culiacan, Sin. (Culiacan)
+MMCM => Chetumal, Q. Roo (Chetumal)
+MMCN => Santa Rosalia, B. C. S. (Santa Rosalia)
+MMCP => Campeche, Camp. (Campeche)
+MMCS => Ciudad Juarez (Ciudad Juarez)
+MMCU => Chihuahua (Chihuahua)
+MMCV => Ciudad Victoria (Ciudad Victoria)
+MMCZ => Cozumel Civ / Mil (Cozumel Civ)
+MMDO => Durango (Durango)
+MMEP => Tepic, Nay. (Tepic)
+MMGL => Don Miguel / Guadalaj (Don Miguel)
+MMGM => Guaymas (Guaymas)
+MMHO => Hermosillo, Son. (Hermosillo)
+MMIA => Colima (Colima)
+MMIO => Saltillo, Coah. (Saltillo)
+MMLC => Lazaro Cardenas (Lazaro Cardenas)
+MMLM => Los Mochis (Los Mochis)
+MMLO => Del Bajio / Leon (Del Bajio)
+MMLP => La Paz (La Paz)
+MMLT => Loreto, B. C. S. (Loreto)
+MMMA => Matamoros (Matamoros)
+MMMD => Aerop.rnacional Merida, Yuc (Aerop.rnacional Merida)
+MMML => Mexicali (Mexicali)
+MMMM => Morelia New (Morelia New)
+MMMT => Minatitlan (Minatitlan)
+MMMV => Monclova, Coah. (Monclova)
+MMMX => Mexico City / Licenci (Mexico City)
+MMMY => Monterrey / Gen Maria (Monterrey)
+MMMZ => Mazatlan / G. Buelna (Mazatlan)
+MMNL => Nuevo Laredo (Nuevo Laredo)
+MMOX => Oaxaca / Xoxocotlan (Oaxaca)
+MMPB => Puebla, Pue. (Puebla)
+MMPG => Piedras Negras, Coah. (Piedras Negras)
+MMPN => Uruapan / Gen Rayon (Uruapan)
+MMPR => Puerto Vallarta / Lic (Puerto Vallarta)
+MMPS => Puerto Escondido (Puerto Escondido)
+MMQT => Queretaro, Qro. (Queretaro)
+MMRX => Reynosa (Reynosa)
+MMSD => San Jose Del Cabo (San Jose Del Cabo)
+MMSP => San Luis Potosi, S. L. P. (San Luis Potosi)
+MMTC => Torreon, Coah. (Torreon)
+MMTG => Tuxtla Gutierrez, Chis. (Tuxtla Gutierrez)
+MMTJ => Tijuana (Tijuana)
+MMTL => Tulancingo (Tulancingo)
+MMTM => Tampico / Gen Fj Mina (Tampico)
+MMTO => Toluca / Jose Maria (Toluca)
+MMTP => Tapachula (Tapachula)
+MMUN => Cancun (Cancun)
+MMVA => Villahermosa (Villahermosa)
+MMVR => Gen. Heriberto Jara (Gen. Heriberto Jara)
+MMZC => Zacatecas (Zacatecas)
+MMZH => Ixtapa-Zihuatanejo (Ixtapa-Zihuatanejo)
+MMZO => Manzanillo (Manzanillo)
+MMZP => Zapopan Military (Zapopan Military)
+MNBL => Bluefields (Bluefields)
+MNCH => Chinandega (Chinandega)
+MNJG => Jinotega (Jinotega)
+MNJU => Juigalpa (Juigalpa)
+MNMG => Managua A. C. Sandino (Managua A. C. Sandino)
+MNPC => Puerto Cabezas (Puerto Cabezas)
+MNRS => Rivas (Rivas)
+MPBO => Bocas Del Toro (Bocas Del Toro)
+MPDA => David (David)
+MPFS => Ft Sherman Rocob (Ft Sherman Rocob)
+MPHO => Howard (Howard)
+MPLB => Albrook Afs / Balboa (Albrook Afs)
+MPMG => Marcos A. Gelabert (Marcos A. Gelabert)
+MPNU => Augusto Vergara (Augusto Vergara)
+MPSA => Santiago (Santiago)
+MPTO => Tocumen (Tocumen)
+MRCH => Chacarita (Chacarita)
+MRLB => Liberia (Liberia)
+MRLM => Puerto Limon (Puerto Limon)
+MRNC => Nicoya (Nicoya)
+MROC => Juan Santamaria (Juan Santamaria)
+MRPM => Palmar Sur (Palmar Sur)
+MRPV => Tobias Bolanos (Tobias Bolanos)
+MSAC => Acajutla (Acajutla)
+MSLP => El Salvador. / Comalapa (El Salvador.)
+MSSA => Santa Ana / El Palmar (Santa Ana)
+MSSM => San Miguel / El Papalon (San Miguel)
+MSSS => San Salvador / Ilopango (San Salvador)
+MTCH => Cap-Haitien (Cap-Haitien)
+MTPP => Port-Au-Prince / Aeroport (Port-Au-Prince)
+MUBA => Baracoa, Oriente (Baracoa)
+MUBY => Bayamo (Bayamo)
+MUCA => Venezuela, Ciego De Avila (Venezuela)
+MUCF => Cienfuegos, Las Villas (Cienfuegos)
+MUCL => Cayo Largo Del Sur (Cayo Largo Del Sur)
+MUCM => Camaguey Aeropuerto (Camaguey Aeropuerto)
+MUCU => Santiago De Cuba, Oriente (Santiago De Cuba)
+MUGM => Guantanamo, Oriente (Guantanamo)
+MUGT => Guantanamo, Oriente (Guantanamo)
+MUHA => Aeropuerto Jose Marti, Rancho-Boyeros, Habana (Aeropuerto Jose Marti)
+MUHG => Holguin Civ / Mil (Holguin Civ)
+MUMO => Moa Military (Moa Military)
+MUMZ => Manzanillo, Oriente (Manzanillo)
+MUNG => Nueva Gerona, Isla De Pinos (Nueva Gerona)
+MUPR => Pinar Del Rio, Pinar Del Rio (Pinar Del Rio)
+MUVR => Varadero, Matanzas (Varadero)
+MUVT => Las Tunas, Las Tunas (Las Tunas)
+MWCR => Owen Robertsgrand Cayman (Owen Robertsgrand Cayman)
+MYBS => Alice Town, Bimini (Alice Town)
+MYEG => George Town, Exuma (George Town)
+MYGF => Freeport, Grand Bahama (Freeport)
+MYGW => West End, Grand Bahama (West End)
+MYIG => Matthew Town, Inagua (Matthew Town)
+MYNN => Nassau (Nassau)
+MYSM => Cockburn Town, San Salvador (Cockburn Town)
+MZBZ => Belize / Phillip Goldston. (Belize)
+NCRG => Rarotonga (Rarotonga)
+NEXC => Charleston, Navelexcen (Charleston)
+NFFN => Nandi (Nandi)
+NFNA => Nausori (Nausori)
+NFNK => Lakemba (Lakemba)
+NFNR => Rotuma (Rotuma)
+NFTF => Fua'Amotu (Fua'Amotu)
+NFTL => Haapai (Haapai)
+NGBR => Beru (Beru)
+NGFO => Nanumea (Nanumea)
+NGFU => Funafuti (Funafuti)
+NGTA => Tarawa (Tarawa)
+NGTR => Arorae (Arorae)
+NGTU => Butaritari (Butaritari)
+NIUE => Alofi / Niue (Alofi)
+NLWF => Maopoopo Ile Futuna (Maopoopo Ile Futuna)
+NLWW => Hihifo Ile Wallis (Hihifo Ile Wallis)
+NSAP => Apia / Upolu Island (Apia)
+NSFA => Faleolo / Apia (Faleolo)
+NSTU => Pago Pago / Airp. (Pago Pago)
+NTAA => Tahiti-Faaa (Tahiti-Faaa)
+NTAT => Tubuai (Tubuai)
+NTTB => Bora-Bora (Bora-Bora)
+NTTG => Rangiroa / Tuamoto Island (Rangiroa)
+NTTO => Hao (Hao)
+NTTX => Mururoa (Mururoa)
+NVSC => Sola Vanua Lava (Sola Vanua Lava)
+NVSL => Lamap Malekula (Lamap Malekula)
+NVSS => Pekoa Santo (Pekoa Santo)
+NVVV => Bauerfield Efate (Bauerfield Efate)
+NWWE => Moue Ile Des Pins (Moue Ile Des Pins)
+NWWK => Koumac Nlle-Caledonie (Koumac Nlle-Caledonie)
+NWWL => Ouanaham Ile Lifou (Ouanaham Ile Lifou)
+NWWN => Noumea Nlle-Caledonie (Noumea Nlle-Caledonie)
+NWWR => La Roche Ile Mare (La Roche Ile Mare)
+NWWV => Ouloup Ile Ouvea (Ouloup Ile Ouvea)
+NWWW => La Tontouta Nlle-Caledonie (La Tontouta Nlle-Caledonie)
+NZAA => Auckland (Auckland)
+NZCH => Christchurch (Christchurch)
+NZCI => Chatham Island (Chatham Island)
+NZCM => Williams Field (Williams Field)
+NZDN => Dunedin Aerodrome (Dunedin Aerodrome)
+NZGS => Gisborne Aerodrome (Gisborne Aerodrome)
+NZHK => Hokitika Aerodrome (Hokitika Aerodrome)
+NZKI => Kaikoura (Kaikoura)
+NZNP => New Plymouth Aerodrome (New Plymouth Aerodrome)
+NZNV => Invercargill Aerodrome (Invercargill Aerodrome)
+NZOH => Ohakea (Ohakea)
+NZPP => Paraparaumu Aerodrome (Paraparaumu Aerodrome)
+NZRN => Raoul Island, Kermadec Island (Raoul Island)
+NZRO => Rotorua Aerodrome (Rotorua Aerodrome)
+NZTG => Tauranga Aerodrome Aws (Tauranga Aerodrome Aws)
+NZWN => Wellington (Wellington)
+NZWP => Whenuapai (Whenuapai)
+OAFR => Farah (Farah)
+OAFZ => Faizabad (Faizabad)
+OAHR => Herat (Herat)
+OAJL => Jalalabad (Jalalabad)
+OAJS => Jabul-Saraj (Jabul-Saraj)
+OAMS => Mazar-I-Sharif (Mazar-I-Sharif)
+OASD => Shindand (Shindand)
+OASG => Shebirghan (Shebirghan)
+OAZB => Zebak (Zebak)
+OAZG => Zaranj (Zaranj)
+OBBI => Bahrain (Bahrain)
+OEAB => Abha (Abha)
+OEAH => Al Ahsa (Al Ahsa)
+OEBA => Al Baha (Al Baha)
+OEBH => Bisha (Bisha)
+OEDR => Dhahran (Dhahran)
+OEDW => Dawadmi (Dawadmi)
+OEGN => Gizan (Gizan)
+OEGS => Gassim (Gassim)
+OEGT => Guriat (Guriat)
+OEHL => Hail (Hail)
+OEJB => Jubail Naval (Jubail Naval)
+OEJD => Jeddah (Jeddah)
+OEJN => Jeddah King Abdul Aziz (Jeddah King Abdul Aziz)
+OEKK => Hafr Al-Batin (Hafr Al-Batin)
+OEKM => Khamis Mushait (Khamis Mushait)
+OEMA => Madinah (Madinah)
+OEMK => Makkah (Makkah)
+OENG => Najran (Najran)
+OEPA => Al Qaysumah (Al Qaysumah)
+OERF => Rafha (Rafha)
+OERK => King Khaled (King Khaled)
+OERR => Arar (Arar)
+OERY => Riyadh (Riyadh)
+OESH => Sharurah (Sharurah)
+OESK => Al-Jouf (Al-Jouf)
+OETB => Tabuk (Tabuk)
+OETF => Taif (Taif)
+OETR => Turaif (Turaif)
+OEWD => Wadi Al Dawasser (Wadi Al Dawasser)
+OEWJ => Wejh (Wejh)
+OEYN => Yenbo (Yenbo)
+OIAA => Abadan (Abadan)
+OIAG => Omidieh (Omidieh)
+OIAH => Gach Saran Du Gunbadan (Gach Saran Du Gunbadan)
+OIAI => Masjed-Soleyman (Masjed-Soleyman)
+OIAW => Ahwaz (Ahwaz)
+OIBB => Bushehr Civ / Afb (Bushehr Civ)
+OIBL => Bandar Lengeh (Bandar Lengeh)
+OICC => Kermanshah (Kermanshah)
+OICG => Ghasre-Shirin (Ghasre-Shirin)
+OICS => Sanandaj (Sanandaj)
+OIFK => Kashan (Kashan)
+OIFM => Esfahan (Esfahan)
+OIFS => Shahre-Kord (Shahre-Kord)
+OIGG => Rasht (Rasht)
+OIHR => Arak (Arak)
+OIII => Tehran-Mehrabad (Tehran-Mehrabad)
+OIIK => Ghazvin (Ghazvin)
+OIIS => Semnan (Semnan)
+OIKB => Bandarabbass (Bandarabbass)
+OIKK => Kerman (Kerman)
+OIKM => Bam (Bam)
+OIMB => Birjand (Birjand)
+OIMH => Torbat-Heydarieh (Torbat-Heydarieh)
+OIMM => Mashhad (Mashhad)
+OIMN => Bojnourd (Bojnourd)
+OIMS => Sabzevar (Sabzevar)
+OIMT => Tabas (Tabas)
+OING => Gorgan (Gorgan)
+OINR => Ramsar (Ramsar)
+OISA => Abadeh (Abadeh)
+OISF => Fasa (Fasa)
+OISS => Shiraz (Shiraz)
+OITK => Khoy (Khoy)
+OITR => Orumieh (Orumieh)
+OITS => Saghez (Saghez)
+OITT => Tabriz (Tabriz)
+OITZ => Zanjan (Zanjan)
+OIYY => Yazd (Yazd)
+OIZB => Zabol (Zabol)
+OIZC => Chahbahar (Chahbahar)
+OIZH => Zahedan (Zahedan)
+OIZI => Iranshahr (Iranshahr)
+OIZJ => Jask (Jask)
+OJAI => Queen Alia (Queen Alia)
+OJAM => Amman (Amman)
+OJAQ => Aqaba (Aqaba)
+OJBD => Irbid (Irbid)
+OJHF => H-5'Safawi (H-5'Safawi)
+OJHR => H-4'Irwaished (H-4'Irwaished)
+OJMF => Mafraq (Mafraq)
+OJMN => Ma'An (Ma'An)
+OKBK => Kuwaitairport (Kuwaitairport)
+OLBA => Beyrouth Aeroport (Beyrouth Aeroport)
+OMAA => Abu Dhabi (Abu Dhabi)
+OMAB => Buhasa (Buhasa)
+OMAD => Abu Dhabi Bateen (Abu Dhabi Bateen)
+OMAL => Al Ain (Al Ain)
+OMDB => Dubai (Dubai)
+OMFJ => Fujairah (Fujairah)
+OMRK => Ras Al Khaimah (Ras Al Khaimah)
+OMSJ => Sharjah (Sharjah)
+OOBR => Buraimi (Buraimi)
+OOFD => Fahud (Fahud)
+OOKB => Khassab (Khassab)
+OOMA => Masirah (Masirah)
+OOMS => Seeb, (Seeb)
+OOSA => Salalah (Salalah)
+OOSH => Sohar Majis ( Sohar Majis)
+OOSQ => Saiq (Saiq)
+OOSR => Sur (Sur)
+OOTH => Thumrait (Thumrait)
+OPDI => Dera Ismail Khan (Dera Ismail Khan)
+OPJA => Jacobabad (Jacobabad)
+OPJI => Jiwani (Jiwani)
+OPKC => Karachi (Karachi)
+OPKD => Hyderabad (Hyderabad)
+OPLA => Lahore (Lahore)
+OPLH => Lahore City (Lahore City)
+OPMI => Mianwali (Mianwali)
+OPMT => Multan (Multan)
+OPNH => Nawabshah (Nawabshah)
+OPPG => Panjgur (Panjgur)
+OPPS => Peshawar (Peshawar)
+OPQT => Quetta (Quetta)
+OPRN => Islamabad (Islamabad)
+OPRS => Risalpur (Risalpur)
+OPSB => Sibi (Sibi)
+OPSR => Sargodha (Sargodha)
+ORBB => Baghdad (Baghdad)
+ORBM => Mosul (Mosul)
+ORBS => Saddam Irq-Afb / Civ (Saddam Irq-Afb)
+ORMS => Shaibah / Basrah (Shaibah)
+OSAP => Aleppo (Aleppo)
+OSDI => Damascus (Damascus)
+OSDZ => Deir Ezzor (Deir Ezzor)
+OSKL => Kamishli (Kamishli)
+OSLK => Lattakia (Lattakia)
+OSPR => Palmyra (Palmyra)
+OTBD => Doha (Doha)
+OYAA => Aden (Aden)
+OYAR => Riyan (Riyan)
+OYAT => Ataq (Ataq)
+OYHD => Hodeidah (Hodeidah)
+OYMB => Marib (Marib)
+OYMC => Mokha (Mokha)
+OYMK => Mokha (Mokha)
+OYSH => Sa'Ada / Sadah (Sa'Ada)
+OYSN => Sana'A (Sana'A)
+OYSQ => Socotra (Socotra)
+OYSY => Sayun (Sayun)
+OYTZ => Taiz (Taiz)
+OYZM => Al-Hazm (Al-Hazm)
+PAAP => Port Alexander (Port Alexander)
+PAAQ => Palmer (Palmer)
+PABA => Barter Island (Barter Island)
+PABE => Bethel / Bethel (Bethel)
+PABG => Big Delta Arctic Weather (Big Delta Arctic Weather)
+PABI => Fort Greely / Allen U. S. Army Airfield, Ak (Fort Greely)
+PABN => Nabesna / Devil Mountain (Nabesna)
+PABR => Barrow, Post Rogers Memorial (Barrow)
+PABT => Bettles, Bettles (Bettles)
+PABV => Birchwood (Birchwood)
+PACD => Cold Bay, Cold Bay (Cold Bay)
+PACL => Clear (Clear)
+PACP => Cape Saint Elias (Cape Saint Elias)
+PACR => Circle City (Circle City)
+PACS => Cape Sarichef (Cape Sarichef)
+PACV => Cordova / Mile 13 (Cordova)
+PACY => Yakataga (Yakataga)
+PACZ => Cape Romanzoff Airways Facilities Sector (Cape Romanzoff Airways Facilities Sector)
+PADE => Deering, Deering (Deering)
+PADK => Adak, Naval Air Station (Adak)
+PADL => Dillingham Municipal, Ak (Dillingham Municipal)
+PADQ => Kodiak (Kodiak)
+PADT => Slana (Slana)
+PADU => Dutch (Dutch)
+PAEC => Chulitna (Chulitna)
+PAED => Anchorage / Elmendorf (Anchorage)
+PAEH => Cape Newenham Airways Facilities Sector (Cape Newenham Airways Facilities Sector)
+PAEI => Fairbanks / Eielson (Fairbanks)
+PAEL => Elfin Cove Seaplane (Elfin Cove Seaplane)
+PAEM => Emmonak (Emmonak)
+PAEN => Kenai, Kenai Municipal (Kenai)
+PAFA => Fairbanks, Fairbanks (Fairbanks)
+PAFB => Wainwright U. S. Army Airfield (Wainwright U. S. Army Airfield)
+PAFE => Kake Seaplane Base (Kake Seaplane Base)
+PAFM => Ambler (Ambler)
+PAFR => Ft. Richardson / Bryant U. S. Army Heliport, Ak (Ft. Richardson)
+PAFW => Farewell Lake (Farewell Lake)
+PAGA => Galena A. (Galena A.)
+PAGB => Galbraith Lake (Galbraith Lake)
+PAGK => Gulkana, Gulkana (Gulkana)
+PAGM => Gambell (Gambell)
+PAGN => Angoon (Angoon)
+PAGS => Gustavus (Gustavus)
+PAGT => Nightmute (Nightmute)
+PAGY => Skagway (Skagway)
+PAHD => Homer / Municipal (Homer)
+PAHN => Haines, Haines (Haines)
+PAHO => Homer (Homer)
+PAHP => Hooper Bay (Hooper Bay)
+PAHS => Huslia (Huslia)
+PAHV => Healy River (Healy River)
+PAHY => Hydaburg Seaplane (Hydaburg Seaplane)
+PAHZ => Hayes River (Hayes River)
+PAII => Egegik (Egegik)
+PAIK => Kinana / Bob Baker Me (Kinana)
+PAIL => Iliamna / Iliamna (Iliamna)
+PAIM => Indian Mountain Airways Facilities Sector (Indian Mountain Airways Facilities Sector)
+PAIN => McKinley Park (McKinley Park)
+PAIZ => Lazy Mtn / Wolverine (Lazy Mtn)
+PAJB => Biorka Island (Biorka Island)
+PAJN => Juneau, Juneau (Juneau)
+PAJO => Johnstone Point (Johnstone Point)
+PAJV => Sutton (Sutton)
+PAKN => King Salmon, King Salmon (King Salmon)
+PAKO => Nikolski (Nikolski)
+PAKP => Anaktuvuk Pass (Anaktuvuk Pass)
+PAKT => Ketchikan, Ketchikan (Ketchikan)
+PAKU => Kuparuk (Kuparuk)
+PAKV => Kaltag, Kaltag (Kaltag)
+PAKW => Klawock (Klawock)
+PALH => Lake Hood Seaplane (Lake Hood Seaplane)
+PALJ => Port Alsworth (Port Alsworth)
+PALK => Snowshoe Lake (Snowshoe Lake)
+PALR => Chandalar Lake (Chandalar Lake)
+PALU => Cape Lisburne Airways Facilities Sector (Cape Lisburne Airways Facilities Sector)
+PALV => Big River Lake (Big River Lake)
+PAMC => McGrath, McGrath (McGrath)
+PAMD => Middleton Island, Ak (Middleton Island)
+PAMH => Minchumina (Minchumina)
+PAML => Manley Hot Springs (Manley Hot Springs)
+PAMR => Merrill Field (Merrill Field)
+PAMX => McCarthy (McCarthy)
+PAMY => Mekoryuk (Mekoryuk)
+PANC => Anchorage, Anchorage (Anchorage)
+PANI => Aniak (Aniak)
+PANN => Nenana / Mun. (Nenana)
+PANR => Funter Bay Seaplane (Funter Bay Seaplane)
+PANT => Annette Island (Annette Island)
+PANV => Annik (Annik)
+PAOH => Hoonah Seaplane (Hoonah Seaplane)
+PAOM => Nome, Nome (Nome)
+PAOR => Northway, Northway (Northway)
+PAOT => Kotzebue, Wien Memorial (Kotzebue)
+PAPC => Port Clarence (Port Clarence)
+PAPG => Petersburg (Petersburg)
+PAPH => Port Heiden (Port Heiden)
+PAPM => Platinum (Platinum)
+PAPO => Point Hope (Point Hope)
+PAPT => Puntilla (Puntilla)
+PAQT => Nuiqsut, Nuiqsut (Nuiqsut)
+PARC => Arctic Village (Arctic Village)
+PASA => Savoonga (Savoonga)
+PASC => Deadhorse, Deadhorse (Deadhorse)
+PASD => Sand Point (Sand Point)
+PASG => Skagway, Skagway (Skagway)
+PASH => Shishmaref (Shishmaref)
+PASI => Sitka, Sitka (Sitka)
+PASK => Selawik (Selawik)
+PASL => Sleetmute (Sleetmute)
+PASM => Saint Mary's (Saint Mary's)
+PASN => Saint Paul (Saint Paul)
+PASO => Seldovia, Seldovia (Seldovia)
+PASV => Sparrevohn Airways Facilities Sector (Sparrevohn Airways Facilities Sector)
+PASW => Skwentna (Skwentna)
+PASX => Soldotna (Soldotna)
+PASY => Shemya, Eareckson As (Shemya)
+PATA => Tanana, Calhoun Memorial (Tanana)
+PATC => Tin City Airways Facilities Sector (Tin City Airways Facilities Sector)
+PATG => Togiac Village (Togiac Village)
+PATJ => Tok (Tok)
+PATK => Talkeetna (Talkeetna)
+PATL => Tatalina (Tatalina)
+PATW => Cantwell (Cantwell)
+PAUM => Umiat (Umiat)
+PAUN => Unalakleet (Unalakleet)
+PAUO => Willow (Willow)
+PAVD => Valdez 2 (Valdez 2)
+PAVL => Kivalina, Kivalina (Kivalina)
+PAWD => Seward (Seward)
+PAWG => Wrangell (Wrangell)
+PAWI => Wainwright Distant Early Warning (Wainwright Distant Early Warning)
+PAWN => Noatak (Noatak)
+PAWR => Whittier (Whittier)
+PAXK => Paxson (Paxson)
+PAYA => Yakutat (Yakutat)
+PAZK => Eureka (Eureka)
+PBTI => Barter Island Distant Early Warning (Barter Island Distant Early Warning)
+PFYU => Fort Yukon (Fort Yukon)
+PGAC => Guam, Mariana Island (Guam)
+PGNT => Sabanettan / Tinian (Sabanettan)
+PGRO => Rota / Rota Island (Rota)
+PGSN => Saipan / Isley (Saipan)
+PGUA => Andersen (Andersen)
+PGUM => Agana, Gu, Mariana Islands (Agana)
+PGWT => Peipeinimaru (Peipeinimaru)
+PHBK => Kekaha, Pacific Missile Test Facility Barking Sands (Kekaha)
+PHHI => Wheeler / Oahu (Wheeler)
+PHIK => Hickam / Oahu (Hickam)
+PHJH => Lahaina / West Maui (Lahaina)
+PHJR => Oahu, Kalaeloa (Oahu)
+PHKO => Kailua / Kona, Keahole (Kailua)
+PHLI => Lihue, Lihue (Lihue)
+PHMK => Molokai Automatic Meteorological Observing System (Molokai Automatic Meteorological Observing System)
+PHMU => Waimea-Kohala (Waimea-Kohala)
+PHNG => Kaneohe, Marine Corps Air Station (Kaneohe)
+PHNL => Honolulu, Honolulu (Honolulu)
+PHNY => Lanai City (Lanai City)
+PHOG => Kahului, Kahului (Kahului)
+PHSF => Bradshaw Army Air Field / Hawaii (Bradshaw Army Air Field)
+PHTO => Hilo, Hilo (Hilo)
+PHWH => South Kona / Hawaii (South Kona)
+PJON => Johnston Island (Johnston Island)
+PKMJ => Majuro / Marshall Island (Majuro)
+PKWA => Kwajalein / Bucholz (Kwajalein)
+PLCH => Christmas / Cassidy (Christmas)
+PLFA => Fanning Island (Fanning Island)
+PMDY => Midway Island Naval Air Facility (Midway Island Naval Air Facility)
+POLI => Oliktok Distant Early Warning (Oliktok Distant Early Warning)
+PPIZ => Point Lay (Point Lay)
+PTKK => Truk / Moen Island (Truk)
+PTPN => Ponape Island (Ponape Island)
+PTRO => Koror / Palau Island (Koror)
+PTSA => Kusaie / Kosrae East (Kusaie)
+PTTK => Kosrae Carolines / V (Kosrae Carolines)
+PTYA => Yap Island (Yap Island)
+PWAK => Wake Island Airfld (Wake Island Airfld)
+RCAY => Kangshan Tw-Afb (Kangshan Tw-Afb)
+RCBS => Chinmem / Shatou (Chinmem)
+RCDC => Pingtung South (Pingtung South)
+RCFG => Mazu (Mazu)
+RCFN => Feng Nin Tw-Afb (Feng Nin Tw-Afb)
+RCFS => Chia Tung (Chia Tung)
+RCGM => Taoyuan Ab = 589650 (Taoyuan Ab = 589650)
+RCKH => Kaohsiung (Kaohsiung)
+RCKU => Chiayi Tw-Afb (Chiayi Tw-Afb)
+RCKW => Hengchun (Hengchun)
+RCLG => Taichung Tw-Afb (Taichung Tw-Afb)
+RCLM => Dongsha (Dongsha)
+RCLY => Lan Yu (Lan Yu)
+RCMJ => Donggang (Donggang)
+RCMQ => Wuchia Observatory (Wuchia Observatory)
+RCMS => Ilan (Ilan)
+RCNN => Tainan Tw-Afb (Tainan Tw-Afb)
+RCNO => Dongshi (Dongshi)
+RCPO => Hsinchu Tw-Afb (Hsinchu Tw-Afb)
+RCQC => Makung Ab (Makung Ab)
+RCQS => Chihhang Tw-Afb (Chihhang Tw-Afb)
+RCSQ => Pingtung North (Pingtung North)
+RCSS => Sungshan / Taipei (Sungshan)
+RCTP => Chiang Kai Shek (Chiang Kai Shek)
+RCUK => Pa Kuei / Bakuai (Pa Kuei)
+RCYU => Hulien Ab (Hulien Ab)
+RJAA => New Tokyor-National (New Tokyor-National)
+RJAF => Matsumoto (Matsumoto)
+RJAH => Hyakuri Ab (Hyakuri Ab)
+RJAI => Ichikawa (Ichikawa)
+RJAK => Kasumigaura Ab (Kasumigaura Ab)
+RJAM => Minamitorishima (Minamitorishima)
+RJAO => Chichijima (Chichijima)
+RJAT => Fuji Ab (Fuji Ab)
+RJAW => Iwojima (Iwojima)
+RJBB => Kansai (Kansai)
+RJBD => Nankishirahama (Nankishirahama)
+RJBH => Hiroshimanishi (Hiroshimanishi)
+RJBT => Tajima (Tajima)
+RJCA => Asahikawa Ab (Asahikawa Ab)
+RJCB => Obihiro (Obihiro)
+RJCC => Chitose Ab (Chitose Ab)
+RJCH => Hakodate (Hakodate)
+RJCJ => Chitose Japanese Air Self Defense Force (Chitose Japanese Air Self Defense Force)
+RJCK => Kushiro (Kushiro)
+RJCM => Memambetsu (Memambetsu)
+RJCN => Nakashibetsu (Nakashibetsu)
+RJCO => Sapporo Ab (Sapporo Ab)
+RJCR => Rebun Island (Rebun Island)
+RJCS => Kushiro (Kushiro)
+RJCT => Tokachi Japanese Ground Self Defense Force (Tokachi Japanese Ground Self Defense Force)
+RJCW => Wakkanai (Wakkanai)
+RJCY => Muroran (Muroran)
+RJDB => Iki (Iki)
+RJDC => Yamaguchi Ube (Yamaguchi Ube)
+RJDK => Kamigoto (Kamigoto)
+RJDM => Metabaru Ab (Metabaru Ab)
+RJDO => Ojika Island (Ojika Island)
+RJDT => Tsushima (Tsushima)
+RJEB => Mombetsu (Mombetsu)
+RJEC => Asahikawa (Asahikawa)
+RJEO => Okushiri Island (Okushiri Island)
+RJER => Rishiri Island (Rishiri Island)
+RJFA => Ashiya Ab (Ashiya Ab)
+RJFC => Yakushima (Yakushima)
+RJFE => Fukue (Fukue)
+RJFF => Fukuoka (Fukuoka)
+RJFG => Tanegashima (Tanegashima)
+RJFK => Kagoshima (Kagoshima)
+RJFM => Miyazaki (Miyazaki)
+RJFN => Nyutabaru Ab (Nyutabaru Ab)
+RJFO => Oita (Oita)
+RJFR => Kitakyushu (Kitakyushu)
+RJFT => Kumamoto (Kumamoto)
+RJFU => Nagasaki (Nagasaki)
+RJFW => Sasebo Usn (Sasebo Usn)
+RJFY => Kanoya Ab (Kanoya Ab)
+RJFZ => Tsuiki Ab (Tsuiki Ab)
+RJKA => Amami (Amami)
+RJKB => Okinoerabu (Okinoerabu)
+RJKI => Kikai Island (Kikai Island)
+RJKN => Tokunoshima Island (Tokunoshima Island)
+RJNF => Fukui (Fukui)
+RJNG => Gifu Ab (Gifu Ab)
+RJNH => Hamamatsu Ab (Hamamatsu Ab)
+RJNK => Komatsu Ab (Komatsu Ab)
+RJNN => Nagoya (Nagoya)
+RJNO => Oki (Oki)
+RJNT => Toyama (Toyama)
+RJNY => Shizuhama Ab (Shizuhama Ab)
+RJOA => Hiroshima (Hiroshima)
+RJOB => Okayama (Okayama)
+RJOC => Izumo (Izumo)
+RJOE => Akeno Ab (Akeno Ab)
+RJOF => Hofu Ab (Hofu Ab)
+RJOH => Miho Ab (Miho Ab)
+RJOI => Iwakuni Marine Corps Air Station (Iwakuni Marine Corps Air Station)
+RJOK => Kochi (Kochi)
+RJOM => Matsuyama (Matsuyama)
+RJOO => Osaka (Osaka)
+RJOP => Komatsujima Ab (Komatsujima Ab)
+RJOR => Tottori (Tottori)
+RJOS => Tokushima Ab (Tokushima Ab)
+RJOT => Takamatsu (Takamatsu)
+RJOW => Iwami (Iwami)
+RJOY => Yao (Yao)
+RJOZ => Ozuki Ab (Ozuki Ab)
+RJSA => Aomori (Aomori)
+RJSC => Yamagata (Yamagata)
+RJSD => Sado (Sado)
+RJSF => Fukushima (Fukushima)
+RJSH => Hachinohe Ab (Hachinohe Ab)
+RJSI => Hanamaki (Hanamaki)
+RJSK => Akita (Akita)
+RJSM => Misawa Ab (Misawa Ab)
+RJSN => Niigata (Niigata)
+RJSO => Ominato Ab (Ominato Ab)
+RJSS => Sendai (Sendai)
+RJST => Matsushima Ab (Matsushima Ab)
+RJSU => Kasuminome Ab (Kasuminome Ab)
+RJSY => Shonai (Shonai)
+RJTA => Atsugi United States Naval Air Station (Atsugi United States Naval Air Station)
+RJTC => Tachikawa Ab (Tachikawa Ab)
+RJTD => Tokyo (Tokyo)
+RJTE => Tateyama Ab (Tateyama Ab)
+RJTF => Chofu (Chofu)
+RJTH => Hachijojima (Hachijojima)
+RJTI => Tokyo Heliport (Tokyo Heliport)
+RJTJ => Iruma Ab (Iruma Ab)
+RJTK => Kisarazu Ab (Kisarazu Ab)
+RJTL => Shimofusa Ab (Shimofusa Ab)
+RJTO => Oshima (Oshima)
+RJTQ => Miyakejima (Miyakejima)
+RJTR => Zama Airfield (Zama Airfield)
+RJTT => Tokyo (Tokyo)
+RJTU => Utsunomiya Ab (Utsunomiya Ab)
+RJTX => Yokosuka Fwf (Yokosuka Fwf)
+RJTY => Yokota Ab (Yokota Ab)
+RKJJ => Kwangju Ab (Kwangju Ab)
+RKJK => Kunsan Ab (Kunsan Ab)
+RKJY => Yosu (Yosu)
+RKNC => Chunchon Ab (Chunchon Ab)
+RKNF => Whang Ryeong (Whang Ryeong)
+RKNH => Hoengsong Ab (Hoengsong Ab)
+RKNN => Kangnung Ab (Kangnung Ab)
+RKNO => Keo Jin (Keo Jin)
+RKNR => Kotar Range (Kotar Range)
+RKNW => Wonju (Wonju)
+RKPC => Cheju (Cheju)
+RKPK => Pusan / Kimhae (Pusan)
+RKPM => Mosulpo Ab (Mosulpo Ab)
+RKPS => Sach'On Ab (Sach'On Ab)
+RKPU => Ulsan (Ulsan)
+RKSB => Tonghae Radar Site (Tonghae Radar Site)
+RKSC => Sv Ri San (Sv Ri San)
+RKSD => Maesanri (Maesanri)
+RKSF => Seoul / Yongdungp'O Rokaf Wc (Seoul)
+RKSG => Pyongtaek Ab (Pyongtaek Ab)
+RKSH => Command Post Tango (Command Post Tango)
+RKSJ => Taesong-San (Taesong-San)
+RKSL => Seoul (Seoul)
+RKSM => Seoul E Ab (Seoul E Ab)
+RKSO => Osan Ab (Osan Ab)
+RKSP => Paengnyongdo Ab (Paengnyongdo Ab)
+RKSQ => Yeonpyeungdo (Yeonpyeungdo)
+RKSS => Seoul / Kimp'O (Seoul)
+RKST => Camp Casey / Tongduch (Camp Casey)
+RKSU => Yeoju Range (Yeoju Range)
+RKSV => Pyoripsan (Pyoripsan)
+RKSW => Suwon Ab (Suwon Ab)
+RKSX => Camp Stanley / H-207 (Camp Stanley)
+RKSY => Yongsan / H-208 Hp (Yongsan)
+RKTA => Andong (Andong)
+RKTB => Paekado (Paekado)
+RKTD => Taejon Kor-Afb (Taejon Kor-Afb)
+RKTE => Songmu Ab (Songmu Ab)
+RKTF => Taejon (Taejon)
+RKTG => Camp Walker H-805 (Camp Walker H-805)
+RKTH => Pohang Ab (Pohang Ab)
+RKTI => Jung Won Rok-Ab (Jung Won Rok-Ab)
+RKTM => Mangilsan Ab (Mangilsan Ab)
+RKTN => Taegu Ab (Taegu Ab)
+RKTP => Hae Mi (Hae Mi)
+RKTS => Sangju (Sangju)
+RKTT => Taegu (Taegu)
+RKTU => Chongju Ab (Chongju Ab)
+RKTV => Chungju (Chungju)
+RKTW => Woong Cheon (Woong Cheon)
+RKTY => Yechon Ab (Yechon Ab)
+RKXX => Nightmare Range (Nightmare Range)
+ROAH => Naha (Naha)
+RODE => Iejima Auxiliary Ab (Iejima Auxiliary Ab)
+RODN => Kadena Ab (Kadena Ab)
+ROHF => Hamby U. S. Army Airfield (Hamby U. S. Army Airfield)
+ROIG => Ishigakijima (Ishigakijima)
+ROKJ => Kumejima (Kumejima)
+ROMD => Minamidaitojima (Minamidaitojima)
+ROMY => Miyakojima (Miyakojima)
+RORA => Aguni Island (Aguni Island)
+RORH => Hateruma (Hateruma)
+RORK => Kitadaito Island (Kitadaito Island)
+RORS => Shimoji-Shima Island (Shimoji-Shima Island)
+RORT => Tarama Island (Tarama Island)
+RORY => Yoron Island (Yoron Island)
+ROTM => Futenma Marine Corps Air Facility (Futenma Marine Corps Air Facility)
+ROYN => Yonaguni (Yonaguni)
+RPLB => Subic Bay Weather Station (Subic Bay Weather Station)
+RPLI => Laoag (Laoag)
+RPLL => Ninoy Aquinor-National (Ninoy Aquinor-National)
+RPMD => Davao (Davao)
+RPMK => Clark Ab (Clark Ab)
+RPMP => Legaspi (Legaspi)
+RPMR => Romblon (Romblon)
+RPMS => Sangley Point (Sangley Point)
+RPMT => Mactan (Mactan)
+RPMZ => Zamboanga (Zamboanga)
+RPUA => Aparri (Aparri)
+RPUB => Baguio (Baguio)
+RPUD => Daet (Daet)
+RPUH => San Jose (San Jose)
+RPUI => Iba (Iba)
+RPUK => Calapan (Calapan)
+RPUN => Naga / Luzon Island (Naga)
+RPUO => Basco (Basco)
+RPUQ => Vigan (Vigan)
+RPUR => Baler (Baler)
+RPUT => Tuguegarao (Tuguegarao)
+RPUV => Virac (Virac)
+RPUW => Marinduque Island (Marinduque Island)
+RPVA => Tacloban (Tacloban)
+RPVD => Dumaguete (Dumaguete)
+RPVF => Catarman (Catarman)
+RPVG => Guiuan (Guiuan)
+RPVI => Iloilo (Iloilo)
+RPVM => Masbate (Masbate)
+RPVP => Puerto Princesa (Puerto Princesa)
+RPVR => Roxas (Roxas)
+RPVT => Tagbilaran (Tagbilaran)
+RPWB => Gen. Santos (Gen. Santos)
+RPWC => Cotobato (Cotobato)
+RPWE => Butuan (Butuan)
+RPWG => Dipolog (Dipolog)
+RPWL => Cagayan De Oro (Cagayan De Oro)
+RPWS => Surigao (Surigao)
+RPWY => Malaybalay (Malaybalay)
+RPXT => Alabat (Alabat)
+SAAC => Concordia Aerodrome (Concordia Aerodrome)
+SAAG => Gualeguaychu Aerodrome (Gualeguaychu Aerodrome)
+SAAJ => Junin Aerodrome (Junin Aerodrome)
+SAAP => Parana Aerodrome (Parana Aerodrome)
+SAAR => Rosario Aerodrome (Rosario Aerodrome)
+SAAU => Villaguay Aerodrome (Villaguay Aerodrome)
+SAAV => Sauce Viejo Aerodrome (Sauce Viejo Aerodrome)
+SABA => Buenos Aires Observatorio (Buenos Aires Observatorio)
+SABE => Aeroparque Bs. As. Aerodrome (Aeroparque Bs. As. Aerodrome)
+SACI => Pilar Observatorio (Pilar Observatorio)
+SACO => Cordoba Aerodrome (Cordoba Aerodrome)
+SACP => Chepes (Chepes)
+SACT => Gobernador Gordillo (Gobernador Gordillo)
+SACV => Villa De Maria Del Rio Seco (Villa De Maria Del Rio Seco)
+SADD => Don Torcuato Aerodrome (Don Torcuato Aerodrome)
+SADL => La Plata Aerodrome (La Plata Aerodrome)
+SADP => El Palomar Aerodrome (El Palomar Aerodrome)
+SAEZ => Ezeiza Aerodrome (Ezeiza Aerodrome)
+SAME => Mendoza Aerodrome (Mendoza Aerodrome)
+SAMI => San Martin (San Martin)
+SAMJ => Jachal (Jachal)
+SAMM => Malargue Aerodrome (Malargue Aerodrome)
+SAMR => San Rafael Aerodrome (San Rafael Aerodrome)
+SAMS => San Carlos (San Carlos)
+SAMU => Uspallata (Uspallata)
+SANC => Catamarca Aero. (Catamarca Aero.)
+SANE => Santiago Del Estero Aero. (Santiago Del Estero Aero.)
+SANI => Tinogasta (Tinogasta)
+SANL => La Rioja Aero. (La Rioja Aero.)
+SANO => Chilecito (Chilecito)
+SANT => Tucuman Aerodrome (Tucuman Aerodrome)
+SANU => San Juan Aerodrome (San Juan Aerodrome)
+SANW => Ceres Aerodrome (Ceres Aerodrome)
+SAOC => Rio Cuarto Aerodrome (Rio Cuarto Aerodrome)
+SAOD => Villa Dolores Aerodrome (Villa Dolores Aerodrome)
+SAOL => Laboulaye (Laboulaye)
+SAOM => Marcos Juarez Aerodrome (Marcos Juarez Aerodrome)
+SAOR => Villa Reynolds Aerodrome (Villa Reynolds Aerodrome)
+SAOU => San Luis Aerodrome (San Luis Aerodrome)
+SARC => Corrientes Aero. (Corrientes Aero.)
+SARE => Resistencia Aero. (Resistencia Aero.)
+SARF => Formosa Aerodrome (Formosa Aerodrome)
+SARI => Iguazu Aerodrome (Iguazu Aerodrome)
+SARL => Paso De Los Libres Aerodrome (Paso De Los Libres Aerodrome)
+SARM => Monte Caseros Aerodrome (Monte Caseros Aerodrome)
+SARP => Posadas Aero. (Posadas Aero.)
+SARS => Presidencia Roque Saenz Pena Aerodrome (Presidencia Roque Saenz Pena Aerodrome)
+SASA => Salta Aerodrome (Salta Aerodrome)
+SASJ => Jujuy Aerodrome (Jujuy Aerodrome)
+SASO => Oran Aerodrome (Oran Aerodrome)
+SASQ => La Quiaca Observatorio (La Quiaca Observatorio)
+SASR => Rivadavia (Rivadavia)
+SAST => Tartagal Aerodrome (Tartagal Aerodrome)
+SATK => Las Lomitas (Las Lomitas)
+SATU => Curuzu Cuatia Aerodrome (Curuzu Cuatia Aerodrome)
+SAVB => El Bolson Aerodrome (El Bolson Aerodrome)
+SAVC => Comodoro Rivadavia Aerodrome (Comodoro Rivadavia Aerodrome)
+SAVE => Esquel Aerodrome (Esquel Aerodrome)
+SAVO => San Antonio Oeste Aerodrome (San Antonio Oeste Aerodrome)
+SAVP => Paso De Indios (Paso De Indios)
+SAVT => Trelew Aerodrome (Trelew Aerodrome)
+SAVV => Viedma Aerodrome (Viedma Aerodrome)
+SAWA => Lago Argentino Aerodrome (Lago Argentino Aerodrome)
+SAWD => Puerto Deseado Aerodrome (Puerto Deseado Aerodrome)
+SAWE => Rio Grande B. A. (Rio Grande B. A.)
+SAWG => Rio Gallegos Aerodrome (Rio Gallegos Aerodrome)
+SAWH => Ushuaia Aerodrome (Ushuaia Aerodrome)
+SAWJ => San Julian Aerodrome (San Julian Aerodrome)
+SAWP => Perito Moreno Aerodrome (Perito Moreno Aerodrome)
+SAWR => Gobernador Gregores Aerodrome (Gobernador Gregores Aerodrome)
+SAWU => Santa Cruz Aerodrome (Santa Cruz Aerodrome)
+SAZA => Azul (Azul)
+SAZB => Bahia Blanca Aerodrome (Bahia Blanca Aerodrome)
+SAZD => Dolores Aerodrome (Dolores Aerodrome)
+SAZE => Pigue Aerodrome (Pigue Aerodrome)
+SAZG => General Pico Aerodrome (General Pico Aerodrome)
+SAZH => Tres Arroyos (Tres Arroyos)
+SAZM => Mar Del Plata Aerodrome (Mar Del Plata Aerodrome)
+SAZN => Neuquen Aerodrome (Neuquen Aerodrome)
+SAZP => Pehuajo Aerodrome (Pehuajo Aerodrome)
+SAZQ => Rio Colorado (Rio Colorado)
+SAZR => Santa Rosa Aerodrome (Santa Rosa Aerodrome)
+SAZS => Bariloche Aerodrome (Bariloche Aerodrome)
+SAZT => Tandil Aerodrome (Tandil Aerodrome)
+SAZV => Villa Gesell (Villa Gesell)
+SAZY => Chapelco (Chapelco)
+SBAA => Conceicao Do Araguaia (Conceicao Do Araguaia)
+SBAF => Afonsos Aeroporto (Afonsos Aeroporto)
+SBAN => Anapolis Braz-Afb (Anapolis Braz-Afb)
+SBAR => Aracaju Aeroporto (Aracaju Aeroporto)
+SBAT => Alta Floresta Aeroporto (Alta Floresta Aeroporto)
+SBBC => Benjamin Constant (Benjamin Constant)
+SBBE => Belem Aeroporto (Belem Aeroporto)
+SBBG => Bage Aeroporto (Bage Aeroporto)
+SBBH => Belo Horizonte Aeroporto (Belo Horizonte Aeroporto)
+SBBI => Curitiba (Curitiba)
+SBBQ => Barbacena (Barbacena)
+SBBR => Brasilia Aeroporto (Brasilia Aeroporto)
+SBBU => Bauru (Bauru)
+SBBV => Boa Vista Aeropor-To (Boa Vista Aeropor-To)
+SBBW => Barra Do Garcas (Barra Do Garcas)
+SBCC => Cachimbo (Cachimbo)
+SBCF => Belo Horizonte (Belo Horizonte)
+SBCG => Campo Grande Aeroporto (Campo Grande Aeroporto)
+SBCJ => Carajas / Maraba (Carajas)
+SBCO => Porto Alegre (Porto Alegre)
+SBCP => Campos (Campos)
+SBCR => Corumba (Corumba)
+SBCT => Curitiba Aeroporto (Curitiba Aeroporto)
+SBCV => Caravelas Aeropor-To (Caravelas Aeropor-To)
+SBCY => Cuiaba Aeroporto (Cuiaba Aeroporto)
+SBCZ => Cruzeiro Do Sul (Cruzeiro Do Sul)
+SBDN => Presidente Prudente (Presidente Prudente)
+SBEG => Eduardo Gomes (Eduardo Gomes)
+SBEK => Jacareacanga (Jacareacanga)
+SBES => S. P. Aldeia Aerodrome (S. P. Aldeia Aerodrome)
+SBFI => Foz Do Iguacu Aeroporto (Foz Do Iguacu Aeroporto)
+SBFL => Florianopolis Aeroporto (Florianopolis Aeroporto)
+SBFN => Fernando De Noronha (Fernando De Noronha)
+SBFZ => Fortaleza Aeropor-To (Fortaleza Aeropor-To)
+SBGA => Gama (Gama)
+SBGL => Galeao (Galeao)
+SBGO => Goiania Aeroporto (Goiania Aeroporto)
+SBGR => Guarulhos Civ / Mil (Guarulhos Civ)
+SBGW => Guaratingueta (Guaratingueta)
+SBHT => Altamira (Altamira)
+SBIH => Itaituba (Itaituba)
+SBIL => Ilheus Aeroporto (Ilheus Aeroporto)
+SBIZ => Imperatriz (Imperatriz)
+SBJF => Juiz De Fora (Juiz De Fora)
+SBJP => Joao Pessoa (Joao Pessoa)
+SBJR => Rio / Jacarepagua (Rio)
+SBKG => Campina Grande (Campina Grande)
+SBKP => Campinas Aeroporto (Campinas Aeroporto)
+SBLO => Londrina Aeroporto (Londrina Aeroporto)
+SBLP => Bom Jesus Da Lapa (Bom Jesus Da Lapa)
+SBMA => Maraba (Maraba)
+SBME => Macae (Macae)
+SBMG => Maringa (Maringa)
+SBMK => Montes Claros (Montes Claros)
+SBMN => Manaus Aeroporto (Manaus Aeroporto)
+SBMO => Maceio Aeroporto (Maceio Aeroporto)
+SBMQ => Macapa (Macapa)
+SBMS => Mocoro / 17 Rosado (Mocoro)
+SBMT => Marte Civ / Mil (Marte Civ)
+SBMY => Manicore (Manicore)
+SBNT => Natal Aeroporto (Natal Aeroporto)
+SBOI => Oiapoque (Oiapoque)
+SBPA => Porto Alegre Aero-Porto (Porto Alegre Aero-Porto)
+SBPB => Parnaiba Aeroporto (Parnaiba Aeroporto)
+SBPC => Pocos De Caldas (Pocos De Caldas)
+SBPF => Passo Fundo (Passo Fundo)
+SBPG => Paranagua (Paranagua)
+SBPK => Pelotas (Pelotas)
+SBPL => Petrolina Aeropor-To (Petrolina Aeropor-To)
+SBPN => Porto Nacional Aeroporto (Porto Nacional Aeroporto)
+SBPP => Ponta Pora Aeropor-To (Ponta Pora Aeropor-To)
+SBPV => Porto Velho Aeroporto (Porto Velho Aeroporto)
+SBQV => Vitoria Da Conquista (Vitoria Da Conquista)
+SBRB => Rio Branco (Rio Branco)
+SBRF => Recife Aeroporto (Recife Aeroporto)
+SBRJ => Rio De Janeiro Aeroporto (Rio De Janeiro Aeroporto)
+SBRP => Leite Lopes / Ribeir (Leite Lopes)
+SBRS => Resende (Resende)
+SBSA => Sao Carlos (Sao Carlos)
+SBSC => Santa Cruz Aeropor-To (Santa Cruz Aeropor-To)
+SBSJ => Sao Jose Dos Campo (Sao Jose Dos Campo)
+SBSL => Sao Luiz Aeroporto (Sao Luiz Aeroporto)
+SBSM => Santa Maria Aero-Porto (Santa Maria Aero-Porto)
+SBSN => Santarem-Aeroporto (Santarem-Aeroporto)
+SBSP => Sao Paulo Aeropor-To (Sao Paulo Aeropor-To)
+SBST => Santos Aeroporto (Santos Aeroporto)
+SBSV => Salvador Aeroporto (Salvador Aeroporto)
+SBTE => Teresina Aeroporto (Teresina Aeroporto)
+SBTF => Tefe (Tefe)
+SBTK => Tarauaca (Tarauaca)
+SBTT => Tabatinga (Tabatinga)
+SBTU => Tucurui (Tucurui)
+SBUA => Sao Gabriel Da Cachoeira (Sao Gabriel Da Cachoeira)
+SBUF => Paulo Afonso (Paulo Afonso)
+SBUG => Uruguaiana Aeroporto (Uruguaiana Aeroporto)
+SBUL => Uberlandia (Uberlandia)
+SBUR => Uberaba (Uberaba)
+SBVH => Vilhena Aeroporto (Vilhena Aeroporto)
+SBVT => Vitoria Aeroporto (Vitoria Aeroporto)
+SBXV => Xavantina (Xavantina)
+SBYA => Iauarete (Iauarete)
+SBYS => Pirassununga (Pirassununga)
+SCAR => Arica (Arica)
+SCBA => Balmaceda (Balmaceda)
+SCCC => Chile Chico (Chile Chico)
+SCCH => Chillan (Chillan)
+SCCI => Punta Arenas (Punta Arenas)
+SCCY => Coyhaique (Coyhaique)
+SCDA => Iquique / Diego Arac (Iquique)
+SCEL => Pudahuel (Pudahuel)
+SCER => Quintero Santiago (Quintero Santiago)
+SCFA => Antofagasta (Antofagasta)
+SCHA => Copiapo (Copiapo)
+SCHR => Cochrane (Cochrane)
+SCIC => Curico (Curico)
+SCIE => Concepcion (Concepcion)
+SCIP => Isla De Pascua (Isla De Pascua)
+SCLL => Vallenar (Vallenar)
+SCRA => Chanaral (Chanaral)
+SCSE => La Serena (La Serena)
+SCTC => Temuco (Temuco)
+SCTE => Puerto Montt (Puerto Montt)
+SCVD => Valdivia (Valdivia)
+SEAM => Ambato / Chachoan (Ambato)
+SEBC => Bahia De Caraquez (Bahia De Caraquez)
+SECU => Cuenca / Mariscal Lamar (Cuenca)
+SEES => Esmeraldas-Tachina (Esmeraldas-Tachina)
+SEGU => Guayaquil / Simon Bolivar (Guayaquil)
+SEIB => Ibarra / Atahualpa (Ibarra)
+SELO => Catamayo / Camilo Ponce Enriquez (Catamayo)
+SELT => Latacunga (Latacunga)
+SEMA => Macara / J. M. Velasco I. (Macara)
+SEMH => Machala / General M. Serrano (Machala)
+SEMT => Manta (Manta)
+SEPA => Pastaza / Rio Amazonas (Pastaza)
+SEQU => Quito / Mariscal Sucre (Quito)
+SESA => Salinas / General Ulpiano Paez (Salinas)
+SEST => San Cristobal Galapagos (San Cristobal Galapagos)
+SETI => Tiputini (Tiputini)
+SETU => Tulcan / El Rosal (Tulcan)
+SFAL => Stanley (Stanley)
+SGAS => Asuncion / Aeropuerto (Asuncion)
+SGCO => Concepcion (Concepcion)
+SGEN => Encarnacion (Encarnacion)
+SGES => Aeropuerto Guarany (Aeropuerto Guarany)
+SGME => Mariscal Estigarribia (Mariscal Estigarribia)
+SGNA => Nueva Asuncion (Nueva Asuncion)
+SKAR => Armenia / El Eden (Armenia)
+SKAS => Puerto Asis (Puerto Asis)
+SKBG => Bucaramanga / Palonegro (Bucaramanga)
+SKBO => Bogota / Eldorado (Bogota)
+SKBQ => Barranquilla / Ernestocortissoz (Barranquilla)
+SKBU => Buenaventura (Buenaventura)
+SKCC => Cucuta / Camilo Daza (Cucuta)
+SKCG => Cartagena / Rafael Nunez (Cartagena)
+SKCL => Cali / Alfonso Bonillaaragon (Cali)
+SKEJ => Barrancabermeja / Yariguies (Barrancabermeja)
+SKIB => Ibague / Perales (Ibague)
+SKIP => Ipiales / San Luis (Ipiales)
+SKLC => Apartado / Los Cedros (Apartado)
+SKLT => Leticia / Vasquez Cobo (Leticia)
+SKMD => Medellin / Olaya Herrera (Medellin)
+SKMR => Monteria / Los Garzones (Monteria)
+SKMU => Mitu (Mitu)
+SKNV => Neiva / Benito Salas (Neiva)
+SKPC => Puerto Carreno / A. Guauquea (Puerto Carreno)
+SKPE => Pereira / Matecana (Pereira)
+SKPP => Popayan / Guillermo (Popayan)
+SKPS => Pasto / Antonio Narin (Pasto)
+SKPV => Providencia Isla / El Embrujo (Providencia Isla)
+SKRG => Rionegro / J. M. Cordova (Rionegro)
+SKRH => Riohacha / Almirante Padilla (Riohacha)
+SKSJ => San Jose Del Guaviare (San Jose Del Guaviare)
+SKSM => Santa Marta / Simon Bolivar (Santa Marta)
+SKSP => San Andres Isla / Sesquicentenario (San Andres Isla)
+SKUC => Arauca / Santiago Perez (Arauca)
+SKUI => Quibdo / El Carano (Quibdo)
+SKVP => Valledupar / Alfonso Lopez (Valledupar)
+SKVV => Villavicencio / Vanguardia (Villavicencio)
+SLAP => Apolo (Apolo)
+SLAS => Ascencion De Guarayos (Ascencion De Guarayos)
+SLCA => Camiri (Camiri)
+SLCB => Cochabamba (Cochabamba)
+SLCN => Charana (Charana)
+SLCO => Cobija (Cobija)
+SLCP => Concepcion (Concepcion)
+SLET => Santa Cruz / El Trompillo (Santa Cruz)
+SLGY => Guayaramerin (Guayaramerin)
+SLJE => San Jose De Chiquitos (San Jose De Chiquitos)
+SLJO => San Joaquin (San Joaquin)
+SLJV => San Javier (San Javier)
+SLLP => La Paz / Alto (La Paz)
+SLMG => Magdalena (Magdalena)
+SLOR => Oruro (Oruro)
+SLPO => Potosi (Potosi)
+SLPS => Puerto Suarez (Puerto Suarez)
+SLRB => Robore (Robore)
+SLRI => Riberalta (Riberalta)
+SLRQ => Rurrenabaque (Rurrenabaque)
+SLRY => Reyes (Reyes)
+SLSA => Santa Ana (Santa Ana)
+SLSB => San Borja (San Borja)
+SLSI => San Ignacio De Velasco (San Ignacio De Velasco)
+SLSM => San Ignacio De Moxos (San Ignacio De Moxos)
+SLSU => Sucre (Sucre)
+SLTJ => Tarija (Tarija)
+SLTR => Trinidad (Trinidad)
+SLVM => Villamontes (Villamontes)
+SLVR => Viru-Viru (Viru-Viru)
+SLYA => Yacuiba (Yacuiba)
+SMJP => Johan A. Pengel (Johan A. Pengel)
+SMZY => Zanderij (Zanderij)
+SOCA => Cayenne / Rochambeau (Cayenne)
+SOOM => Saint-Laurent-Du-Maroni (Saint-Laurent-Du-Maroni)
+SPAY => Atalaya (Atalaya)
+SPCL => Pucallpa (Pucallpa)
+SPEO => Chimbote (Chimbote)
+SPGM => Tingo Maria (Tingo Maria)
+SPHI => Chiclayo (Chiclayo)
+SPHO => Ayacucho (Ayacucho)
+SPHY => Andahuayla (Andahuayla)
+SPHZ => Anta Huaraz (Anta Huaraz)
+SPIM => Lima-Callao / Aerop.rnacional Jorgechavez (Lima-Callao)
+SPJA => Rioja (Rioja)
+SPJI => Juanjui (Juanjui)
+SPJL => Juliaca (Juliaca)
+SPJN => San Juan (San Juan)
+SPJR => Cajamarca (Cajamarca)
+SPME => Tumbes (Tumbes)
+SPMS => Yurimaguas (Yurimaguas)
+SPNC => Huanuco (Huanuco)
+SPPY => Chachapoyas (Chachapoyas)
+SPQT => Iquitos (Iquitos)
+SPQU => Arequipa (Arequipa)
+SPRU => Trujillo (Trujillo)
+SPSO => Pisco (Pisco)
+SPST => Tarapoto (Tarapoto)
+SPTN => Tacna (Tacna)
+SPTU => Puerto Maldonado (Puerto Maldonado)
+SPUR => Piura (Piura)
+SPYL => Talara (Talara)
+SPZO => Cuzco (Cuzco)
+SUAA => Melilla (Melilla)
+SUAG => Artigas (Artigas)
+SUCA => Colonia (Colonia)
+SUDU => Durazno (Durazno)
+SULS => Capitan Corbeta (Capitan Corbeta)
+SUME => Mercedes (Mercedes)
+SUMO => Melo (Melo)
+SUMU => Carrasco (Carrasco)
+SUPE => Maldonado / Punta Est (Maldonado)
+SUPU => Paysandu (Paysandu)
+SURV => Rivera (Rivera)
+SUSO => Salto (Salto)
+SUTB => Tacuarembo (Tacuarembo)
+SUTR => Treinta Y Tres (Treinta Y Tres)
+SVAC => Acarigua (Acarigua)
+SVBC => Barcelona (Barcelona)
+SVBI => Barinas (Barinas)
+SVBM => Barquisimeto (Barquisimeto)
+SVBS => Maracay-B. A. Sucre (Maracay-B. A. Sucre)
+SVCB => Ciudad Bolivar (Ciudad Bolivar)
+SVCL => Calabozo (Calabozo)
+SVCP => Carupano / Gen. Jose (Carupano)
+SVCR => Coro (Coro)
+SVCS => Caracas / Oscar Macha (Caracas)
+SVCU => Cumana (Cumana)
+SVFM => Caracas / La Carlota (Caracas)
+SVGD => Guasdualito (Guasdualito)
+SVGI => Guiria (Guiria)
+SVGU => Guanare (Guanare)
+SVHG => Higuerote (Higuerote)
+SVJC => Paraguana / Josefa (Paraguana)
+SVJM => San Juan De Los Morros (San Juan De Los Morros)
+SVLF => La Fria (La Fria)
+SVLO => La Orchila (La Orchila)
+SVMC => Maracaibo-La Chinita (Maracaibo-La Chinita)
+SVMD => Merida (Merida)
+SVMG => Margarita / Del Carib (Margarita)
+SVMI => Caracas / Maiquetia Aerop.. Simon Bolivar (Caracas)
+SVMN => Mene Grande (Mene Grande)
+SVMP => Metropolitano Private (Metropolitano Private)
+SVMT => Maturin (Maturin)
+SVPA => Puerto Ayacucho (Puerto Ayacucho)
+SVPC => Pto. Cabello (Pto. Cabello)
+SVPM => Paramillo Private (Paramillo Private)
+SVPR => Guayana / Manuel Car (Guayana)
+SVSA => San Antonio Del Tachira (San Antonio Del Tachira)
+SVSE => Santa Elena De Uairen (Santa Elena De Uairen)
+SVSO => Sto. Domingo (Sto. Domingo)
+SVSP => San Felipe (San Felipe)
+SVSR => San Fernando De Apure (San Fernando De Apure)
+SVST => San Tome Private (San Tome Private)
+SVSZ => Santa Barbara Zulia (Santa Barbara Zulia)
+SVTM => Tumeremo (Tumeremo)
+SVTR => Temblador (Temblador)
+SVVA => Valencia (Valencia)
+SVVG => El Vigia / Perez Alph (El Vigia)
+SVVL => Valera (Valera)
+SVVP => Valle De La Pascua (Valle De La Pascua)
+SWBC => Barcelos (Barcelos)
+SYGT => Georgetown (Georgetown)
+SYTM => Timehri (Timehri)
+TAKA => Takao Radar Site (Takao Radar Site)
+TAPA => Vc Bird Antigua (Vc Bird Antigua)
+TBPB => Grantley Adams (Grantley Adams)
+TBPO => Bridgetown City (Bridgetown City)
+TDCF => Canefield (Canefield)
+TDPD => Melville Hall (Melville Hall)
+TDPR => Roseau (Roseau)
+TFFF => Le Lamentin (Le Lamentin)
+TFFJ => Gustavia, Saint Barthelemy (Gustavia)
+TFFR => Le Raizet, Guadeloupe (Le Raizet)
+TGPY => Point Salines (Point Salines)
+TIST => Charlotte Amalie St. Thomas, Cyril E. King (Charlotte Amalie St. Thomas)
+TISX => Christiansted / Henry E. Rohlsen, Saint Croix (Christiansted)
+TJBQ => Aquadilla / Borinquen (Aquadilla)
+TJMZ => Mayaguez / Eugenio (Mayaguez)
+TJNR => Roosevelt Roads, Naval Station (Roosevelt Roads)
+TJPS => Ponce / Mercedita (Ponce)
+TJSJ => Luis Munoz Marin (Luis Munoz Marin)
+TKPK => Golden Rock (Golden Rock)
+TKPN => Charlestown / Newcast (Charlestown)
+TLPC => Vigie (Vigie)
+TLPL => Hewanorra (Hewanorra)
+TNCA => Queen Beatrix, Aruba (Queen Beatrix)
+TNCB => Flamingo, Bonaire (Flamingo)
+TNCC => Hato, Curacao (Hato)
+TNCE => Roosevelt Saint Eustatius (Roosevelt Saint Eustatius)
+TNCM => Juliana, Saint Maarten (Juliana)
+TRPM => Blackburne / Plymouth (Blackburne)
+TTCP => Crown Pt./ Scarborou (Crown Pt./ Scarborou)
+TTPP => Piarco, Trinidad (Piarco)
+TTPT => Crown Point, Tobago (Crown Point)
+TUPJ => Beef Island, Tortola (Beef Island)
+TVSV => Arnos Vale (Arnos Vale)
+TXKF => Bermuda (Bermuda)
+UAAA => Almaty (Almaty)
+UAFF => Bishkek (Bishkek)
+UAII => Shymkent (Shymkent)
+UAOO => Kzyl-Orda (Kzyl-Orda)
+UARR => Uralsk (Uralsk)
+UATA => Aralskoe More (Aralskoe More)
+UATT => Aktjubinsk (Aktjubinsk)
+UBBB => Baku / Bine (Baku)
+UEEE => Jakutsk (Jakutsk)
+UELL => Cul'Man (Cul'Man)
+UGEE => Yerevan (Yerevan)
+UGGG => Tbilisi (Tbilisi)
+UGMM => Muhrani (Muhrani)
+UHBP => Ekimchan (Ekimchan)
+UHHH => Habarovsk (Habarovsk)
+UHHO => Troickoe (Troickoe)
+UHMA => Anadyr (Anadyr)
+UHMD => Buhta Providenja (Buhta Providenja)
+UHMM => Magadan (Magadan)
+UHPP => Petropavlovsk-Kamchatskij (Petropavlovsk-Kamchatskij)
+UHSS => Yuzhno-Sakhalinsk (Yuzhno-Sakhalinsk)
+UHWW => Vladivostok (Vladivostok)
+UIAA => Chita (Chita)
+UIII => Irkutsk (Irkutsk)
+UIIO => Ust'Ordynskij (Ust'Ordynskij)
+UIKB => Bodajbo (Bodajbo)
+UIKK => Kirensk (Kirensk)
+UINN => Nizhneudinsk (Nizhneudinsk)
+UIUH => Horinsk (Horinsk)
+UIUU => Ulan-Ude (Ulan-Ude)
+UKBB => Boryspil (Boryspil)
+UKFF => Simferopol (Simferopol)
+UKHH => Kharkiv (Kharkiv)
+UKII => Kisinev (Kisinev)
+UKKK => Kyiv (Kyiv)
+UKLL => L'Viv (L'Viv)
+UKOO => Odesa (Odesa)
+ULAA => Arhangel'Sk (Arhangel'Sk)
+ULAK => Kotlas (Kotlas)
+ULLI => St. Peterburg (St. Peterburg)
+ULMM => Murmansk (Murmansk)
+ULOL => Velikie Luki (Velikie Luki)
+ULTT => Tallinn (Tallinn)
+ULWT => Tot'Ma (Tot'Ma)
+ULWW => Vologda (Vologda)
+UMII => Vitebsk (Vitebsk)
+UMMS => Minsk (Minsk)
+UMRR => Riga (Riga)
+UMRW => Ventspils (Ventspils)
+UNBB => Barnaul (Barnaul)
+UNCE => Novokuznetsk (Novokuznetsk)
+UNII => Enisejsk (Enisejsk)
+UNNN => Novosibirsk (Novosibirsk)
+URKK => Krasnodar (Krasnodar)
+URMM => Mineral'Nye Vody (Mineral'Nye Vody)
+URRR => Rostov-Na-Donu (Rostov-Na-Donu)
+URSS => Adler (Adler)
+URWI => Elista (Elista)
+URWW => Volgograd (Volgograd)
+USHH => Hanty-Mansijsk (Hanty-Mansijsk)
+USRR => Surgut (Surgut)
+USSS => Ekaterinburg (Ekaterinburg)
+UTDD => Dushanbe (Dushanbe)
+UTED => Dzizak (Dzizak)
+UTSM => Tamdy (Tamdy)
+UTSS => Samarkand (Samarkand)
+UTST => Termez (Termez)
+UTTT => Tashkent (Tashkent)
+UUBP => Brjansk (Brjansk)
+UUEE => Moscow / Sheremet'Ye (Moscow)
+UUEM => Tver (Tver)
+UUOO => Voronez (Voronez)
+UUWW => Moscow / Vnukovo (Moscow)
+UUYT => Ust'- Kulom (Ust'- Kulom)
+UUYY => Syktyvkar (Syktyvkar)
+UWPP => Penza (Penza)
+VAAH => Ahmadabad (Ahmadabad)
+VAAK => Akola (Akola)
+VAAU => Aurangabad Chikalthan Aerodrome (Aurangabad Chikalthan Aerodrome)
+VABB => Bombay / Santacruz (Bombay)
+VABI => Bilaspur (Bilaspur)
+VABJ => Bhuj-Rudramata (Bhuj-Rudramata)
+VABM => Belgaum / Sambra (Belgaum)
+VABP => Bhopal / Bairagarh (Bhopal)
+VABV => Bhaunagar (Bhaunagar)
+VAGO => Goa / Dabolim (Goa)
+VAID => Indore (Indore)
+VAJB => Jabalpur (Jabalpur)
+VAKD => Khandwa (Khandwa)
+VAKP => Kolhapur (Kolhapur)
+VANP => Nagpur Sonegaon (Nagpur Sonegaon)
+VARK => Rajkot (Rajkot)
+VASL => Sholapur (Sholapur)
+VBBM => Bhamo (Bhamo)
+VBBS => Pathein (Pathein)
+VBCI => Coco Island (Coco Island)
+VBHL => Homalin (Homalin)
+VBKG => Kengtung (Kengtung)
+VBKP => Kyaukpyu (Kyaukpyu)
+VBLS => Lashio (Lashio)
+VBMK => Myitkyina (Myitkyina)
+VBML => Meiktila (Meiktila)
+VBMM => Moulmein (Moulmein)
+VBPA => Hpa-An (Hpa-An)
+VBPR => Prome (Prome)
+VBPT => Putao (Putao)
+VBRM => Mandalay (Mandalay)
+VBRN => Mergui (Mergui)
+VBRR => Mingaladon (Mingaladon)
+VBSY => Sandoway (Sandoway)
+VBTV => Dawei (Dawei)
+VCBI => Katunayake (Katunayake)
+VCCA => Anuradhapura (Anuradhapura)
+VCCB => Batticaloa (Batticaloa)
+VCCC => Ratmalana (Ratmalana)
+VCCT => Trincomalee (Trincomalee)
+VDKC => Kompong-Cham (Kompong-Cham)
+VDPP => Phnom-Penh / Pochentong (Phnom-Penh)
+VDSR => Siemreap (Siemreap)
+VEAT => Agartala (Agartala)
+VEBD => Siliguri (Siliguri)
+VEBS => Bhubaneswar (Bhubaneswar)
+VECC => Calcutta / Dum Dum (Calcutta)
+VECX => Car Nicobar (Car Nicobar)
+VEGK => Gorakhpur (Gorakhpur)
+VEGT => Gauhati (Gauhati)
+VEGY => Gaya (Gaya)
+VEIM => Imphal Tulihal (Imphal Tulihal)
+VEJH => Jharsuguda (Jharsuguda)
+VEJS => Jamshedpur (Jamshedpur)
+VELR => North Lakhimpur (North Lakhimpur)
+VEMN => Dibrugarh / Mohanbari (Dibrugarh)
+VEPB => Port Blair (Port Blair)
+VEPT => Patna (Patna)
+VERC => M. O. Ranchi (M. O. Ranchi)
+VGCB => Cox's Bazar (Cox's Bazar)
+VGEG => Chittagong Patenga (Chittagong Patenga)
+VGIS => Ishurdi (Ishurdi)
+VGJR => Jessore (Jessore)
+VGRJ => Rajshahi (Rajshahi)
+VGSY => Sylhet (Sylhet)
+VGTJ => Dhaka (Dhaka)
+VGZR => Kurmitola, Dia (Kurmitola)
+VHCH => Cheung Chau (Cheung Chau)
+VHHH => Hong Kongr-National (Hong Kongr-National)
+VIAG => Agra (Agra)
+VIAL => Allahabad / Bamhrauli (Allahabad)
+VIAR => Amritsar (Amritsar)
+VIBN => Varanasi / Babatpur (Varanasi)
+VIBY => Bareilly (Bareilly)
+VICX => Kanpur / Chakeri (Kanpur)
+VIDD => New Delhi / Safdarjung (New Delhi)
+VIDP => New Delhi / Palam (New Delhi)
+VIGR => Gwalior (Gwalior)
+VIHR => Hissar (Hissar)
+VIJN => Jhansi (Jhansi)
+VIJO => Jodhpur (Jodhpur)
+VIJP => Jaipur / Sanganer (Jaipur)
+VIKO => Kota Aerodrome (Kota Aerodrome)
+VILK => Lucknow / Amausi (Lucknow)
+VIST => Satna (Satna)
+VIUD => Udaipur Dabok (Udaipur Dabok)
+VLAP => Attopeu (Attopeu)
+VLIP => Pakse (Pakse)
+VLLB => Luang-Prabang (Luang-Prabang)
+VLSB => Sayaboury (Sayaboury)
+VLSK => Savannakhet (Savannakhet)
+VLSV => Saravane (Saravane)
+VLTK => Thakhek (Thakhek)
+VLVT => Vientiane (Vientiane)
+VMMC => Taipa (Taipa)
+VNBW => Bhairawa (Bhairawa)
+VNJL => Jumla (Jumla)
+VNKT => Kathmandu (Kathmandu)
+VNPK => Pokhara (Pokhara)
+VNSI => Simra (Simra)
+VNSK => Surkhet (Surkhet)
+VNTJ => Taplejung (Taplejung)
+VNVT => Biratnagar (Biratnagar)
+VOBI => Bellary (Bellary)
+VOBZ => Vijayawada / Gannavaram (Vijayawada)
+VOCB => Coimbatore / Peelamedu (Coimbatore)
+VOCC => Cochin / Willingdon (Cochin)
+VOCP => Cuddapah (Cuddapah)
+VOHY => Hyderabad (Hyderabad)
+VOMD => Madurai (Madurai)
+VOML => Mangalore / Bajpe (Mangalore)
+VOMM => Madras / Minambakkam (Madras)
+VOTR => Tiruchchirapalli (Tiruchchirapalli)
+VOTV => Thiruvananthapuram (Thiruvananthapuram)
+VOVR => Vellore (Vellore)
+VRGN => Gan (Gan)
+VRMM => Male (Male)
+VTBC => Chanthaburi (Chanthaburi)
+VTBD => Don Muang (Don Muang)
+VTBG => Kanchanaburi (Kanchanaburi)
+VTBI => Prachin Buri (Prachin Buri)
+VTBJ => Phetchaburi (Phetchaburi)
+VTBP => Prachuap Khirikhan (Prachuap Khirikhan)
+VTBS => Chon Buri (Chon Buri)
+VTBU => Rayong (Rayong)
+VTCC => Chiang Mai (Chiang Mai)
+VTCH => Mae Hong Son (Mae Hong Son)
+VTCL => Lampang (Lampang)
+VTCN => Nan (Nan)
+VTCP => Phrae (Phrae)
+VTCR => Chiang Rai (Chiang Rai)
+VTCS => Mae Sariang (Mae Sariang)
+VTPH => Hua Hin (Hua Hin)
+VTPM => Mae Sot (Mae Sot)
+VTPN => Nakhon Sawan (Nakhon Sawan)
+VTPS => Phitsanulok (Phitsanulok)
+VTPT => Tak (Tak)
+VTPU => Uttaradit (Uttaradit)
+VTSA => Satun (Satun)
+VTSB => Surat Thani (Surat Thani)
+VTSD => Chumphon (Chumphon)
+VTSH => Songkhla (Songkhla)
+VTSK => Pattani (Pattani)
+VTSN => Nakhon Si Thammarat (Nakhon Si Thammarat)
+VTSP => Phuket (Phuket)
+VTSR => Ranong (Ranong)
+VTSS => Hat Yai (Hat Yai)
+VTST => Trang (Trang)
+VTUB => Mukdahan (Mukdahan)
+VTUC => Chaiyaphum (Chaiyaphum)
+VTUD => Udon Thani (Udon Thani)
+VTUK => Khon Kaen (Khon Kaen)
+VTUL => Loei (Loei)
+VTUM => Nong Khai (Nong Khai)
+VTUN => Nakhon Ratchasima (Nakhon Ratchasima)
+VTUP => Nakhon Phanom (Nakhon Phanom)
+VTUR => Roi Et (Roi Et)
+VTUS => Sakon Nakhon (Sakon Nakhon)
+VTUU => Ubon Ratchathani (Ubon Ratchathani)
+VVDN => Da Nang (Da Nang)
+VVGL => Hanoi / Gialam (Hanoi)
+VVNB => Ha Noi (Ha Noi)
+VVNT => Nha Trang (Nha Trang)
+VVPB => Hue (Hue)
+VVPK => Pleiku City (Pleiku City)
+VVQN => Quy Nhon (Quy Nhon)
+VVTS => Ho Chi Minh (Ho Chi Minh)
+VVVH => Vinh (Vinh)
+VYSW => Sittwe (Sittwe)
+VYYY => Yangon (Yangon)
+WAAA => Ujung Pandang / Hasanuddin (Ujung Pandang)
+WAAB => Bau-Bau / Beto Ambiri (Bau-Bau)
+WAAU => Kendari / Woltermon-Ginsidi (Kendari)
+WABB => Biak / Mokmer (Biak)
+WABI => Nabire (Nabire)
+WABN => Kokonao / Timuka (Kokonao)
+WABO => Serui / Yendosa (Serui)
+WABT => Enarotali (Enarotali)
+WAJI => Sarmi (Sarmi)
+WAJJ => Jayapura / Sentani (Jayapura)
+WAJW => Wamena / Wamena (Wamena)
+WAKK => Merauke / Mopah (Merauke)
+WAKT => Tanah Merah / Tanah Merah (Tanah Merah)
+WAMA => Galela / Gamarmalamu (Galela)
+WAMG => Gorontalo / Jalaluddin (Gorontalo)
+WAMH => Tahuna (Tahuna)
+WAMI => Toli-Toli / Lalos (Toli-Toli)
+WAML => Palu / Mutiara (Palu)
+WAMM => Menado / Dr. Sam Ratulangi (Menado)
+WAMP => Poso / Kasiguncu (Poso)
+WAMT => Ternate / Babullah (Ternate)
+WAMW => Luwuk / Bubung (Luwuk)
+WAPA => Amahai (Amahai)
+WAPH => Labuha / Taliabu (Labuha)
+WAPI => Saumlaki (Saumlaki)
+WAPN => Sanana (Sanana)
+WAPP => Ambon / Pattimura (Ambon)
+WAPR => Namlea (Namlea)
+WASF => Fak-Fak / Torea (Fak-Fak)
+WASK => Kaimana / Utarom (Kaimana)
+WASR => Manokwari / Rendani (Manokwari)
+WASS => Sorong / Jefman (Sorong)
+WBGB => Bintulu (Bintulu)
+WBGG => Kuching (Kuching)
+WBGR => Miri (Miri)
+WBGS => Sibu (Sibu)
+WBKK => Kota Kinabalu (Kota Kinabalu)
+WBKL => Labuan (Labuan)
+WBKS => Sandakan (Sandakan)
+WBKT => Kudat (Kudat)
+WBKW => Tawau (Tawau)
+WBSB => Brunei (Brunei)
+WIAA => Sabang / Cut Bau (Sabang)
+WIAG => Menggala / Astra Ksetra (Menggala)
+WIAM => Tasikmalaya / Cibeureum (Tasikmalaya)
+WIAR => Madiun / Iswahyudi (Madiun)
+WIAS => Malang / Abdul Rahkmansaleh (Malang)
+WIBB => Pakanbaru / Simpangtiga (Pakanbaru)
+WIIA => Curug / Budiarto (Curug)
+WIIB => Bandung / Husein (Bandung)
+WIIH => Jakarta Halim Perdanakusuma (Jakarta Halim Perdanakusuma)
+WIII => Jakarta / Soekarno-Hatta (Jakarta)
+WIIJ => Jogyakarta / Adisucipto (Jogyakarta)
+WIIK => Kalijati (Kalijati)
+WIIL => Cilacap (Cilacap)
+WIIS => Semarang / Ahmadyani (Semarang)
+WIIT => Telukbetung / Beranti (Telukbetung)
+WIKD => Tanjungpandan / Buluh Tumbang (Tanjungpandan)
+WIKK => Pangkalpinang / Pangkalpinang (Pangkalpinang)
+WIKN => Tanjungpinang / Kijang (Tanjungpinang)
+WIKS => Singkep / Dabo (Singkep)
+WIMB => Gunung Sitoli / Binaka (Gunung Sitoli)
+WIMG => Padang / Tabing (Padang)
+WIMM => Medan / Polonia (Medan)
+WIMS => Sibolga / Pinangsori (Sibolga)
+WIOI => Singkawang Ii (Singkawang Ii)
+WIOK => Ketapang / Rahadi Usmaman (Ketapang)
+WION => Ranai / Ranai (Ranai)
+WIOO => Pontianak / Supadio (Pontianak)
+WIOS => Sintang (Sintang)
+WIPA => Jambi / Sultan Taha (Jambi)
+WIPH => Kerinci / Depati Parbo (Kerinci)
+WIPL => Bengkulu / Padangkemiling (Bengkulu)
+WIPP => Palembang / Talangbetutu (Palembang)
+WIPR => Rengat / Japura (Rengat)
+WITC => Meulaboh / Cut Nyak Dhien (Meulaboh)
+WITM => Lhokseumawe / Malikussaleh (Lhokseumawe)
+WITT => Banda Aceh / Blangbintang (Banda Aceh)
+WMBA => Sitiawan (Sitiawan)
+WMKC => Kota Bharu (Kota Bharu)
+WMKD => Kuantan (Kuantan)
+WMKJ => Johore Bharu / Senai (Johore Bharu)
+WMKK => Kuala Lumpur / Subang (Kuala Lumpur)
+WMKL => Langkawi (Langkawi)
+WMKM => Malacca (Malacca)
+WMKP => Penang / Bayan Lepas (Penang)
+WPDL => Dilli / Dilli (Dilli)
+WPEC => Baucau (Baucau)
+WPOC => Oe-Cusse / Oe Cusse (Oe-Cusse)
+WRBB => Banjarmasin / Syamsuddin Noor (Banjarmasin)
+WRBI => Pangkalan Bun / Iskandar (Pangkalan Bun)
+WRBK => Kotabaru (Kotabaru)
+WRBM => Muaratewe / Beringin (Muaratewe)
+WRBP => Palangkaraya / Panarung (Palangkaraya)
+WRKC => Maumere / Wai Oti (Maumere)
+WRKK => Kupang / El Tari (Kupang)
+WRKL => Larantuka (Larantuka)
+WRKM => Alor / Mali (Alor)
+WRKR => Rote / Baa (Rote)
+WRKS => Sabu / Tardamu (Sabu)
+WRLB => Longbawan / Juvai Semaring (Longbawan)
+WRLG => Tanjung Selor (Tanjung Selor)
+WRLK => Tanjung Redep / Berau (Tanjung Redep)
+WRLL => Balikpapan / Sepinggan (Balikpapan)
+WRLR => Tarakan / Juwata (Tarakan)
+WRLS => Samarinda / Temindung (Samarinda)
+WRRA => Ampenan / Selaparang (Ampenan)
+WRRB => Bima (Bima)
+WRRR => Denpasar / Ngurah-Rai (Denpasar)
+WRRS => Sumbawa Besar / Sumbawa Besar (Sumbawa Besar)
+WRRW => Waingapu / Mau Hau (Waingapu)
+WRSJ => Surabaya / Juanda (Surabaya)
+WRSP => Surabaya / Perak (Surabaya)
+WRSQ => Surakarta / Adisumarmo (Surakarta)
+WRSS => Surabaya (Surabaya)
+WSAP => Singapore / Paya Lebar (Singapore)
+WSSS => Singapore / Changi (Singapore)
+YBAF => Archerfield Aerodrome (Archerfield Aerodrome)
+YBAM => Amberley Aerodrome (Amberley Aerodrome)
+YBAS => Alice Springs Aerodrome (Alice Springs Aerodrome)
+YBBN => Brisbane M. O (Brisbane M. O)
+YBCG => Coolangatta Aws (Coolangatta Aws)
+YBCS => Cairns (Cairns)
+YBCV => Charleville (Charleville)
+YBGL => Gladstone (Gladstone)
+YBLR => Longreach (Longreach)
+YBMA => Mount Isa Amo (Mount Isa Amo)
+YBMK => Mackay Mo (Mackay Mo)
+YBOK => Oakey Aerodrome (Oakey Aerodrome)
+YBPN => Proserpine (Proserpine)
+YBRK => Rockhampton (Rockhampton)
+YBRM => Broome (Broome)
+YBTL => Townsville Amo (Townsville Amo)
+YBWP => Weipa City (Weipa City)
+YDGV => Gove (Gove)
+YDTC => Tennant Creek (Tennant Creek)
+YDYL => Yulara Aws (Yulara Aws)
+YMAY => Albury (Albury)
+YMDV => Devonport East (Devonport East)
+YMEN => Goldstream Aws (Goldstream Aws)
+YMES => East Sale Aerodrome (East Sale Aerodrome)
+YMHB => Hobart (Hobart)
+YMLT => Launceston (Launceston)
+YMLV => Laverton Aerodrome (Laverton Aerodrome)
+YMMB => Moorabbin Aws (Moorabbin Aws)
+YMMG => Mount Gambier Aerodrome (Mount Gambier Aerodrome)
+YMMI => Mildura (Mildura)
+YMML => Melbourne (Melbourne)
+YMMQ => Macquarie Island (Macquarie Island)
+YMWY => Wynyard West (Wynyard West)
+YPAD => Adelaide (Adelaide)
+YPAL => Albany (Albany)
+YPBH => Broken Hill Patton Street (Broken Hill Patton Street)
+YPCC => Cocos Island (Cocos Island)
+YPCD => Ceduna (Ceduna)
+YPDB => Derby (Derby)
+YPDN => Darwin (Darwin)
+YPEA => Bullsbrook Pearce Amo (Bullsbrook Pearce Amo)
+YPED => Edinburgh M. O. (Edinburgh M. O.)
+YPFT => Forrest (Forrest)
+YPGN => Geraldton (Geraldton)
+YPKG => Kalgoorlie Boulder Amo (Kalgoorlie Boulder Amo)
+YPKU => Kununurra Kununurra Aws (Kununurra Kununurra Aws)
+YPLC => Leigh Creek (Leigh Creek)
+YPLM => Learmonth (Learmonth)
+YPMR => Meekatharra (Meekatharra)
+YPPD => Port Hedland Pardoo (Port Hedland Pardoo)
+YPPF => Parafield (Parafield)
+YPPH => Belmont Perth (Belmont Perth)
+YPTN => Katherine Aerodrome (Katherine Aerodrome)
+YPWR => Woomera Aerodrome (Woomera Aerodrome)
+YPXM => Christmas Island Aerodrome (Christmas Island Aerodrome)
+YSBK => Bankstown Aws (Bankstown Aws)
+YSCB => Canberra (Canberra)
+YSCH => Coffs Harbour Mo (Coffs Harbour Mo)
+YSCM => Cooma (Cooma)
+YSCN => Camden (Camden)
+YSDU => Dubbo (Dubbo)
+YSNF => Norfolk Island (Norfolk Island)
+YSNW => Nowra Ran Air Station (Nowra Ran Air Station)
+YSRI => Richmond Aus-Afb (Richmond Aus-Afb)
+YSSY => Sydney (Sydney)
+YSTW => Tamworth (Tamworth)
+YSWG => Wagga (Wagga)
+YSWM => Williamtown Aerodrome (Williamtown Aerodrome)
+ZBAA => Beijing (Beijing)
+ZBHH => Hohhot (Hohhot)
+ZBTJ => Tianjin / Zhangguizhu (Tianjin)
+ZBYN => Taiyuan (Taiyuan)
+ZGCS => Changsha (Changsha)
+ZGGG => Guangzhou (Guangzhou)
+ZGHK => Haikou (Haikou)
+ZGKL => Guilin (Guilin)
+ZGNN => Nanning (Nanning)
+ZGOW => Shantou (Shantou)
+ZGSZ => Shenzhen (Shenzhen)
+ZGZJ => Zhanjiang (Zhanjiang)
+ZHCC => Zhengzhou (Zhengzhou)
+ZHHH => Wuhan (Wuhan)
+ZKKC => Kimchaek (Kimchaek)
+ZKPY => Pyongyang (Pyongyang)
+ZLIC => Yinchuan (Yinchuan)
+ZLJQ => Jiuquan (Jiuquan)
+ZLSN => Xi'An (Xi'An)
+ZLXN => Xining (Xining)
+ZLYA => Yan An (Yan An)
+ZPPP => Kunming (Kunming)
+ZSAM => Xiamen (Xiamen)
+ZSCN => Nanchang (Nanchang)
+ZSFZ => Fuzhou (Fuzhou)
+ZSGZ => Ganzhou (Ganzhou)
+ZSHC => Hangzhou (Hangzhou)
+ZSNJ => Nanjing (Nanjing)
+ZSOF => Hefei (Hefei)
+ZSQD => Qingdao (Qingdao)
+ZSSS => Shanghai / Hongqiao (Shanghai)
+ZSTN => Jinan (Jinan)
+ZUCK => Chongqing (Chongqing)
+ZUGY => Guiyang (Guiyang)
+ZULS => Lhasa (Lhasa)
+ZUUU => Chengdu (Chengdu)
+ZWHM => Hami (Hami)
+ZWSH => Kashi (Kashi)
+ZWTN => Hotan (Hotan)
+ZWWW => Urum-Qi / Diwopu (Urum-Qi)
+ZWYN => Yining (Yining)
+ZYCC => Changchun (Changchun)
+ZYQQ => Qiqihar (Qiqihar)
+ZYTL => Dalian (Dalian)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/wtf.txt Tue May 01 12:26:35 2007 +0200
@@ -0,0 +1,6560 @@
+2D 2-Dimensional
+3ACC 3A Central Control
+3D 3-Dimensional
+3M Minnesota Mining and Manufacturing
+4GL Fourth Generation Language
+4H Head, Heart, Hands, Health
+5XBCOER 5 X-Bar Central Office Equipment Reports system, "5XB COER"
+AAAAAA Association for the Abolition of Abused Abbreviations and Asinine Acronyms
+AAA American Automobile Association
+AAA Anti-Aircraft Artillery
+AA Administrative Assistant
+AA Affirmative Action committee
+AAAL American Academy of Arts and Letters
+AA Alcoholics Anonymous
+AA American Airlines
+AA Antiaircraft Artillery
+AAAS American Association for the Advancement of Science
+AA Associate in Accounting
+AA Astronomy and Astrophysics, "A&A"
+AA Automobile Association (in England)
+A Aftermath
+AAII American Association of Individual Investors
+AAMOF As A Matter Of Fact
+AAMSI American Association for Medical Systems Informatics
+AAO Anglo-Australian Observatory
+AAP Affirmative Action Program
+AARC Anglo-American Cataloging Rules
+AARP Appletalk ARP
+AAS American Astronomical Society
+AAS Atom Absorption Spectrometry
+AAVSO American Association of Variable Star Observers
+AAX Automated Attendant eXchange
+ABA American Bar Association
+ABA American Basketball Association
+ABA American Booksellers Association
+AB Able Bodied seaman
+ABATS Automatic Bit Access Test System
+ABBR ABBReviation
+ABC American Broadcasting Company
+ABEL Advanced Boolean Expression Language (a Data-I/O Trademark)
+ABHC Average Busy Hour Calls
+ABI American Bell Inc
+ABI Application Binary Interface (SunOS and SV application sw interface std)
+ABM Asynchronous Balanced Mode
+ABP Alt.Binary.Pictures
+ABPE* Alt.Binaries.Pictures.Erotica.* (.bondage, .leather, etc.)
+ABS Acrylonitrile Butadiene-Styrene (plastic)
+ABS Alternative Billing Service
+ABS American Bureau of Shipping
+ABS Anti-Blocking System
+ABSBH Average Busy Season Busy Hour
+ACAA Agricultural Conservation and Adjustment Administration
+AC Access Control
+AC Adaptive Control
+AC Alternating Current (ac, see also DC)
+AC Answer Center (Sun)
+AC Ante Christum (before Christ)
+AC Ante Cibum (before meals)
+ACAWS Advisory, Caution, And Warning System
+ACB Annoyance Call Bureau
+ACBL American Contract Bridge League
+ACC Argonne Code Center
+ACC Audio Communications Controller
+ACCRA American Chamber of Commerce Research Association
+ACCS Army Command and Control System
+ACCS Automated Calling Card Service
+ACCT Account
+ACDA Automatic Call Disposition Analyzer
+ACD Automatic Call Distributor [telephony]
+ACE Advanced Composition Explorer
+ACE Advanced Computing Environments [Corporate name]
+ACE Automatic Calibration and Equalization
+ACE Automatic Calling Equipment
+ACF Advanced Communications Functions
+ACH Attempt per Circuit per Hour
+ACHEFT Automated ClearingHouse Electronic Funds Transfer
+ACIA Asynchronous Communications Interface Adapter
+ACK ACKnowledge
+ACK Amsterdam Compiler Kit
+ACL Access Control List
+ACL Advanced Cmos Logic
+ACLU American Civil Liberties Union
+ACM Access Control Machine
+ACM Association for Computing Machinery
+ACO Acronym Control Officer
+ACOF Attendant Control Of Facilities
+ACP ACtion Point
+ACRNEMA a medical imaging standard, "ACR/NEMA"
+ACRV Assured Crew Return Vehicle (or) Astronaut Crew Rescue Vehicle
+ACS Advanced Communications System
+ACS Australian Computer Science
+ACSE Association Control Service Entity (ISO/CCITT layer 7)
+ACSNET Acedemic Computing Services NETwork
+ACSU Advanced t-1 Channel Service Unit
+ACTPU ACTivate Physical Unit (SNA)
+ACTS Advanced Communications Technology Satellite
+ACTS Automated Coin Toll Service
+ACTS Automatic Coin Telephone Service [telephony]
+ACTUP AIDS Coalition To Unleash Power, "ACT UP"
+ACU Alarm Control Unit
+ACU Automatic Calling Unit
+ACW Alternating Continuous Waves
+ACWP Actual Cost of Work Performed
+ADA Air Defense Artillery
+ADA Alternate Delay Accumulation
+AD Addendum
+AD After Date
+AD Analog to Digital converter, "A/D" (see ADC)
+AD Anno Domini (in the year of our Lord)
+AD Application Development
+ADB A DeBugger
+ADB Apple Desktop Bus
+ADC Analog to Digital Converter
+ADCCP Advanced Data Communications Control Procedure
+ADCI Automatic Display Call Indicator
+ADD Advanced Dungeons & Dragons, "AD&D"
+ADDCP Advanced Data Communication Control Procedure
+ADEW Andrew Development Environment Workbench
+ADF Automatic Direction Finder
+ADFRF Ames-Dryden Flight Research Facility (was DFRF) (NASA)
+AD(H)D Attention Deficit (Hyperactivity) Disorder
+ADI Acceptable Daily Input
+ADI Anolog Device Inc
+ADM Additional Dealer Markup
+ADM ADMiral
+ADM Advanced Micro Devices
+ADMD Administration Management Domain
+ADN Abbreviated Dialing Number
+ADP Adenosine Di-Phosphate
+ADP Administrative Data Processing
+ADP Advanced Data Processing
+ADP Automatic Data Processing
+ADPCM Pulse Code Modulation with Adaptive Quantization
+ADS Advanced Digital System
+ADS Application Development System
+ADS Audio Distribution System
+ADS Automatic Voice System
+ADS Auxilary Data System
+ADSP AppleTalk Data Stream Protocol
+ADSR Attack Decay Sustain Release
+ADT Abstract Data Type
+ADT Atlantic Daylight Time
+AEA American Electronics Association
+AEA Atomic Energy Authority
+AE Application Entity/Environment/Execution/Engineering (APE)
+AEC Architectural Engineering Construction
+AEC Atomic Energy Commission
+AEF American Expeditionary Force (see BEF)
+AEGIS Advanced Electronic Guidance and Instrumentation System
+AES Application Environment Specification
+AFACTS Automatic FACilities Test System
+AF Address Family (sockets)
+AFADS Automatic Force Adjustment Data System
+AF Adventures in Fantasy
+AFAICR as far as I can recall
+AFAICT As Far As I Can Tell
+AFAIK As Far As I Know
+AFAIR as far as I recall
+AF Air Force
+AFATDS Advanced Field Artillery Tactical Data System
+AF Audio Frequency
+AFB Air Force Base
+AFCAC Air Force Computer Acquisition Center
+AFC American Football Conference
+AFC Automatic Frequency/Flight Control
+AFCC Air Force Communications Command
+AFGE American Federation of Government Employees
+AFI Authority and Format Identifier
+AFIPS American Federation of Information Processing Societies
+AFK Away From Keyboard
+AFL American Federation of Labor
+AFL American Football League
+AFLCIO American Federation of Labor; Congress of Industrial Organizations, "AFL-CIO"
+AFM Adobe Font Metrics
+AFNOR Association Francaise de NORmalization
+AFP Appletalk Filing Protocol
+AFS Andrew File System
+AFSC Air Force Systems Command
+AFSCME American Federation of State, County and Municipal Employees
+AFSK Automatic Frequency Shift Keying
+AFTRA American Federation of Television and Radio Artists
+AFUU Association Francaise des Utilisateurs d'Unix
+AG Adjutant General
+AG Arcade Game
+AG Attorney General
+AGCT Army General Classification Test
+AGL Above Ground Level
+AGM Air-to-Ground Missile
+AGN Active Galactic Nucleus
+AGU American Geophysical Union
+AHA American Homebrew Association
+AH Artificial Horizon
+AH Avalon Hill (major war game manufacturer)
+AHL American Hockey League
+AHQ Air HeadQuarters
+AIAA American Institute of Aeronautics and Astronautics
+AIA American Institute of Architects
+AIA Application Integration Architecture
+AI Allegheny International
+AI Amnesty International
+AI Anal Intrusion
+AI Artificial Insemination
+AI Artificial Intelligence
+AI Attitude Indicator
+AIC Automatic Intercept Center
+AICC Automatic Intercept Communications Controller
+AID Agency for International Development
+AIDDE Ames' Interactive Dynamic Display Editor
+AIDS Acquired ImmunoDeficiency Syndrome
+AIM Air Interception Missile
+AIM Airman's Information Manual
+AIMS Advanced Inventory Management System
+AIOD Automatic Identification Outward Dialing
+AIPS Astronomical Image Processing System
+AIS Action Item System
+AIS Automatic Intercept System
+AIUI As I Understand It
+AIX Advanced Interactive eXecutive (unix)
+AJ Astronomical Journal
+AKA Also Known As
+AKA Also Known As
+AK Alaska
+ALA American Library Association
+ALA Automobile Legal Association
+AL Alabama
+AL American League (baseball)
+ALAP AppleTalk-LocalTalk Link Access Protocol
+ALBM Air-to-Land Ballistic Missile
+ALBO Automatic Line BuildOut
+ALC Automatic Load Control
+ALEXIS Array of Low Energy X-ray Imaging Sensors
+ALFA Anonima Lombarda Fabbrica Automobili
+ALFE Analog Line Front End
+ALGOL ALGorithmic Oriented Language
+ALI Automatic Location Indentification
+ALIT Automatic Line Insulation Testing
+ALM Asychronous Line Module
+ALM Asynchronous Line Multiplexer
+ALMS alt.lifestyle.master.slave
+ALPO Association of Lunar and Planetary Observers
+ALRU Automatic Line Record Update
+ALS Advanced Launch System [Space]
+ALS Automated List Service
+ALU Arithmetic Logic Unit
+AMA American Medical Association
+AMA Association for Model Aviation
+AMA Automatic Message Accounting
+AMACS Automatic Message Accounting Collection System
+AM Administrative Module
+AM Agricultural and Mechanical, "A&M"
+AM Air Marshal
+AM Alpes-Maritimes, "A.-M."
+AM American, "Am."
+AM Americium, "Am"
+AM Amplitude Modulation
+AM anno mundi (in the year of the world)
+AM Ante Meridiem, "a.m." (before noon)
+AMARC Automatic Message Accounting Recording Center
+AMASE Automatic Message Accounting Standard Entry
+AMAT Automatic Message Accounting Transmitter
+AMATPS Automatic Message Accounting TeleProcessing System
+AMBA Association of Master of Business Administration
+AMC Albany Medical College
+AMD Advanced Micro Devices [Corporate name]
+AMERITECH AMERican Information TECHnologies
+AMEX AMerican EXpress
+AMI American Micro System Inc
+AMORC Ancient Mystic Order Rosae Crucis
+AMP Adenosine MonoPhosphate
+AMPAS Academy of Motion Picture Arts and Sciences
+AMPS Advanced Mobile Phone Service
+AMRAAM Advanced Medium Range Air-To-Air Missile
+AMROC American Rocket Company [Space]
+AMSAT radio AMateur SATellite corp.
+AMT Active Memory Technology
+AMU Atomic Mass Unit
+AMVET AMerican VETeran
+ANA American Nurses Association
+ANA Automatic Number Announcement
+ANAC Automatic Number Announcement Circuit [telephony]
+AN Associated Number
+ANC All Number Calling [telephony]
+ANC American Network Communications
+ANC Army Nurse Corps
+ANDF Architecture-Neutral Distribution Format
+ANF Automatic Number Forwarding
+ANFSCD And Now For Something Completely Different
+ANG Air National Guard
+ANI Automatic Number Identification [telephony]
+ANIF Automatic Number Identification Failure
+ANL Argonne National Laboratory
+ANOVA ANalysis Of VAriance
+ANPA American Newspaper Publishers Association
+ANSI American National Standards Institute
+ANU Australian National University
+ANZUS Australia, New Zealand, United States
+AOA Abort Once Around (Shuttle abort plan)
+AO Account Of
+AOCS Attitude and Orbit Control System
+AOL Absent Over Leave (see AWOL)
+AOPA Aircraft Owners and Pilots Association
+AOP Annual Operating Plan
+AOQ Average Outgoing Quality
+AOS Academic Operating System
+AOS Alternate Operator Service [telephony]
+AOSS Auxilliary Operator Service System
+AOW Asia and Oceania Workshop
+APA All Points Addressable
+AP Accounts Payable, "A/P"
+AP Additional Premium
+AP Age Play
+AP All Points
+AP Application Process
+AP Associated Press
+AP Attached Processor
+APB All Points Bulletin
+APC AMARC Protocol Converter
+APDA Apple Programmers and Developers Association
+APDU Application Protocol Data Unit
+APE APplication Engineering
+APG Aberdeen Proving Ground
+API American Petroleum Institute
+API Application Program(ming) Interface
+APICS American Production and Inventory Control Society
+APJ Astrophysical Journal, "Ap.J", "ApJ"
+APL A Programming Language
+APM Attached Pressurized Module (a.k.a. Columbus)
+APO Alpha Pi (?) Omega, service fraternity
+APO Army Post Office
+APP Application Portability Profile
+APPC Advanced Peer-to-Peer Communications
+APPC Advanced Program-to-Program Communication (IBM)
+APR Annual Percentage Rate
+APS Automatic Protection Switch
+APSE Ada Programming Support Environment
+APT Attached Proton Test
+APU Auxiliary Power Unit
+AQ Accumulator-Quotient register
+AQL Acceptable Quality Level
+AR Accounts Receivable, "A/R"
+AR Address Register
+AR Alarm Report
+ARAMIS American Rheumatic Arthritis Medical Information System
+AR Arkansas
+ARC Advanced RISC Computing
+ARC American Red Cross
+ARC Ames Research Center (NASA)
+ARC Audio Response Controller
+ARCNET Attached Resource Computer local area NETwork
+ARCO Atlantic Richfield COmpany
+ARIS Audichron Recorded Information System
+ARLL Advanced Run-Length Limited encoding
+ARM Acorn Risc Machine
+ARM Adjustable Rate Mortgage
+ARM Annotated Reference Manual
+ARO After Receipt of Order
+ARPA Advanced Research Projects Agency (of the DoD, see DARPA)
+ARP Address Resolution Protocol (Internet->Ethernet)
+ARPANET Advanced Research Projects Agency NETwork
+ARQ Automatic Repeat reQuest
+ARRL Amateur Radio Relay League
+ARSA Airport Radar Service Area
+ARS Alternate Route Selection
+ARSB Automated Repair Service Bureau
+ARTCC Air Route Traffic Control Center
+ARTEMIS Advanced Relay TEchnology MISsion
+ARU Audio Response Unit
+ARV American Revised Version
+ASA Acetyl Salicylic Acid
+ASA American Standards Association (now ANSI)
+ASA Astronomical Society of the Atlantic
+ASAIGAC As Soon As I Get A Chance
+AS Anglo-Saxon
+ASAP as soon as possible
+ASAP As Soon As Possible
+ASAP As Soon As Possible
+ASB Alt.Sex.Bondage
+ASC Accredited Standards Committee
+ASC Additional Sense Code
+ASCAP American Society of Composers, Authors, and Publishers
+ASCC Automatic Sequence-Controlled Calculator
+ASCII American Standard Code for Information Interchange
+ASCQ Additional Sense Code Qualifier
+ASDIC Anti-Submarine Detection Investigation Committee (British for sonar)
+ASDSP Application-Specific Digital Signal Processor
+ASF* alt.sex.fetish.*
+ASFD alt.sex.femdom/ alt.sex.fetish.diapers
+ASG Automated Sciences Group
+ASHRAE Amer. Soc. of Heating, Refrigerating and Air-cond. Engineers, inc.
+ASI Agenzia Spaziale Italiano
+ASI Asynchronous SCSI Interface
+ASI Automatic System Installation
+ASIC Application Specific Integrated Circuit
+ASIS Aromatic Solvent Induced Shift
+ASK Akademische Software Kooperation
+ASK Amplitude Shift Keying
+ASL (a/s/l) Age, Sex, Location (usually impolite IRC query)
+ASM American Society of Metals
+ASME American Society of Mechanical Engineers
+ASN1 Abstract Syntax Notation One, "ASN.1"
+ASN Abstract Syntax Notation
+ASOC Administrative Service Oversight Center
+ASP Aggregated Switch Procurement
+ASP Appletalk Session Protocol
+ASPEN Automatic System for Performance Evaluation of the Network
+ASR Airport Surveillance Radar
+ASRM Advanced Solid Rocket Motor
+ASRS Aviation Safety Reporting System
+ASS Alt.Sex.Spanking/Stories, depending on context
+ASSR Autonomous Soviet Socialist Republic
+AST Applied System Technology
+AST Asyncronous System Trap
+AST Atlantic Standard Time
+ASTM American Society of Testing and Materials
+ASV American Standard Version
+ATA Airport Traffic Area
+ATA AT Attachment
+ATA Automatic Trouble Analysis
+ATACC Advanced Tactical Air Command Central
+AT Access Tandem
+AT Advanced Technology
+AT Atlantic Time
+ATB Advanced Technology Bomber (stealth bomber)
+ATB All Trunks Busy
+ATB Alt.Talk.Bestiality
+ATC Air Traffic Control
+ATC Atsugi Technical Center
+ATC Automatic Transmission Control
+ATDRS Advanced Tracking and Data Relay Satellite
+ATE Automatic Test Equipment
+ATEOTD At The End of the Day
+ATF Advanced Technology Fighter
+ATH Abbreviated Trouble History
+ATI Automatic Test Inhibit
+ATIS Atherton Tools Interface Specification
+ATIS Automatic Terminal Information Service
+ATIS Automatic Transmitter Identification System
+ATK Andrew ToolKit
+ATLAS Atmospheric Laboratory for Applications and Science
+ATM Adobe Type Manager
+ATM Amateur Telescope Maker
+ATM Asynchronous Transfer Mode
+ATM Asynchronous Transfer Mode
+ATM At The Moment
+ATM Automatic Teller Machine
+ATMS Automated Trunk Measurement System
+ATN Automated Test Network
+ATO Abort To Orbit (Shuttle abort plan)
+ATOMS AT&t Optimized Materials Simulator
+ATP2 AppleTalk Phase 2
+ATP Adenosine TriPhosphate
+ATP Airline Transport Pilot (highest grade of pilot certificate)
+ATP All Tests Pass
+ATP Appletalk Transaction Protocol
+ATPCO Airline Tariff Publishing COmpany
+ATR Alternate Trunk Routing
+ATR Apollo Token Ring
+ATRS Automated Trouble Reporting System
+ATS Automated Test System
+ATSL Along The Same Line
+ATT American Telephone & Telegraph, "AT&T"
+ATTC Automatic Transmission Test and Control circuit
+ATTCOM American Telephone & Telegraph COMmunications
+ATTIS American Telephone & Telegraph Information Systems
+ATV All Terrain Vehicle
+AU Arithematic Unit
+AU Astronomical Unit (93,000,000 miles) [Space]
+AUDIX AUDio Information eXchange
+AUI Attachment Unit Interface
+AUP Acceptable Use Policy
+AUP Acceptable Use Policy
+AURA Association of Universities for Research in Astronomy
+AUS Army of the United States
+AUTODIN AUTOmatic DIgital Network
+AUTOSEVCOM AUTOmatic SEcure Voice COMmunications
+AUTOVON AUTOmatic VOice Network
+AUX Apple UniX
+AUXF AUXillary Frame
+AV AudioVisual
+AVD Alternate Voice Data
+AVLIS Atomic Vapor Laser Isotope Separation
+AVS Application Visualization Software
+AWACS Airborne Warnings And Control Systems
+AWEA American Wind Energy Association
+AWG American Wire Gauge
+AWGTHTGTTA Are We Going To Have To Go Through This Again
+AWHFY Are We Having Fun Yet
+AWK al Aho, peter Weinberger, brian Kernighan (pattern scanning language)
+AWOL Absent WithOut Leave (also Absent Without Official Leave) (see AOL)
+AWST Aviation Week and Space Technology (a.k.a. AvLeak), "AW&ST"
+AXAF Advanced X-ray Astrophysics Facility [Space]
+AY Arther Young
+AZ Arizona
+B4 Before
+B4N Bye For Now
+B6ZS Bipolar with 6 Zero Subsitution
+B911 Basic 911
+BA Bachelor of Arts
+BAC By Any Chance
+BACH Business Alliance for Commerce in Hemp
+BAFO Best And Final Offer
+BAG(L) Busting A Gut (Laughing)
+BALUN BALanced to UNbalanced
+BAMAF BELLCORE AMA Format
+BANCS Bell Administrative Network Communications System
+BAPCO Bellsouth Advertising & Publishing COmpany
+BARRNET Bay Area Regional Research Network, "BARRNet" (SF Bay Area)
+BASH Bourne-Again SHell
+BASIC Beginner's All-purpose Symbolic Instruction Code
+BATSE Burst And Transient Source Experiment (on GRO)
+BBA Bachelor of Business Administration
+BB Bases on Balls
+BBB Better Business Bureau
+BB Best of Breed
+BB Bunnies and Burrows
+BBC British Broadcasting Corporation
+B bit, "b"
+BBIAB Be Back In A Bit
+BBL Barrel
+BBL [I'll] Be Back Later
+BBM Big Beautiful Man
+BBN Bolt, Beranek, and Newman [Corporate name]
+B Book
+BBS be back soon
+BBS Bulletin Board Service
+BBS Bulletin Board System
+BBW Big Beautiful Woman
+BBXRT Broad-Band X-Ray Telescope (ASTRO package)
+B Byte
+BC Battlecars
+BC Before Christ
+BC British Columbia
+BCBS Blue Cross/Blue Shield, "BC/BS"
+BCC Blind/Blank Carbon Copy
+BCC Block Check Character
+BCC Blocked Call Cleared
+BCD Bad Conduct Discharge
+BCD Binary Coded Decimal
+BCD Blocked Call Delayed
+BCDIC Binary Coded Decimal Interchange Code
+BCE Before the Common Era (substitute for BC)
+BCNU Be Seeing You
+BCP Binary Communications Protocol
+BCP Byte Controlled Protocols
+BCPL Basic Combined Programming Language
+BCR Bell Communications Research
+BCS Bachelor of Commercial Science
+BCS Basic Combined Subset
+BCS Batch Change Supplement
+BCS Binary Compatibility Standard (ABI for Motorola chips)
+BCS Boston Computer Society
+BCS British Computer Society
+BCWP Budgeted Cost of Work Performed
+BCWS Budgeted Cost of Work Scheduled
+BDA Battle Damage Assessment
+BDA Bomb Damage Assessment
+BD Bachelor of Divinity
+BD Bank Draft
+BD Bills Discounted
+B&D Bondage and Discipline
+BDC Boston Development Center
+BDD Basic Dungeons & Dragons, "BD&D"
+BDF Binary Distribution Format
+BDF Bitmap Description Format (Adobe)
+BDF Bitmap Distribution Format
+BDSM Bondage & Discipline, Dominance & Submission, Sado-Masochism.
+BDSMLMNOP BDSM and whatever else we might do
+BDT Billing Data Transmitter
+BDT Bulk Data Transfer
+BEA Bureau of Economic Analysis
+BEAV Binary Editor And Viewer
+BE Back End
+BE Bill of Exchange
+BECAUSE BEnchmark of Concurrent Architectures for their Use in Scientific Engineering
+BED Hanscom Field, Bedford MA
+BEF Band Elimination Filter
+BEF British Expeditionary Force (see AEF)
+BELLCORE BELL COmmunications REsearch
+BEM Bug Eyed Monster
+BENELUX BElgium, NEtherlands, and LUXembourg
+BER Basic Encoding Rules
+BER Bit Error Rate
+BERNET BErliner RechnerNETz
+BERT Bit Error Rate Test
+BEST Borland Enhanced Support and Training
+BETRS Basic Exchange Telecommunications Radio Service
+BFA Bachelor of Fine Arts
+BF Boy Friend
+BF Brought Forward
+BFD Big F***ing Deal
+BFHD Big Fat Hairy Deal
+BFN Bye For Now
+BFR Biennial Flight Review
+BGP Border Gateway Protocol
+BHA Butylated HydroxyAnisole
+BH Black Hole
+BH Boot Hill
+BHC Busy Hour Calls
+BHP Brake HorsePower
+BHT Butylated HydroxyToluene
+BIAB Back In A Bit
+BIAF Back In A Few
+BIAS Back In A Second
+BIAW Back In A While
+BI Backplane Interconnect
+BI Bus Interconnect
+BICS Building Industry Consulting Services [telephony]
+BID Bis In Die (twice a day)
+BIMA Berkeley Illinois Maryland Array
+BIND Berkeley Internet Name Daemon
+BIOC Break Into Other Computers
+BION Believe It Or Not
+BIOS Basic Input Output System
+BIRD BIlinear Rotation Decoupling
+BIS Business Information System
+BISDN Broadband Integrated Services Digital Network, "B-ISDN"
+BISP Business Information System Program
+BISYNC Binary Synchronous Communications, "BiSync" (BSC is preferred) [IBM]
+BIT Binary digIT
+BIT Bipolar Integrated Technology Inc
+BITNET Because-It's-Time NETwork
+BITS Biotechnology Information Toolkit Software
+BIU Bus Interface Unit
+BIX Byte Information eXchange
+BLAS Basic Linear Algebra Subroutines
+BLAST BLocked ASynchronous Transmission
+BL Bill of Loading
+BLDS Busy Line/Don't Answer, "BL/DS"
+BLER Block Error Rate
+BLERT BLock Error Rate Test
+BLF Busy Lamp Field [telephony]
+BLF Busy Line Field
+BLM Bureau of Land Management
+BLOBS Binary Large OBjectS
+BLS Bureau of Labor Statistics
+BLS Business Listing Service
+BLT Bacon, Lettuce, and Tomato
+BLT BLock Transfer
+BLV Busy Line Verification
+BMA Bank Marketing Association
+BM Basal Metabolism
+BM Bowel Movement
+BM Breakdown Maintenance
+BMEWS Ballistic Missile Early Warning
+BMG Bloomington, IN
+BMI Broadcast Music Inc.
+BMO Ballistic Missile Office
+BMOC Big Man On Campus
+BMP Benchmark Plan
+BMR Basal Metabolism Rate
+BNC Bayonet Navy Connector
+BNC Bayonet Neill Concelman (connector) [electronics] (see also TNC)
+BNC Berkley Nucleonics Corporation
+BNC British Naval Connectors
+BNET Berkeley NETworking
+BNF Bachus-Naur Form
+BNFL British Nuclear Fuels Ltd
+BNRCVUUCP Batch News ReCeive Via UUCP
+BNS Billed Number Screening
+BNSC British National Space Centre
+BNU Basic Networking Utilities (AT&T's name for HoneyDanBer UUCP)
+BO Body Odor
+BO Branch Office
+BO Buyer's Option
+BOC Bell Operating Company
+BOD Board Of Directors
+BOF Birds Of a Feather
+BOFH Bastard Operator From Hell
+BOM Bill Of Materials
+BOQ Bachelor Officers' Quarters
+BOR Basic Output Report
+BORSCHT Battery, Overvoltage, Ringing, Supervision, Coding, Hybrid Test
+BOS Base Operating System
+BOS Boston MA
+BOS Business Office Supervisor
+BOSIX Biin Open System Interface eXtension
+BOSS Billing and Order Support System
+BOT Beginning Of Tape
+BP Base Pointer
+BP Blood Pressure
+BP British Petroleum
+BP British Pharmacopoeia
+BPD Borderline Personality Disorder
+BPI Bits Per Inch, Blocks Per Inch, Bytes Per Inch
+BPOC Bell Point Of Contact
+BPOE Benevolent and Protective Order of Elks
+BPPS Basing-Point Pricing System
+BPS Bits/Bytes Per Second
+BPSS Basic Packet-Switching Service
+BRAT Business Residence Account Tracking system
+BRB [I'll] Be Right Back
+BR Bills Receivable
+BR British Rail
+BRC Business Reply Card
+BRCS Business Residence Custom Service
+BRI Basic Rate Interface
+BRIEF Basic Reconfigurable Interactive Editing Facility
+BRL army Ballistic Research Laboratory
+BRL Ballistics Research Lab
+BRM Basic Remote Module
+BRS Bibliographic Retrieval Service
+BRT Be Right There
+BSA Basic Serving Arrangements
+BSA Birmingham Small Arms
+BSA Boy Scouts of America
+BS Bachelor of Science
+BS Back Space
+BS Banded Signaling
+BSBH Busy Season Busy Hour
+BS Bill of Sale
+BS Bill of Sale, "B/S"
+BS British Standards
+BSC Bachelor of SCience, "BSc"
+BSC Binary Synchronous Communication
+BSC Binary Synchronous Communications (also sometimes BiSync) [IBM]
+BSC Business Service Center
+BSCM BiSynchronous Communications Module
+BSD Berkeley Software Distribution
+BSE Basic Service Element
+BSF Bell Shock Force
+BSI British Standards Institute
+BSMTP Batched SMTP
+BSN Bachelor of Science in Nursing
+BSOC Bell Systems Operating Company
+BSP Bell System Practice
+BSRFS Bell System Reference Frequency Standard
+BSS Basic Synchronized Subset
+BSS Block Started by Symbol (IBM assembly-language)
+BST Basic Services Terminal
+BSTJ Bell System Technical Journal
+BSTS Better Safe than sorry
+BSW Boston Software Works
+BTA But Then Again
+BTAM Basic Telecommunications Access Method [IBM]
+BT Bus Terminator
+BTDT Been There, Done That
+BTHU British Thermal Unit, "BThU" (BTU, q.v., is preferred)
+BTL Backplane Transceiver Logic
+BTL Bell Telephone Laboratories
+BTN Billing Telephone Number
+BTO Bachman Turner Overdrive
+BTOL Better Than Open Look
+BTS Board Tracking System
+BTSOOM Beats The Shit Out Of Me
+BTTH butt to the head
+BTU British Thermal Unit
+BTW By The Way
+BU Bushido
+BU Business Units
+BURP Brewers United for Real Potables
+BUS Basic Utility System
+BUT Board Under Test
+BVA Billing Validation Application
+BV Blessed Virgin
+BVC Billing Validation Center
+BVY Beverly MA
+BW Business Wire
+BWC BandWidth Compression
+BWG Big Wide Grin
+BWI Baltimore-Washington International (airport)
+BWI British West Indies
+BWM Broadcast Warning Message
+BWT Broadcast Warning TWX
+BWTS BandWidth Test Set
+BX Base eXchange (see also PX)
+BYKT(A) But You Knew That (Already)
+BYU Brigham Young University
+CAA Civil Aviation Authority (U.K.)
+CAB Civil Aeronautics Board
+CABS Carrier Access Billing System
+CA CAble
+CA California
+CAC Calling-card Authorization Center
+CAC Carrier Access Code
+CAC Circuit Administration Center
+CAC Customer Administration Center
+CA Chartered Accountant
+CA Chief Accountant
+CA Chronological Age
+CACM Communications of the Association for Computing Machinery
+CA Collision Avoidance (as in CSMA/CA (q.v.))
+CAD Computer Aided Design (sometimes seen as CAD/CAM)
+CAD Computer-Aided Dispatch
+CADD Computer-Aided Design and Drafting
+CADV Combined Alternate Data/Voice
+CAE Common Application Environment
+CAE Computer-Aided Education
+CAE Computer-Aided Engineering
+CAFE Corporate Average Fuel Economy
+CAGR Compound Annual Growth Rate
+CAI Call Assembly Index
+CAI Computer Aided Instruction
+CAI Computer Application Inc
+CAI Computer Assisted Instruction
+CAIS Colocated Automatic Intercept System
+CAIS Common Apse Interface Specification
+CALRS Centralized Automatic Loop Reporting System
+CALS Computer-aided Acquisition and Logistics Support
+CAMAC Computer Automated Measurement And Control
+CAMA Centralized Automatic Message Accounting
+CAM Common Access Method (SCSI)
+CAM Computer Aided Management
+CAM Computer-Aided Manufacturing
+CAM Computer Aided Manufacturing (sometimes seen as CAD/CAM)
+CAM Content Addressable Memory
+CAML Categorical Abstract Machine Language
+CAMM Computer Assisted Material Management
+CAMP Campaign Against Marijuana Planting
+CAMRA CAMpaign for Real Ale
+CAN Campus Area Network
+CAP Civil Air Patrol
+CAP Columbia Appletalk Package
+CAP Computer Aided Publishing
+CAPP Computer Aided Process Planning
+CAPS CAPital letterS
+CAPTAIN Character And Pattern Telephone Access Information Network
+CAR Computer Access & Retrieval
+CAR Contents of the Address part of the Register
+CAROT Centralized Automatic Reporting On Trunks
+CART Championship Auto Racing Teams
+CAS Chemical Abstracts Service
+CAS Circuit Associated Signaling
+CAS Communicating Application Specification
+CAS Computerized Autodial System
+CASE Common Application Service Element
+CASE Computer Aided Software Engineering
+CASSI Chemical Abstracts Service Source Index
+CASSIS Classification and Search Support Information System
+CAT Computer-Aided Tomography
+CAT Computer Assisted Typesetter
+CAT conCATenate
+CAT Craft Access Terminal
+CAT Customer Acceptance Test
+CATIS Common Applications and Tools Integration Services
+CATLAS Centralized Automatic Trouble Locating and Analysis System
+CATV Community Antenna TeleVision
+CAU Connection Arrangement Unit
+CAV Constant Angular Velocity
+CAVU Ceiling And Visibility Unlimited
+CB(C&B) Chastity Belt / Cock and Ball
+CBC Canadian Broadcasting Corporation
+CB Citizens Band radio
+CBD Cash Before Delivery
+CBD Central Business District
+CBD Commerce Business Daily
+CBDS Connectionless Broadband Data Service
+CBEMA Computer & Business Equipment Manufacturers Association
+CBI Computer Based Instruction
+CBR Chemical, Biological, Radiological warfare
+CBS Columbia Broadcasting System
+CBS CrossBar Switching
+CBT Cock and Ball Torture/Training
+CBW Chemical and Biological Warfare
+CBX Computerized Branch eXchange
+CCA Computer Corporation of America [Corporate name]
+CCAFS Cape Canaveral Air Force Station
+CC Carbon Copy
+CCC Canadian Committee on Cataloging
+CCC Central Control Complex
+CCC Ceramic Chip Carriers
+CCC Civil(ian) Conservation Corps
+CCCCM CCC CounterMeasures (sometimes C^3CM)
+CCC Command, Control, and Communications (sometimes C^3)
+CC C Compiler
+CCC Computer Control Center
+CCC Concourse Computer Center [MIT]
+CC Center Conductor
+CC Central Control
+CCCI Command, Control, Communications, and Intelligence
+CC Cluster Controller
+CC Common Control
+CC Cost Center
+CC Country Code
+CCD Charge Coupled Device (see CID)
+CCD Computer-Controlled Display
+CCDS Centers for the Commercial Development of Space
+CCH Connections per Circuit per Hour
+CCI Computer Carrier Interrupt
+CCI Computer Consoles, Incorporated
+CCIM Certified Commercial Investment Member
+CCIP Continuously Computed Impact Point
+CCIR Comite' Consultatif International des Radio Communications
+CCIS Common Channel Interoffice Signaling [telephony]
+CCITT Comite' Consultatif International Telegraphique et Telephonique
+CCITT International Consultative Committee for Telegraphy and Telephony
+CCL Console Command Language
+CCNC Common Channel Network Controller
+CCNC Computer/Communications Network Center
+C Copper
+CCR Commitment, Concurrency, and Recovery
+CCR Covenants, Conditions, and Restrictions
+CCR Creedence Clearwater Revival
+CCR Customer-Controlled Reconfiguration
+CCRP Continuously Computed Release Point
+CCSA Common Control Switching Arrangement [telephony]
+CCS Common Channel Signaling
+CCS Common Command Set (SCSI)
+CCS Hundred (C) Call Seconds
+CCTAC Computer Communications Trouble Analysis Center
+CCTA Central Computer and Telecommunications Agency
+CCT Central Control Terminal
+CCTV Closed Circuit TeleVision
+CCU COLT Computer Unit
+CCV Calling Card Validation
+CCW Counter ClockWise
+CDA Call Data Accumulator
+CDA Coin Detection and Announcement
+CDA Compound Documents Architecture
+CDAR Customer Dialed Account Recording
+CDB Command Descriptor Block
+CDB Customer Distributed Buglist
+CD Carrier Detect (properly DCD (q.v.))
+CDC Centers for Disease Control
+CDC Control Data Corporation, inc. [Corporate name]
+CD Certificate of Deposit
+CDCF Cumulative Discounted Cash Flow
+CD Circular Dichroism
+CD Civil Defense
+CD Collision Detection (as in CSMA/CD (q.v.))
+CD Compact Disk
+CD Cross Dresser
+CDEV Control panel DEVice
+CDF Combined Distributing Frame
+CDF Context-Dependent File
+CDIAC Carbon Dioxide Information Analysis Center
+CDI Circle Digit Identification
+CDI Course Deviation Indicator
+CDO Community Dial Office
+CDP Career Development Program
+CDPR Customer Dial Pulse Receiver
+CDR Call Dial Rerouting
+CDR CommanDeR
+CDR Contents of the Decrement part of the Register
+CDR Critical Design Review
+CDROM Compact Disk Read Only Memory, "CD-ROM"
+CDS Craft Dispatch System
+CDSF Commercially Developed Space Facility
+CDT Call Data Transmitter
+CDT Central Daylight Time
+CDU Control Display Unit
+CEA Commissariat a l'Energie Atomique, France
+CEA Council of Economic Advisors
+CEA County Education Authority
+CEBIT welt-CEntrum Buero Information Telekommunikation
+CEC Commission of the European Communities
+CE Chemical Engineer
+CE Civil Engineer
+CE Common Era (substitute for AD)
+CE Corps of Engineers
+CE Customer Engineer
+CED Committee for Economic Development
+CEERT Coalition for Energy Efficiency and Renewable Technologies
+CEF Cable Entrance Facility
+CEI Comparably Efficient Interconnection
+CELSS Controlled Ecological Life Support System [Space]
+CEN Centre d'Etudes Nucleaires
+CENS Centre d'Etudes Nucleaires de Seclay
+CENTO CENtral Treaty Organization
+CEO Chief Executive Officer
+CERMET Ceramic Metal Element
+CERN organisation (formerly Conseil) Europeenne pour la Recherche Nucleaires
+CERT Computer Emergency Response Team
+CET Central European Time
+CEV Controlled Environment Vault
+CEVI Common Equipment Voltage Indicator
+CFA Center For Astrophysics
+CFB Color Frame Buffer
+CFCA Communications Fraud Control Association
+CF Carry Forward
+CFC Chloro-FluoroCarbon [chemical]
+CFC Combined Federal Campaign
+CF Coin First payphone [telephony]
+CFD Computational Fluid Dynamics
+CFF Columbus Free Flyer
+CFHT Canada-France-Hawaii Telescope
+CFI Certificated Flight Instructor
+CFI Cost, Freight, and Insurance
+CFIDS Chronic Fatigue Immune Deficiency Syndrome
+CFL Canadian Football League
+CFO Chief Financial Officer
+CFP Call For Papers
+CFR Code of Federal Regulations
+CFS Chronic Fatigue Syndrome
+CGA Color Graphics Adapter
+CG Coast Guard
+CG Commanding General
+CGCT Compagnie Generale de Constructions Telephoniques
+CGE Cincinnati Gas & Electric, "CG&E"
+CGE Compagnie Generale d'Electricite
+CGIAR Consultative Group on International Agricultural Research
+CGI Computer Graphics Interface
+CGM Computer Graphics Metafile
+CGMIF Computer Graphics Metafile Interchange Format
+CGN Concentrator Group Number
+CGS Centimeter-Gram-Second
+CGX Chicago (Meigs) IL
+CHA Champions
+CHAP CHAnnel Processor
+CHARA Center for High Angular Resolution Astronomy
+CHARGEN CHARacter GENerator
+CH Cardboard Heroes
+CH ClearingHouse
+CH CourtHouse
+CH Customs House
+CHI Chill: Adventures into the Unknown
+CHOTS Corporate Headquarters Office Technology System
+CHP California Highway Patrol
+CHUDWAH Clueless Het Dom Wannabe
+CHUSWAH Clueless Het Sub Wannabe
+CIAC Computer Incident Advisory Capability
+CIA Central Intelligence Agency [US Government]
+CIB Console Interface Board
+CICA Competition in Contracting Act
+CIC Carrier Identification Code
+CIC Coordination and Information Center [CSNet]
+CI Configuration Interaction
+CICS Customer Information Control System [IBM]
+CICSVS Customer Information Control System / Virtual Storage, "CICS/VS"
+CI Cubic Inches
+CID Central Institute for the Deaf
+CID Charge Injection Device (see CCD)
+CID Computer Integrated Design
+CIDEP Chemically Induced Dynamic Electron Polarization
+CIDIN Common Icao Data Interchange Network
+CIDNP Chemically Induced Dynamic Nuclear Polarization
+CIF Caltech Intermediate Form
+CIF Cost, Insurance and Freight
+CII Call Identity Index
+CIMA Construction Industry Manufacture's Association
+CIM Computer Integrated Manufacturing
+CIO Chief Information Officer
+CIP Chief Income Producer
+CIP Computer-Investitions-Programm
+CIRCA Center for Instructional and Research Computing Activities
+CIRRIS Cryogenic InfraRed Radiance Instrument for Shuttle
+CISC Complex Instruction Set Computer
+CIS Chief Income Spender
+CIS Commonwealth of Independent States
+CIS Complete and Irrevocable Submission
+CIS Compuserve Information S?
+CIS Customized Intercept Service
+CIT California Institute of Technology
+CIT Case Institute of Technology (part of CWRU, Cleveland, OH)
+CIT Circumstellar Imaging Telescope [Space]
+CIT Computer Integrated Telephony
+CIU Computer Interface Unit
+CLASP Comprehensive Logistics Automated Support Program
+CLASS Centralized Local Area Selective Signaling
+CLASS Custom Local Area Signaling Service
+CL Connection-Less mode
+CLDN Calling Line Directory Number
+CLEF Certified Licensed Evaluation Facility
+CLEI Common-Language Equipment Identification
+CLI Calling Line Ident
+CLI Command Line Interpreter
+CLID Calling Line IDentification
+CLLI Common-Language Location Identification
+CLNP ConnectionLess Network Protocol
+CLOS Common Lisp Object System
+CLRC Circuit Layout Record Card
+CLR Combined Line and Recording
+CLS connectionless server
+CLTP Connectionless Transport Protocol
+CLU Chartered Life Underwriter
+CLUT Color LookUp Table
+CLV Constant Linear Velocity
+CMA Cash Management Account
+CMAC Centralized Maintenance and Administration Center
+CMCC Central Mission Control Centre (ESA)
+CMC Communication Machinery Corporation
+CMC Construction Maintenance Center
+CMC Corporate Management Commitee
+CM Command Module (Apollo spacecraft)
+CM Computer Modern
+CM Congregation of the Mission
+CM Corrective Maintenance
+CMD Centralized Message Distribution
+CMDF Combined Main Distributing Frame
+CMDS Centralized Message Data System
+CMH Port Columbus OH
+CMI Champaign-Urbana IL
+CMIIW correct me if I'm wrong
+CMIIW Correct Me If I'm Wrong
+CMIP Common Management Information Protocol
+CMIS Common Management Information Service
+CMISE Common Management Information Service Element
+CML Current Model Logic
+CMMU Cache/Memory Management Unit
+CMOS Complementary-symmetry Metal-Oxide Semiconductor
+CMOT Common Management Information Services and Protocol over TCP/IP
+CMRR Common Mode Rejection Ratio
+CMS Call Management System
+CMS Circuit Maintenance System
+CMS Communications Management Subsystem
+CMS Conversational Monitoring System
+CMSGT Chief Master Sergeant, "CMSgt"
+CMT Cellular Mobile Telephone
+CMU Carnegie-Mellon University
+CMU COLT Measurement Unit
+CMW Compartmented Mode Workstation
+CMYK Cyan, Magenta, Yellow, blacK
+CNAB Customer Name/Address Bureau
+CNA Communications Network Application
+CNA Customer Name / Address, "CN/A" [telephony]
+CNA Customer Name and Address
+CN Canadian National (railroad) [Corporate name]
+CNCC Customer Network Control Center
+CNC Computer Numerical Control
+CNC Consensual Non Consent
+CN Change Notice
+CNDO Complete Neglect of Differential Overlap
+CNES Centre National d'Etude Spatiales
+CNI Common Network Interface
+CNMA Communications Network for Manufacturing Applications
+CNM Communications Network Management
+CNMS Cylink Network Management System
+CNN Cable News Network
+CNO Carbon-Nitrogen-Oxygen
+CNO Chief of Naval Operations
+CNP continued [in my] next post
+CNR Canadian National Railways
+CNR Carrier to Noise Ratio
+CNR Consiglio Nazionale delle Ricerche, Italy
+CNRCVUUCP Compressed News ReCeive Via UUCP
+CNS Central Nervous System
+CNS Complimentary Network Service
+CNSR Comet Nucleus Sample Return
+COAM Customer Owned And Maintained
+COB Close Of Business
+COBE COsmic Background Explorer
+COBOL COmmon Business Oriented Language
+CO Cash Order
+COC Call of Cthulhu
+COC Circuit Order Control
+CO Central Office [telephony]
+CO Colorado
+COCOM Coordinating Comittee for Export to Comminist Area
+CO Commanding Officer
+CO Conscientious Objector
+COCOT Customer-Owned Coin-Operated Telephone [telephony]
+CODASYL Conference On DAta SYstems Languages
+CODCF Central Office Data Connecting Facility
+COD Collect On Delivery; Cash On Delivery
+CODEC COder-DECoder
+COE Center Of Excellence
+COE Central Office Equipment
+COEES COE Engineering System
+COER Central Office Equipment Report
+COFF Common Object File Format
+CO in Care Of, "C/O"
+COLA Cost-Of-Living Allowance
+COLOC COrrelation spectroscopy for LOng-range Couplings
+COLT Central Office Line Tester
+COMAS Central Office Maintenance and Administration System
+COM Commercial (pilot certificate)
+COM Computer Output Microfilm
+COMDEX COMputer Dealer's Exposition
+COMM Communications
+COMPACT COMmercial Product ACquisition Team
+COMPTEL COMPton TELescope (on GRO)
+COMSAT Communications Satellite Corp
+COMSAT COMmunications SATellite [Space]
+COMS Complementary Metal Oxide Semiconductor
+CONN CONNector
+CONS Connection-Oriented Networking Session
+CONTAC Central Office NeTwork ACcess
+CONUS CONtinental United States
+COO Chief Operating Officer
+COP Character-Oriented Protocol
+COPS Computer Oracle and Password System
+COQ Cost Of Quality
+CORE COntrolled Requirement Expression
+CORN COmputer Resource Nucleus
+CORNET CORperate NETwork
+COS Central Office Switch
+COS Corporation for Open Systems
+COSINE Cooperation for Open Systems Interconnection Networking in Europe
+COSMIC COmmon Systems Main InterConnection frame system
+COSMIC COmputer Software Management and Information Center
+COSMOS COmputer System for Mainframe OperationS
+COSTAR Corrective Optics Space Telescope Axial Replacement
+COSY COrrelation SpectroscopY
+COT Central Office Terminal
+COTS Connection-Oriented Transport (layer) Service
+CPA Certified Public Accountant
+CPA Communications & Public Affairs, "C&PA"
+CP Canadian Pacific
+CP Canadian Press
+CPC Cellular Phone Company
+CPC Circuit Provisioning Center
+CP Chemically Pure
+CP Command Post
+CP Command Processor
+CP Control Program
+CP CoPy
+CP Corporal Punishment
+CP Cross Polarization
+CPD Central Pulse Distributor
+CPE Customer Premises Equipment
+CPE Customer-Provided Equipment
+CPFF Cost Plus Fixed Fee
+CPH Cost Per Hour
+CPI Characters Per Inch
+CPI Common Programming Interface
+CPI Computer Private branch exchange Interface
+CPIO CoPy In/Out
+CPL Combined Programming Language
+CPMAS Cross Polarization/Magic Angle Spinning, "CP/MAS"
+CPM Control Program for Microcomputers (sometimes CP/M)
+CPM Cost Per Minute
+CPM Critical Path Method
+CPMG Carr-Purcell-Meiboom-Gill
+CPMP Carrier Performance Measurement Plan
+CPO Chief Petty Officer
+CPO Chief Post Office
+CPO Customer Premises Equipment
+CPP Cable Patch Panel
+CPR Canadian Pacific Railway
+C programming language, successor to BCPL
+CPS Characters Per Second
+CPSR Computer Professionals for Social Responsibility
+CPT CaPTain
+CPU Central Processing Unit
+CPW Certified Public Weigher
+CQ Charge of Quarters, Call to Quarter
+CQ Commercial Quality
+CRAF Comet Rendezvous/Asteroid Flyby [Space]
+CRAM Card Random Access Memory
+CRAS Cable Repair Administrative System
+CRB Certified Residential Broker
+CR Carriage Return (ASCII 15 octal)
+CRC Camera Ready Copy
+CRC Chemical Rubber Company
+CRC Civil Rights Commission
+CRC Customer Record Center
+CRC Cyclical Redundancy Character
+CRC Cyclic Redundancy Check
+CRD Customer Required Date
+CREG Concentrated Range Extension with Gain
+CREN Corporation for Research and Educational Networking
+CRFC Customer Return For Credit
+CRFMP Cable Repair Force Management Plan
+CRI Cray Research, Inc.
+CRIN Centre de Recherche en Informatique de Nancy
+CRISC Complex-Reduced Instruction Set Computer
+CRIS Customer Record Information System
+CRISP Complex-Reduced Instruction Set Processor
+CRISP Cross-Relaxation Intensity Sequence Pattern
+CRL Certificate Revocation List
+CRLF Carriage Return/Line Feed
+CRONIC Colorado Rudimentary Operating Nucleus for Intelligent Controllers (HSC OS)
+CROTCH Computerized Routine for Observing and Testing the Channel Hardware
+CRRES Combined Release / Radiation Effects Satellite
+CRSAB Centralized Repair Service Answering Bureau
+CRS Centralized Results System
+CRT Cathode Ray Tube (also generic reference to a terminal)
+CRTC Canadian Radio-television and Telecommunications Commission
+CSAB Computing Sciences Accreditation Board
+CSA Canadian Standards Association
+CSA Carrier Serving Area
+CSACC Customer Service Administration Control Center
+CSA Client Service Agent
+CSA Confederate States of America
+CSACS Centralized Status, Alarm and Control System
+CSA Customer Service Administration
+CSAR Centralized System for Analysis Reporting
+CSC Cell Site Controller
+CSC Computer Sciences Corporation
+CS Chivalry & Sorcery, "C&S"
+CS Civil Servant
+CSCM Chemical Shift Correlation Map
+CS Code Segment
+CS Computer Science; Computing Science
+CS County Seat
+CS Customer Service
+CSDC Circuit Switched Digital Capability
+CSD Customer Service Division
+CSE Common Subexpression Elimination
+CSF Critical Success Factor
+CSI Commercial Systems Integration
+CSIRO Commonwealth Scientific and Industrial Research Organization
+CSIS Canadian Security and Intelligence Service
+CSL Can't Stop Laughing
+CSL Coin Supervising Link
+CSMACA Carrier Sense Multiple Access with Collision Avoidance, "CSMA/CA"
+CSMA Carrier Sense Multiple Access
+CSMACD Carrier Sense Multiple Access with Collision Detection, "CSMA/CD"
+CSM Command and Service Module (Apollo spacecraft)
+CSM Command Sergeant Major
+CSN Computer Systems News (magazine)
+CSNET Computer Science NETwork
+CSOC Consolidated Space Operations Center (at Colorado Springs)
+CSO Central Services Organization
+CSO Computing Services Office (UIUC)
+CSPAN Cable-Satellite Public Affairs Network, "C-SPAN"
+CSP Control Switching Point
+CSR Control and Status Register
+CSRG Computer Systems Research Group
+CSRI Computer Systems Research Institute (U Toronto)
+CSRS Civil Service Retirement System
+CSS Computer Sub-System
+CSS Customer Switching System
+CSTA Computer Supported Telecommunications Applications
+CSTC Consolidated Satellite Test Center (USAF)
+CST Central Standard Time
+CSU Channel Service Unit
+CTC Canadian Transport Commission
+CTC Centralized Traffic Control [railroad]
+CTC Central Test Center
+CTC Chu-Itoh Techno-Science Co.
+CT Central Time
+CT Charge Transfer
+CT Communications & Tracking, "C&T"
+CT Computed Tomography
+CT Connecticut
+CTD Computing and Telecommunications Division
+CTERM Command TERMinal (DECNET)
+CTIO Cerro Tololo Inter-american Observatory
+CTM Contac Trunk Module
+CTMS Carrier Transmission Measuring System
+CTNE Compania Telefonica Nacional de Espana
+CTO Call Transfer Outside
+CTRL Control
+CTS Carpal Tunnel Syndrome
+CTS Carpal Tunnel Syndrome
+CTS Cartridge Tape Subsystem (Exabyte)
+CTS Clear To Send
+CTS Compatible Timesharing System
+CTSS {Compatible,Chameleon,Cray,Cyber} Time-Sharing System
+CTT Cartridge Tape Transport
+CTTC Cartridge Tape Transport Controller
+CTTN Cable Trunk Ticket Number
+CTV Canadian TeleVision network
+CUA Common User Access
+CU Close-Up
+CU Control Unit
+CUCRIT Capital Utilization CRITeria
+CU Customer Unit
+CU (L8R) (S) See You (Later) (Soon)
+CUL See You Later [net jargon]
+CUNBATCH Compressed news UNBATCH
+CUTK Common Update/EQuipment system, "CU/TK"
+CVCC Controlled Vortex Combustion Chamber
+CV Constant Velocity
+CV Curriculum Vitae
+CVD Chemical Vapor Deposition
+CVR Compass Voice Response
+CVT Continuous Variable Transmission
+CW Car Wars
+CWC City-Wide Centrex
+CW Chemical Warfare
+CW Child Welfare
+CW Churchwarden
+CW Continuous Wave
+CWI Centrum voor Wiskunde en Informatica (Centre for Mathematics and Computer Science)
+CWO Cash With Order
+CWO Chief Warrant Officer
+CWRU Case Western Reserve University
+CWYS Converse With You Soon
+CXI Common X-windows Interface
+CYA Cover Your Ass
+CY Calendar Year
+CYO Catholic Youth Organization
+CZ Canal Zone
+CZ Control Zone
+DACCS Digital Access Cross Connect System [telephony]
+DAC Design Automation Conference
+DAC Digital to Analog Converter
+DACS Digital Access Cross-connect System [telephony]
+DACS Directory Assistance Charging System
+DA Days after Acceptance
+DAD Draft ADdendum
+DA Department of Agriculture
+DA Deposit Account
+DA Desk Accessory (Mac)
+DA Digital to Analog converter, "D?A"
+DA Directory Assistance (/C = computerized, /M = Microfilm)
+DA District Attorney
+DA Don't Answer
+DAIS Distributed Automatic Intercept System
+DAMQAM Dynamically Adaptive Multicarrier Quadrature Amplitude Modulation
+DAP Data Access Protocol (DECNET)
+DAP Division Advisory Panel [of NSF (q.v.) DNCRI (q.v.)]
+DARC Division Alarm Recording Center
+DAR Daughters of the American Revolution
+DARFC Duck And Run For Cover
+DARPA Defense Advanced Research Projects Agency
+DARU Distributed automatic intercept system Audio Response Unit
+DASD Direct Access Storage Device
+DAS Directory Assistance System
+DAS Distributor And Scanner
+DAS Dual Attach Station
+DASWDT Distributor And Scanner-Watch Dog Timer, "DAS-WDT"
+DATA Defense Air Transport Administration
+DAT Digital Audio Tape
+DAV Data Above Voice
+DAV Disabled American Veterans
+DAY Dayton OH
+DBAC Data Base Administration Center
+DBA Data Base Administrator
+DBA Doing Business As
+DBAS Data Base Administration System
+DB DataBase
+DB DeciBels, "db"
+DB Dial Box
+DBF DBase Format
+DBM DataBase Manager
+DBME DataBase Managment Environment
+DBMS DataBase Management System (rdbms for Relational)
+DBRAD Data Base Relational Application Directory
+DBS Duplex Bus Selector
+DBT Dialectical Behavior Therapy
+DCA Defense Communications Agency
+DCA Distributed Communication Architecture
+DCA Document Content Architecture
+DCA Washington (National) DC
+DCC Data Country Code
+DCC Descriptive Cataloging Committee
+DCC DiCyclohexylCarbodiimide
+DCC Digital Compact Cassette
+DCCO Defense Commercial Communications Office
+DCCS DisContiguous Shared Segments
+DC Data Cartridge
+DCD Data Carrier Detect (sometimes CD (q.v.))
+DC Direct Current, "dc" (see also AC)
+DC District of Columbia
+DCE Data Circuit-terminating Equipment
+DCE Data Communications Equipment
+DCE Distributed Computing Environment
+DCH D Channel Handler
+DCI Desktop Color Imaging
+DCL Data Control Language
+DCL DEC Control Language
+DCL Digital Command Language
+DCLU Digital Carrier Line Uint
+DCM Digital Carrier Module
+DCMS Distributed Call Measurement System
+DCMU Digital Concentrator Measurement Unit
+DCNA Data Communication Network Architecture
+DCO Document Change Order
+DCP Distributed Communications Processor
+DCP Duplex Central Processor
+DCPR Detailed Contuing Property Record (PICS/DCPR)
+DCPSK Differential Coherent Phase-Shift Keying
+DCS Digital Crosconnect System
+DCS Distribution Control System
+DCT Digital Carrier Trunk
+DCTN Defense Commercial Telecommunications Network
+DCTS Dimension Custom Telephone Service
+DDA Digital Differential Analyzer
+DDA Domain Defined Attribute
+DDB Device Dependent Bitmap
+DDC Digital Data Converter
+DDC Direct Department Calling
+DDCMP Digital Data Communication Message Protocol
+DDCU DC-to-DC Converter Unit
+DD Daredevils
+DD Data Dictionary
+DD Days after Date
+DDD Direct Distance Dialing [Telephony; principally US, elsewhere STD]
+DD Demand Draft
+DD Dishonorable Discharge
+DD Disk Drive
+DD Doctor of Divinity
+DD Double Density
+DD Dungeons & Dragons, "D&D"
+DDE Dynamic Data Exchange
+D Depth
+DDJ Dr. Dobbs Journal
+DDK Driver Development Kit (from MS)
+DDL Data Definition Language
+DDL Document Description Language
+DDN Defense Data Network
+DDP Datagram Delivery Protocol
+DDP Distributed Data Processing
+DDPEX Device Dependent PEX
+DDQ DichloroDicyanobenzoQuinone
+DDS Dataphone Digital Service [AT&T]
+DDS Dataphone Digital service carrier offering 2.4 - 56 kb/s
+DDS Digital Dataphone Service
+DDS Digital Data Service
+DDS Digital Data Storage (Sony and HP's DAT format)
+DDS Digital Data System
+DDS Direct Digital Service
+DDS Doctor of Dental Surgery; Doctor of Dental Science
+DDS Document Distribution Services
+DDT DichloroDiphenylTrichloroethane
+DDV DatenDirektVerbindung
+DDX Digital Data eXchange, Device Dependent X (windows)
+DDX Distributed Data eXchange
+DEA Data Encryption Algorithm
+DEA Drug Enforcement Agency
+DEAR Department of Energy Acquisition Regulation
+DEBNA Digital Ethernet BI Network Adapter
+DEC Digital Equipment Corporation [Corporate name]
+DECNET Digital Equipment Corporation NETwork
+DECUS Digital Equipment Computer Users Society
+DE Delaware
+DE Disk Enclosure
+DELNI Digital Ethernet Local Network Interconnect
+DELQA Digital Ethernet Lowpower Q-bus network Adapter
+DELUA Digital Ethernet Lowpower Unibus network Adapter
+DEMPR Digital Ethernet Multi-Port Repeater
+DEPCA Digital Ethernet Personal Computer-bus Adapter
+DEPT Distortionless Enhancement by Polarization Transfer
+DEQNA Digital Ethernet Q-bus Network Adapter
+DEREP Digital Ethernet REPeater
+DERP Defective Equipment Replacement Program
+DES Data Encryption Standard
+DESPR Digital Ethernet Single Port Repeater
+DESTA Digital Ethernet thin-wire STation Adapter
+DEUNA Digital Ethernet Unibus Network Adapter
+DEW Distant Early Warning (as in DEW Line)
+DEXEC Diagnostic EXEc software
+DFC Distinguished Flying Cross
+DF Damage Free
+DFD Data Flow Diagram
+DF Direction Finding
+DF Direction Finding, "D/F"
+DFE Data Flow Editor
+DFG Deutsche ForschungsGemeinschaft
+DFI Digital Facility Interface
+DFM Distinguished Flying Medal
+DFMS Digital Facility Management System
+DFN Deutsches ForschungsNetz
+DFRF Dryden Flight Research Facility (now ADFRF)
+DFS Depth-First Search
+DFS Distributed File System
+DFT Discrete Fourier Transform
+DFTT Don't Feed The Trolls
+DFW Dallas-Ft.Worth (regional airport)
+DGA Direct Graphics Access
+DG Data General [Corporate name]
+DG Dei Gratia (by the grace of God)
+DG Directional Gyro
+DG Director General
+DGP Dissimilar Gateway Protocol
+DGSC Defense General Supply Center
+DHCP Dynamic Host Configuration Protocol
+DHHS Department of Health and Human Services
+DHSS british Department of Health and Social Security
+DHSS Department of Health and Social Security (British)
+DIA Defence Intelligence Agency
+DIA Display Industry Association
+DIAD (magnetic) Drum Information Assembler / Dispatcher
+DIA Document Interchange Architecture
+DIAL Direct Information Access Line
+DIAS Defense Automatic Integrated System
+DIBAL DiIsoButylALuminum hydride
+DIB Device Independent Bitmap
+DIB Directory Information Bases
+DIC Digital Interface Controller
+DID Direct Inward Dialing [telephony]
+DID Dissociative Identity Disorder (used to be MPD)
+DIF Digital Interface Frame
+DIF Document Interchange Format
+DIFMOS Double Injection Floating Gate MOS
+DIL Dual InLine
+DILOG DIstributed LOGic
+DIM Data In the Middle
+DIMS Document Image Management System
+DIN Deutsche Industrie Normenausschuss
+DIN Deutsches Institut fur Normung
+DINK Double Income, No Kids
+DIP Dual Inline Package
+DIR Deliverly & Installation Request
+DIRE Dire Is Really Emacs
+DIRT Design In Real-Time
+DISA Direct Inward System Access
+DISCO DIfferences and Sums within COsy
+DIS Draft International Standard (ISO)
+DISOSS DIStributed Office Support System
+DIU Digital Interface Unit
+DIV Division
+DIX DEC, Intel, Xerox (Ethernet hardware levels)
+DIY Do It Yourself
+DJ Disc Jockey
+DKF Dreaded Koosh Flogger
+DLA Defense Logistics Agency
+DLC Data Link Control
+DLC Digital Loop Carrier
+DLC Driver's License Compact (Uniform interstate treatment)
+DLCU Digital Line Carrier Unit
+DL Download
+DLE Data Link Escape
+DLG Digital Line Graph
+DLI Data Link Interface
+DLL Dial Long Lines
+DLL Dynamic Link Library
+DLO Dead Letter Office
+DLS Data Link Control
+DLS Digital Link Service
+DLTDHYITAOYWO Dont Let The Door Hit You In The Ass On Your Way Out
+DLTU Digital Line/Trunk Unit
+DLUPG Digital Line Unit-Pair Gain, "DLU-PG"
+DMA Direct Memory Access
+DMD Directory Management Domain
+DMD Doctor of Dental Medicine
+DM Delta Modulation
+DM Dialog Manager
+DM District Manager
+DM Dungeon Master
+DME DiMethoxyEthane
+DME Distance Measuring Equipment
+DME Distributed Management Environment
+DMF DiMethylFormamide
+DMI Digital Multiplexed Interface
+DML Data Manipulation Language
+DML Data Manipulation Logic
+DMOS Diffusion Metal Oxide Semiconductor (see MOS)
+DMQ Do-Me Queen
+DMS Data Management System
+DMS Digital Multiplexed System
+DMS Diskless Management Services
+DMSP Defense Meteorological Satellite Program
+DMU Data Manipulation Unit
+DMV Department of Motor Vehicles
+DMZ DeMilitarized Zone
+DNA DeoxyriboNucleic Acid
+DNA Digital Network Architecture [DEC]
+DNC Direct Numerical Control
+DNC Dynamic Network Controller
+DNCRI [NSF (q.v.)] Division of Networking and Communications Research and Infrastructure
+DN Directory Number
+DNDK don't know, don't care
+DNHR Dynamic NonHierarchical Routing
+DNIC Data Network Identification Code [telephony]
+DNI DECnet Network Interface
+DNL Director of Naval Laboratories
+DNP Dynamic Nuclear Polarization
+DNR Dialed Number Recorder [telephony]
+DNS Domain Name System
+DNX Dynamic Network X-connect
+DOA Dead On Arrival
+DOB Date Of Birth
+DOC Dynamic Overload Control
+DOCS Display Operator Console System
+DOD Department of Defense, "DoD"
+DOD Department Of Defense [U.S. Government]
+DOE Department Of Energy [U.S. Government]
+DOE Depends On Experience
+DOHC Dual OverHead Camshaft
+DOJ Department Of Justice [U.S. Government]
+DOMAIN Distributed Operating Multi Access Interactive Network (Apollo)
+DOM Data On Master group
+DORE Dynamic Object Rendering Environment
+DOS Disk Operating System
+DOT Department Of Transportation [U.S. Government]
+DOTE Director, Operational Test and Evaluation, "DOT&E"
+DOTS Digital Office Timing Supply
+DOV Data Over Voice [telephony]
+DOW Day Of Week
+DOXYL Dimethyl-OXazolidine-oxYL
+DOYC Deity Of Your Choice
+DOYKB Down On Your Knees, Bitch
+DPAC Dedicated Plant Assignment Center
+DPA Delegation of Procurement Authority
+DPANS Draft Proposed American National Standard
+DPC Destination Point Code
+DP Data Processing
+DP Demarcation Point
+DP Dial Pulse [telephony]
+DP Displaced Persons (expelled from native land)
+DP Display Postscript
+DP Double Play
+DP Draft Proposal
+DPE Data Path Extender
+DPI Dots Per Inch
+DPM Defect Per Million
+DPM Digital Panel Meter
+DPM Directional Policy Matrix
+DPMI DOS Protected Mode Interface
+DPNPH Data Packet Network-Packet Handler, "DPN-PH"
+DPP Discounted Payback Period
+DPPH DiPhenylPicrylHydrazyl
+DPS Display PostScript
+DPSK Differential Phased-Shift Keying
+DQC Double-Quantum Coherence
+DQ Dairy Queen
+DQDB Distributed Queue Dual Bus a reservation-strategy MAN 150 Mb/s
+DQ Dragon Quest
+DQF Double-Quantum Filter
+DQL Database Query Language
+DQOTD Dumb Question Of The Day
+DRAM Dynamic Random Access Memory (as opposed to static RAM)
+DRAW Direct Read After Write
+DRDA Distributed Relational Database Architecture
+DR Data Ready
+DR Data Receive
+DRD Data Reading Device
+DR Dead Reckoning
+DR Dining Room
+DRE Directional Reservation Equipment
+DRG Democratic Republic of Germany (East Germany)
+DRI Defense Research Internet (replaces Arpanet)
+DRI Digital Research, Incorporated [Corporate name]
+DRMU Digital Remote Measurement Unit
+DRP DECnet Routing Protocol
+DRS Data Rate Select (RS-232)
+DSAB Distributed Systems Architecture Board
+DSA Dial System Assistance
+DSA Digital Storage Architecture
+DSA Directory Service Agent
+DSBAM Double-SideBand Amplitude Module
+DSC Differential Scanning Calorimetry
+DSC Document Structuring Conventions
+DSCS Defense Satellite Communications System
+DS Data Segment
+DSDC Direct Service Dial Capability
+DSD Data Structure Diagram
+DS Digital carrier Span
+DS Digital Signal
+DS Directory Service
+DS Direct Signal
+DS Double-Sided
+DSE Data Structure Editor
+DSEE Domain Software Engineering Environment
+DSI Digital Speech Interpolation
+DSM Distinguished Service Medal
+DSN Deep Space Network
+DSN Digital Signal (level) N
+DSO Digital Storage Oscilloscope
+DSO Distinguished Service Order
+D&S or D/s Dominance and Submission
+DSP Decessit Sine Prole (died without issue)
+DSP Defense Support Program (USAF/NRO)
+DSP Digital Signal Processor; Digital Signal Processing
+DSP Domain-Specific System
+DSR Data Set Ready (RS-232)
+DSR Digital Standard Runoff
+DSR Dynamic Service Register
+DSRI Digital Standard Relational Interface
+DSS Data Station Selector
+DSS Decision Support System
+DSS Direct Station Selection [telephony]
+DSSI Digital Storage Systems Interconnect
+DST Daylight Saving Time
+DSTN Double SuperTwisted Nematic
+DSU Digital Service Unit; Data Service Unit
+DSU Disk Subsystem Unit (Artecon)
+DSW Dick Size War
+DSX Digital System X-connect
+DTA Differential ThermoAnalysis
+DTA Disk Transfer Area
+DTAS Digital Test Access System
+DTB Data Transfer Bus
+DTC Design To Cost
+DTC Digital Trunk Controller
+DTC Di-group Terminal Controller
+DT Data Transmit
+DTD Document Type Definition
+DT Delirium Tremens
+DT Di-group Terminal
+DTE Data Terminal Equipment
+DTF Dial Tone First payphone [telephony]
+DTG Direct Trunk Group
+DTI Department of Trade and Industry (U.K.)
+DTIF Digital Transmission Interface Frame
+DTL Diode Transistor Logic
+DTMF Dial Tone Multi Frequency [telephony]
+DTP DeskTop Publishing
+DTR Data Terminal Ready
+DTRT do the right thing
+DTS Distributed Time Service
+DTSS Dartmouth TimeSharing System
+DTU Demand Transmission Unit
+DTU Di-group Terminal Unit
+DTWT do the wrong thing
+DUA Directory User Agent
+DUATS Direct User Access Terminal System
+DU Decision Unit
+DUI Driving Under the Influence
+DUT Device Under Test
+DUV Data Under Voice
+DVC Digital Voice Card
+DV Deo Vo lente (God willing)
+DVI DeVice Independent
+DVI Digital Video Interactive
+DVMA Direct Virtual Memory Access, see DMA, device uses MMU.
+DVM Digital Volt Meter
+DVM Doctor of Veterinary Medicine
+DVMRP Distance-Vector Multicast Routing Protocol
+DVX Digital Voice eXchange
+DWAPS Defense Warehousing Automated Processing System
+DWB Documenter's WorkBench
+DW Dead Weight
+DWI Driving While Intoxicated
+DWIM do what I mean
+DWIM Do What I Mean
+DX Distance (as in long distance radio communication)
+DXT Data eXtractT facility
+E911 Enhanced 911
+EAA Experimental Aircraft Association
+EADAS Engineering and Administrative Data Acquisition System
+EADASNM Engineering and Administrative Data Acquisition System/Network Management, "EADAS/NM"
+EADASS Engineering and Administrative Data AcquiSition System
+EAEO Equal Access End Office
+EAFB Edwards Air Force Base
+EARN European Academic Research Network
+EASD Equal Access Service Date
+EAS Engineering Administration System
+EAS Extended Announcement System
+EAS Extended Area Service
+EASI Enhanced Asynchronous SCSI Interface
+EBCDIC Extended Binary Coded Decimal Interchange Code
+EBI Extensive Background Investigations
+ECAD Electronical Computer Aided Design
+ECAFE Economic Commission for Africa and the Far East
+ECAP Electronic Customer Access Program
+ECASS Electronically Controlled Automatic Switching System
+ECASS Export Control Automated Support System
+ECC Enter Cable Change
+ECC Error Checking and Correcting
+ECC Error Correction Code
+ECCM Electronic Counter-CounterMeasures
+ECCS Economic C (hundred) Call Seconds
+ECD East Coast Division (Sun)
+ECDO Electronic Community Dial Office
+EC European Community
+EC Exchange Carrier [telephony]
+ECF Enhanced Connectivity Facility
+ECG ElectroCardioGram
+ECL Emitter Coupled Logic (see also TTL)
+ECL Error Correction Logic
+ECLSS Environmental Control and Life Support System [Space]
+ECMA European Computer Manufacturers Association
+ECM Electronic Counter Measure
+ECM European Common Market
+ECN Engineering Computer Network (at Purdue)
+ECO Ecological
+ECO Electronic Central Office
+ECO Engineering Change Order
+ECOM Electronic Computer Originated Mail, "E-COM"
+ECPA Electronic Communication Privacy Act
+ECP/EMP Excessive Cross Post(ing) / Excessive Multi-post(ing)
+ECPT Electronic Coin Public Telephone
+ECR Engineering Change Request
+ECSA Exchange Carriers Standards Association
+ECS Electronic Crosconnect System
+ECS Environmental Control System
+ECT ElectroConvulsive Therapy
+ECV Electric Cargo Vehicle [NASA OEXP]
+EDAC Electromechanical Digital Adapter Circuit
+EDA Electron Donor-Acceptor
+EDA Electronic Design Automation
+EDD Expert Dungeons & Dragons, "ED&D"
+EDF Electricite de France
+EDGAR Electronic Data Gathering, Analysis, and Retrieval
+EDI Electronic Data Interchange
+EDIF Electronic Design Interchange Format
+EDO Extended Duration Orbiter [Space]
+EDP Electronic Data Processing
+EDS Electronic Data Systems
+EDSX Electronic Digital Signal X-connect
+EDTA Ethylene Diamine Tetraacetic Acid
+EDTCC Electronic Data Transmission Communications Central
+EDT Eastern Daylight Time
+EDV Elektronische DatenVerarbeitung
+E East
+EEC European Economic Community
+EECT End-to-End Call Trace
+EEDP Expanded Electronic tandem switching Dialing Plan
+EE Electrical or Electronics Engineer
+EEG ElectroEncephaloGram
+EEHO Either End Hop Off
+EEI Equipment-to-Equipment Interface
+EEL Epsilon Extension Language
+EEM External Expansion Module (Sun)
+EEO Errors and Omissions Excepted, "E&EO"
+EEPROM Electrically Erasable Programmable Read Only Memory
+E Espionage
+EFD Ellington Field, Houston TX
+EFI Electronics For Imaging (Co.)
+EFIS Electronic Flight Instrumentation System
+EFRAP Electronic Feeder Route Analysis Program
+EFS Error Free Seconds
+EGA Enhanced Graphics Adapter
+EG evil grin
+EG Exempli Gratia, "e.g." (for example)
+EGP Exterior Gateway Protocol
+EGREP Extended GREP
+EGRET Energetic Gamma Ray Experiment Telescope (on GRO)
+EHF Extremely High Frequency (30-300GHz)
+EHP Error Handling Package
+EHT Extended Hueckel Theory
+EIA Electronics Industry Association
+EINE EINE Is Not Emacs
+EIN Employer Identification Number
+EIP Everything Is Permissible
+EISA Extended Industry-Standard Architecture
+EISB Electronic Imaging Standards Board
+EIS Environmental Impact Statement
+EIS Executive Information Systems
+EIS Expanded Inband Signaling
+EIS Extended Instruction Set
+EISS Economic Impact Study System
+EISS European Intelligence Support System
+EITS Encoded Information TypeS
+EJASA Electronic Journal of the Astronomical Society of the Atlantic
+EKG ElectroKardioGramm (see ECG)
+EKTS Electronic Key Telephone Sets
+ELC Extra(Excellent) Low Cost
+ELDOR ELectron-electron DOuble Resonance
+EL ElectroLuminescent (as in display)
+ELF Executable and Linking Format
+ELF Extensible Linking Format
+ELF Extremely Low Frequency
+ELLE Elle Looks Like Emacs
+ELM ELectronic Mailer
+ELO Electric Light Orchestra
+ELP Emerson, Lake and Palmer (or Powell)
+ELT Emergency Locator Transmitter
+ELV Expendable Launch Vehicle [Space]
+EMACS Editor MACroS; Eight Megabytes And Constantly Swapping
+EMA Electronic Mail Association
+EMA Enterprise Management Architecture (DEC)
+EMAIL Electronic MAIL, "E-MAIL"
+EMBL European Molecular Biological Laboratory
+EMC ElectroMagnetic Compatibility
+EM ``Ear & Mouth''; recEive & transMit leads of a signalling system, "E&M"
+EM Engineering Model
+EM Enlisted Man (see EW)
+EMFBI Excuse Me For Butting In
+EMF ElectroMotive Force
+EMI ElectroMagnetic Interference
+EML Expected Measured Loss
+EMP ElectroMagnetic Pulse
+EMPRESS EnvironMental Pulse Radiation Environment Simulator for Ships
+EMR ElectroMagnetic Response
+EMS Electronic Message System
+EMS Element Management System
+EMS Element Management System, part of AT&T's UNMA
+EMS Expanded Memory Specification
+EMSG email message
+EMT Emergency Medical Technician
+EMU ElectroMagnetic Unit
+EMU Extravehicular Mobility Unit [Space]
+ENDOR Electron-Nuclear DOuble Resonance
+ENEA Comitato Nazionale per la Ricerca e per lo Sviloppo dell' Energia Nuclaeare e delle Energie Alternative, Italy
+ENET Ethernet, "E-Net"
+ENFIA Exchange Network Facility for Interstate Access
+ENIAC Electronic Numerical Integrator and Calculator
+ENS ENSign
+EOD End Of Discussion
+EOD Erasable Optical Disk
+EOE Electronic Order Exchange
+EOE Equal Opportunity Employer
+EO End Office [telephony]
+EO Erasable Optical
+EOF End Of File
+EOL End Of Lecture
+EOL End Of Line
+EOM End Of Message
+EOM End Of Month
+EOS Earth Observing System
+EOS Electrical OverStress
+EOS Extended Operating System
+EOT End Of Transmission
+EOTT End Office Toll Trunking
+EPA Enhanced Performance Architecture
+EPA Environmental Protection Agency
+EPD Entry Products Division
+EP Emulation Program
+EP Experience Points
+EP Extended Play
+EPL Electronic switching system Program Language
+EPOS Engineering and Project-management Oriented Support system
+EPPS Electronic Pre-Press Systems.
+EPR Electron Paramagnetic Resonance
+EPR Ethylene Propylene Rubber
+EPRI Electric Power Research Institute
+EPROM Erasable Programmable Read-Only Memory
+EPSCS Enhanced Private Switched Communication Service
+EPS Encapsulated PostScript
+EPSF Encapsulated PostScript File
+EPSF Encapsulated PostScript Format
+EPSI Encapsulated PostScript Interchange
+EPT Empire of the Petal Throne
+EPTS Electronic Problem Tracking System
+EPUB Electronic PUBlication
+EPW Enemy Prisoner of War
+EQ Educational Quotient (see IQ)
+EQUEL Embedded QUEL
+ERA Earned Run Average
+ERA Entity-Relationship-Attribute
+ERA Equal Rights Amendment
+ERAR Error Return Address Register
+ERD Entity-Relationship Diagram
+ERE Entity-Relationship Editor
+ER Emergency Room
+EREP Environmental Recording Editing and Printing
+ER Error Register
+ERICA Experiment on Rapidly Intensifying Cyclones over the Atlantic
+ERICA Eyegaze Response Interface Computer Aid
+ERISA Employee Retirement Income Security Act
+ERL Echo Return Loss
+ERP Effective Radiated Power
+ERS Earth Resources Satellite (as in ERS-1)
+ERT Earth Resources Technology [Space]
+ERU Error Return address Update
+ESAC Electronic Surveillance Assistance Center
+ESAC Electronic Systems Assistance Center
+ESA Enterprise Systems Architecture (MVS/XA followon)
+ESA European Space Agency
+ESB Emergency Service Bureau
+ESCA Electron Spectroscopy for Chemical Analysis
+ESD ElectroStatic Discharge
+ESD Engineering Service Division
+ESDI Enhanced Standard Device Interface
+ESE East South East
+ES End System
+ES Expert System
+ES Extra Segment
+ESF Extended SuperFrame
+ESF Extended Superframe Format
+ESH End System Hello
+ESI ElectroStatic Interference
+ESIS End System-Intermediate System, "ES-IS"
+ESL Emergency Stand-Alone
+ESMD Embeded Storage Module Disk
+ESMD Enhanced Storage Module Device
+ESM Electronic Support Measures
+ESM External Storage Module (Sun)
+ESN Electronic Serial Number
+ESN Electronic Switched Network
+ESO European Southern Observatory
+ESOP Employee Stock Ownership Plan
+ESPEC Ethernet SPECification (DIX)
+ESP Enhanced Service Provider
+ESP Extra Sensory Perception
+ESPRIT European Strategic Programme of Research and Development in Information Technology
+ESPS Entropic Signal Processing System
+ESR Electron Spin Resonance
+ESS Electronic Switching System [telephony]
+ESS Environmental Stress Screening
+ESSEX Experimental Solid State EXchange
+ESSX Electronic Switching Systen eXchange
+EST Eastern Standard Time
+ETACC External Tank/Aft Cargo Carrier, "ET/ACC" (see also ET) [Space]
+ETA Estimated Time of Arrival
+ETAS Emergency Technical ASsistance
+ETC Et cetera, and so on...
+ETD Estimated Time of Departure
+ET Eastern Time
+ET Electron Transfer
+ET External Tank [of the US Space Shuttle]
+ET ExtraTerrestrial [Space]
+ETFD Electronic Toll Fraud Device [telephony]
+ETF Electronic Toll Fraud
+ETH Eidgnoessiche Techniche Hochschule
+ETLA extended three letter acronym
+ETLA Extended Three Letter Acronym
+ETLA Extended Three Letter Acronym
+ETN Electronic Tandem Network
+ETO Earth-to-Orbit [Space]
+ETR Eastern Test Range
+ETSACI Electronic Tandem Switching Adminstration Channel Interface
+ETS Electronic Tandem Switching
+ETS Electronic Translation System
+ETSI European Telecommunication Standards Institute
+ETSSP ETS Status Panel
+ETV Education TeleVision
+EUC Extended Unix Code
+EUNET European UNIX NETwork, "EUnet"
+EUUG European UNIX Users Group
+EUVE Extreme UltraViolet Explorer
+EUV Extreme UltraViolet
+EVA ExtraVehicular Activity
+EVX Electronic Voice eXchange
+EW Electronic Warfare
+EW Enlisted Woman (see EM)
+EWO Engineering Work Order
+EWOS European Workshop for Open Systems
+EWS Engineering Work Station
+EXPO World Exposition
+F2F Face to Face / Female To Female
+FAA Federal Aviation Administration (U.S.)
+FAB Feature-Advantage-Benefit
+FACD Foreign Area Customer Dialing
+FACOM Fujitsu Automatic Computer
+FACS Facilities Assignment and Control System
+FAD Flavin Adenine Diphosphate
+FAE Fuel Air Explosive
+FAESHED Fuel Air ExploSive, HElicopter Delivered
+FA Factory Automation
+FA Fat Admirer, one who prefers a fat sexual/romantic partner
+FA Finance Accounting (Sun)
+FA Football Association (British soccer)
+FA Fuse Alarm
+FAG Forced Air Gas
+FAI Federation Aeronautique International
+FAO Food and Agriculture Organization [U.S. Government]
+FAQ Frequently Asked Question(s)
+FAQ Frequently-Asked Question(s)
+FAQL Frequently-Asked Questions List
+FAR Federal Acquisition Regulation
+FAR Federal Aviation Regulations (U.S.)
+FAR Federation of American Research
+FARNET Federation of American Research NETworks
+FAS Foreign Agricultural Service
+FAS Free Alongside Ship
+FASST Flexible Architecture Standard System Technology
+FAST Fast Auroral SnapshoT explorer
+FAST First Application System Test
+FAT File Allocation Table
+FAT Foreign Area Translation
+FAX FAcsimile
+FB Freight Bill
+FBI Federal Bureau of Investigation [U.S. Government]
+FBO Fixed-Base Operator
+FBV a Dutch acronym for "Fluke, Ltd."
+FCAP Facility CAPacity
+FCB File Control Block
+FCC Federal Communications Commission [U.S. Government]
+FCC Federal Computer Conference
+FCC Forward Command Channel
+FCCSET Federal Coordinating Council for Science, Education and Technology (under OSTP)
+FCFS First Come, First Served
+FC Full Color
+FCG False Cross or Ground
+FCO Field Change Order
+FCRC Federal Contract Research Center
+FCS File Control Systemction
+FCS First Customer Ship (SunOS Releases)
+FCS Frame Check/Control Sequence
+FCT Four Corner Test (4FCT)
+FDA Food and Drug Administration [U.S. Government]
+FDC Floppy Disk Controller
+FDDI Fiber Distributed Data Interface
+FDDIII FDDI supporting isochronous traffic, "FDDI-II"
+FD File Descriptor
+FD Floppy/Flexible Disk(ette)/Drive
+FDHD Floppy Drive High Density
+FDIC Federal Deposit Insurance Corporation [U.S. Government]
+FDL File Definition Language
+FDM Frequency-Division Multiplexing
+FDP Field Development Program
+FDR Franklin Delano Roosevelt
+FDX Full DupleX
+FEA Finite Element Analysis
+FEC Forward Error Correction
+FED Far End Data
+FEDSIM FEDeral Systems Integration and Management center
+FE Format Effecters
+FE Front End
+FEHQ Fluke European HeadQuarters
+FEMA Federal Emergency Management Agency
+FEMF Foreign Electro-Motive Force
+FEM Finite Element Modeling
+FEPC Fair Employment Practices Commission
+FEP Fluorinated Ethylene Propylene
+FEP Front End Processor
+FEPS Facility and Equipment Planning System
+FERS Federal Employees Retirement System
+FET Far East Trading
+FET Federal Excise Tax
+FET Field Effect Transistor
+FEV Far End Voice
+FFA Field Failure Analysis
+FFA Future Farmers of America
+FF Fist F*
+FF Flip-Flop
+FFRDC Federally Funded Reseach and Development Center
+FFS Fast File System
+FFS For Fuck's Sake
+FFT Fast Fourier Transform
+FGA Feature Group A, "FG-A" [telephony:Line Side term. for LD carriers]
+FGB Feature Group B, "FG-B" [telephony:Trunk Side term. for LD carriers (aka ENFIA B), 950 service]
+FGC Feature Group C, "FG-C" [telephony]
+FGD Feature Group D, "FG-D" [telephony:Trunk Side term. for LD carriers, 1+ service]
+FGM Female Genital Mutilation
+FGREP Fixed GREP
+FGS Fine Guidance Sensors (on HST)
+FHA Federal Housing Administration
+FHA Future Homemakers of America
+FHLMC Federal Home Loan Mortgage Association (Freddie Mac)
+FHMA Federal Home Mortgage Association (Fannie Mae)
+FHST Fixed Head Star Trackers (on HST)
+FIB Focused Ion Beam
+FICA Federal Insurance Contributions Act
+FID Free Induction Decay
+FIDO Fog Investigation Dispersal Operation
+FIFO First In, First Out
+FILO First In, Last Out
+FIMS Forms Interface Management System
+FINE FINE Is Not Emacs
+FIN Field Information Notice
+FIOC Frame Input/Output Controller
+FIO Frequency In and Out
+FIP Facility Interface Processor
+FIPS Federal Information Processing Standard
+FIR Far InfraRed
+FIR Field Information Report
+FIR Finite Impulse Response
+FIRMR Federal Information Resource Management Regulation
+FITB Fill In The Blank
+FIT Federal Information Technologies, inc.
+FITS Flexible Image Transport System
+FLACC Full Level Algol Checkout Compiler
+FL Florida
+FLOP FLoating point OPeration
+FLOPS FLoating-point OPerations per Second
+FLRA Federal Labor Relations Authority
+FLS Floating License Server
+FLT Front Load Tape
+FMAC Facility Maintenance And Control
+FMB Federal Maritime Board
+FMC Flexible Manufacturing Cell
+FMCS Federal Mediation and Conciliation Service
+FMEA Failure Mode and Effect Analysis
+FM Fibromyalgia
+FM Frequency Modulation
+FMR Field Marketing Representative (Sun)
+FMS Fieldbus Message Specification
+FMS Financial Management Service (Treasury Dept)
+FMS Flexible Machining/Manufacturing System
+FMS Forms Management System
+FNC Federal Networking Council
+FNPA Foreign Numbering Plan Area
+FOAC Federal Office Automation Center
+FOAD F* Off And Die
+FOB Free On Board
+FOC Faint Object Camera (on HST)
+FOC Fiber Optic Communications
+FOC Free Of Charge
+FOCSY FOldover Corrected SpectroscopY
+FO Forecast Order
+FO Foreign Office
+FO Forward Observer
+FOIA Freedom Of Information Act
+FOIMS Field Office Information Management System
+FOIRL Fiber Optic Inter Repeater Link
+FON Fiber Optics Network
+FOOBAR See FUBAR
+FORCS Faa's Operational Reporting Communication System
+FORD Fix Or Repair Daily
+FORD Found On Road Dead
+FOR Free On Rail
+FORTRAN FORmula TRANslator
+FOSE Federal Office Systems Exposition
+FOS Faint Object Spectrograph (on HST)
+FOT Fiber Optic Transceiver
+FOT Free On Truck
+FOV Field Of View
+FPA Floating Point Accelerator
+FPC Fish Protein Concentrate
+FPC Floating Point Coprocessor
+FPDU FTAM Protocol Data Unit
+FPE Floating Point Engine
+FPE Foam PolyEthylene
+FPHA Federal Public Housing Authority
+FPLA Field Programmable Logic Array (see PLA)
+FPM Feet Per Minute
+FPO Fleet Post Office
+FPP Floating Point Processor
+FPS Favorite Play Sequence
+FPS Feet Per Second
+FPS Foot-Pound-Second
+FPU Floating Point Unit
+FQDN Fully-Qualified Domain Name
+FRACTAL FRACTional dimensionAL
+FRAM Ferroelectric RAM
+FRB Federal Reserve Board
+FRD Fire RetarDant
+FRED Fred Resembles Emacs Deliberately
+FREE Fathers Rights and Equality Exchange
+FR Flat Rate
+FR Frame Relay
+FRG Federal Republic of Germany (West Germany)
+FRICC Federal Research Internet Coordinating Committee
+FROG Free Rocket Over Ground
+FRPG Fantasy Role Playing Game
+FRR Flight-Readiness Review
+FRS Federal Reserve System
+FRS Flexible Route Selection
+FRU Field Replacable Unit
+FSCM Federal Supply Code for Manufactures
+FSDO Flight Standards District Office
+FSDO for some definition of
+FSE Field Service Engineer
+FSF Free Software Foundation
+FS Field Service
+FS File System
+FS Fine Structure
+FS Floppy System
+FSK Frequency Shift Keying
+FSLIC Federal Savings and Loan Insurance Corporation
+FSS Fast System Switch (System V)
+FSS Federal Supply Service
+FSS Flight Service Station
+FSU Florida State University
+FSU Former Soviet Union
+FSW Forward Swept Wings
+FT1 fractional T1, common carrier transmission in multiples of 64 kb/s
+FTAM File Transfer, Access, and Management (ISO FTP equivalent)
+FTC Federal Trade Commission
+FTE Factory Test Equipment
+FT Foot
+FT Fourier Transform
+FTG Final Trunk Group
+FTL Faster Than Light
+FTL For The Loss/Lose
+FTM Female To Male (transgendered)
+FTMP For The Most Part
+FTP File Transfer Protocol
+FTPI Flux Transitions Per Inch
+FTR For The Record
+FTS Federal Telecommunications System [US Government]
+FTS Federal Telephone System [telephony]
+FTS Flight Telerobotic Servicer [Space]
+FTW File Tree Walk
+FTW For The Win
+FTZ FernmeldeTechnisches Zentralamt
+FTZ Free Trade Zone
+FUBAR F***ed Up Beyond All Recognition
+FUBAR F'ed Up Beyond All Repair (or Recognition)
+FUBAR fucked up beyond all recognition
+FUD fear, uncertainty and doubt
+FUD Fear, Uncertainty, and Doubt
+FUSE Far Ultraviolet Spectroscopic Explorer
+FUS Full-Use Standard
+FV folio verso, "fv" (on the back of the page)
+FWD Front Wheel Drive
+FW Fringeworthy
+FWHM Full Width at Half Maximum
+FWIW for what it's worth
+FWIW For What It's Worth
+FWIW For What It's Worth...
+FX Foriegn eXchange [telephony]
+FX special effects
+FYA For Your Action
+FY Fiscal Year
+FYI for your information
+FYI For Your Information
+FYI For Your Information
+FYS For Your Signature
+GAAP Generally Accepted Accounting Principles
+GAAS Gallium Arsenide, "GaAs"
+GAB Group Audio Bridging [telephony]
+GADO General Aviation District Office
+GA Gamblers Anonymous
+GA General Assembly
+GA General Average
+GA General of the Army
+GA Georgia
+GA Go Ahead
+GAIA Earth's self-sustaining Biosphere, "Gaia"
+GAIA GUI Application Interoperability Architecture
+GAL Generic Array Cell
+GAN Global Area Network
+GAO General Accounting Office
+GAR Grand Army of the Republic
+GAS Get-Away Special
+GATED GATEway Deamon
+GATT General Agreement on Tariffs and Trade
+GAW Guaranteed Annual Wage
+GB Gangbusters
+GB GigaByte
+GB Great Britain
+GBIP General Purpose Interface Bus
+GBS Group Bridging Service
+GBT Green Bank Telescope
+GCA General Communications Architecture (Ingres)
+GCA Ground Controlled Approach
+GCC Gnu C Compiler
+GCD Ground Controlled Descent
+GC Garbage Collection (LISP)
+GC Gas Chromatograph(y)
+GC Graphic Context
+GCL Graphics Command Language
+GCM General Court Martial
+GCR Group-Coded Recording (magnetic tape, 6250 bpi)
+GCS Group Control System
+GCT Greenwich Civil Time
+GCVS General Catalog of Variable Stars
+GDB Gnu DeBugger
+GDI Graphical Display Interface
+GDOS Graphics Device Operating System
+GDP Gross Domestic Product
+GD&R Grinning, Ducking, and Running (after a smart ass comment)
+GDS Great Dark Spot
+GDT Global Descriptor Table
+GECOS General Electric Comprehensive Operating System
+GECR Global Environmental Change Report
+GE General Electric
+GEISCO General Electric Information Services COmpany
+GEIS General Electric Information Systems
+GEM Giotto Extended Mission
+GEM Graphics Environment Manager
+GEMS General Electric Medical Systems
+GEO Geosynchronous Earth Orbit [Space]
+GFCI Ground Fault Circuit Interrupter
+GF Girl Friend
+GG Genetic Girl
+GGP Gateway-to-Gateway Protocol
+G Gravity
+G grin
+<g> grin (or <G> big grin, vars. incl <VEG> Very Evil Grin)
+GHOD General Heuristic Organizing Device
+GHQ General HeadQuarters
+GHRS Goddard High Resolution Spectrograph (on HST)
+GHZ Giga HertZ, "GHz" (unit of frequency, 1,000,000,000 cycles per second)
+GID Group IDentity
+GIF Graphics Interchange Format
+GI Galvanized Iron
+GI Gastro Intestinal
+GI General Issue
+GIGO Garbage In, Garbage Out
+GI Government Issue
+GIN Graphics INput
+GISS Goddard Institute for Space Studies
+GIYF Google Is Your Friend
+GJIAGDVYFCN Go Jump In a God Damned Volcano, You Fucking Cave Newt (talk.bizarre)
+GKS Graphical Kernel Standard
+GKSM GKS Metafile
+GLBTH Gay,Lesbian,Bi,Trans,Het
+GL Graphic Library
+GLOMR Global Low-Orbiting Message Relay
+GMBH Gesellschaft Mit Beschraenkter Haftung
+GMC Giant Molecular Cloud
+GMD Gesellschaft fuer Mathematik und Datenverarbeitung
+GM Game Master
+GM General Manager
+GM General Motors
+GM Guided Missile
+GMRT Giant Meter-wave Radio Telescope
+GMTA great minds think alike
+GMTA Great Minds Think Alike
+GMT Greenwich Mean Time
+GMW Give me More Windows
+GND GrouND
+GNMA Government National Mortgage Association (Ginnie Mae)
+GNP Gross National Product
+GNU GNU's Not Unix
+GoAT Go Away, Troll
+GOES Geostationary Orbiting Environmental Satellites
+GOK God Only Knows
+GOK God Only Knows
+GOP Grand Old Party
+GOS Grade Of Service
+GOSIP Government Open Systems Interconnection Profile
+GOWI Get On With It
+GOX Gaseous OXygen
+GPC General Purpose Computer
+GPCI Graphics Processor Command Interface
+GPD Graphics Products Division
+GP General Practitioner
+GP Grand Prix
+GP Graphics Processor
+GP Group Processor
+GPIB General-Purpose Interface Bus
+GPI Graphics Programming Interface
+GPL General Public License
+GPL GNU Public License
+GPL Graphics Programming Language
+GPM Gross Product Margin
+GPO General Post Office
+GPO Government Printing Office
+GPS General Problem Solver
+GPS Global Positioning System [Space]
+GPSI Graphics Processor Software Interface
+GPSS General Purpose System Simulator
+GQ General Quarters
+GRASS Geographical Resources Analysis Support System
+GRB Gamma Ray Burst(er)
+GRD GRounD
+GREP Global Regular Expression Print, g/re/p, (UNIX command)
+GRI Graduate, Realtors Institute
+GRIPS Government Raster Image Processing Software
+GRO Gamma Ray Observatory [Space]
+GROPE Graphical representation of protocols in Estelle
+GRPMOD GRouP MODulator, "GRP MOD"
+GRS Gamma Ray Spectrometer (on Mars Observer)
+GRS Great Red Spot
+GSA General Services Adminstration [U.S. Government]
+GSA Girl Scouts of America
+GSA Government Services Administration
+GSAT General telephone and electronics SATellite corporation
+GSBCA General Services administration Board of Contract Appeals
+GSC Guide Star Catalog (for HST)
+GSFC Goddard Space Flight Center (Greenbelt, MD) [NASA]
+GS General Schedule
+GS Glide Slope
+GS Golden Shower/Getting Started
+GS Gray-Scale
+GSTS Ground-based Surveillance and Tracking System
+GTC General Telephone Company
+GTE General Telephone and Electric [Corporate name]
+G2G Got To Go
+GTG Got To Go
+GTG Good To Go
+GT Gross Ton
+GT Group Technology
+GTO Gaussian Type Orbital
+GTO Geostationary Transfer Orbit
+GTSI Government Technology Services, inc.
+GTT Global Title Transmission
+GUIDE Graphical User Interface Design Editor (Sun)
+GUI Graphical User Interface
+GUS Guide to the Use of Standards (SPAG publication)
+GUUG German UNIX Users Group
+GWEN Ground Wave Emergency Network
+GW Gamma World
+GWS Graphics Work Station
+HACD Home Area Customer Dialing
+HA Home Automation
+HAL Hard Array Logic
+HAL Hardware Abstraction Layer
+HAL Heuristically programmed ALgorithmic computer (2001)
+HAM Hold And Modify
+HAND have a nice day
+HAND Have A Nice Day
+HANFS Highly Available Network File System
+HAO High Altitude Observatory
+HAP Host Access Protocol
+HARM High-Availability, Reliability, and Maintainability
+HASP Houston Automated Spooling Program
+HAT Hashed Address Table
+HBA Host Bus Adapter (SCSI)
+HB HemogloBin, "Hb"
+HBM Her British Majesty; His British Majesty
+HBO Home Box Office
+HCFA Health Care Financing Administration
+HCF Halt and Catch Fire
+HC Holy Communion
+HC House of Commons
+HCL High Cost of Living
+HCL Host Control Links
+HCR Hodge Computer Research, inc.
+HCSDS High-Capacity Satellite Digital Service
+HCTDS High-Capacity Terrestrial Digital Service
+HDA Head Disk Assembly (in winchester disk drives)
+HDBV Host Data Base View
+HD Hard Disk
+HD Heavy Duty
+HD Henry Draper catalog entry
+HD High Density
+HDLC High-level Data Link Control
+HDL High Density Lipoprotein
+HDN Hochgeschwindigkeits-DatenNetz
+HDTV High Definition TeleVision
+HDX Half DupleX
+HEAO High Energy Astronomical Observatory [satellite]
+HEAP Home Energy Assistance Program
+HEDM High Energy-Density Matter [Space]
+HE His Eminence; His Excellency
+HEHO High End Hop Off
+HEM High-level Entity Management
+HEMP Help End Marijuana Prohibition
+HEMS High-level Entity Management System
+HEMT High Electron Mobility Transistor
+HEO High Earth Orbit [Space]
+HEP High Energy Physics
+HERA HErmes Robotic Arm, "HeRA"
+HERO Hazards of Electromagnetic Radiation to Ordnance
+HETCOR HETeronuclear chemical-shift CORrelation
+HFC HyperFine (splitting) Constant
+HFE Human Factors Engineering
+HF Hawthorne Farms (Intel)
+HF High Fantasy
+HF High Frequency (3-30MHz)
+HFS Hierarchical File System (Apple Macintosh)
+HFS HyperFine Splitting
+HGA High Gain Antenna
+HGC Hercules Graphics Card
+H Harn
+H Height
+HHIS hanging head in shame
+HHOK/S Ha Ha, Only Kidding/Serious
+HIC Hybrid Integrated Circuit
+HIFO Highest-In, First-Out
+HI Hawaii
+HIIPS Hud Integrated Information Processing Services
+HIPPI HIgh Performance Parallel Interface
+HIPPI High Performance Peripheral Interface
+HIRES HI-RESolution
+HIS Honeywell Information System
+HIV Human Immuno-deficiency Virus
+HLC Heavy Lift Capability [Space]
+HLHSR Hidden Line & Hidden Surface Removal
+HLL High-Level Language
+HLV Heavy Lift Vehicle [Space]
+HMA High Memory Area
+HMC Halley Multicolor Camera (on Giotto)
+HM High-resolution Monochrome
+HMO Hueckel Molecular Orbital
+HMOS High performance Metal Oxide Semiconductor (see MOS)
+HMPA HexaMethylPhosphorAmide (HMPT)
+HMP Host Monitoring Protocol
+HMPT HexaMethylPhosphoric Triamide
+HMS His/Her Majesty's Ship
+HMT His/Her Majesty's Transport
+HNG Horny Net Geek
+HNPA Home Numbering Plan Area [telephony]
+HNS Hospitality Network Service
+HOBIC HOtel Billing Information Center
+HOBIS HOtel Billing Information System
+HOESY Heteronuclear Overhauser Enhancement SpectroscopY
+HOL High-Order System
+HOMO Highest Occupied Molecular Orbital
+HOTOL HOrizontal Take-Off and Landing
+HOW Home Owners Warranty
+HPD High Performance Division (Sun group)
+HPFS High Performance File System (OS/2)
+HPGE High Purity Germanium
+HPGL Hewlett Packard Graphics Language
+HP Hewlett-Packard, inc. [Corporate name]
+HP Higher Power (sort of an AA "in" term, usually God)
+HP High Pressure
+HP Hit Points
+HP HorsePower
+HPIB Hewlett-Packard Interface Bus
+HPLC High-Performance Liquid Chromatography
+HPLT High-Productivity Languages/Tools, "HPL/T"
+HPN White Plains NY
+HPO High Performance Option
+HPPA HP Precision Architecture
+HQ HeadQuarters
+HR Hertzsprung-Russell (diagram)
+HRH Her/His Royal Highness
+HR House of Representatives
+HR Human Resources
+HRI High Resolution Imager (on ROSAT)
+HSB Hue, Saturation, Brightness
+HSC Hierarchical Storage Controller
+HSFS High Sierra File System
+HS High School
+HSI High Speed Interface
+HSI Horizontal Situation Indicator
+HSLN High Speed Local Network
+HSP High Speed Photometer (on HST)
+HSSDS High-Speed Switched Digital Service
+HST Hawaiian Standard Time
+HST High Speed Technology
+HST Hubble Space Telescope
+HTH hope this helps
+HTH Hope This Helps / Hand To Hand [combat]
+HT High Tension (as in electric power transmission)
+HT Horizontal Tab
+HTK Hits To Kill
+HUAC House Unamerican Activities Committee
+HUD Heads Up Display
+HUD Housing and Urban Development [U.S. Government]
+HUGE Hewlett-packard Unsupported Gnu Emacs
+HU High Usage
+HUTG High Usage Trunk Group
+HUT Hopkins Ultraviolet Telescope (ASTRO package)
+HVAC Heating, Ventilation, and Air Conditioning
+HV High Voltage
+HW2000 Highway 2000
+HWD Hayward CA
+HWM High-Water Mark
+HWNINS He whose name is not spoken
+HWP Height and Weight Proprotional (i.e.: "normal" build)
+HWSNBN He who should not be named
+HWWNBN He Who Will Not Be Named (refers to a specific troll person)
+HZ HertZ, "Hz" (unit of frequency, cycles per second)
+I18N InternationalizatioN (count the letters)
+IAAL I Am Actually Laughing
+IAB Interactive Application Builder
+IAB Internet Activities Board
+IAC In Any Case
+IAD Dulles International, Washington DC
+IAEA International Atomic Energy Agency
+IAE In Any Event
+IAH Houston (Intercontinental) TX
+IA Inspection Authorization
+IANA Internet Assigned Numbers Authority
+IANAL I am not a lawyer
+IANAL I Am Not A Lawyer
+IAP Internet Access Provider
+IAPPP International Amateur/Professional Photoelectric Photometry
+IATA International Air Transport Association
+IAUC IAU Circular
+IAU International Astronomical Union
+IAW In Accordance With
+IB Instruction Buffer
+IBM Ingrained Batch Mentality
+IBM International Brotherhood of Magicians
+IBM International Business Machines [Corporate name]
+IBM Itty Bitty Machines
+IBN Integrated Business Network
+ICAN Individual Circuit ANalysis
+ICB Interstate Computer Bank
+ICBM InterContinental Ballistic Missile
+ICBW I Could Be Wrong
+ICCC Inter-Client Communication Convention (X)
+ICCCM Inter-Client Communication Conventions Manual
+ICC Interstate Commerce Commission
+ICD Interactive Call Distribution
+ICE In-Circuit Emulator
+ICE International Cometary Explorer
+ICE Intrusion Countermeasures Electronics
+ICI Imperial Chemical Industries
+IC Independent Carrier
+IC Integrated Circuit
+IC Interexchange Carrier [telephony] (see also IEC)
+IC Inter-LATA Carrier
+ICJ International Court of Justice
+ICLID Individual Calling Line ID
+ICL International Computers Limited
+ICM Integrated Call Management
+ICMP Internet Control Message Protocol
+ICOCBW I Could Of Course Be Wrong
+ICON Inter CONtinental
+ICP Integrated Channel Processor
+ICP Inventory Control Points
+ICRC International Cosmic Ray Conference
+ICSC Inter-LATA Customer Service Center
+ICST Institute for Computer Science and Technology
+ICT In-Circuit Test
+ICT Interactive Consumer Terminal
+IDA Intercommunication Data Areas
+IDA International Dark-sky Association
+IDA International Development Association
+IDC Insulation Displacement Contact
+IDDD International Direct Distance Dial [telephony]
+IDEA International Dance Exercise Association
+IDEA Internet Design, Engineering, and Analysis notes (IETF RFCs)
+IDE Integrated Development Environment
+IDE Integrated Drive Electronics
+IDE Interactive Development Environments, inc
+IDF Intermediate Distributing Frame [telephony]
+IDGI I Don't Get It
+ID Idaho
+ID IDentification
+IDI Initial Domain Identifier
+IDK I Don't Know
+IDL Interactive Data Language
+IDL Interface Description Language
+IDM Image Data Manager
+IDP Initial Domain Part
+IDP Internet Datagram Protocol (XNS equivalent to IP)
+IDS Internal Directory System
+IDVC Integrated Data/Voice Channel
+IDV Interlibrational Derived Vehicle [Space]
+IEC InterExchange Carrier [telephony] (see also IC)
+IEC International Electrotechnical Commission
+IEEE Institute of Electrical and Electronics Engineers
+IEE Institute of Electrical Engineers (UK)
+IE Id Est, "i.e." (that is)
+IE Id Est (that is)
+IE Indo-European
+IE Inter Ethernet
+IEN Internet Engineering Notes
+IEN Internet Experiment Notebook (precedes RFCs)
+IESG Internet Engineering Steering Group
+IETF Internet Engineering Task Force
+IETGFTP it's easier to get forgiveness than permission
+IFB Invitation For Bids
+IFC International Finance Corporation
+IFC International Freighting Corporation
+IFF Identification - Friend or Foe
+IFF Image File Format
+IFF Interchange File Format
+IFF Iterative Function Fractal
+IF InterFace, "I/F"
+IF Intermediate Frequency
+IFIP International Federation for Information Processing
+IFLA International Federation of Library Associations
+IFR Instrument Flight Rules
+IFRPS Intercity Facility Relief Planning System
+IGES Initial Graphics Exchange Standard
+IGM InterGalactic Medium
+IGMP Internet Group Multicast Protocol
+IGP Interior Gateway Protocol
+IGY International Geophysical Year
+IHP Indicated HorsePower
+IHS Integrated Hospital Support
+IIA Information Industry Association
+IIANM if I am not mistaken
+IIE Institute of Industrial Engineers
+IIHF International Ice Hockey Federation
+IIL Integrated Injection Logic
+IIN Integrated Information Network
+IINM If I'm Not Mistaken
+IIRC If I Recall Correctly
+IISPB Image and Information Standards Policy Board
+IIUC If I Understand Correctly
+ILO International Labor Organization
+ILS Instrument Landing System
+ILV Industrial Launch Vehicle [Space]
+IMAO In My Arrogant Opinion
+IMAP3 Interactive Mail Access Protocol - Version 3
+IMAP Interactive Mail Access Protocol
+IMAS Integrated Mass Announcement System
+IMC Instrument Meteorological Contitions
+IMCO in my considered opinion
+IMD Industry Marketing Development
+IME In My Experience
+IMF International Monetary Fund
+IMHO in my humble opinion
+IMHO In My Humble Opinion
+IMHO In My Humble Opinion [net jargon]
+IM Installation & Maintenance, "I&M"
+IM Instant Message
+IM Interface Module
+IMM Input Message Manual
+IMNERHO In My Never Even Remotely Humble Opinion
+IMNSHO In My Not So Humble Opinion
+IMO in my opinion
+IMO In My Opinion
+IMPACT Inventory Management Program and Control Technique
+IMP Interface Message Processor [ARPANET/MILNET] (replaced by PSN)
+IMSA International Motor Sports Association
+IMS Integrated Management System
+IMSL International Mathematical Subroutine Library
+IMSLTHO In My Slightly/Somewhat Less Than Humble Opinion
+IMSO Integrated Micro Systems Operation (Intel)
+IMSVS Information Management System/Virtual Storage, "IMS/VS"
+IMT Image Management Terminal
+IMT Inter-Machine Trunk
+IMTS Improved Mobile Telephone Service
+IMX In My eXperience (perferred form: IME)
+INADEQUATE Incredible Natural Abundance Double-QUAntum Transfer Experiment
+INADS INitialization and ADministration System [telephony]
+INC InterNational Carrier
+INDO Intermediate Neglect of Differential Overlap
+INDOR INternuclear DOuble Resonance
+INEPT Insensitive Nucleus Enhancement by Polarization Transfer
+INGRES Interactive Graphic Retrieval System
+IN Indiana
+IN Intelligent Network
+INL Inter Node Link
+INMS integrated network management system, part of AT&T's UNMA
+INN Inter Node Network
+INOC Internet Network Operations Center
+INRIA Institut National de Recherche en Informatique et Automatique
+INRI Iesus Nazerenus Rex Iudaeorum (Jesus of Nazareth, King of the Jews)
+INS Immigration and Naturalization Service
+INS Inertial Navigation System
+INS Information Network System
+INSTITUTE INSTITUTE's Name Shows That It's Totally Unrelated To EMACS
+INTAP INteroperability Technology Association for information Processing
+INTELSAT INternational TELecommunications SATellite consortium
+INWATS INward Wide Area Telephone Service [telephony]
+IOCC International Overseas Completion Center
+IOC Input/Output Computer (Aptec)
+IOC Input/Output Controller
+IOC International Operating Center [telephony, US]
+IOD Identified Outward Dialing
+IO Input/Output, "I/O"
+IO Input/Output (sometimes I/O)
+IO Inward Operator
+IONL Internal Organization of the Network Layer
+IOOF International Order of Odd Fellows
+IOP Input-Output Processor
+IOTA Infrared-Optical Telescope Array
+IOTA International Occultation Timing Association
+IOT InterOffice Trunk
+IOU I Owe you (U)
+IOW in other words
+IOW In Other Words
+IOW In Other Words
+IPCC Intergovernmental Panel on Climate Change
+IPCE InterProcess Communication Environment
+IPC Integrated Personal Computer
+IPC InterProcess Communication
+IPC Inventory Process Control
+IPCS Interactive Problem Control System
+IPDU Internet Protocol Data Unit
+IPE Integrated Programming Environment
+IPI Intelligent Peripheral Interface
+IP Industrial Products
+IP Information Provider [telephony]
+IP Innings Pitched
+IP Instruction Pointer
+IP Intermediate Point
+IP Internet Protocol
+IPLAN Integrated PLanning And Analysis
+IPL Initial Program Load
+IPM Impulses Per Minute
+IPM Interruptions Per Minute
+IPMS InterPersonal Message Services
+IPO Initial Public Offering
+IPO International Procurement Office
+IPSE Integrated Project-Support Environment
+IPS Inches Per Second
+IPS Inertial Pointing System
+IPS Information Processing Standards
+IPT Williamsport PA
+IPX Internetwork Packet exchange (of Novell Inc.)
+IPXSPX Internet Packet eXchange/Sequenced Packet eXchange (Novell), "IPX/SPX"
+IQ Intelligence Quotient (see EQ)
+IQR Inquiry
+IRAF Image Reduction and Analysis Facility
+IRA Individual Retirement Account
+IRA Interprocedural Register Allocation
+IRA Irish Republican Army
+IRAS Infrared Astronomical Satellite
+IRBM Intelligent Repeater Bridge Module
+IRBM Intermediate Range Ballistic Missile
+IRC International Record Carrier
+IRC Internet Relay Chat
+IRC Internet Relay Chat
+IRD Investment Recovery Department
+IRDS Information Resource Dictionary Standard
+IRDS InfraRed Detection Set
+IRE Institute of Radio Engineers (old name for the now IEEE, q.v.)
+IRG InterRecord Gap
+IR Index Register
+IR Information Resource
+IR InfraRed
+IR Internetwork Router
+IRL in real life
+IRM Information Resources Management
+IRM Intelligent Repeater Module
+IRMS Information Resources Management Service
+IRN Intermediate Routing Node
+IROR Internal Rate Of Return
+IRQ Interrupt ReQuest
+IRSG Internet Research Steering Group
+IRS Inertial Reference System
+IRS Internal Revenue Service
+IRTF Internet Research Task Force
+IRT In Reply To, In Regards To
+ISA Industry-Standard Architecture
+ISAM Indexed Sequential Access Method
+ISAS Institute of Space and Astronautical Science (Japan)
+ISBD International Bibliographic Description
+ISBN International Standard Book Number
+ISCH Interstitial-Cell-Stimulating Hormone (same as LH)
+ISC Information Services Center
+ISC Interactive Systems Corporation
+ISC International Switching Center
+ISDN Integrated Services Digital Network
+ISDT Integrated Systems Development Tool
+ISEE International Sun Earth Explorer (usually ISEE-3)
+ISF Information Systems Factory
+ISFUG Integrated Software Federal User Group
+ISH Intermediate System Hello
+ISI Information Sciences Institute (at USC)
+IS Information Separator
+IS Information Systems
+IS Intermediate System
+IS International Standard
+IS Interrupt Set
+ISIS Intermediate System to Intermediate System, "IS-IS"
+ISLM Integrated Services Line Module
+ISLU Integrated Services Line Unit
+ISM InterStellar Medium
+ISN Information Systems Network
+ISN Integrated Systems Network
+ISODE ISO Development Environment
+ISO Infrared Space Observatory
+ISO In Search Of
+ISO International Standards Organization
+ISOO Information Security Oversight Office
+ISOP Incentive Stock Option Plan
+ISP Internet Service Provider
+ISPM International Solar Polar Mission
+ISRG Independent Space Research Group
+ISR Institute of Snow Research
+ISSI Information Security Systems Inc.
+ISS Integrated Switching System
+ISSN Integrated Special Services Network
+ISSN International Standard Serial Number
+IST Initial System Test
+ISTM it seems to me
+ISTM It Seems To Me
+ISTR I seem to recall
+ISTR I Seem To Recall
+ISUP Integrated Services User Part
+ISV Independent Software Vendor
+ISV Instantaneous Speed Variation
+ISY International Space Year
+ITC Independent Telephone Company
+ITC Inter-Task Communication
+IT Industrial Technology
+IT Information Technology
+ITM Information Technology Management
+ITMT In The MeanTime
+ITSEC Information Technology Security Evaluation Criteria
+ITSFWI If The Shoe Fits, Wear It
+ITS Incompatible Timesharing System
+ITS Institute of Telecommunication Science
+ITSO Incoming Trunk Service Observation
+ITT International Telephone and Telegraph
+ITU International Telecommunications Union
+ITUSA IT Users Standards Association
+ITYM I Think You Mean
+IUE International Ultraviolet Explorer
+IU Integer Unit
+IUS Inertial Upper Stage [Space]
+IUV Interlibrational Utility Vehicle [Space]
+IVDT Integrated Voice/Data Terminal
+IVP Installation Verification Program
+IVTS International Video Teleconferencing Service
+IWBNI It Would Be Nice If
+IWC Inside Wire Cable
+IWS Intelligent Work-Station
+IWW International Workers of the World
+IXC IntereXchange Carrier (aka LD)
+IX Interactive eXecutive
+IXM IntereXchange Mileage
+IYKWIM(AITYD) If You Know What I Mean (And I Think You Do)
+JACM Journal of the Association for Computing Machinery
+JAFO Just Another F**king Observer
+JAL Japan Airline
+JANET Joint Academic Network (U.K.)
+JBS John Birch Society
+JCAC Joint Civil Affairs Committee
+JCAE Joint Committee on Atomic Energy
+JCA Jewelry Crafts Association
+JCAMP Joint Committee on Atomic and Molecular Physical data
+JCEE Joint Council on Economic Education
+JCET Joint Council on Educational Television
+JC Jesus Christ
+JC Joint Compound (plumbing)
+JC Julius Caesar
+JC Junior College
+JCL Job Control Language
+JCS Joint Chiefs of Staff
+JD Justice Department
+JDS John Dewey Society
+JECC Japan Electronic Computer Company
+JEIDA Japan Electronics Inderstry Development Association
+JEM Japanese Experiment Module (for SSF)
+JES Job Entry System
+JES John Ericsson Society
+JESUS Job Entry System of the University of Saskatuan
+JFET Junction FET
+JFIF JPEG File Interchange Format
+JFK John F. Kennedy (and the international airport)
+JFMIP Joint Financial Management Improvement Program
+JFS Next Generation of JLE
+JGR Journal of Geophysical Research
+JIC Joint Industry Council
+JIC Joint Intelligence Center
+JIC Just in Case
+JI Justice, Inc.
+JILA Joint Institute for Laboratory Astrophysics
+JIM Job Information Memorandum
+JINTACCS Joint INteroperability of TActical Command and Control Systems
+JISC Japanese Industrial Standards Committee
+JIS Japan Industrial Standards
+JIT Just In Time
+JK Just Kidding / JoKe
+JLE Japanese Language Enveronment
+JMO just my opinion
+JMS John Milton Society
+JMX Jumbogroup MultipleX
+JOAT Jack Of All Trades
+JO Job Order
+JO Junior Officer
+JOOC Just Out of Curiosity
+JOVE Jonathan's Own Version of Emacs
+JOVIAL Jules Own Version of the International Algorithmic Language
+JPEG Joint Photographic Experts Group
+JPL Jet Propulsion Laboratory
+JRC Junior Red Cross
+JSC Johnson Space Center (NASA)
+JSD Jackson System Development
+JSN Junction Switch Number
+JSRC Joint Services Review Committee
+JST Japan Standard Time
+JSW Junctor SWitch
+JTIDS Joint Tactical Information Distribution Systems
+JTLYK Just To Let You Know
+JTM Job Transfer and Manipulation
+JUNET Japan UNIX Network
+JV Junior Varsity
+JVNC John von Neumann (Super Computer) Center, "JvNC"
+JVNCNET John von Neumann (Super Computer) Center network, "JvNCnet"
+K9 canine (K9 corps - army dogs)
+KAO Kuiper Airborne Observatory
+KAOS Killing as Organized Sport
+KB Key Board
+KB KiloByte
+KBPS KiloBits Per Second
+KBS Knowledge-Based System
+KC King's Counsel (QC when queen reigning)
+KC Knights of Columbus
+KCL Kyoto Common Lisp
+KDCI Key Display Call Indicator
+KDD Kokusai Denshin Denwa Co.
+KD Kiln Dried
+KD Knocked Down; Knock-Down
+KDT Keyboard Display Terminal
+KERMIT Kl-10 Error-free Reciprocal Micro Interconnect over Tty lines
+KFT KiloFeeT
+KGB Komitet Gosudarstvennoi Bezopaznosti
+KHYF Know How You Feel
+KHz Kilo HertZ (unit of frequency, 1000 cycles per second)
+KIA Killed In Action
+KIAS Knot Indicated Air Speed
+KIF Key Index File
+KI Kiwanis International
+KI Kuenstliche Intelligenz
+KIP Kinetics IP
+KIPS Kawasaki Integrated Power-valve System
+KISS Keep It Simple, Stupid
+K Kilobit
+KLIPS thousands of Logical Inferences Per Second
+KLOC thousands of Lines Of Code
+KNF kernel normal form
+KO Knock Out
+KOWC Key Word Out of Context
+KP Key Pulse [telephony]
+KP Kitchen Police
+KPNO Kitt Peak National Observatory
+KPO KeyPunch Operator
+KQC King's College London
+KR Kernighan and Ritchie, the c programming language, "K&R"
+KSC Kennedy Space Center (NASA)
+KSF Key Success Factor
+KSH Korn SHell
+KS King's Scholar
+KSR Keyboard Send-Receive
+KSU Key System Unit [telephony]
+KTB Cretaceous-Tertiary Boundary (from German)
+KTB Kali's Teeth Bracelet
+KTHX OK, Thanks
+KTHXBYE OK, Thanks, goodbye
+KTS Key Telephone System [telephony]
+KTU Key Telephone Unit [telephony]
+KWIC Key Word In Context
+KY Kentucky
+L1 Lagrange Point #1 35,000 Miles above moon [Space]
+L2 Lagrange Point #2 40,000 Miles behind moon [Space]
+L3 Lagrange Point #3 (?? 35,000 Miles below moon) [Space]
+L4 Lagrange Point #4 240,000 mile Earth orbit [Space]
+L5 Lagrange Point #5 240,000 mile Earth orbit [Space]
+L8R later
+L8R Later
+LAB Labor
+LAC Loop Assignment Center
+LADAR LAser Detection And Ranging
+LADT Local Access Data Transport
+LAIS Local Automatic Intercept System
+LAL Local Analog Loopback
+LA Los Angeles
+LA Louisiana
+LA Low Altitude
+LAMA Local Automatic Message Accounting [telephony]
+LAM Master of Liberal Arts
+LANCE Local Area Network Controller for Ethernet
+LANL Los Alamos National Laboratory
+LAN Local Apparent Noon
+LAN Local Area Network
+LAPB Link Access Procedure - Balanced (X.25)
+LAPD Link Access Procedure on the D channel
+LAPD Los Angeles Police Department
+LAP Link Access Procedure
+LAPM Link Access Procedure for Modems
+LARC Langley Research Center, "LaRC" [NASA]
+LAR Local Acquisition Radar
+LART Luser Attitude Readjustment Tool (i.e.: clue-by-four)
+LASER Light Amplification by Stimulated Emission of Radiation
+LASS Local Area Signaling Service
+LATA Local Access Transport Area
+LATIS Loop Activity Tracking Information System
+LAT Local Apparent Time
+LAT Local Area Transport (DEC)
+LAVC Local Area VAX Cluster
+LAX Los Angeles International Airport
+LBHS Long Beach High School
+LB Light Bomber
+LBL Lawrence Berkeley Labs
+LBO Line Buildout
+LB pound (LiBra)
+LBS Load Balance System
+LBS Pounds
+LCA Logic Cell Array
+LCAMOS Loop CAble Maintenance Operation System
+LCAO Linear Combination of Atomic Orbitals
+LCCIS Local Common Channel Interoffice Signaling
+LCCL Line Card CabLe
+LCCLN Line Card Cable Narrative
+LCD Liquid Crystal Display
+LCD Lowest Common Denominator
+LCDN Last Called Directory Number
+LCDR Lieutenant Commander
+LCIE Lightguide Cable Interconnection Equipment
+LC inductor-Capacitor circuit (as in filters, L is symbol inductance)
+LCL Lunar Cargo Lander [NASA OEXP]
+LCLOC Line Card LOCation
+LC Lower Case, "l.c."
+LCM Life Cycle Management
+LCN Logical Channel Numbers
+LCP Link Control Protocol
+LCR Least Cost Routing
+LCRMKR Line Card ReMarKs, Retained
+LCSE Line Card Service and Equipment
+LCSEN Line Card Service and Equipment Narrative
+LCS Laboratory for Computer Science [MIT]
+LCT Landing Craft Tanks
+LDC Logical Device Coordinates
+LDC Long Distance Carrier [telephony]
+LDEF Long Duration Exposure Facility
+LDF Large Deployable Reflector [Space]
+LDL Local Digital Loopback
+LDL Low Density Lipoprotein
+LDMTS Long Distance Message Telecommunications Service
+LDP Laboratory Data Products
+LDS The Church of Jesus Christ of Latter-Day Saints
+LDT Local Descriptor Table
+LDX Long Distance eXtender [telephony]
+LEAP Low-power Enhanced At Portable
+LEAS LATA Equal Access System
+LEC Local Exchange Carrier [telephony]
+LED Light-Emitting Diode
+LEGO Low End Graphics Option
+LE Lance Ethernet
+LEM Lunar Excursion Module (a.k.a. LM) (Apollo spacecraft)
+LENCL Line Equipment Number CLass
+LEO Low Earth Orbit [Space]
+LERC Lewis Research Center, "LeRC" [NASA]
+LEST Large Earth-based Solar Telescope
+LFACS Loop Facilties Assignment And Control System
+LF Line Feed Character
+LF Line Finder
+LF Low Frequency (30-300KHz)
+LFSA List of Frequently Seen Acronyms
+LFS Loopback File System
+LGA Low Gain Antenna
+LGB Lesbian/Gay/Bisexual
+LGB Long Beach CA
+LGBO Lesbian/Gay/Bisexual and any others we've missed, "LGBO*"
+LGM Little Green Men
+LHD Litterarum Humaniorum Doctor (doctor of human letters)
+LH Left Hand
+LH Liquid Hydrogen (also LH2 or LHX)
+LH Lower Half
+LH Luteinizing Hormone (same as ISCH)
+LHS Left Hand Side
+LIDAR LIght Detection And Ranging
+LIFIA Laboratoire d'Informatique Fondamentale et d'Intelligence Artificielle
+LIFO Last In, First Out
+LI Long Island
+LIM Lotus-Intel-Microsoft (memory specification)
+LIMM Lotus Intel Microsoft Memory (PC world)
+LIMS Labor-Informations-Management-System
+LINC Laboratory INstrument Computer
+LIPS Logical Inferences Per Second
+LISA Large Installation System Administration
+LIS Lanthanide-Induced Shift
+LISP LISt Processing Language
+LIST List-Oriented Interactive Language
+LIU Line Interface Unit
+LJBF Let's Just Be Friends
+LLAMA Logic Lacking A Meaningful Acronym
+LLB Legum Baccalaureus (bachelor of laws)
+LLCLINK Layer Control Protocol (?), "LLCLink"
+LLC Logical Link Control
+LLD Leather Lifestyle Dork(s)
+LLD Legum doctor (doctor of laws)
+LL Late Latin
+LL Long Lines [telephony]
+LLN Line Link Network [telephony]
+LLNL Lawrence-Livermore National Laboratory
+LLO Low Lunar Orbit [Space]
+LLOX Lunar Liquid OXygen [Space]
+LLP Line Link Pulsing [telephony]
+LMAO Laughing My Ass Off
+LMFAO Laughing My F***ing Ass Off
+LMC Large Magellanic Cloud (see SMC)
+LME Layer Management Entity
+LMF License Management Facility
+LMK Let Me Know
+LM Lan Manager
+LM Life Master (Contract Bridge ranking)
+LM Lunar Module (a.k.a. LEM) (Apollo spacecraft)
+LMMS Local Message Metering System
+LMOS Line Maintenance Operations System [telephony, AT&T]
+LMSO laughing my socks off
+LN2 Liquid N2 (Nitrogen)
+LNG Liquified Natural Gas
+LOA Lands of Adventure
+LOA Leave Of Absence
+LOB Line Of Balance
+LOB Line Of Building
+LOCAP LOw CAPacitance
+LOC Lines Of Code
+LOC Local Operating Company
+LOE Level Of Effort
+LOF Lock OFf-line
+LOFT Launch Operations Flight Test [Space]
+LOI Letter Of Intent
+LO Lake Oswego
+LO Leverage Out
+LOL laughing out loud
+LOL Laughing Out Loud
+LON Lock ON-line
+LOOPS Lisp Object Oriented Programming System
+LOP Lines Of Position
+LORAN Long RANge Navigation
+LOSF Lunar Orbit Staging Facility [Space]
+LOS Line Of Sight
+LOS Los Angeles
+LOTS Low Overhead Timesharing System
+LOX Liquid OXygen
+LPCDF Low Profile Combined Distributing Frame
+LPC Linear Predictive Coding (speech processing)
+LPDA Link Problem Determination Aid
+LPF League for Programming Freedom
+LPG Liquified Petroleum Gas
+LPG Low Pressure Gas
+LP Linear Prediction
+LP Linear Programming
+LPL Lunar Personnel Lander [NASA OEXP]
+LP Long Play(ing) (record)
+LP Low Pressure
+LPN Licensed Practical Nurse
+LPP Licensed Program Products
+LPR Line PrinteR
+LPT Line PrinTer
+LPT Lunar Propellant Tanker [NASA OEXP]
+LPV Lunar Piloted Vehicle [NASA OEXP]
+LQ Letter Quality
+LRAP Long Route Analysis Program
+LRB Liquid Rocket Booster [Space]
+LRBM Long Range Ballistic Missile
+LRC Longitudinal Redundancy Character
+LRS Line Repeater Station
+LRSP Long Range System Plan
+LRSS Long Range Switching Studies
+LRU Least Recently Used
+LRU Line Replaceable Unit
+LSAP Long Service Access Point
+LSB Least Significant Bit; Least Significant Byte
+LSB Lower Side Band
+LSC Lecture Series Committee [MIT]
+LSC LightSpeed C
+LSD Least Significant Digit
+LSD LySergic acid Diethylamide
+LSD pounds (Libra), shillings (Sestertii), and (old) pence (Denarii)
+LSELLINK Layer Selector (?), "LSELLink"
+LSI Large Scale Integration
+LS Left Side
+LS Letter Signed
+LS Locus Sigilli (place of seal)
+LSP LightSpeed Pascal
+LSR Local Standard of Rest
+LSRP Local Switching Replacement Planning system
+LSSD Level-Sensitive Scan Detection
+LSS Life Support System
+LSS Loop Switching System
+LSV Line Status Verifier
+LTAB Line Test Access Bus
+LTA Lighter Than Air
+LTC Lieutenant Colonel
+LTC Local Test Cabinet
+LTD Local Test Desk
+LTF Lightwave Terminating Frame
+LTF Line Trunk Frame
+LTG Line Trunk Group
+LTJG Lieutenant Junior Grade
+LTL Less than Truckload Lot
+LT Long Ton
+LT Low Tension
+LTMS Laughing To MySelf
+LTNS Long Time No See
+LTPD Lot Tolerance Percent Deffective
+LTP Lunar Transient Phenomenon
+LTR Long Distance Relationship
+LTR Long Term Relationship
+LTS Loss Test Set
+LTV Loan To Value
+LTVR LTV Ratio
+LUG Local Users Group
+LU Logical Unit
+LUMO Lowest Unoccupied Molecular Orbital
+LUN Logical Unit Number
+LUT Look-Up Table
+LWM Low-Water Mark
+LWP Light Weight Process
+LWSP Linear White-SPace
+LWT Last Will and Testament
+LXE Lightguide eXpress Entry
+LZ Landing Zone
+MAAP Maintenance And Administration Panel
+MAC Apple MACintosh computer
+MACBS Multi-Access Cable Billing System
+MAC Mandatory Access Control
+MAC Media Access Control
+MAC Military Air Command
+MAC Move, Add, Change
+MAC Multiple Analogue Component
+MACSYMA project MAC's SYmbolic MAnipulation System
+MADD Mothers Against Drunk Driving
+MAD Mass Air Delivery
+MAD Mutual Assured Destruction
+MADN Multiple Access Directory Numbers
+MAF Marine Abkuerzungs Fimmel (roughly navy abbreviation spleen?)
+MAG Magazine
+MAJOUR Modular Application for JOURnals
+MA Maintenance Administrator
+MA Massachusetts [US state postal designation]
+MAN Metropolitan Area Network
+MAP Maintenance and Administration Position
+MAP Management Assesment Program
+MAP Manufacturing Automation Protocol (GM's Token-Passing "Ethernet")
+MAP Marketing Assistance Program
+MAPSS Maintenance & Analysis Plan for Special Services
+MAPTOP Manufacturing Automation Protocol/Technical Office Protocol, "MAP/TOP"
+MARBI MAchine Readable form of Bibliographic Information
+MARC MAchine Readable card Catalog
+MARC Market Analysis of Revenue and Customers system
+MAR Microprogram Address Register
+MARS Multiuser Archival and Retrieval System
+MASB MAS Bus
+MASC MAS Controller
+MASC Multiple Award Schedule Contract
+MASER Microwave Amplification by Stimulated Emission of Radiation
+MASH Mobile Army Surgical Hospital
+MAS Magic Angle Spinning
+MAS MAin Store
+MAS Mass Announcement System
+MASM MAS Memory
+MAST Multi-Application SOnar Trainer
+MATCALS Marine Air Traffic-Control And Landing System, "MAT-CALS"
+MATFAP Metropolitan Area Transmission Facility Analysys Program
+MAU Math Acceleration Unit
+MAU Media Access Unit
+MAU Medium Attachment Unit
+MAU Multiple Access Unit
+MAU Multistation Access Unit
+MAXI Modular Architecture for the Exchange of Information (DoD)
+MBA Management Business Analyst
+MBA Master Business Administration
+MBBA p-MethoxyBenzylidene-p-n-ButylAniline
+MB Manned Base
+MB MegaByte (1MB=1048576 bytes)
+MBO Management By Objectives
+MBPS MegaBits/Bytes Per Second
+MBWA Management By Walking Around
+MCAD Mechanical Computer Aided Design
+MCAE Mechanical Computer Aided Engineering
+MCA Mechanical Computer Aided Design
+MCA Micro Channel Architecture
+MCC Master Control Center
+MCC Master Control Console
+MCC Microelectronics & Computer Consortia (Austin based)
+MCC Mission Control Center
+MCCS Mechanized Calling Card Service
+MCHB Maintenance CHannel Buffer
+MCH Maintenance CHannel
+MCIAS Multi-Channel Intelligent/Intercept Announcement System
+MCI Media Control Interface
+MCI Microwave Communications Incorporated
+MC Management Committee
+MC Master of Ceremonies
+MC Material Control
+MCNC Microelectronics Center of North Carolina
+MCN Metropolitan Campus Network
+MCPAS Master Control Program/Advanced System, "MCP/AS"
+MCP Master Control Program
+MCP Multiport/Multiprotocol Communication Processor
+MCPO Master Chief Petty Officer
+MCR Memory ContRoller
+MCS Material Control System
+MCS Meeting Communications Service
+MCSV Mars Crew Sortie Vehicle [NASA OEXP]
+MCTRAP Mechanized Customer Trouble Report Analysis Plan
+MCU Microprocessor Control Unit
+MDACS Modular Digital Access Control System
+MDAS Magnetic Drum Auxiliary Sender
+MDC Marker Distributor Control
+MDC Meridian Digital Centrex
+MD Doctor of Medicine
+MDDS Media Documentation Distribution Set
+MDEC MAINDEC maintenance on DEC diagnostic paper tapes
+MDE Modular Design Environment
+MDF Main Distribution Frame [telephony]
+MDI Medium Dependent Interface
+MDI Multiple Document Interface
+MDL Molecular Design Ltd. [Corporate name]
+MD Management Domain
+MD Maryland [US state postal designation]
+MD Medical Doctor
+MD Months after Date
+MDQS Multi-Device Queueing System
+MDRE Mass Driver Reaction Engine [Space]
+MDS Multi-point Distribution Service
+MDT Mean Down Time
+MDU Marker Decoder Unit
+MDX Modular Digital eXchange
+MEA Minimum Enroute Altitude (IFR)
+MEC Mobile Equipment Console
+MECO Main Engine CutOff
+MED Master of EDucation, "MEd"
+MELD Mechanized Engineering and Layout for Distributing frames
+MEM 2-MethoxyEthoxyMethyl
+ME Maine
+ME Mechanical Engineer
+MEM Maximum Entropy Method
+M.E. myalgic encephalomyelitis
+MERP Middle-Earth Role Playing
+MERS Most Economic Route Selection
+META not an acronym; see www.mindspring.com/~frites/m.htm
+MET Mid European Time
+MET Multibutton Electronic Telephone
+MeV Million Electron Volts
+MFA Master Fine Arts
+MFB Monochrome Frame Buffer
+MFENET Magnetic Fusion Energy NETwork
+MFG Manufacturing
+MFJ Modification of Final Judgement
+MFLOPS Million FLoating-point OPerations per Second
+MF Medium Frequency (300-3000KHz)
+MF Middle French
+MFM Modified Frequency Modulation
+MF Multi-Frequency [telephony]
+MFR Multi-Frequency Receivers
+MFS Macintosh File System
+MFT Metallic Facility Terminal
+MFT Multiprogramming with a Fixed number of Tasks
+MGH Massachusetts General Hospital
+MG Machine Gun
+MG Major General
+MG MasterGroup
+MG Military Government
+MGM Metro-Goldwyn Mayer [Corporate name]
+MGT MasterGroup Translator
+MGUFI My Gosh U Freaking/Fucking Idiot
+MHD MagnetoHydroDynamics
+MHL Microprocessor Host Loader
+MHS Message Handling System (aka X.400)
+MHz MegaHertZ (unit of frequency, 1,000,000 cycles per second)
+MIA Missing In Action
+MIB Management Information Base
+MICE Modular Integrated Communications Environment
+MICR Magnetic Ink Character Recognition
+MIDI Musical Instrument Digital Interface
+MIFASS Marine Integrated Fire And Support System
+MIF Maker Interchange Format
+MIL Military
+MILNET MILitary NETwork
+MILSTD MILitary StandarD, "MIL-STD"
+MIMD Multiple Instruction, Multiple Data
+MIME Multipurpose Internet Mail Extensions
+MI Michigan
+MI Military Intelligence
+MIM Media Interface Module
+MIM Metal Insulator Metal
+MIM Morality In Media
+MI Mode Indicator
+MINCE MINCE Is Not Complete Emacs
+MINDO Modified Intermediate Neglect of Differential Overlap
+MIN Mobile Identification Number
+MINX Multimedia Information Network eXchange
+MIP Mortgage Insurance Premium
+MIPS Microprocessor without Interlocked Piped Stages
+MIPS Million Instructions Per Second
+MIPS Million of Instructions Per Second
+MIR Micro-Instruction Register
+MIR Peace, "mir" [Russian]
+MIRS Management Information Retrival System
+MIRV Multiple Independently-Targetable Reentry Vehicle
+MISCF MISCellaneous Frame
+MIS Management Information System
+MITI Ministry of International Trade and Industry
+MIT Massachusetts Institute of Technology
+MITS Microcomputer Interactive Test System
+MJ Modular Jack
+MKTG Marketing
+MLA Member of Legislative Assembly (see MPP)
+MLCD Multi-Line Call Detail
+MLC MiniLine Card
+MLD Minimum Lethal Dose
+MLEM Multi Language Environment
+MLL Mars Logistics Lander [NASA OEXP]
+ML Middle Latin
+MLO Material, Labor, Overhead - Inventoriable Cost / Full Cost
+MLS Microwave Landing System
+MLS MultiLevel Security
+MLS Multiple Listing Service
+MLT Mechanized Loop Testing
+MLV Medium Lift Vehicle [NASA OEXP]
+MMC Minicomputer Maintenance Center
+MMC Money Market Certificate
+MMDF Multi-channel Memo Distribution Facility
+MMES Martin Marietta Energy Systems
+MMFS Manufacturing Message Format Standard
+MMGT MultiMasterGroup Translator
+MMH MonoMethyl Hydrazine
+M Miniatures
+MMJ Modified Modular Jack
+MM Maryknoll Missioners
+MMM see 3M
+MMOC Minicomputer Maintenance Operations Center
+MMP Modified Modular Plug
+MMS Main Memory Status
+MMS Manufacturing Message Specification
+MMS Memory Management System
+MMT Multiple Mirror Telescope
+MMU Manned Maneuvering Unit [Space]
+MMU Memory Management Unit
+MMW Multi-Mega Watt [Space]
+MMX Mastergroup MultipleX
+MNA Member of National Assembly (Quebec)
+MNDO Modified Neglect of Diatomic (differential) Overlap
+MN Minnesota
+MNOS Metal-Nitride-Oxide Semiconductor
+MNP Microcom Networking Protocol
+MNRAS Monthly Notices of the Royal Astronomical Society
+MOA Military Operations Area
+MOCA Minimum Obstacle Clearance Altitude (IFR)
+MOC Mars Observer Camera (on Mars Observer)
+MODEM MOdulator-DEModulator
+MOD Magneto-Optical Disk
+MOD Mesio Occlusal Distal (dental filling)
+MOFW Men Of Few Words
+MOG Minicomputer Operations Group
+MOLA Mars Observer Laser Altimeter (on Mars Observer)
+MOL Manned Orbiting Laboratory
+MO Magneto-Optical
+MO Mail Order
+MOMA Museum Of Modern Art
+MO Medical Officer
+MO Missouri
+MOM MethOxyMethyl
+MO Modus Operandi
+MO Molecular Orbital
+MO Money Order
+MOMV Manned Orbital Maneuvering Vehicle [Space]
+MOPAC Molecular Orbital PACkage
+MOP Maintenance Operations Protocol (DEC)
+MOR Middle-Of-the-Road
+MOSFET Metal Oxide Semiconductor Field Effect Transistor
+MOS Metal Oxide Semiconductor
+MOTAS Member of the Appropriate Sex
+MOTD Message Of The Day
+MOTIS Message-Oriented Text Interchange System
+MOTOPS Member of the Oppositely-Plumbed Sex
+MOTOS Member of the Opposite Sex
+MOTSS Member of the Same Sex
+MOTV Manned Orbital Transfer Vehicle [Space]
+MOU Memorandum Of Understanding
+MOUSE Minimum Orbital Unmanned Satellite of Earth
+MOV Metal Oxide Varistor
+MPCC Microprocessor Common Control
+MPCH Main Parallel CHannel
+MPC Minor Planets Circular
+MPC Multiprocess Communications
+MPD Multiple Personality Disorder
+MPDU Message Protocol Data Unit
+MPE Mission to Planet Earth [Space]
+MPG Miles Per Gallon
+MPH Miles Per Hour
+MPIF Multiprocessor Interface
+MP Manifold Pressure
+MP Melting Point
+MP Member of Parliament
+MP Metal Particle
+MP Metropolitan Police
+MP Micro Processor
+MP Military Police(man)
+MP Mixed Projection
+MP Modular Plug
+MP MultiProcessing
+MP MultiProcessor
+MPO Manufacturer's Point of Origin
+MPOW Multiple Purpose Operator Workstation
+MPPD Multi-Purpose Peripheral Device
+MPP Member of Provincial Parliament (Canada; also MLA)
+MPP Message Posting Protocol
+MPP Message Processing Program
+MPP MicroProcessor Pascal
+MPR Mars Pressurized Rover [Space]
+MPS Master Production Schedule
+MPS Megabytes Per Second
+MPT Ministry of Posts and Telecommunications
+MPT MultiPort Transceiver
+MPU MicroProcessor Unit
+MPV Mars Piloted Vehicle [NASA OEXP]
+MPW Macintosh Programmer's Workshop
+MQC Multiple-Quantum Coherence
+MQF Multiple-Quantum Filter
+MRD Marketing Requirements Document
+MRFL Mandatory File and Record Locking
+MRF Maintenance Reset Function
+MRI Magnetic Resonance Imaging
+MR Miniatures Rules
+MRP Manufacturing Requirements Planning
+MRP Manufacturing Resource Planning
+MRP Material Resource Planning
+MRS Material Reject Stock
+MRS Material Requirements Schedule
+MRSR Mars Rover and Sample Return
+MRSRM Mars Rover and Sample Return Mission
+MRTS Modification Request Tracking System
+MRU Most Recently Used
+MSB Most Significant Bit; Most Significant Byte
+MSCDEX MicroSoft CD-rom EXtensions
+MSC Media Stimulated Calling
+MSC MicroSoft C
+MSCP Mass Storage Control Protocol
+MSD Most Significant Digit
+MSDOS MicroSoft DOS, "MS-DOS", Maybe SomeDay an Operating System
+MSE Mobile Subscriber Equipment
+MSFC (George C.) Marshall Space Flight Center [NASA]
+MSFR Minimum Security Functionality Requirements
+MSG MonoSodium Glutamate
+MSH Marvel Super Heroes
+MSI Medium Scale Integration
+MSL Mean Sea Level
+MSL Motor Simulation Laboratory
+MS Maintenance State
+MS ManuScript
+MS Mass Spectrometry
+MS Master of Science
+MS MicroSoft [Corporate name]
+MS Military Science
+MS MilliSecond
+MS Motor Ship
+MS Multiple Sclerosis
+MSN Manhattan Street Network, mesh architecture - wavelength-division mux
+MSN Manufacturing Sequence Number
+MSO Manufacturers Statement of Ownership
+MSPE Mercenaries, Spies & Private Eyes
+MSP Mass Storage Pedestal
+MSR Mess-, Steuer- und Regelungssysteme
+MSR Multitrack Serpentine Recording
+MSS Management Support System
+MSS ManuScriptS
+MSS Mass Storage Subsystem
+MSS Mass Storage System
+MSS Maximum Segment Size
+MST Mountain Standard Time
+MTA Mail Transfer Agent
+MTA Message Transfer Agent
+MTA Message Transfer Architecture (AT&T)
+MTA Metropolitan Transportation Authority
+MTBF Mean Time Between Failures
+MTBRP Mean-Time-Between-Parts-Replacement
+MTC Man Tended Capability
+MTD Month To Date
+MTFBWY May The Force Be With You
+MTF Male to Female (transgendered)
+MTF Master Test Frame
+MTF Modulation Transfer Function
+MTF more to follow
+MTI Multi-Terminal Interface
+MT Material Transfer
+MT Metric Ton
+MTM Method Time Measurements
+MT Mountain Time
+MTP Message Transfer Part
+MTR Magnetic Tape Recording
+MTR Mechanized Time Reporting
+MTS Message Telecommunications Service
+MTS Message Telephone Service
+MTS Mobile Telephone Service
+MTSO Mobile Telephone Switching Office [telephony]
+MTTFF Mean Time To First Failure
+MTTF Mean Time To Failure
+MTTR Mean Time to Recovery/Repair
+MTTR Mean Time Trouble Repair
+MTU Maintenance Termination Unit
+MTU Maximum Transer Unit
+MTU Maximum Transmission Unit
+MTU Media Tech Unit
+MTV Music TeleVision
+MTX Mobile Telephone eXchange
+MUA Mail User Agent
+MUF Maximum Usable Frequency (max freq during sunspot activity)
+MULDEM MULtiplexer-DEMultiplexer
+MULTICS MULTiplexed Information and Computing Service
+MU Message Unit
+MUMPS Massachusetts general hospital Utility MultiProgramming System
+mung Mash Until No Good
+MUNG Mung Until No Good (see the hacker's dictionary)
+MUX MUltipleXor
+MVA Market Value Adjustment
+MVA MegaVolt Ampere
+MV MicroVAX
+MVP Multiline Variety Package
+MVS Multiple Virtual Storage
+MVSSP Multiple Virtual Storage / System Product, "MVS/SP"
+MVSXA Multiple Virtual Storage / Extended Architecture, "MVS/XA"
+MVY Martha's Vineyard MA
+MW MicroWave, "M/W"
+MWM Motif Window Manager
+MW MultiWink
+MX Mail eXchange
+MX Missile eXperimental
+MXU MultipleXer Unit
+MYOB mind your own business
+MYOB Mind Your Own Business
+NAACP National Association for the Advancement of Colored People
+NAAFA National Association to Advance Fat Acceptance
+NAAS North American Automated Systems co.
+NABISCO NAtional BIScuit COmpany [Corporate name]
+NAB National Association of Broadcasters
+NACA National Advisory Committee on Aeronautics (became NASA)
+NAC Network Administration Center
+NACS National Advisory Committee on Semiconductors
+NADGE NATO Air Defense Ground Environment
+NAD Network Access Device
+NAD Nicotinamide Adenine Dinucleotide
+NAGE National Association of Government Employees
+NAG Network Architecture Group
+NAG Numerical Algorithms Group
+NAK Negative AcKnowledgement
+NAMM North American Music Merchants
+NAM Name and Address Module [telephony, cellular phone changeable ROM]
+NAM National Account Manager [telephony, AT&T specific?]
+NAM Number Assignment Module [telephony, cellular phone changeable ROM]
+NA Narcotics Anonymous
+NAND Inverted And Gate, Not And
+NAND Not-AND gate
+NA Next Address
+NAN Not A Number
+NA North America
+NA Not Applicable
+NANP North American Numbering Plan
+NAPAP National Acid Precipitation Assessment Program
+NAPLPS North American Presentation Layer Protocol Suite
+NARDAC NAvy Regional Data Automation Center
+NAR National Association of Realtors
+NAR Nuclear Acoustic Resonance
+NASAGSFC National Aeronautics and Space Administration Goddard Space Flight Center, "NASA/GSFC"
+NASA National Aeronautics and Space Administration
+NASCAR National Association of Stock Car Auto Racing
+NASDA National Space Development Agency [Japan]
+NASDAQ National Association of Security Dealers Automated Quotations
+NASM National Air and Space Museum
+NAS National Academy of Sciences
+NAS National Advanced Systems
+NAS National Aircraft (Aerospace) Standards
+NAS National Audubon Society
+NAS Network Application Support
+NAS Numerical Aerodynamic Simulation
+NAS Numerical and Atmospheric Sciences network
+NASP National AeroSpace Plane
+NATO North Atlantic Treaty Organization
+NAU Network Addressable Unit
+NAVDAC NAVal Data Automation Command
+NAVSWC NAV Surface Warfare/Weapons Center
+NBA National Basketball Association
+NBC National Broadcasting Company
+NBD no big deal
+NBFM NarrowBand Frequency Modulation
+NB New Brunswick
+NB Nota Bene
+NBO Network Build Out
+NBO Network Business Opportunity
+NBP Name Binding Protocol
+NBS National Bureau of Standards (renamed NIST) [U.S. Government]
+NBVM Narrow Band Voice Modulation
+NCA Network Control Analysis
+NCAR National Center for Atmospheric Research
+NCCF Network Communications Control Facility
+NCC National Computer Conference
+NCC Network Control Center
+NCDC National Climatic Data Center
+NCD Network Computing Devices
+NCE New Catholic Edition
+NCGA National Computer Graphics Association
+NCIC National Cartographic Information Center
+NCIC National Crime Information Center
+NCMOS N-Channel (Silicon Gate Reversed) CMOS
+NC Network Control
+NC No Charge
+NC No Connection
+NC Non-Consensual
+NC North Carolina
+NCO Non-Commissioned Officer
+NCP Network Control Program/Protocol/Point
+NCR National Cash Register [Corporate name]
+NCSA National Center for Supercomputing Applications
+NCSC National Computer Security Center
+NCSL National Computer Systems Laboratory (NIST)
+NCS National Computer/Communications Systems
+NCS Network Computing System
+NCTE Network Channel-Terminating Equipment
+NCTL National Computer and Telecommunications Laboratory
+NCV No Commercial Value
+NDA Non-Disclosure Agreement
+NDB Non-Directional Beacon
+NDCC Network Data Collection Center
+NDC Normalized Device Coordinates
+NDDL Neutral Data Definition Language
+NDDO Neglect of Diatomic Differential Overlap
+NDEA National Defense Education Act
+NDE NeWS Development Environment
+NDI Network Design & Installation (Sun Service), "ND&I"
+NDIS Network Driver Interface Specification
+NDL Logical Network Disk
+NDL Network Database Language
+ND Network Disk (Sun)
+ND No Date
+ND North Dakota
+NDP New Democratic Party (Canada)
+NDSL National Direct Student Loan
+NDT Newfoundland Daylight Time
+NDV NASP Derived Vehicle
+NEAR National Electronic Accounting and Reporting system
+NEARNET New England Academic and Research network, "NEARnet"
+NEB New English Bible
+NEBS New Equipment-Building System
+NEC National Electric Code
+NEC National Electric Conference
+NEC Nippon Electric Company [Corporate name]
+NEFS Network extensible File System, "NeFS"
+NEI Not Elsewhere Included
+NEMA National Electrical Manufacturers Association
+NEMP Nuclear ElectroMagnetic Pulse
+NE New England
+NE Non Exempt
+NE North East
+NESAC National Electronic Switching Assistance Center
+NESC National Energy Software Center
+NES National Energy Strategy
+NES Not Elsewhere Specified
+NETBEUI NETBIOS Extended User Interface
+NETBIOS NETwork Basic Input Output System
+NETBLT NETwork Block Transfer
+NETCDF NETwork Common Data Format
+NET National Educational Television
+NET NETwork
+NET New England Telephone
+NEWS Networked Extensible Windowing System, "NeWS"
+NEWT NeWS Terminal, "NeWT"
+NEXRAD NEXt generation weather RADar
+NEXT Near-End cross-Talk
+NFC National Football Conference
+NFC no fucking clue
+NFFE National Federation of Federal Employees
+NFI no fucking idea
+NFL National Football League
+NF No Funds
+NFPA National Fire Protection Association
+NFR Not a Functional Requirement
+NFR Not Flame Related
+NFS Network File System
+NFT Network File Transfer
+NGC New General Catalog
+NG National Guard
+NG News Group / No Good
+NG No Good
+NHI National Health Insurance
+NHLBI National Heart, Lung, and Blood Institute (Bethesda, MD)
+NHL National Hockey League (the nation is Canada)
+NH New Hampshire
+NHR Non Hierarchial Routing
+NICE Network Information and Control Exchange (DECNET)
+NICMOS Near Infrared Camera / Multi Object Spectrometer (HST upgrade)
+NIC Network Information Center (ARPAnet)
+NIC Network Interface Card
+NIFTP (a file transfer network in the UK)
+NIH National Institutes of Health
+NIH not invented here
+NIH Not Invented Here
+NIMBY Not In My Back Yard
+NIMBY Not In My Back Yard
+NIMH National Institute of Mental Health (Rockville, MD)
+NIM Nuclear Instrumentation Module (an electronic instr. standard)
+NIMS Near-Infrared Mapping Spectrometer (on Galileo)
+NI Network Interface
+NIR Near InfraRed
+NIR Network Information Registry
+NISC Network Information and Support Center (NYSERNet)
+NISDN narrowband integrated-services digital network, "N_ISDN"
+NIS Network Information Service (nee YP)
+NISO National Information Standards Organization
+NISS National Information on Software and Services
+NIST National Institute of Standards and Technology (formerly NBS)
+NIU Network Interface Unit
+NJ New Jersey
+NKS Network Knowledge Server
+NLA National Leather Association
+NLDP National Launch Development Program
+NLM National Library of Medicine
+NL National League (baseball)
+NL New Leather
+NLP Natural Language Processing
+NLQ Near Letter Quality
+NLRB National Labor Relations Board
+NLS Native Language Support
+NLS Network License Server
+NMA Network Management Architecture
+NMC Network Management Center
+NMI New Model Introduction
+NMI Non Maskable Interrupt
+NM Nautical Mile
+NM Network Module
+NM Never Mind
+NM New Mexico
+NM No Mark; Not Marked
+NM Not Much
+NMOS N channel Metal Oxide Semiconductor (N-MOS) (see MOS)
+NMR Nuclear Magnetic Resonance
+NMS Network Management Station
+NNE North North East
+N North
+N Notice
+NNTP Net News Transfer Protocol
+NNTP Network News Transfer Protocol
+NNW North North West
+NNX Network Numbering eXchange
+NOAA National Oceanic and Atmospheric Administration
+NOAO National Optical Astronomy Observatories
+NOC Network Operations Center
+NOCS Network Operations Center System
+NOE Nuclear Overhauser Effect
+NOESY Nuclear Overhauser and Exchange SpectroscopY
+NOP No OPeration
+NORAD NORth American Defense command
+NORDO No-radio
+NORGEN Network Operations Report GENerator
+NORML National Organization for the Reform of Marijuana Laws
+NOSC Naval Ocean Systems Center
+NOS Network Operating System
+NOS Not Otherwise Specified
+!= Not equal to
+NOTIS Network Operator Trouble Information System
+NPA No Power Alarm
+NPA Numbering Plan Area, or area code [Telephony]
+NPC Non-Player Character (see PC)
+NPG New Product Group
+NPI New Product Introduction
+NPL National Physical Laboratory (UK)
+NPL Non-Procedural Language
+NPMS Named Pipes/Mail Slots
+NPN Negative-Positive-Negative (transistor)
+NPN NonProtein Nitrogen
+NP Nondeterministic-Polynomial
+NP No Problem
+NP No Protest
+NP Notary Public
+NP Noun Phrase
+NPP Net Primary Productivity
+NPRM Notice of Proposed Rulemaking
+NPR National Public Radio
+NPSI Network Protocol Service Interface
+NPV Net Present Value
+NQ No Quote
+NQS Network Queuing System
+NRA National Rifle Association
+NRAO National Radio Astronomy Observatory
+NRC National Research Council
+NRC Nuclear Regulatory Commission
+NRDC Natural Resource Defense Council
+NRE New Relationship Excitement\Ecstasy
+NREN National Research and Education Network
+NRE Non-Recurring Engineering
+NRL Naval Research Labs
+NRM Normal Response Mode
+NRN no reply necessary
+NROFF New ROFF
+NRO National Reconnaissance Office
+NRZI Non-Return to Zero Inverted (magnetic tape, 800 bpi)
+NRZ Non-Return to Zero
+NSA National Security Agency [U.S. Government]
+NSAP Network Service Access Point
+NSC National Security Council [U.S. Government]
+NSC Network Service Center
+NSCS Network Service Center System
+NSDSSO NASA Science Data Systems Standards Office
+NSEC Network Switching Engineering Center
+NSEL Network Service Selector
+NSEM Network Software Environment
+NSE Network Software Environment
+NSF National Science Foundation [U.S. Government]
+NSFNET National Science Foundation NETwork
+NS Name Server
+NS Network Services
+NS Neutron Star
+NS Not Specified
+NS Nova Scotia
+NS Nuclear Ship
+NSO National Solar Observatory
+NSPMP Network Switching Performance Measurement Plan
+NSP Network Services Protocol (DECNET)
+NSSDC National Space Science Data Center
+NST Newfoundland Standard Time
+NSTS National Space Transportation System [Space]
+NSUG Nihon Sun User's Group
+NSU Networking Support Utilities
+NSWC Naval Surface Warfare/Weapons (obsolete) Center
+NSW New South Wales (Australia)
+NTEC Network Technical Equipment Center
+NTEU National Treasury Employees Union
+NTF No Trouble Found
+NTFS Windows NT File System
+NTIA National Telecommunications and Information Agency
+NTIS National Technical Information Service
+NT Network Termination
+NT Newfoundland Time
+NT New Technology
+NT New Testament
+NTN Neutralized Twisted Nematic
+NT Northern Telecom
+NT Northern Territory
+NTO Network Terminal Option
+NTP Network Time Protocol
+NTP Normal Temperature and Pressure (see STP)
+NTR Nuclear Thermal Rocket(ry)
+NTSB National Transportation Safety Board [U.S. Government]
+NTSC National Television Standards Committee; Never The Same Color
+NTS Network Technical Support
+NTS Network Test System
+NTT New Technology Telescope
+NTT Nippon Telephone & Telegraph
+NUA Network User Address
+NUI Network User Identification
+NU Name Unknown
+NURBS NonUniform Rational B-Spline
+NUSC Naval Underwater Systems Command
+NVH Noise, Vibration, Harshness
+NVLAP National Validation Laboratory Program
+NV Nevada
+NVRAM NonVolatile Random Access Memory
+NWA Northwest Airline
+NW North West
+NWS National Weather Service
+NWT North West Territories (Australia)
+NXX NANP syntax for a three-digit string, {[2-9],[0-9],[0-9]} [Telephony]
+NYC New York City
+NY New York
+NYNEX New York, New England and the unknown (X)
+NYSE New York Stock Exchange
+NYSERNET New York State Educational and Research Network, "NYSERNet"
+NZ New Zealand
+NZUSUGI New Zealand Unix System User Group, Inc.
+O2 Oxygen
+OACIS Oregon Advanced Computing InStitute
+OAK Oakland CA
+OA Office Automation
+OAO Orbiting Astronomical Observatory
+OA Order Administration
+OA Overeaters Anonymous
+OAS Organization of American States
+OASYS Office Automation SYStem
+OAT Outside Air Temperature
+OATS Office Automation Technology and Services
+OBD Online Bugs Database (Sun)
+OBE Order of the British Empire
+OB Obligatory
+OBO Or Best Offer
+OBS Omnibearing Selector
+OBS Omni Bearing Selector
+OCATE Oregon Center for Advanced Technology Education
+OCC Office Communications Cabinet
+OCC Other Common Carrier
+OCDM Office of Civil Defense and Mobilization
+OCE Other Common carrier channel Equipment
+OCI Out of City Indicator
+OCLC Online Computer Library Center (Ohio College Library Catalog)
+OCLI Optical Coating Labs Inc.
+OCO Object Code Only
+OC Operator Centralization
+OC Order of Canada
+OCR Optical Character Reader
+OCR Optical Character Recognition
+OCS Officer Candidate School
+OCST Office of Commercial Space Transportation
+OCU Office Channel Unit
+ODAC Operations Distribution Administration Center
+ODA Office Document Architecture
+ODDD Operator Direct Distance Dialing
+OD Doctor of Optometry
+ODD Operator Distance Dialing
+ODIF Office Document Interchange Format
+ODI Optical Digital Image
+ODISS Optical Digital Image Storage System
+ODMR Optically Detected Magnetic Resonance
+OD Oculus Dexter (right eye)
+OD Officer of the Day
+OD Outer Diameter
+OD OverDose
+ODP Open Distributed Processing
+ODS Overhead Data Stream
+OECD Organization for Economic Cooperation and Development
+OED Oxford English Dictionary
+OEM Original Equipment Manufacturer
+OE Old English
+OEO Office of Economic Opportunity
+OE Order Entry
+OES Order of the Eastern Star
+OEXP Office of Exploration [NASA]
+OFM Order of Friars Minor
+OFNPS Outstate Facility Network Planning System
+OF Old French
+OFS Order of Free State
+OGICSE Oregon Graduate Institute Computer Science and Engineering
+OGI Oregon Graduate Institute
+OGL Old Guard Leather
+OG Original Gum
+OGT OutGoing Trunk
+OH Ohio
+OH OverHead
+OHP OverHead Projector
+OIC Oh, I See
+OIRA Office of Information and Regulatory Affairs
+OIU Office Interface Unit
+OIW Workshop for Implementors of OSI
+OJT On-the-Job Training
+OLE Object Linking and Embedding
+OLIT Open Look Interface Toolkit
+OL Old Leather
+OLTM Optical Line Terminating Multiplexer, "O-LTM"
+OLTP OnLine Transaction Processing
+OLWM OpenLook Window Manager
+OMA Optical Multichannel Analyzer
+OMB Office of Management and Budget
+OMD Orchestral Manouevers in the Dark
+OME Oregon Microcomputer Engineering (Intel)
+OMFG Oh My F***ing God/Goodness/Gosh
+OMG Oh My Goodness/Gosh/God
+OMM Output Message Manual
+OM Office Management
+OMPF Operation and Maintenance Processor Frame
+OMS Orbital Maneuvering System
+OMV Orbital Maneuvering Vehicle [Space]
+ONAC Operations Network Administration Center
+ONAL Off Network Access Line
+ONA Open Network Architecture
+ONC Open Network Computing
+ONE Open Network Environment
+ONI Office of Naval Intelligence
+ONI Operator Number Identification [telephony]
+ON Old Norse
+ONP Optical Nuclear Polarization
+ONR Office of Naval Research
+OOB Out Of Band
+OOC Out of Character / Curiosity
+OODB Object Oriented Data Base
+OOI Out Of Interest
+OOL Out Of Luck
+OO Object Oriented
+OOPART Out Of Place ARTifact
+OOPL Object-Oriented Programming Language
+OOP Object-Oriented Programming
+OOPS Object-Oriented Programming System
+OOPS Object Oriented Program Support
+OOPSTAD Object Oriented Programming for Smalltalk Application Developers Association
+OOSH Object-Oriented SHell
+OOT Object-Oriented Technology
+OPC Originating Point Codes
+OPDU Operation Protocol Data Units
+OPEC Organization of Petroleum Exporting Countries
+OPEOS Outside Plant planning, Engineering & construction Operations Sys
+OPF Orbiter Processing Facility
+OPM Office of Personnel Management
+OPM Outside Plant Module
+OP Observation Post
+OP OfficePower office automation system, trademark of CCI
+OP OFFICEPOWER office automation system, trademark of CCI
+OP Order of Preachers
+OP Out of Print
+OP Outside Plant
+OPSM Outside Plant Subscriber Module
+OPS Off-Premises Station
+OPX Off-Premises eXtension
+ORB Office Repeater Bay
+ORDLIX Organized Design for Line and Crew System
+ORD Optical Rotatory Dispersion
+ORFEUS Orbiting and Retrievable Far and Extreme Ultraviolet Spectrometer
+ORM Optical Remote Module
+ORNAME Originator / Recipient Name, "ORname"
+ORNL Oak Ridge National Laboratory
+OROM Optical Read Only Memory
+OR Operating Room
+OR Operation Research
+OR Oregon
+OR Originating Register
+OR Owner's Risk, Own Risk
+ORT Ongoing Reliability Test
+OS2 Operating System/2, "OS/2"
+OSAC Operator Services Assistance Center
+OSB Order of St. Benedict
+OSCAR Orbiting Satellite Carrying Amateur Radio
+OSC Operator Services Center
+OSC Orbital Sciences Corporation [Space]
+OSC OSCillator
+OSCRL Operating System Command Response Language
+OSDIT Office of Software Development and Information Technology
+OSD Office of the Secretary of Defense
+OSDS Operating System for Distributed Switching
+OSE Open Software Environment
+OSF Open Software Foundation (Oppose Sun Forever)
+OSF Order of St. Francis
+OSHA Occupational Safety and Health Act
+OSINET Open Systems Interconnection Network
+OSI Open Systems Interconnection
+OSIRM Open Systems Interconnection/Reference Model, "OSI/RM"
+OSME Open Systems Message Exchange
+OSN Office Systems Node
+OSN Open Systems Network
+OS Oculus Sinister (left eye)
+OSO Originating Signaling Office
+OS Operating System
+OS Operator Service
+OS Ordinary Seaman
+OS Out of Stock
+OS OutState
+OSPF Open Shortest Path First
+OSP Optical Storage Processor
+OSP OutSide Plant
+OSPS Operator Service Position System
+OSSA Office of Space Science and Applications
+OSSE Oriented Scintillation Spectrometer Experiment (on GRO)
+OSS Office of Strategic Services (later CIA)
+OSS Office Support System
+OSS Operation Support System [telephony, AT&T?]
+OSS Operator Service System
+OSTP Office of Science and Technology Policy [White House]
+OTA Office of Technology Assessment [U.S. government]
+OTA Optical Telescope Assembly (on HST)
+OTBE OverTaken By Events
+OTB Off-Track Betting
+OTBS One True Bracketing Style
+OTC Output Technology Corporation
+OTC Over The Counter (stocks)
+OTDR Optical TDR
+OTEC Ocean Thermal Energy Conversion
+OTF Open Token Foundation
+OTHB Over The Horizon - Backscatter (as in radar), "OTH-B"
+OTK Over The Knee
+OTLF Open Taxi & Limousine Foundation, "OT&LF"
+OTL Out To Lunch
+OTM On Time Marker
+OTP On The Phone
+OT Off Topic
+OTOH on the other hand
+OTOH On The Other Hand
+OTOH On The Other Hand
+OT Old Testament
+OT OverTime
+OTR On The Rag
+OTS Office of Thrift Supervision
+OTS Officers' Training School
+OTS Off The Shelf
+OTTOMH off the top of my head
+OTV Orbital Transfer Vehicle [Space]
+OTW One True Way
+OUTWATS OUTward Wide Area Telephone Service [telephony]
+OV Orbiter Vehicle [Space]
+OWHN One-Word Host Name
+OW Over-Write
+P2 Interpersonal Messaging Protocol (for heading and body)
+P3 Protocol used by UA Entities and MTA Entities
+P4 The video interface bus on the 3/80
+PAA P-AzoxyAnisole
+PABX Private Automatic Branch eXchange [telephony]
+PACE Program for Arrangement of Cables and Equipment
+PAC Privilege Attribute Certificate
+PACT Prefix Access Code Translator
+PACX Private Automatic Computer eXchange
+PAD Packet Assembler-Disassembler (for networking)
+PAD Public Access Device (networking)
+PADS PeroxylAmine DiSulfonate
+PAK Product Authorization Key
+PAL Personal Answer Line (Sun group)
+PAL Phase Alternation Line-rate
+PAL Programmable Array Logic
+PAMD Payload Assist Module, Delta-class, "PAM-D"
+PAM Payload Assist Module [Space]
+PAM Pulse Amplification Modulation
+PAM Pulse-Amplitude Modulation
+PAN Personal Account Number
+PANS Pretty Advanced New Stuff
+PAO Palo Alto CA
+Pa Pascal
+PA Pennsylvania
+PA Per Annum
+PA Play Aid
+PA Power Alarm
+PA Power of Attorney
+PAP Printer Access Protocol
+PA Precision Architecture (HP)
+PA Press Agent
+PA Private Account
+PA Process Alert
+PA Program Address
+PA protactinium, "Pa"
+PA Public Address
+PA Purchasing Agent
+PARC Palo Alto Research Center, xerox
+PAR Peak-to-Average Ratio, "P/AR"
+PAR Precision Approach Radar
+PAR Project Authorization Request
+PAS Public Announcement Service
+PAT Power Alarm Test
+PAT Profit After Tax
+PATROL Program for Administrative Traffic Reports On Line
+PAX Private Automatic eXchange
+PBC Peripheral Bus Computer
+PBC Processor Bus Controller
+PBD Pacific Bell Directory
+PBM Play By Mail game
+PBM Portable BitMap file format
+PBS Public Broadcasting System
+PBT Profit Before TAX
+PBX Private Branch eXchange [telephony]
+PCA Positive Controlled Airspace (above 18,000')
+PCA Printed-Circuit Assembly
+PCAT Personal Computer/Advanced Technology, "PC/AT"
+PCB PolyChlorinated Biphenyls
+PCB Printed Circuit Board
+PCB Process Control Block
+PCB Protocol Control Block (TCP)
+PCC Portable C Compiler
+PCDA Program Controlled Data Acquisition
+PCDOS Personal Computer DOS, "PC-DOS"
+PCF Portable Compiled Font
+PCF Puritanical Control Freaks
+P (Chem.) para-, "p-"
+PCH Parallel CHannel
+PCIE President's Council on Integrity and Efficiency
+PCILO Perturbational Configuration Interaction of Localized Orbitals
+PCI Panel Call Indicator
+PCI Peripheral Components Interface
+PCI Protocol Control Information
+PCL Printer Command Language
+PCL Programmable Command Language
+PCM Plug-Compatible Mainframe
+PCM Pulse-Code Modulation
+PCNFS Personal Computer Network File System
+PCN Personal Communication Network
+PCO Peg Count and Overflow
+PCO Process Change Order
+PCPC Personal Computers Peripheral Corporation
+PC Peace Corps
+PC PerCent; PerCentage
+PC Personal Computer
+PC Piece of Crap
+PC Player Character (see NPC)
+PC Politically Correct
+PC Post Card
+PC Post Cibum (after meals)
+PC Primary Center
+PC Printed Circuit
+PC Privileged Character
+PC Privy Council
+PC Production Control
+PC Program Counter
+PC Progressive Conservative party (Canada)
+PCSA Personal Computer Systems Architecture
+PCS Patchable Control Store
+PCS Permanent Change of Station
+PCTE Portable Common Tools Environment
+PCTS Posix Conformance Test Suite
+PCTV Program Controlled TransVerters
+PDAD Proposed Draft ADdendum
+PDA Public Displays of Affection
+PDB Process DataBase
+PDE Partial Differential Equation
+PDES Product Data Exchange Specifications
+PDF Power Distribution Frame
+PDF Program Development Facility
+PDIF Product Definition Interchange Format
+PDI Power and Data Interface
+PDL Page Description Language
+PDL Page/Program Description/Design Language
+PDL Program Design Language
+PDN Public Data Network
+PD Per Diem
+PD Peripheral Decoder
+PD Police Department
+PD Potential Difference
+PDP Plasma Display Panel
+PDP Programmed Data Processor [DEC]
+PD Public Domain
+PDQ Pretty Damned Quick
+PDS Portable Display Shell
+PDSP Peripheral Data Storage Processor
+PDS Premises Distribution System (AT&T)
+PDS Public Domain Software
+PDT Pacific Daylight Time
+PDU Product Development Unit
+PDU Protocol Data Unit
+PEBCAK Problem Exists Between Chair and Keyboard
+PEBCAK Problematic Error Between the Chair and Keyboard
+PECC Product Engineering Control Center
+PEDRI Proton-Electron Double-Resonance Imaging
+PEI Prince Edward Island
+PEM Privacy Enhanced Mail
+PEPE Pepe Est Presque Emacs
+PE Peripheral Equipment
+PE Phase Encoded (1600 bpi)
+PE Physical Education
+PE PolyEthylene
+PEP Packetized Ensemble Protocol
+PEP Productivity Enhancement Project
+PE Prince Edward island
+PE Printer's Error
+PE Professional Engineer
+PE Protestant Episcopal
+PERFECT PERFormance Evaluation for Cost-Effective Transformations
+PERL Pathologically Eclectic Rubbish Lister
+PERL Practical Extraction and Report Language
+PERT Program Evalution and Review Technique
+PES PhotoElectron Spectroscopy
+PETA People for the Ethical Treatment of Animals
+PEX Phigs/phigs+ Extension to X
+PEXSI PEX Sample Implementation (gfx), "PEX-SI"
+PFB Printer Font Binary
+PF Programmed Function
+PFPU Processor Frame Power Unit
+PGA Pin Grid Array
+PGA Professional Graphics Adapter
+PGA Pure Grain Alcohol
+PG Perge Notice
+PHA Pulse Height Analyzer/Analysis
+PHIGS Programmer's Hierarchical Interactive Graphics System
+PHOTOCD PHOTOgraphic Compact Disk
+PH Parity High bit
+PH Potential of Hydrogen, "pH"
+PH Process Hold
+PHS Public Health Service
+PHYSREV Physical Review Journal, "PhysRev"
+PIA Plug-In Administrator
+PIC Pilot In Command
+PIC Plastic-Insulated Cable
+PIC Primary Independent Carrier
+PICS Plug-in Inventory Control System (PICS/DCPR)
+PID Process IDentifier
+PID Protocol IDentifier
+PIF Paid In Full
+PIF Program Information File
+PIMS Profit Impact of Marketing Strategy
+PINE Pine Is Not Elm
+PING Packet InterNet Groper
+PIN Personal Identification Number
+PIP Packet Interface Port
+PIP Periphal Interchange Program
+PI Principal Investigator
+PI Protocol Interpreter
+PISS Passive Ignorance Silence Strike
+PITA pain in the ass
+PITA Pain In The Ass
+PITI Principal, Interest, Taxes, Insurance
+PIT Principal, Interest, and Taxes
+PIXEL PIcture ELement
+PL1 Programming Language One, "PL/1"
+PLAN Public Lands Action Network
+PLA Programmable Logic Array
+PLCC Plastic Leaded Chip Carrier
+PLC Programmable Logic Controller
+PLD Programmable Logic Device
+PLL Phase-Locked Loop
+PLM Programming Language for Microcomputers
+PLMK Please Let Me Know
+PLO Palestine Liberation Organization
+PLO Please Leave On
+PL Parity Low bit
+PLS Physical Layer Signaling
+PLSS Portable Life Support System
+PLT Panduit Locking Tie
+PMAC Peripheral Module Access Controller
+PMA Physical Medium Attachment
+PMC Permanently Manned Capability
+PMDF Pascal Memo Distribution Facility
+PMEG Page Map Entry Group
+PMFJI, PMJI Pardon Me (For) Jumping In
+PMG Page Map Group
+PMIRR Pressure Modulated InfraRed Radiometer (on Mars Observer)
+PMMU Paged Memory Management Unit
+PMO Prime Minister's Office
+PMOS P channel Metal Oxide Semiconductor (P-MOS) (see MOS)
+PM PayMaster
+PM Peripheral Module
+PM Phase Modulation
+PM Plant Management
+PM Police Magistrate
+P&M Posted & Mailed
+PM PostMaster
+PM Post Meridiem (after noon)
+PM PostMortem
+PM Presentation Manager
+PM Pressurized Module
+PM Preventive Maintenance
+PM Prime Minister
+PM Provost Marshal
+PMRC Parents' Music Resource Center
+PMSL Pissed MySelf Laughing
+PMT PhotoMultiplier Tube
+PMU Precision Measurement Unit
+PMX Presentation Manager for the X window system, "PM/X"
+PNB Pacific Northwest Bell
+PN Part Number
+PNPN Positive-Negative-Positive-Negative devices
+PNP Plug N Play
+PNP Positive-Negative-Positive (transistor)
+PN Promissory Note
+POA Power Of Attorney
+POB Periphal Order Buffer
+POC Port Of Call
+POD Pay On Delivery
+POD Point Of Distribution
+POE Port Of Entry/Embarkation
+POF Programmable Operator Facility
+POGO Polar Orbiting Geophysical Observatory
+POH Pilot's Operating Handbook
+POK Power on Okey Signal
+POM Phase Of Moon
+PO Petty Officer
+PO Postal Order
+PO Post Office
+POP Point of Presence [telephony]
+POP Point Of Production
+POP Post Office Protocol
+POP Processor On Plug-in (h/w)
+POPS Paperless Order Processing System
+PO Purchase Order
+POR Point Of Receive
+POR Price On Request
+POSI Promoting conference for OSI
+POSIX Portable Operating System for unIX
+POS Point Of Sale
+POS Programmable Option Set
+POST Power On Self Test
+POSYBL PrOgramming SYstem for distriButed appLications
+POTS Plain Old Telephone Service
+POTS Plain Ordinary Telephone System
+POTV Personnel Orbit Transfer Vehicle [Space]
+POV Point Of View
+POV Point Of View
+POWER Performance Optimization With Enhanced Risc
+POW Prisoner Of War
+P page, "p."
+PPA Post Pack Audit
+PPB Parts Per Billion
+PPBS Planning, Programming, and Budgeting Systems
+PPC Pour Prendre Conge' (to take leave)
+PPCS Person to Person, Collect, Special [telephony]
+PPD Peripheral Pulse Distributor
+PPD PostScript Printer Description
+P per (as in m.p.h.), "p."
+P peta- (SI prefix)
+P phosphorus, "P"
+P pico- (SI prefix), "p"
+PPI Professional Press Inc.
+PPI Programmable Peripheral Interface
+PPL pretty please
+PPM Page Per Minute
+PPM Parts Per Million
+PPM Portable PixMap file format
+PPM Product Portfolio Management
+PPN Parameterized Post-Newtonian formalism for general relativity
+PPN Project Programmer Number
+PPN Public Packet Switching
+PP pages, "pp."
+PP Painting Processor
+PP Parcel Post
+PP Past Participle
+PP Post Pay
+PPP Point-to-Point Protocol
+PP Primary Point
+PP Private Pilot
+PPS PostPostScriptum
+PPS Product Performance Surveys
+PPS ProduktionsPlanungs- und Steuerungssysteme
+PPS Public Packet Switching network
+PPT Parts Per Trillion
+PPT Pulse Pair Timing
+PPT Punched Paper Tape
+PQ Province of Quebec
+PRCA Puerto Rico Communications Authority
+PRC People's Republic of China
+PRC Planning Research Corporation
+PREMIS PREMises Information System
+PREPNET Pennsylvania Research & Economic Partnership network, "PREPnet"
+PRG PAL/PROM Programming Department
+PRI Primary Rate Interface
+PRISM Parallel Reduced Instruction Set Multiprocessing
+PRMD Private Management Domain
+PROFS PRofessional OFfice System
+PROLOG PROgramming in LOGic
+PROMATS PROgrammable Magnetic Tape System
+PROM Programmable Read-Only Memory
+PROPAL Programmed PAL
+PROTEL PRocedure Oriented Type Enforcing Language
+PROXYL tetramethyl-PyRrolidine-OXYL
+PR PayRoll
+PR Public Relations
+PR Puerto Rico
+PRS Personal Response System
+PRTC Puerto Rico Telephone Company
+PSAP Public Safety Answering Point
+PSA Problem Statement Analyzer
+PSA Public Service Announcement
+PSC Pittsburgh Supercomputer Center
+PSC Polar Stratospheric Clouds
+PSC Prime Service Contractor
+PSC Public Safety Calling system
+PSC Public Service Commission
+PSDC Public Switched Digital Capability
+PSDN Packet-Switched Data Network
+PSDS Public Switched Digital Service
+PSDS Public Switched Digital Service [telephony, AT&T?]
+PSE Packet Switch Exchange
+PSE Programming Support Environment
+PSF Point Spread Function
+PSG Platoon SerGeant
+PSG Professional Service Group (Sun group)
+PSI Packetnet System Interface
+PSI Packet Switch Interface
+PSIU Packet Switch Interface Unit
+PSK Phase-Shift Keying
+PSL Problem Statement Language
+PSM Packet Service Module
+PSM Packet Service Module
+PSM Position Switching Module
+PSM Professional Service Manager
+PSN Packet Switched Network
+PSN Packet Switching Node
+PSN Packet Switch Node
+PSO Pending Service Order
+PS PicoSecond
+PS PostScript
+PS PostScript [Adobe (tm)]
+PS PostScriptum
+PS Power Steering
+PS Power Supply
+PSP Product Support Plan
+PSP Program Segment Prefix
+PS Process Stop Ship
+PS Program Store
+PS Public School
+PSR Product Specific Realizations
+PSR Product Specific Release
+PSR PulSaR
+PSS Packet Switched Services
+PSS Packet Switch Stream
+PSTN Public Switched Telephone Network
+PST Pacific Standard Time
+PSU Program Storage Unit
+PSWM PostScript Window Manager
+PSW Program Status Word
+PTA Parent-Teacher Association
+PTAT Private Trans Atlantic Telecommunications
+PTD Parallel Transfer Disk/Drive
+PTE Page Table Entry
+PTI Portable Test Instrument
+PTN Plant Test Number [telephony:actual number assigned for 800 service]
+PTO Patent and Trademark Office
+PTO Please Turn Over
+PTO Power Take-Off
+PT Pacific Time
+PT Patrol Torpedo (as in PT boat)
+PT Physical Therapy
+PT Physical Training
+PTP Point To Point
+PT Program Timer
+PTSD Post Traumatic-Stress Disorder
+PTSS/PTSD Post Traumatic Stress Syndrome / Disorder
+PTT Postal, Telephone, and Telegraph administration
+PTT Post, Telephone and Telegraph administration
+PTV Passenger Transport Vehicle [Space]
+PTW Primary Translation Word
+PTY Pseudo-Terminal driver
+PUC Peripheral Unit Controller
+PUC Public Utilities Commission
+PUD Planned Unit Development
+P (UK) pence, pennies, penny, "p"
+PU Physical Unit
+PUP PARC Universal Packet protocol
+PVC Permanent Virtual Circuits
+PVC PolyVinylChloride
+PVFS Post Viral Fatigue Syndrome
+PVN Private Virtual Network
+PVO Pioneer Venus Orbiter
+PV PhotoVoltaic
+PVT Private (pilot certificate)
+PWB Printed Wiring Board
+PWB Programmers Work Bench
+PWD Print Working Directory
+PWG Permanent Working Group
+PW Prisoner of War (usually POW)
+PX Post eXchange (see also BX)
+QAM Quadrature Amplitude Modulation
+QA Quality Assurance
+QAS Quasi-Associated Signaling
+QBE Query By Example
+QBP queen's bishop's pawn (chess)
+QB queen's bishop (chess)
+QCPE Quantum Chemistry Program Exchange
+QC Quality Control
+QC Queen's Counsel
+QDA Quantity Discount Agreement
+QDCS Quality, Deliverly, Cost, Service / Safety
+QD Quaque Die (daily)
+QED Quantum ElectroDynamics
+QED Quod Erat Demonstrandum (which was to be demonstrated)
+QED Quod Est Demonstrandum (that which was to be demonstrated)
+QEF Quod Erat Faciendum (which was to be done)
+QEI Quod Erat Inveniendum (which was to be found out)
+QE Quick Estimation
+QET Quantum Effect Transistor
+QIC Quarter-Inch Cartridge
+QID Quater In Die (four times a day)
+QIS Quality Information System
+QKtP queen's knights's pawn (chess)
+QKt queen's knight (chess)
+QLI Query Language Interpreter
+QMC QuarterMaster Corps
+QMF Query Management Facility
+QMG QuarterMaster General
+QMP Quality Measurement Plan
+QM QuarterMaster
+QMS Quality Micro Systems
+QNS Quantity Not Sufficient
+Q Queen('s), "Q."
+Q question, "Q."
+QQV which see (plural of q.v.), "qq.v."
+QRA Quality Reliability Assurance
+QRSS Quasi Random Signal Source
+QSO Quasi-Stellar Object
+QSS Quality Surveillance System
+QTC Quantitative Technology Corporation
+QTY Quantity
+QUANGO QUAsi Non-Governmental Organization
+QUANTAS Quantas Empire Airways
+QUANTAS QUeensland And Northern Territory Aerial Service, "Quantas"
+QUEL QUEry Language
+QV which see (sing.), "q.v."
+QWERTY first six keys from left on top alphabetic row of standard keyboard
+QWL Quality of Working Life
+RAAF Royal Australian Air Force
+RACEP Random Access and Correlation for Extended Performance
+RACE Random Access Card Equipment
+RADAR Radio Association Defending Airwave Rights (radar detector makers)
+RADAR RAdio Detection And Ranging
+RADM Rear ADMiral
+RAD Radiation Absorbed Dose
+RAD Rapid Access Disk
+RAF Royal Air Force
+RAID Redundant Arrays of Inexpensive Disks
+RAMP Ratings And Maintenance Phase
+RAM Random-Access Memory
+RAND Rural Area Network Design
+RAO Regional Accounting Office
+RAO Revenue Accounting Office
+RA radium, "Ra"
+RARDE Royal Armaments Research and Development Establishment
+RARE European Association of Research Networks
+RA Regular Army
+RARE Reseaux Associes pour la Recherche Europeenne
+RA Research Assistant
+RA Return Authorization
+RA Royal Academy
+RARP Reverse Address Resolution Protocol (Ethernet->Internet)
+RAR Return Address Register
+RASC Residence Account Service Center
+RAS Reliability, Availability, and Serviceability
+RATFOR RATional FORtran
+RBC Red Blood Count
+RBHC Regional Bell Holding Company
+RBI Runs Batted In
+RBOC Regional Bell Operating Company
+RBOR Request Basic Output Report
+RB Rhythm and Blues, "R&B"
+RBTL Read Between The Lines
+RBT Reliable Broadcast Toolkit
+RCAF Royal Canadian Air Force
+RCA Radio Corporation of America
+RCAS Reserve Component Automation System
+RCC Radio Common Carrier
+RCC Remote Cluster Controller
+RCC Reverse Command Channel
+RCF Remote Call Forwarding
+RCI Rodent Cage Interface (for SLS mission)
+RCLDN Retrieval of Calling Line Directory Number
+RCL Runtime Control Library
+RCMAC Recent Change Memory Administration Center
+RCMP Royal Canadian Mounted Police
+RCM Remote Carrier Module
+RCP Remote CoPy
+RC Receive Clock
+RC Red Cross
+RC Regional Center
+RC Repair Center (Sun)
+RC Resistance-Capacitance
+RC Resistor-Capacitor circuit (as in filters)
+RC Roman Catholic
+RC Run Commands
+RCSC Remote Spooling Communications Subsystem
+RCS Reaction Control System
+RCS Revision Control System
+RCT Relayed Coherence Transfer
+RCU Radio Channel Unit
+RCVR ReCeiVeR
+RDA Remote Data Access
+RDBMS Relational DataBase Management System
+RDES Remote Data Entry System
+RDF Radio Direction Finding
+RDL Remote Digital Loopback
+RDM Reliably-Delivered Message (sockets)
+RDP Reliable Datagram Protocol
+RD Received Data
+RD Research and Development, "R&D"
+RD Rural Delivery
+RDS Radio Digital System
+RDT Radio Digital Terminal
+REA Rail Express Agency
+RECON Reconnaissance
+REC Regional Engineering Center
+REGIS REmote Graphics Instruction Set
+REMOBS REMote OBservation System
+REM Rapid Eye Movement
+REM Rat Enclosure Module (for SLS mission)
+REM Rational Economic Man
+REM Remote Equipment Module
+REM Ring Error Monitor
+REM Roentgen Equivalent in Man
+REN Ring Equivalence Number
+REO Removable, Erasable, Optical
+REO R. E. Olds
+REQSPEC REQuirements SPECification
+RETMA Radio Electronics Television Manufacturers Association (rack spacing)
+REX Raster Engine
+REX Remote EXecution
+REXX Restructured EXtended eXecutor
+RFC Request For Comments [Internet]
+RFD Rural Free Delivery
+RFE Request For Enhancement
+RFI Radio Frequency Interference
+RFP Request For Proposals
+RFQ Request For Quotes
+RF Radio Frequency
+RFS Remote File Sharing
+RFS Remote File System
+RFT Request For Technology
+RGBI Red Green Blue Intensity
+RGB Red Green Blue
+RGP Raster Graphics Processor
+RGU Radio Government/Universal, "RG/U"
+RHC Regional (Bell) Holding Company
+RHF Restricted Hartree-Fock
+RH Right Hand
+RHS Right Hand Side
+RHV Reid-Hillview Intergalactic, San Jose CA
+RIACS Research Institute for Advanced Computer Science (at NASA Ames)
+RIAS Radio In the American Sector, berlin
+RID Remote Isolation Device
+RIFF Resource Interchange File Format
+RIF Reading Is Fundamental
+RIF Reduction In Force
+RILM Repertoire International de Literature Musicale
+RIPE Reseaux IP Europeenne
+RIP Raster Image Processor
+RIP Rest In Peace/Requiescat In Pace
+RIP Routing Information Protocol
+RIPS Raster Image Processing Systems Corp.
+RI Receiving & Inspection, "R&I"
+RI Rhode Island
+RI Ring Indicator
+RISC Reduced Instruction Set Computer
+RISC Relegate Important Stuff to the Compiler
+RISLU Remote Integrated Services Line Unit
+RITA Recognition of Information Technology Achievement award
+RIT Rochester Institute of Technology
+RJE Remote Job Entry [IBM]
+RLCM Remote Line Concentrating Module
+RLC Resistor Inductor Capacitor
+RLDS The Re-organized Church of Latter-Day Saints
+RLG Research Libraries Group
+RLIN Research Libraries Information Network [run by RLG (q.v.)]
+RLL Run Length Limited
+RLOGIN Remote Login, "rlogin"
+RL real life
+RL Real Life (sometimes written as r/l)
+RLT Remote Line Test
+RMA Return Materials Authorization
+RMAS Remote Memory Administration System
+RMATS Remote Maintenance Admisistration and Traffic System [telephony]
+RMF Read Me First
+RMI Radio Magnetic Indicator
+RM Record Marking
+RM Regional Manager
+RMR Remote Message Registers
+RMR Return Material Receipt
+RMS Record Management System
+RMS Remote Manipulator System [Space]
+RMS Richard M. Stallman
+RMS Root Mean Square
+RMS Royal Mail Ship
+RNA RiboNucleic Acid
+RNGC Revised New General Catalog
+RNOC Regional Network Operations Center
+RN Reference Noise
+RN Registered Nurse
+RN Royal Navy
+RNR Receive Not Ready
+RNZAF Royal New Zealand Air Force
+ROA Return On Assets
+ROB Remote Order Buffer
+ROC Regional Operating Company
+ROE Rate Of Exchange
+ROE Return On Equity
+ROFF Run-OFF
+ROFL Rolling On the Floor Laughing (there are variations)
+ROG Receipt Of Goods
+ROH Receiver Off Hook
+ROI Region Of Interest
+ROI Return On Investment
+ROM Range Of Motion (medical)
+ROM Read-Only Memory
+ROM Rupture Of Membrane (as in birth)
+RONABIT Return On Asset Before Income Tax
+RONA Return on Net Assets
+RO Read/Only, "R/O"
+RO Receive Only
+ROSAT ROentgen SATellite
+ROSE Remote Operations Service Element
+ROTC Reserve Officers' Training Corps
+ROTFL Rolling On The Floor Laughing
+ROTFLOL Rolling On The Floor Laughing Out Loud
+ROTF Rolling On The Floor (Usually seen as ROFL)
+ROTL Remote Office Test Line
+ROTS Rotary Out Trunks Selectors
+ROUS Rodents Of Unusual Size
+ROW Rest Of the World
+ROYGBIV Red, Orange, Yellow, Green, Blue, Indigo, Violet, "Roy G. Biv"
+RPC Remote Procedure Call
+RPG RePort Generator
+RPG Role Playing Game
+RPI Rolling Plan Indices
+RPM Remote Process Management
+RPM Removable Peripheral Module
+RPM Resales Price Maintenance
+RPM Revolutions Per Minute
+RPN Reverse Polish Notation
+RPO Railway Post Office
+RP Rolling Plan
+RPS Revolutions Per Second
+RPS Rotational Positional Sensing (disks)
+RPV Remotely Piloted Vehicle
+RQ RuneQuest
+RQSM Regional Quality Service Management
+RQS Rate/Quote System
+R rand
+R recto, "r."
+R Republican, "R."
+R right, "r"
+R Ring
+RRIP Rock Ridge Interchange Protocol
+R roentgen
+R Rolemaster
+R rook in chess
+RRO Rate and Route Operator [telephony]
+RRO Reports Receiving Office
+RR RailRoad
+RR Rate & Route, "R&R"
+RR Receive Ready
+RR Resource Record
+RR Route Relay
+RR Rural Route
+RS232 Digital Communication Standard, "RS-232"
+RSA Repair Service Attendant
+RSB Repair Service Bureau
+RSC Remote Switching Center
+RSC Residence Service Center
+RSCS Remote Source Control System
+RSCS Remote Spooling and Communication Subsystem
+RSE Research & Systems Engineering, "R&SE"
+RSFSR Russian Soviet Federated Socialist Republic
+RSH Remote/Restricted SHell
+RSLE Remote Subscriber Line Equipment
+RSLM Remote Subscriber Line Module
+RSM Remote Switching Module
+RSN real soon now
+RSN Real Soon Now
+RS Recommended Standard
+RS Recording Secretary
+RS Revised Status
+RS Right Side
+RS RISC System
+RS Royal Society
+RSS Remote Switching System
+RSTSE Resource System Time Sharing/Enhanced, "RSTS/E"
+RSTS Resource System Time Sharing
+RSU Remote Switching Unit
+RSVP Repondez S'il Vous Plait (please reply)
+RSV Revised Standard Edition
+RSWC Right Side up With Care
+RTAC Regional Technical Assistance Center [telephony]
+RTA Remote Trunk Arrangement
+RTC Right To Copy
+RTFB read the fine book
+RTFMP read the fine man page
+RTFM Read the F*g Manual!
+RTFM read the fine manual
+RTFM Read The F***ing Manual
+RTF Read This First
+RTF Rich Text Format
+RTFS Read The Fine Source
+RTG Radioisotope Thermoelectric Generator
+RTL Resistor-Transistor Logic
+RTL Run-Time Library
+RTLS Return To Launch Site (Shuttle abort plan)
+RTMP Routing Table Maintenance Protocol
+RTM Regional Telecommunications Management
+RTM Remote Test Module
+RT RadioTelephone
+RT RealTime
+RT Real-Time/Rise Time/Radiation Therapy/RighT (as opposed to Left)
+RT Risc Technology [IBM]
+RTR Reel-To-Reel
+RTSE Reliable Transfer Service Element
+RTSL Read The Source Luke
+RTS Ready To Send
+RTS Real Time Systems (lll-csrg)
+RTS Reliable Transfer Service
+RTS Remote Testing System
+RTS Return To Stock
+RTT Round Trip Time
+RTTY Radio Teletype
+RTU Real Time Unix
+RTU Remote Trunking Unit
+RTU Right To Use
+RUM Remote User Multiplex
+RUOK Are you OK?
+RU Receive Unit
+RWC Remote Work Center
+RWE Remote Wall Enclosure
+RWM Read/Write Memory, "R/WM"
+RW Read/Write
+RW Read/Write, "R/W"
+RW Real World
+RW Right Worshipful
+RW Right Worthy
+RX Remote eXchange
+SAAB Svenska Aeroplan AktieBolaget (Swedish Aircraft Corporation)
+SAA South Atlantic Anomaly
+SAA Systems Application Architecture (IBM)
+SABME Set Asynchronous Balanced Mode Extended
+SABRE Semi-Automated Business Research Environment
+SACK Selective ACK
+SAC Service Area Code
+SAC Strategic Air Command [US military]
+SADD Students Against Drunk Driving
+SAE Society of Automotive Engineers
+SAGA Solar Array Gain Augmentation (for HST)
+SAG Street Address Guide
+SAIC Science Applications International Corporation
+SAI Serving Area Interface
+SAKDC Swiss Army Knife Data Compression
+SALI Standalone Automatic Location Identification
+SALT Strategic Arms Limitting Talks
+SAMA Step-by-step Automatic Message Accounting [telephony]
+SAMPEX Solar Anomalous and Magnetospheric Particle EXplorer
+SAM Smart Assed Masochist / Stand And Model
+SAM Surface-to-Air Missile
+SAMTO Space And Missile Test Organization
+SAO Smithsonian Astrophysical Observatory
+SAP Second Audio Program
+SAP Service Access Point
+SARA Satellite pour Astronomie Radio Amateur
+SAREX Search and Rescue Exercise
+SAREX Shuttle Amateur Radio Experiment
+SAR Search And Rescue
+SAR Store Address Register
+SAR Synthetic Aperture Radar
+SARTS Switched Access Remote Test System
+SA Salvation Army
+SA Seaman Apprentice
+SA Service Assistant
+SASE Self-Addressed Stamped Envelope
+SASE Specific Application Service Element
+SA Sex Appeal
+SA Sine Anno (without date)
+SASI Shugart Associates Systems Interface
+SA South Africa
+SA South America
+SA South Australia
+SAS Single Attach Station
+SAS Southern All Stars
+SAS Space Activity Suit
+SAS Space Adaptation Syndrome
+SAS Statistical Analysis Software?
+SA Subject to Approval
+SAT Satellite [Space]
+SAT Scholastic Aptitude Test
+SAT Special Access Termination
+SAT Supervisory Audio Tone
+SAT Synthetic Aperture Telescope
+SAW Surface Acoustic Wave
+SBA Small Business Administration
+SBC Single Board Computer
+SBMS Southwestern Bell Mobile Service
+SBS Skyline Business Systems
+SBUS School Bus, "S-Bus"
+SBU Strategic Business Unit
+SBWR Simplified Boiling Water Reactor
+SCADA Supervisory Control And Data Acquisition
+SCADC Standard Central Air Data Computer
+SCAD Subsonic Cruise Armed Decoy
+SCAME SCreen oriented Anti-Misery Editor
+SCAMP Single-Chip A-series Mainframe Processor
+SCAN Switched Circuit Automatic Network
+SCA Shuttle Carrier Aircraft
+SCA Society for Createive Anachronism
+SCA Sunlink Channel Adapter
+SCAT Stromberg-Carlson Assistance Team
+SCB System Control Block
+SCCA Sports Car Club of America
+SCC Serial Communication Controller
+SCC Specialized Common Carrier
+SCCS Source Code Control System
+SCCS Specialized Common Carrier Service
+SCCS Switching Control Center System
+SCC Switching Control Center (or Specialized Common Carriers)
+SCED SCSI/Ethernet/Diagnostics (Sequent board)
+SCE Signal Conversion Equipment
+SCE Structure Chart Editor
+SCF Selective Call Forwarding
+SCF Self Consistent Field
+s.c.f.t.h.i. Smiley Captiond for the Humor-Impaired
+SCIFI SCIence FIction, "sci-fi"
+SCI SpaceCraft Incorporated
+SCM Software Configuration Management
+SCMS Serial Copy Management System
+SCM Subscriber Carrier Module
+SCNR Sorry, Could Not Resist
+SCOOPS SCheme Object Oriented Programming System
+SCO Santa Cruz Operation
+SCO Serving Central Office
+SCOTS Surveilance and Control Of Transmission Systems
+SCOT Stepper Central Office Tester
+SCPC Signal Channel Per Carrier
+SCPD Supplementary Central Pulse Distributor
+SCPI Standard Commands for Programmable Instrumentation
+SCP Signal Control Point
+SCP Signal Conversion Point
+SCP Sunlink Communications Processor
+SCP System Control Program
+SCRAM Static Column RAM (h/w)
+SCSA Sun Common SCSI Architecture
+SC Scanner Controller
+SC Secondary Channel
+SC Sectional Center
+SCSI Small Computer System Interface (pronounced scuzzi)
+SC Skull & Crossbones, "S&C"
+SC South Carolina
+SC SpaceCraft, "S/C"
+SCS Silicon Controlled Switch
+SC SubCommittee
+SCT Schmidt-Cassegrain Telescope
+SCTS Secondary Clear To Send
+SCUBA Self Contained Underwater Breathing Apparatus
+SCUD Subsonic Cruise Unarmed Decoy
+SCU Selector Control Unit
+SCX Specialized Communications eXchange
+SDA Send Data With Immediated Ackonwledge
+SDA Swappable Data Area
+SDB Safety Deposit Box
+SDCD Secondary Data Carrier Detect
+SDD Specific Development & Design, "SD&D"
+SDF Secondary Distribution Frame
+SDF Standard Data Format
+SDF SubDistribution Frame
+SDH Synchronous Digital Hierarchy (synchronous multiplexed network)
+SDIO Strategic Defense Initiative Organization
+SDI Selective Dissemination of Information
+SDI Space Defense Initiative
+SDIS Switched Digital Integrated Service
+SDI Standard Disk Interconnect
+SDI Standard Disk Interface
+SDI Storage Device Interconnect
+SDI Strategic Defense Initiative [US Government]
+SDK Software Development Kit
+SDLC Synchronous Data Link Control [IBM]
+SDLP Standard Device Level Protocol
+SDL Specification and Description Language
+SDL System Design Language
+SDM Sub-rate Data Multiplexer
+SDN Software-Defined Network
+SDOC Selective Dynamic Overload Controls
+SDO Staff Duty Officer
+SDP Service Delivery Point
+SDRC Structural Dynamics Research Corporation
+SDR Store Data Register
+SDSC San Diego Supercomputer Center
+SD SCSI Disk
+SDSC Synchronous Data Set Controller
+SD Sensory Deprivation
+SD South Dakota
+SDS Sodium Dodecyl Sulfate
+SDS Switched Data Service
+SDS Synchronous Data Set
+SDU Service Data Unit
+SDV Shuttle Derived Vehicle [Space]
+SEAP Service Element Access Point
+SEAS Signaling Engineering and Administration System
+SEATO SouthEast Asia Treaty Organization
+SECAM SEquential Couleur Avec Memoire
+SECNAV SECretary of the NAVy
+SEC Securities and Exchange Commission
+SEC Security Exchange Commission
+SECSY Spin-Echo Correlated SpectroscopY
+SED Stream EDitor
+SEI Software Engineering Institute (Carnegie Mellon)
+SEI Space Exploration Initiative
+SEL SELector
+SEL Software Engineering Laboratory
+SELV Safety Extra-Low Voltage
+SEM Scanning Electron Microscope
+SEP someone else's problem
+SERC Science & Engineering Research Council
+SERC Swedish Energy Research Commission
+SER Satellite Equipment Room
+SE South East
+SESRA Seattle Employee Services Recreation Association
+SES Service Evaluation System
+SEST Swedish-European Submillimeter Telescope
+SE Systems Engineer
+SETI Search for ExtraTerrestrial Intelligence
+SET Single Electron Transfer
+SET Software Engineering Technology
+SFA sweet fuck all
+SFDM Statistical Frequency Division Multiplexing
+SFD Sun Federal Division
+SFMC Satellite Facility Management Center
+SFO San Francisco CA
+SFRPG Science Fiction Role Playing Game
+SF San Francisco
+SF Science Fiction; Speculative Fiction
+SF Single Frequency
+SF Standard Form
+SF Star Frontiers
+SGI Silicon Graphics Incorporated
+SGML Standard Generalized Markup Language
+SGMP Simple Gateway Monitoring Protocol (superseded by SNMP)
+SG Signal Ground
+SG StarGuard
+SG SubGroup
+SG SuperGroup
+SHAPE Supreme Headquarters Allied Powers Europe
+SHAR SHell ARchiver
+SHCD Sherlock Holmes Consulting Detective
+SHF Super High Frequency (3-30GHz)
+SHID slaps head in disgust
+SHRPG Super Hero Role Playing Game
+SIAM Society for Industrial and Applied Mathematics
+SICK Single Income, Coupla' Kids
+SIC Second In Command
+SIC Silicon Integrated Circuit
+SID Sudden Ionospheric Disturbance
+SID System IDentification
+SIGCAT Special Interest Group for Cd-rom Applications Technology
+SIG Special Interest Group
+SIMD Single Instruction, Multiple Data
+SIMM Single Inline Memory Module
+SINE SINE is not EINE
+SIPC Securities Investment Protection Corporation
+SIPP Strategic Industry Partners Program
+SIP Single Inline Package/Pin
+SIPS Satellite Imagery Processing System
+SIR Shuttle Imaging Radar
+SIRTF Space (formerly Shuttle) InfraRed Telescope Facility
+SISAL Streams and Iteration in a Single-Assignment Language
+SISCOM Satellite Information System COMpany
+SIS Software Information Services
+SIS Strategic Information System
+SI Staten Island
+SI Status Indicator
+SI System Integrater
+SITA Societe Internationale Telecommunications Aeronautiques
+SIT Special Information Tone
+SJC San Jose CA
+SJ Society of Jesus
+SKU Stock Keeping Unit
+SLALOM Scalable Language-independent Ames Laboratory One-minute Measurement
+SLAN Sine Loco, Anno, (vel) Nomine (without place, year, or name)
+SLAPP Strategic Litigation Against Protesting People
+SLAR Side Looking Airborne Radar
+SLA Special Libraries Association
+SLA Symbionese Liberation Army
+SLA Synchronous Line Adapter
+SLBM Submarine Launched Ballistic Missiles
+SLC Space Launch Complex [Space]
+SLC Subscriber Loop Carrier
+SLC Super Low Cost
+SLDC Synchronous Data Link Control
+SLED Single Large Expensive Drive
+SLE Screening Line Editor
+SLIC Subscriber Line Interface Circuit
+SLIC System Link and Interrupt Controller (Sequent)
+SLIM Subscriber Line Interface Module
+SLIP Serial Line Internet Protocol
+SLP Super Long Play (VHS VCR, aka EP)
+SL Salvage Loss
+SL SpaceLab
+SL Space Launch [Space]
+SLS Space(lab) Life Sciences
+SLUFAE Surface Launched Unit, Fuel Air Explosive
+SMA Sergeant Major of the Army
+SMASF SMAS Frame
+SMA Spectrum Manufacturers Association
+SMASPU SMAS Power Unit
+SMAS Supplementary MAin Store
+SMAS Switched Maintenance Access System
+SMB System Message Block
+SMC Small Magellanic Cloud (see LMC)
+SMDF Subscriber Main Distributing Frame
+SMDI Subscriber Message Desk Interface
+SMDR Station Message Detailed Recording
+SMDR Station Message Detail Recording
+SMDS Switched Multimegabit Data Service
+SMDS switched multimegabit data service, Bellcore-developed standard
+SMD Standard Molecular Data format
+SMD Storage Module Device (interface standard for disk drives)
+SMD Surface Mounted Devices
+SMEGMA Sophisticated Modern Editor with Gloriously Magnificent Abilities
+SMERSH abbr. of Russian phrase meaning "Death to the spies."
+SME Society of Manufacturing Engineers
+SME Solar Mesosphere Explorer
+SMEX SMall EXplorers
+SMG SuperMasterGroup
+SMILS Sonobuoy Missile Impact Location System
+SMI Structure of Management Information
+SMI Sun Microsystems Inc.
+SMIT System Management Interface Tool
+SMK Software Migration Kit
+SMLSFB so many losers, so few bullets
+SMM Solar Maximum Mission
+SMOC Small Matter Of Commitment
+SMOF Secret Master Of Fandom
+SMOH Since Major OverHaul
+SMOP simple matter of programming
+SMOP Small Matter Of Programming
+SMO Santa Monica CA
+SMP Symmetric MultiProcessing
+SMPTE Society of Motion Picture and Television Engineers
+SMR Service Marketing Representative
+SMSA Standard Metropolitan Statistical Area
+SM Service Mark
+SM, S&M Sado-Masochism, Sex Magick
+SMS Service Management System
+SM Switching Module
+SMTP Simple Mail Transfer Protocol
+SMT Surface Mount Technology
+SNADS SNA Distribution Services
+SNADS Systems Network Architecture Distribution Service
+SNAFU Situation Normal -- All Fouled/F***ed Up
+SNAFU situation normal, all fucked up
+SNAP Shipboard Non-tactical Automated data Processing program
+SNAP SubNetwork Access Protocol
+SNAP System and Network Administration Program
+SNA Santa Ana (Orange County) CA
+SNA Systems Network Architecture [IBM]
+SNCF Societe National des Chemins de Fer (French National Railways)
+SNERT snot-nosed egotistical rude teenager
+SNET Southern New England Telephone
+SNF Server-Natural Format
+SNF Server Normal/Natural Format
+SNI Siemens Nixdorf Informationssysteme
+SNMP Simple Network Management Protocol
+SNM SunNet Manager
+SNOBOL StriNg Oriented symbOLic Language
+SNPA SubNetwork Point of Attachment
+SNR Signal to Noise Ratio
+SNR SuperNova Remnant
+SN Subnetwork Number
+SN Super Nova
+SNTSC Super NTSC (video)
+SNU Solar Neutrino Units
+SOAC Service Order Analysis Control
+SOAP Symbolic Optimizing Assembler Program
+SOAR Smalltalk On A Risc
+SOC Service Oversight Center
+SOFIA Stratospheric Observatory For Infrared Astronomy
+SOF Sales Order Form
+SOHF Sense Of Humor Failure
+SOHO SOlar Heliospheric Observatory
+SOH Service Order History
+SOH Start Of Header, ASCII control character (dec=01,control-A)
+SOL Shit Out [Of] Luck
+SOL Short on Landing (or, colloquially, Shit Out of Luck)
+SOMM Stop On Micro-Match
+SONAR Service Order Negotiation And Retrieval
+SONAR SOund Detection And Ranging
+SONDS Small Office Network Data System
+SONET Synchronous Optical NETwork
+SOP Standard Operating Procedure
+SOR Sales Order Request
+SO Sales Order
+SO Seller's Option
+SO significant other
+SO Significant Other
+SO Significant Other
+SO Space Opera
+SOS Save Our Souls (International standard distress call, Morse ...---...)
+SOS Silicon On Sapphire
+SO Strike Out
+SOW Speaking Of Which
+SOW Statement Of Work
+SPAG Standards Promotion and Applications Group
+SPAN Space Physics Analysis Network
+SPAN System Performance ANalyzer
+SPARC Scalable Processor ARChitecture
+SPARC Standards, Planning, And Requirements Committee
+SPARS Society of Professional Audio Recording Studios
+SPAR Stock Points Adp Replacement
+SPA Software Publishers Association
+SPAWAR naval SPAce and WARfare command
+SPCA Society for the Prevention of Cruelty to Animals
+SPCC Society for the Prevention of Cruelty to Children
+SPC Software Productivity Consortium
+SPC Southern Pacific Communications
+SPCS Stored Program Control Systems
+SPC Statistical Process Control
+SPC Stored Program Control
+SPDL Standard Page Description Language (ISO)
+SPDM Special Purpose Dextrous Manipulator
+SPD Software Products Division
+SPEC Standard Performance Evaluation Corporation
+SPE Symbolic Programming Environment
+SPIM Sun Product Information Meeting
+SPI Selective Population Inversion
+SPI Serial Peripheral Interface
+SPITBOL SPeedy ImplemenTation of snoBOL
+SPL System Programming Language
+SPNI Society for the Protection of Nature in Israel
+SPOT Systeme Probatoire pour l'Observation de la Terre
+SPR Software Problem Report
+SP Shore Patrol
+SP Short Play (VHS VCR)
+SP Signaling Point
+SP Signal Processor
+SP Southern Pacific (railroad) [Corporate name]
+SPS Self Praise Stinks
+SPS Solar Power Satellite [Space]
+SPSS Statistical Package for Social Sciences (computer software)
+SPS Standby Power System
+SP Stack Pointer
+SP Standard Play (VHS VCR)
+SP Star Patrol
+SP System Product (IBM VM)
+SPUCDL Serial Peripheral Unit Controller/Data Link, "SPUC/DL"
+SPUD Storage Pedestal Upgrade Disk/Drive
+SPUR Systech Pluraxial Unplug Repeater
+SPU System Processing Unit
+SQA Software Quality Assurance
+SQC Single-Quantum Coherence
+SQC Statistical Quality Control
+SQE Signal Quality Error ("heartbeat")
+SQLDS Structured Query Language/Data System, "SQL/DS"
+SQL Structured Query Language
+SQO Some Quantity Of
+SQUID Superconducting QUantum Interference Device
+SRAM Scratchpad RAM
+SRAM Short Range Attack Missile
+SRAM Static RAM
+SRA Selective Routing Arrangement
+SRB Solid (fuel) Rocket Booster [Space]
+SRD Secondary Receive Data
+SRI Stanford Research Institute (now called SRI International)
+SRM Solid Rocket Motor
+SRO Standing Room Only
+SRP source routing protocol, an IBM specification
+SR Sales Representative
+SRS Service Repair System
+SR Street Regal (KDX)
+SRTS Secondary Ready To Send
+SSAP Session Service Access Memory
+SSA Soaring Society of America
+SSA Social Security Administration [U.S. Government]
+SSAS Station Signaling and Announcement Subsystem
+SSBAM Single-SideBand Amplitude Modulation
+SSBBW Super-Sized Big Beautiful Woman
+SSBF or SSBBF Soc.Subculture.Bondage-BDSM.Femdom
+SSB or SSBB Soc.Subculture.Bondage-BDSM (I prefer just SSB, myself)
+SSB Single SideBand
+SSCP Subsystem Services Control Point
+SSCP System Services Control Point
+SSC Safe, Sane, Consensual
+SSC Specialized Systems Consultants
+SSC Special Services Center
+SSD Solid State Disk
+SSDU Session Service Data Unit
+S second (SI abbrev.), "s"
+SSEL Session Service Selector
+SSE Software Support Engineer
+SSE South-SouthEast
+SSFF Showcase Software Factory of the Future
+SSF Space Station Fred (er, Freedom)
+SSG Staff SerGeant
+S Siemens
+SSI Small Scale Integration
+SSI Solid-State Imager (on Galileo)
+SSI Space Services Incorporated [Space]
+SSI Space Studies Institute
+SSI Supplemental Security Income
+S Sleeve
+SSME Space Shuttle Main Engine
+SSO Satellite Switching Office
+S South
+SSPC SSP Controller
+SSPF Space Station Processing Facility
+SSPRU SSP Relay Unit
+SSP Signal Switching Point
+SSP Sponsor Selective Pricing
+SSPS Satellite Solar Power Station [Space]
+SSP System Status Panel
+SSRMS Space Station Remote Manipulator System
+SSR Secondary Surveillance Radar
+SSR Soviet Socialist Republic
+SS Sales Support
+SS Sparc Station
+SS Special Services
+SSS Soc.Sexuality.Spanking
+SSS System Support Specialist
+SS Stack Segment
+SS Stop Ship
+SSTO Single Stage to Orbit [Space]
+SST Spectroscopic Survey Telescope
+SST Spread-Spectrum Technology
+SST SuperSonic Transport
+SSTTSS Space-Space-Time-Time-Space-Space network
+SSTV Slow Scan TeleVision
+S sulphur
+S Supplement
+SSW South-SouthWest
+STAGE Structured Text And Graphics Editor
+STARS Software Technology for Adaptable, Reliable Systems
+STB Software Technical Bulletin
+STC Serving Test Center
+STC Supplemental Type Certificate
+STC Switching Technical Center
+STDM Statistical Time Division Multiplexing
+STD Sacrae Theologiae Doctor (doctor of sacred theology)
+STD Secondary Transmit Data
+STD Sexually Transmitted Disease (replaces VD)
+STD State Transition Diagram
+STD/STI Sexually Transmitted Disease / .. Infection
+STD Subscriber Trunk Dialing [British, and elsewhere; equiv. DDD in USA]
+STFU Shut the Freak/Fuck Up
+STFU Sir, That's Freakin Ugly
+STFW Search The Freaking Web
+STILO Scientific and Technical Intelligence Liaison Office
+STIS Space Telescope Imaging Spectrometer (to replace FOC and GHRS)
+STI Standard Tape Interface
+STL St. Louis (Lambert) MO
+STN Scientific and Technical information Network
+STN SuperTwisted Nematic
+STOH Since Top Overhaul (cylinders, etc., but not crankshaft, etc.)
+STOL Short TakeOff and Landing
+STO Slater Type Orbital
+STP Shielded Twisted Pair
+STP Signal Transfer Point
+STP Software Through Pictures
+STP spanning tree protocol, an IEEE 802.1 routing specification
+STP Standard Temperature and Pressure (see NTP)
+STRPG Star Trek: The Role-Playing Game
+STR Spot The Reference
+STSCI Space Telescope Science Institute, "STScI"
+ST Seagate Technologies
+ST Short Ton
+STSI Space Telescope Science Institute
+STS Sales Technical Support
+STS Shared Tenant Service
+STS Shuttle Transport System (or) Space Transportation System
+STS Space-Time-Space network
+ST STart
+STTNG Star Trek, The Next Generation
+STTNG Star Trek: The Next Generation, "ST:TNG"
+STTOS Star Trek: The Old Stuff/The Original Series, "ST:TOS"
+STV Single Transferable Vote
+STV Space Transfer Vehicle [Space]
+SUCCESS SUn Corporate Catalyst Electronic Support Service
+SUG Sun User's Group
+SUID Set UID
+SUM Symantec Utilities for Macintosh
+SUNDIAG SUN system DIAGnostics software
+SUNET Swedish University NETwork
+SUNOCO SUN Oil COmpany [Corporate name]
+SUN Stanford University Network
+SUNVIEW SUN's Visual / Integrated Environment for Workstations
+SUNY State University of New York
+SURANET Southeastern Universities Research Association network, "SURAnet"
+SURF Sequent Users Resource Forum
+SU Set Uid
+SUSP System Use Sharing Protocol
+SVC Switched Virtual Circuits
+SVGA Super VGA
+SVID System V Interface Definition
+SVP Schematic Verification Program
+SVR4 System V Release 4
+SVS Switched Voice Service
+SVVS System V Validation Suite
+SVVS System V Verification Suite
+SWAG silly, wild-assed guess
+SWAHBI silly, wild-assed hare-brained idea
+SWAN Sun Wide Area Network
+SWAS Submillimeter Wave Astronomy Satellite
+SWB SouthWestern Bell
+SWF ShortWave Fading
+SWIFT Society for Worldwide Interbank Financial Transfers
+SWM Solbourne Window Manager
+SWO Sales Work Order
+SW South West
+SWS Scientific Workstation Support (at ORNL)
+SW SuperWorld
+SX SimpleX signaling
+SXS Step by (X) Step switching [Telephony]
+SYC SYstem Control
+SYMPL SYsteMs Programming Language
+SYN SYNchronizing segment
+SYSGEN SYStem GENeration
+T1 1.544Mbps [telephony], one of the basic signalling systems 24x64Kb
+T1FE T1 carrier Front End
+T1OS T1 carrier OutState, "T1/OS"
+T3 44.736 Mbps (eq 28 T1 channels) [Telephony]
+TAB Tape Assembly Bonding
+TAB Technical Assistance Board
+TACCS Tactical Army Combat service support Computer System
+TAC Tactical Air Command (see SAC)
+TAC Terminal Access Circuit
+TAC Terminal Access Controller [ARPAnet/MILNET/DDN]
+TAE Transportable Applications Environment
+TAFN That's All For Now
+TAF That's All Folks
+TAG Technical Advisory Group (ISO)
+TAL Transatlantic Abort Landing (Shuttle abort plan)
+TAM Total Available Market
+TANJ There Ain't No Justice
+TANSTAAFL There Ain't No Such Thing As A Free Lunch
+TAP Telephone Assistance Plan
+TAR Tape ARchiver
+TASC Technical Assistance Service Center
+TASC Telecommunications Alarm Surveillance and Control system
+TASI Time Assignment Speech Interpolation system
+TAS Telephone Answering Service
+TA Teaching Assistant
+TA Terminal Adaptor
+TA Territorial Army
+TA Transfer Allowed
+TAT TransAtlantic Telephone
+TAT Turn Arround Time
+TAU Thousand Astronomical Units [Space]
+TBA To Be Announced/Arranged
+TBD To Be Designed/Determined
+TBH To Be Honest
+TBO Time Between Overhaul
+TB TuBerculosis
+TCAP Transaction Capabilities Applications Port
+TCAS T-Carrier Administration System
+TCA Terminal Control Area
+TCA Terminal Controlled Airspace
+TCB Task Control Block
+TCB Trusted Computer Base
+TCCC Technical Committee on Computer Communications
+TCC Trunk Class Code
+TCG Test Call Generation
+TCM Time Compression Multiplexer
+TCM Trellis Coded Modulation
+TCPIP Transmission Control Protocol/Internet Protocol, "TCP/IP"
+TCP Transmission Control Protocol
+TCR Transient Call Record
+TCSEC Trusted Computer System Evaluation Criteria (orange book)
+TCS Thermal Control System
+TCS Traction Control System (to prevent wheel-spin)
+TC Teachers College
+TC Technical Committee (ISO)
+TC Timing Counter
+TC Tinned Copper
+TC Toll Center
+TC Total Color
+TCT To Challenge Tomorrow
+TCT Toll Connecting Trunk
+TDAS Traffic Data Administration System
+TDCC Transportation Data Coordinating Committee
+TDC Tape Data Controller
+TDC Terrestrial Data Circuit
+TDD Telecommunications Device for Deaf
+TDD Telephone Device for the Deaf
+TDE Transition Diagram Editor
+TDI Trusted Database Interpretation
+TDL Test Description Language
+TDMA Time-Division Multiple Access
+TDM Time-Division Multiplexing
+TDO Table of Denial Orders
+TDRSS Tracking and Data Relay Satellite System
+TDRS Tracking and Data Relay Satellite [Space]
+TDR Time Domain Reflectometer
+TD "Top's Disease"
+TD TouchDown
+TD Transmit Data
+TD Treasury Department
+TDY Temporary DutY
+TEB Teterboro NJ
+TECO Tape Editor and COrrector
+TECO Text Editor and COrrector
+TEC Technology Exchange Company
+TEFLON polyTEtraFLuOrethyleNe
+TEHO Tail End Hop Off
+TELEX TELetypewriter EXchange
+TELSAM TELephone Service Attitude Measurement
+TEMA Tubilar Exchanger Manufacturers Association
+TEMPEST Transient Electro-Magnetic Pulse Emanation STandard
+TEMPOL TEtraMethyl-PiperidinOL-oxyl
+TEMPONE TEtraMethyl-PiperidinONE-oxyl
+TEMPO Technical Military Programming Organization
+TEMPO TEtraMethyl-Piperidine-Oxyl
+TEM Transmission Electron Microscope
+TENS Transcutaneous Electrical Nerve Stimulator
+TERM TERMinal
+TER Technical Education Resources
+TES The Eulenspiegel Society
+TES Thermal Emission Spectrometer (on Mars Observer)
+TE Terminal Equipment
+TE Transverse Electric
+TET Test Environment Toolkit
+TFC Total Full Color
+TFLAP T-carrier Fault-Locating Applications Program
+TFP Tops Filing Protocol
+TFS Translucent File System
+TFS Trunk Forecasting System
+TFTB Topping From The Bottom
+TFTP Trivial File Transfer Protocol
+TFT The Fantasy Trip
+TFT Thin Film Transistor
+TGC Terminal Group Controller
+TGIF Thanks God It's Friday
+TGN Trunk Group Number
+TG Thieves' Guild
+TG TransGendered
+TGV Two Guys and a Vax
+THF TetraHydroFuran
+THIEF THief/This Here Isn't Even Fine
+THOR Tandy High-intensity Optical Recording
+THOR THermal Optical Recording
+THRUSH Technological Hierarchy for the Removal of Undesireables and Subjugation of Humanity
+TH Trouble History
+THX Tom Holman Xover
+TIA Telephone Information Access
+TIA Thanks In Advance
+TIA Transient Ischemic Attack
+TIC TermInfo Compiler
+TIC Tongue in Cheek
+TID Ter In Die (three times a day)
+TIFF Tag(ged) Image File Format
+TIGA Texas Instruments Graphics Architecture
+TIMTOWTDI There Is More Than One Way To Do It
+TINA This Is Not an Acronym
+TINA TINA Is Not an Acronym
+TINC There Is No Cabal
+TIP Team Improvement Program
+TIRKS Trunk Integrated Record Keeping System
+TIROS Television InfraRed Observation Satellite
+TI Texas Instruments [Corporate name]
+TI Transport Independent
+TKO Technical Knock Out
+TK TeleKommunikation
+TLA three letter acronym
+TLA Three Letter Acronym
+TLA Three Letter Acronym
+TLB Translation lookaside buffer
+TLC Tender Loving Care
+TLC Thin-Layer Chromatography
+TLDR Too Long, Didn't Read
+TLI Transport Level Interface (AT&T stream-based protocol)
+TLM Trouble Locating Manual
+TLN Trunk Line Network
+TLP Transmission Level Point
+TL Total Loss
+TLTP Trunk Line and Test Panel
+TLV Type, Length, Value
+TMAC Treasury department's Multiuser Acquisition Contract
+TMA Tycho Magnetic Anomaly [movie 2001]
+TMDF Trunk Main Distributing Frame
+TMIS Telecommunications Management Information System
+TMI too much information
+TMJ Temporal-Mandibular-Joint (affects opening mouth)
+TMMS Telephone Message Management System
+TMO Telephone Money Order
+TMPTAWWTLO The Missionary Position Twice a Week With the Lights Out
+TMP The Morrow Project
+TMRC Tech Model Railroad Club [MIT]
+TMRC Transportation Modeling Research Center (TMRC {above} alter ego)
+TMRS Traffic Measurement and Recording System
+TMRS Traffic Metering Remote System
+TMR Transient Memory Record
+TMSC Tape Mass Storage Control (DEC)
+TMS TetraMethylSilane; TriMethylSilyl
+TMS Time-Multiplexed Switch
+TM TradeMark
+TM Transverse Magnetic
+TNC Threaded Navy Connector
+TNC Threaded Neill Concelman (connector) [electronics] (see also BNC)
+TNDS Total Network Data System
+TNN Trunk Network Number
+TNOP Total Network Operation Plan
+TNPC Traffic Network Planning Center
+TN Telephone Number
+TN Tennessee
+TN Transaction Number
+TNT The NeWS Toolkit
+TNT TriNitroToluene
+TN Twisted Nematic
+TOCSY TOtal Correlation SpectroscopY
+TOC Table Of Contents
+TODS Transactions on Database Systems (ACM)
+TOD Time-Of-Day
+TOMS Total Ozone Mapping Spectrometer
+TOMS Transactions on Mathematical Software (ACM)
+TOOIS Transactions on Office Information Systems (ACM)
+TOPICS Total On-Line Program and Information Control System (NHK)
+TOPLAS Transactions on Programming Languages and Systems (ACM)
+TOPS Timesharing OPerating System
+TOPS Traffic Operator Position System
+TOPS Transcendental OPerating System
+TOP Technical/Office Protocol
+TORES Text ORiented Editing System
+TOS Terms Of Service / The Original Series
+TOS The Operating System
+TOS Transfer Orbit Stage [Space]
+TOTBAL There Ought To Be A Law
+TO Telegraph Office
+TO Turn Over
+TOW Tube launched, Optically tracked, Wire guided missile
+TOY Time Of Year (clock)
+TP0 OSI Transport Protocol Class 0 (Simple Class)
+TP4 OSI Transport Protocol Class 4 (Error Detection and Recovery Class)
+TPC The Phone Company [movie The President's Analyst)
+TPE Total Power Exchange
+TPE Twisted Pair Ethernet
+TP from TP0 and TP4 (ISO/CCITT Transport Services; like TCP)
+TPI Tracks Per Inch
+TPMP Total network data system Performance Measurement Plan
+TPM Third-Party Maintenance
+TPO Traveling Post Office
+TPPI Time-Proportional Phase Increment
+TPS Technical Publication Software
+TPS Technical Publishing Software
+TPS TeleProcessing Services
+TPS Thermal Protection System
+TPS Transactions Per Second
+TPTB The Powers That Be
+TP Test Plan
+TP Third Party
+TP Toll Point
+TP Transaction Processing
+TP Transport Protocol
+TPT Twisted Pair Transceiver
+TP Twisted Pair
+TQC Total Quality Control
+TRAC Total Risk Analysis Calculation (SunTrac)
+TREAT Trouble Report Evaluation Analysis Tool
+TRIB Transfer Rate of Information Bits
+TRMTR TRamsMiTteR
+TROFF Text RunOFF, text formatter
+TROFF Typsetter new ROFF
+TRON The Real-time Operating Nucleus
+TRON The Realtime Operating system Nucleus
+TRR Tip-Ring Reverse
+TRR Token Ring Repeater
+TRSA Terminal Radar Service Area
+TR Test Register
+TR Token Ring
+TR Transfer Register
+TRUSIX TRUSted unIX
+TRW Thompson, Ramo, and Woolridge
+TSAP Transport Service Access Point
+TSCPF Time Switch and Call Processor Frame
+TSD Total System Design
+TSDU Transport Service Data Unit
+TSEL Transport Service Selector
+TSE Technical Support Engineer (Sun)
+TSI Time Slot Interchanger
+TSM Tech Support Manager
+TSORT Transmission System Optimum Relief Tool
+TSO Technical Standard Order
+TSO Time Sharing Option
+TSPS Traffic Service Position System
+TSP Teleprocessing Services Program
+TSP Test SuPervisor
+TSP Thrift Savings Plan
+TSP Time Synchronization Protocol
+TSP Traffic Service Position
+TSP TriSodium Phosphate
+TSR Terminate and Stay Resident
+TSR Test Summary Report
+TSR TSR (Fortune 500 Company that manufactures Dungeons & Dragons)
+TSS Tethered Satellite System [Space]
+TSS Time-Sharing System
+TSS Trunk Servicing System
+TSST Time-Space-Space-Time network
+TS Top Secret
+TSTO Two Stage to Orbit [Space]
+TS TransSexual
+TSTS Time-Space-Time-Space network
+TST Time-Space-Time network
+TST Traveling-Wave Tube
+TTBOMK To The Best Of My Knowledge
+TTC Telecommunications Technology Council
+TTC Terminating Toll Center
+TTD Things To Do
+T tera- (SI prefix)
+T tesla
+TTFN Tah Tah, For Now
+TTFN Ta Ta For Now
+T Tip
+TTL Time To Live
+TTL Transistor-Transistor Logic
+TTMA Tennessee Tech Microcomputer Association
+T tonne(s), "t."
+T ton(s), "t."
+TTP Telephone Twisted Pair
+TTP Trunk Test Panel
+T Traveler
+T tritium
+TTS Trunk Time Switch
+TTTN Tandem Tie Trunk Network
+TT Trunk Type
+TT Tunnels & Trolls, "T&T"
+T tun(s), "t."
+TTU Tennessee Technological University
+T2YL Talk To You Later
+T2UL Talk To You Later
+TTUL Talk To You Later
+TTYC TTY Controller
+TTYL Talk To You Later
+TTYTT To Tell You The Truth
+TTY TeleTYpe(writer)
+TUG TeX User's Group
+TUNIS Toronto UNIversity System
+TUR Traffic Usage Recording
+TUR Trunk Utilization Report
+TV also stands for TransVestite
+TVA Tennessee Valley Authority
+TV TeleVision
+TVTWM Tom's Virtual TWM
+TWA Trans World Airlines
+TWG The Wollongong Group
+TWIMC To Whom It May Concern
+TWM Tab (or Tom's) Window Manager
+TW Thieves' World
+TWT Traveling Wave Tube
+TWX TeletypeWriter eXchange
+TXID Transuction Identifier
+TX Texas
+TX Transmit
+TX Transuction
+TY Thank You
+TYT Take Your Time
+TYVM Thank You Very Much
+UAB UNIX Appletalk Bridge
+UAE Unexpected Application Error
+UAE United Arab Emerates
+UAF User Authorization File
+U&A(&LI) Used and Abuse (and Loving It)
+UAPDU User Agent Protocol Data Unit
+UARS Upper Atmosphere Research Satellite
+UART Universal Asynchronous Receiver and Transmitter
+UAR United Arab Republic
+UAR User Action Routine
+UA United Artists
+UA User Agent
+UBA UniBus Adapter [DEC]
+UBC Universal Bibliographic Control
+UBC University of British Columbia
+UBM Unpressurized Berthing Mechanism
+UCAR University Corporation for Atmospheric Research
+UCB University of California at Berkeley
+UCC Uniform Commercial Code
+UCD Uniform Call Distribution
+UCD University of California at Davis
+UCI University of California at Irvine
+UCLA University of California at Los Angeles
+UCL Underwater Sound Laboratory
+UCL University College London
+UCR University of California at Riverside
+UCSB University of California at Santa Barbara
+UCSC University of California at Santa Cruz
+UCSD University of California at San Diego
+UCSF University of California at San Francisco
+UC University of CA
+UC upper case, "u.c."
+UDB Unified DataBase
+UDF User Defined Function
+UDMH Unsymmetrical DiMethyl Hydrazine
+UDP User Datagram Protocol
+UDT User Defined Type
+UEC User Environment Component
+UFO Unidentified Flying Object
+UFS Universal File System
+UGC Uppsala General Catalog
+UG Micro-Grip (HP plotter paper positioner)
+UHF Ultra High Frequency (300-3000MHz)
+UHF Unrestricted Hartree-Fock
+UH Upper Half
+UIC User Identification Code
+UID User IDentity
+UIL User Interface Language
+UIMS User Interface Management System
+UIP User Interface Program
+UITP Universal Information Transport Plan
+UIT Ultraviolet Imaging Telescope (Astro package)
+UIUC University of Illinois at Urbana-Champaign
+UI Unix International
+UI User Interface
+UKST United Kingdom Schmidt Telescope
+UK United Kingdom
+ULANA Unified Local-Area Network Architecture
+UL Underwriters Laboratory
+UMA Upper Memory Area
+UMB Upper Memory Blocks
+UMT Universal Military Training
+UNCLE United Network Command for Law Enforcement
+UNESCO United Nations Educational, Scientific, & Cultural Organization
+UNICEF United Nations International Children's Emergency Fund (now UN Child. Fund)
+UNICS UNiplex Information Computer Services
+UNISTAR UNIversal Single call Telecommunications Answering & Repair
+UNIVAC UNIversal Automatic Computer
+UNIX not an acronym at all. Was a pun on MIT's MULTICS.
+UNMA Unified Network Management Architecture
+UNO United Nations Organization
+UN United Nations
+UPC Universal Product Code
+UPDS Uninterruptible Power Distribution System
+UPI United Press International [Corporate name]
+UPN Umgekehrte Polnische Notation (RPN)
+UPS Uninterruptible Power Supply
+UPS United Parcel Service [Corporate name]
+UP Union Pacific (railroad) [Corporate name]
+UP Upper Peninsula (of Michigan)
+U (representing the greek mu) - micro, "u"
+UREP UNIX-RSCS Emulation Program (BITNET software for UNIX)
+UR University of Rochester
+USAC United States Answer Center
+USAC United States Auto Club
+USAC US Answer Center (Sun Hotline)
+USAFA United States Air Force Academy (in Colorado Springs)
+USAF United States Air Force
+USAN University Satellite Network
+USART Universal Synchronous Asynchronous Receiver/Transmitter
+USA Union of South Africa
+USA United States Army
+USA United States of America
+USB Upper Side Band
+USCA United States Code, Annotated
+USCG United States Coast Guard
+USC University of Southern California
+USDA United States Department of Agriculture
+USD Underwriters Safety Device
+USENET USErs' NETwork
+USES United States Employment Service
+USFL United States Football League
+USGS United States Geological Survey
+USG Unix Support Group
+USHGA United States Hang Gliding Association
+USIA United States Information Agency
+USITA United States Independent Telephone Association
+USL Unix System Laboratories
+USMC United States Marine Corps
+USMP United States Microgravity Payload
+USM United States Mail
+USN United States Navy
+USOC Universal Service Order Code
+USO United Service Organizations
+USO Universal Service Order
+USO Unix Software Operation
+USPS United States Postal Service
+USPTO United States Patent and Trademark Office
+USP United States Pharmacopeia
+USP Universal Sampling Plan
+USRT Universal Synchronous Receiver/Transmitter
+USR User Service Routines
+USSR Union of Soviet Socialist Republics
+USSS User Services and Systems Support
+USS United States Ship
+US United States (of America)
+USV Unterbrechungsfreie StromVersorgung
+USW Und So Weiter
+UTC Universal Coordinated Time
+UTE Union Technique de i"Electricite"
+UTP Unshielded Twisted Pair
+UTQGS Uniform Tire Quality Grading System
+UTR UpTime Ratio
+UTSL use the source, Luke
+UT Universal Time
+UT University of Tennessee
+UT University of Texas
+UT UTah
+UUCICO Unix to Unix Copy Incoming Copy Outgoing
+UUCP Unix-to-Unix CoPy
+UUG Unix User Group
+U unified atomic mass unit, "u"
+U Universe
+U uranium
+UUT Unit Under Test
+UVS UltraViolet Spectrometer
+UV UltraViolet
+UWCSA University of Washington Computer Science Affiliates
+UWS Ultrix Workstation Software
+UW UnderWriter
+UW University of Wisconsin
+VABIS Vagn Aktie Bolaget i Soedertaelje (Swedish truck company)
+VAB Value Added Business
+VAB Vehicle Assembly Building (formerly Vertical Assembly Building)
+VAC Volts of Alternating Current
+VADS Verdix Ada Development System
+VAD Value Added Dealer
+VAFB Vandenberg Air Force Base
+VANS Value-Added Network Services
+VAN Value-Added Network (e.g. Tymnet, Telenet, etc)
+VAP Value-Added Process
+VAR Value-Added Remarketer/Reseller
+VASCAR Visual Average Speed Computer And Recorder
+VASI Visual Approach Slope Indicator
+VAST Virtual Archive Storage Technology
+VAT Value Added Tax
+VA Veterans Administration
+VA Virginia
+VAV Value Application Venders
+VAXBI VAX Bus Interconnect
+VAX Virtual Address eXtended
+VBG Very Big Grin
+VB Valence Bond
+VB Venture Business
+VCCI Volantary Control Council for Intersive
+VCM Voice Coil Motor
+VCO Voltage Controlled Oscillator
+VCPI Virtual Control Program Interface
+VCR VideoCassette Recorder
+VCS Virtual Circuit System
+VCU Virginia Commonwealth University
+VC Virtual Circuit
+VDC Volts of Direct Current
+VDE Verband Deutscher Electrotechniker
+VDFM Virtual Disk File Manager
+VDI Virtual Device Interface
+VDM Vienna Development Method
+VDM Virtual Device Metafile
+VDS Virtual DMA Services
+VDT Video Display Terminal
+VD Venereal Disease (see also STD)
+VEEGA Venus-Earth-Earth Gravity Assist (Galileo flight path)
+VEG very evil grin
+VESA Video Electronics Standards Association
+VEU Volume End User
+VE Value Engineering
+VEX Video Extension to X
+VFEA VMEbus Futurebus+ Extended Architecture
+V fiVe
+VFO Variable Frequency Oscillator
+VFR Visual Flight Rules
+VFS Virtual File System
+VF Video Frequency
+VF Voice Frequency
+VFW Veterans of Foreign Wars
+VFW Volunteer Fire Department
+VFY VeriFY
+VGA Video Graphics Array/Accelerator
+VGF Voice Grade Facility
+VGI Virtual Graphics Interface
+VG Very Good
+VG Vicar-General
+VHDL Vhsic Hardware Description Language
+VHD Video High Density
+VHF Very High Frequency (30-300MHz)
+VHSIC Very High Speed Integrated Circuit
+VHS Video Home System (VCR)
+VIABLE Vertical Installation Automation BaseLinE
+VIC V.35 Interface Cable
+VIFRED VIsual FoRms EDitor
+VILE VI-Like Emacs
+VINES VIrtual NEtwork Software
+VINE Vine Is Not Emacs
+VIP Very Important Person
+VISTA Volunteers In Service To America
+VITA Vme International Trade Association
+VIU Voiceband Interface Unit
+VI VIsual editor
+VJ Video Jockey
+VLA Very Large Array radio telescope in Arizona or New Mexico
+VLBA Very Long Baseline Array
+VLBI Very Long Baseline Interferometry
+VLF Very Low Frequency (3-30KHz)
+VLIW Very Long Instruction Word
+VLSI Very Large Scale Integration
+VLT Very Large Telescope
+VL Vulgar Latin
+VMCF Virtual Machine Communications Facility
+VMCMS Virtual Machine/Conversational Monitor System, "VM/CMS"
+VMC Visual Meteorological Conditions
+VME Versabus Module Europe
+VME Versa Modular Europa
+VME Virtual Machine Environment
+VMM Virtual Memory Manager
+VMOS Vertical Metal Oxide Semiconductor (V-MOS) (see MOS)
+VMRS Voice Message Relay System
+VMR Vertical Market Reseller
+VMR Volt-Meter Reverse
+VMSP Virtual Machine/System Product, "VM/SP"
+VMS Vertical Motion Simulator
+VMS Virtual Memory operating System
+VMS Virtual Memory System
+VMS Voice Mail System
+VMS Voice Management System
+VMTP Versatile Message Transaction Protocol
+VM Virtual Machine
+VM Virtual Memory
+VNF Virtual Network Feature
+VNLF Via Net Loss Factor
+VNL Via Net Loss plan
+VNY Van Nuys CA
+VOA Voice Of America
+VOA Volunteers Of American
+VODAS Voice Over Data Access Station
+VOIR Venus Orbiting Imaging Radar (superseded by VRM)
+VOIS Voice-Operated Information System
+VOQ Visiting Officer's Quarters
+VORT Very Ordinary Rendering Toolkit
+VOR VHF Omnidirectional Range
+VPF Vertical Processing Facility
+VPISU Virginia Polytechnic Institute and State University, "VPI&SU"
+VPN Virtual Private Network
+VP View Processor
+VP Virtual President
+VRAM Video-RAM
+VRC Vertical Redundancy Character
+VRM Venus Radar Mapper (now called Magellan)
+VRM Virtual Resource Manager
+VRM Voice Recognition Module
+VROOMM Virtual Realtime Object Oriented Memory Manager
+VRS Voice Response System
+VR Variety Reduction
+VSAM Virtual Sequential Access Method
+VSAM Virtual Storage Access Method
+VSAT Very Small Aperture Terminal, satellite dish
+VSA Virtual Server Architecture
+VSB Vestigial SideBand modulation
+VSE Virtual Storage Extended
+VSP Vector/Scalar Processor
+VSR Voice Storage and Retrieval
+VSSP Voice Switch Signaling Point
+VSS Voice Storage System
+VS VAXStation
+VSX X/open Verification Suite
+VTAM Virtual Telecommunications Access Method [IBM]
+VTI Virtual Terminal Interface
+VTOC Volume Table Of Contents
+VTOL Vertical TakeOff and Landing
+VTP Virtual Terminal Protocol
+VTR VideoTape Recorder
+VTS Video Teleconferencing System
+VTS Virtual Terminal Service
+VT Virtual Terminal
+VUIT Visual User Interface Tool
+VUP Vax Unit of Performance
+VU Volume Unit
+V vanadium
+V Vergeltungswaffe (reprisal weapon: V1, V2)
+V version, "v"
+V versus, "v."
+V volt(s)
+VVSS Vertical Volute Spring Suspension
+VV Villains & Vigilantes, "V&V"
+VWS VAX Workstation Software
+VXI VMEbus Extension for Instrumentation
+WAC Womens Air Corps
+WADS Wide Area Data Service
+WAG Wild-Assed Guess
+WAIS Wide Area Information Server
+WAN Wide Area Network
+WAP Wissenschaftliche ArbeitsPlatzrechner
+WAP Work Assignment Procedure
+WARC World Administrative Conference
+WATFOR WATerloo FORtran
+WATSUP WATfor Student Utility Program
+WATS Wide Area Telephone Service
+WA Washington
+WA Western Australia
+WBC White Blood Cells
+WBS Wednesday Business School
+WBS Work Breakdown Structure
+WB Water Ballast
+WB WayBill
+WB Welcome Back
+WCL Widget Creation Library
+WCPC Wire Center Planning Center
+WCS Writable Control Store (VAX)
+WCTU Women's Christian Temperance Union
+WC Water Closet
+WC Wire Center
+WC Without Charge
+WDC Washington, District of Columbia
+WDC Work Distribution Chart
+WDM wavelength-division multiplexing, for optical fibre, ultra-gigabit
+WDT Watch Dog Timer
+WD White Dwarf
+WD Working Draft
+W/E Whatever
+WELL Whole Earth 'Lectronic Link
+WFM Works For Me
+WFPCII Replacement for WFPC
+WFPC Wide Field / Planetary Camera (on HST)
+WF Work Factor method
+WGS WorkGroup System (AT&T's 386 PC)
+WG Working Group
+WHBL World Home Bible League
+WHOI Woods Hole Oceanographic Institution
+WHO World Health Organization
+WHSE Warehouse
+WHSGNASBN We Have Some Good News And Some Bad News
+WH WarHammer
+Wiitwd(h) What it is that we do (here)
+WINS Wollongong Integrated Networking Solutions
+WIN WIssenschaftsNetz
+WIP Work-In-Process
+WIS WWMCCS Information System
+WITS Washington Interagency Telecommunications System
+WI Wisconsin
+WIYN Wisconsin / Indiana / Yale / NOAO telescope
+WKS Well Known Services
+WLN Wiswesser Line Notation
+WMF Windows MetaFile
+WMO World Meteorological Organization
+WMSCR Weather Message Switching Center Replacement
+WM Work Manager
+WNIM Wide area Network Interface Module
+WNN Watashi no Namae ha Nakajima desu. (Kana-Kanji henkan), "Wnn"
+WOA Work Of Art
+WOB Waste Of Bandwidth
+WOMBAT Waste Of Money, Brains, And Time
+WOPR War Operations Planned Response (from "Wargames" movie)
+WORM Write Once, Read Many time
+WOSA Windows Open System Architecture
+WO Write Only
+WOW Worlds of Wonder
+WPS Word Processing Software
+WP Word Processing
+WP Working Paper
+WRT Whitewater Resource Toolkit
+WRT With Respect/Regard To
+WSD Work Station Division
+WSI Wafer Scale Integration
+WSJ Wall Street Journal
+WSMR White Sands Missile Range
+WSN Wirth Syntax Notation
+WSP Work Simplification Program
+WS Water Sports (see GS)
+WS Work Sampling
+WS Work Station
+WSW West-SouthWest
+WTF What The Fuck
+WTF {what,where,who,why} The Fuck
+WTH {what,where,who,why} The Hell
+WTR Western Test Range
+WUPPE Wisconsin Ultraviolet PhotoPolarimter Experiment (Astro package)
+WU Washington University
+WU Western Union
+WV West Virginia
+WW2 World War II
+W Wales/Welsh
+W watt
+W Wednesday, "W."
+W week(s), "w."
+W West
+WWFO World Wide Field Operations
+W Width
+WWII World War II
+WWI World War I
+WWMCCS World-Wide Military Command and Control System
+W wofram (tungsten)
+WWOPS World-Wide Operations
+WW World War
+WYSIWIS What You See Is What I See
+WYSIWYG What You See Is What You Get
+WY Wyoming
+X25 CCITT recommendation for packet switched networks DTE interfacing, "X.25"
+XA eXtended Architecture (31-bit addressing in IBM machines)
+XBT X-Bar Tandem
+XB X-Bar
+XCF eXperimental Computing Facility
+XCMOS eXtended CMOS
+XD eX (without) Dividend
+XDMCP X Display Manager Control Protocol
+XDR eXternal Data Representation
+XD without Dividend
+XFER transFER (the X is for trans)
+XFE X-Front End
+XGA eXtended Graphics Adapter
+XGMC Xiphias Gladius Memorial Clique
+XID eXchange IDentification
+XIE X Imaging Extension
+XIM X Input Method
+XINU Xinu Is Not UNIX
+XL eXtra Large
+XLFD X Logical Font Description
+XMI eXtended Memory Interconnect (DEC)
+XMM X-ray Multi Mirror
+XMS eXtended Memory Specification
+XMS eXtended Multiprocessor operating System
+XMTR transMiTteR (the X is for trans)
+XNS Xerox Network Services/Systems/Standard
+XO eXecutive Officer
+XOR eXclusive OR (logical function)
+XPG2 X/Open Portability Guide Release-2
+XPG3 X/Open Portability Guide Release-3
+XPG X/Open Portability Guide
+XP Jesus Christ (from the first two letters of "Christ" written in Greek)
+XPORT transPORT (the X is for trans)
+XRM X Resource Manager
+XSECT cross SECTion (the X is for cross)
+XTAL crysTAL (another version of x for crys, see XMTR)
+XTAL crysTAL (the X is for crys)
+XTC eXternal Transmit Clock
+XT eXtended Technology
+XT X.11 Toolkit, "Xt"
+XUI X-windows User Interface
+XUV eXtreme UltraViolet
+XVIEW X window system-based Visual/Integrated Environment for Workstations
+XWSDS X Window System Display Station
+YACC Yet Another Compiler Compiler
+YAFIYGI You Asked For It, You Got It
+YA Yet Another
+YB YearBook
+YHBT you have been trolled
+YHL you have lost
+YKINMK Your Kink Is Not My Kink
+YKINOK Your Kink Is Not Okay
+YKIOK,IJNMK Your Kink is OK, It's Just Not My Kink
+YKWIM you know what I mean
+YMBJ You Must Be Joking
+YMCA Young Mens Christian Association
+YMHA Young Mens Hebrew Association
+YMMV your mileage may vary
+YMMV Your Mileage May Vary
+YOB Year Of Birth
+YPVS Yamaha Power Valve System
+YP Yellow Pages
+YRS Ysgarth Rules System
+YSO Young Stellar Object
+YST Yukon Standard Time
+YTD Year To Date
+YT Yukon Territory
+YT Yukon Time
+YWCA Young Womens Christian Association
+YWHA Young Womens Hebrew Association
+YW You're Welcome
+Y year, "y."
+Y yen
+Y yttrium
+YY Year
+ZBB Zero Base Budgeting
+ZBR Zone Bit Recording
+ZB Zero Beat
+ZD Zero Defect
+ZETA Zero Energy Thermonuclear Assembly
+ZFS Zero-Field Splitting
+ZGS Zero Gradient Synchrotron
+ZG Zero Gravity
+ZIB Konrad-Zuse-Zentrum fuer Informationstechnik Berlin
+ZIF Zero Insertion Force
+ZIP Zig-zag Inline Pin
+ZIP Zone Improvement Plan (post office code)
+ZIP Zone Information Protocol
+ZI Zonal Index
+ZK barrage balloon (navy symbol)
+ZMRI Zinc Metals Research Institute
+ZPG Zero Population Growth
+ZPRSN Zurich Provisional Relative Sunspot Number
+ZQC Zero-Quantum Coherence
+ZST Zone Standard Time
+ZT Zone Time
+ZWEI Zwei Was Eine Initially
+Z Zenith
+Z Zero
+ZZF Zentralamt zur Zulassung von Fernmeldeeinrichtungen