rubyfox-server 2.3.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.rvmrc +1 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +23 -0
- data/Rakefile +1 -0
- data/bin/smartfox +7 -0
- data/lib/rubyfox/server/cli.rb +59 -0
- data/lib/rubyfox/server/data/config/.keep +0 -0
- data/lib/rubyfox/server/data/config/_backups/.keep +0 -0
- data/lib/rubyfox/server/data/config/ascii/boot.txt +5 -0
- data/lib/rubyfox/server/data/config/ascii/ready.txt +9 -0
- data/lib/rubyfox/server/data/config/core.xml +44 -0
- data/lib/rubyfox/server/data/config/crossdomain.xml +10 -0
- data/lib/rubyfox/server/data/config/descriptors/.keep +0 -0
- data/lib/rubyfox/server/data/config/descriptors/config_room.txt +323 -0
- data/lib/rubyfox/server/data/config/descriptors/config_server.txt +621 -0
- data/lib/rubyfox/server/data/config/descriptors/config_zone.txt +1021 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_game.txt +63 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_room.txt +377 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_user.txt +589 -0
- data/lib/rubyfox/server/data/config/descriptors/runtime_zone.txt +354 -0
- data/lib/rubyfox/server/data/config/jetty/.keep +0 -0
- data/lib/rubyfox/server/data/config/jetty/jetty.xml +214 -0
- data/lib/rubyfox/server/data/config/jetty/realm.properties +21 -0
- data/lib/rubyfox/server/data/config/jetty/webdefault.xml +410 -0
- data/lib/rubyfox/server/data/config/log4j.properties +75 -0
- data/lib/rubyfox/server/data/config/myprop.properties +5 -0
- data/lib/rubyfox/server/data/config/server.xml +65 -0
- data/lib/rubyfox/server/data/config/templates/sfs2x.unix.txt +12 -0
- data/lib/rubyfox/server/data/config/templates/sfs2x.windows.txt +1 -0
- data/lib/rubyfox/server/data/config/templates/vmoptions.txt +3 -0
- data/lib/rubyfox/server/data/config/wordsFile.txt +13 -0
- data/lib/rubyfox/server/data/data/bannedusers/.keep +0 -0
- data/lib/rubyfox/server/data/data/bannedusers/users.bin +0 -0
- data/lib/rubyfox/server/data/data/buddylists/.keep +0 -0
- data/lib/rubyfox/server/data/data/buddylists/BasicExamples/7364666773646667 +0 -0
- data/lib/rubyfox/server/data/extensions/.keep +0 -0
- data/lib/rubyfox/server/data/extensions/__lib__/.keep +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/.keep +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/ant-1.6.5.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/core-3.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jetty-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jetty-util-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-2.1-glassfish-2.1.v20091210.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-2.1-jetty-6.1.26.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/jsp-api-2.1-glassfish-2.1.v20091210.jar +0 -0
- data/lib/rubyfox/server/data/lib/Jetty/servlet-api-2.5-20081211.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/BaseHTTPServer.py +484 -0
- data/lib/rubyfox/server/data/lib/Lib/CGIHTTPServer.py +325 -0
- data/lib/rubyfox/server/data/lib/Lib/ConfigParser.py +472 -0
- data/lib/rubyfox/server/data/lib/Lib/Cookie.py +742 -0
- data/lib/rubyfox/server/data/lib/Lib/HTMLParser.py +383 -0
- data/lib/rubyfox/server/data/lib/Lib/MimeWriter.py +181 -0
- data/lib/rubyfox/server/data/lib/Lib/Queue.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/SimpleHTTPServer.py +198 -0
- data/lib/rubyfox/server/data/lib/Lib/SimpleXMLRPCServer.py +274 -0
- data/lib/rubyfox/server/data/lib/Lib/SocketServer.py +576 -0
- data/lib/rubyfox/server/data/lib/Lib/StringIO.py +239 -0
- data/lib/rubyfox/server/data/lib/Lib/UserDict$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/UserDict.py +60 -0
- data/lib/rubyfox/server/data/lib/Lib/UserList.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/UserString.py +182 -0
- data/lib/rubyfox/server/data/lib/Lib/__future__$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/__future__.py +104 -0
- data/lib/rubyfox/server/data/lib/Lib/aifc.py +961 -0
- data/lib/rubyfox/server/data/lib/Lib/anydbm.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/atexit.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/base64.py +77 -0
- data/lib/rubyfox/server/data/lib/Lib/bdb.py +563 -0
- data/lib/rubyfox/server/data/lib/Lib/binhex.py +531 -0
- data/lib/rubyfox/server/data/lib/Lib/bisect.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/calendar.py +246 -0
- data/lib/rubyfox/server/data/lib/Lib/cgi.py +1040 -0
- data/lib/rubyfox/server/data/lib/Lib/chunk.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/cmd.py +336 -0
- data/lib/rubyfox/server/data/lib/Lib/code$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/code.py +311 -0
- data/lib/rubyfox/server/data/lib/Lib/codecs$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/codecs.py +636 -0
- data/lib/rubyfox/server/data/lib/Lib/codeop$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/codeop.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/colorsys.py +123 -0
- data/lib/rubyfox/server/data/lib/Lib/commands.py +84 -0
- data/lib/rubyfox/server/data/lib/Lib/compileall.py +148 -0
- data/lib/rubyfox/server/data/lib/Lib/copy.py +330 -0
- data/lib/rubyfox/server/data/lib/Lib/copy_reg$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/copy_reg.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/datetime$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/datetime.py +2007 -0
- data/lib/rubyfox/server/data/lib/Lib/dbexts.py +726 -0
- data/lib/rubyfox/server/data/lib/Lib/difflib.py +1088 -0
- data/lib/rubyfox/server/data/lib/Lib/dircache.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/doctest.py +1173 -0
- data/lib/rubyfox/server/data/lib/Lib/dospath.py +341 -0
- data/lib/rubyfox/server/data/lib/Lib/dumbdbm.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Charset.py +393 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Encoders.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Errors.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Generator.py +378 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Header.py +515 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Iterators.py +25 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEAudio.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEBase.py +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEImage.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEMessage.py +32 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEMultipart.py +37 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMENonMultipart.py +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/MIMEText.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Message.py +837 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Parser.py +292 -0
- data/lib/rubyfox/server/data/lib/Lib/email/Utils.py +340 -0
- data/lib/rubyfox/server/data/lib/Lib/email/__init__.py +72 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_compat21.py +69 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_compat22.py +70 -0
- data/lib/rubyfox/server/data/lib/Lib/email/_parseaddr.py +480 -0
- data/lib/rubyfox/server/data/lib/Lib/email/base64MIME.py +184 -0
- data/lib/rubyfox/server/data/lib/Lib/email/quopriMIME.py +323 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/__init__.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/PyBanner048.gif +0 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/audiotest.au +0 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_01.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_02.txt +135 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_03.txt +16 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_04.txt +37 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_05.txt +28 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_06.txt +33 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_07.txt +83 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_08.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_09.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_10.txt +32 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_11.txt +7 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_12.txt +36 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_13.txt +94 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_14.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_15.txt +52 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_16.txt +123 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_17.txt +12 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_18.txt +6 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_19.txt +43 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_20.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_21.txt +20 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_22.txt +46 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_23.txt +8 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_24.txt +10 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_25.txt +117 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_26.txt +45 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_27.txt +15 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_28.txt +25 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_29.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_30.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_31.txt +15 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_32.txt +14 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_33.txt +29 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_34.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/data/msg_35.txt +4 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email.py +2718 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email_codecs.py +68 -0
- data/lib/rubyfox/server/data/lib/Lib/email/test/test_email_torture.py +136 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/__init__$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/__init__.py +97 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/aliases$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/aliases.py +115 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/ascii.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/base64_codec.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/charmap.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp037.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1006.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1026.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1140.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1250.py +123 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1251.py +157 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1252.py +76 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1253.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1254.py +82 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1255.py +143 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1256.py +129 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1257.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp1258.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp424.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp437.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp500.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp737.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp775.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp850.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp852.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp855.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp856.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp857.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp860.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp861.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp862.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp863.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp864.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp865.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp866.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp869.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp874.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/cp875.py +281 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/hex_codec.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_1.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_10.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_13.py +100 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_14.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_15.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_2.py +101 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_3.py +79 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_4.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_5.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_6.py +137 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_7.py +124 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_8.py +112 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/iso8859_9.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/koi8_r.py +172 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/koi8_u.py +54 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/latin_1.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_cyrillic.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_greek.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_iceland.py +166 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_latin2.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_roman.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mac_turkish.py +167 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/mbcs.py +36 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/quopri_codec.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/raw_unicode_escape.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/rot_13.py +105 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/undefined.py +34 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/unicode_escape.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/unicode_internal.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16_be.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_16_le.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_7.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_8$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/utf_8.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/uu_codec.py +112 -0
- data/lib/rubyfox/server/data/lib/Lib/encodings/zlib_codec.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/fileinput.py +349 -0
- data/lib/rubyfox/server/data/lib/Lib/fnmatch.py +107 -0
- data/lib/rubyfox/server/data/lib/Lib/formatter.py +454 -0
- data/lib/rubyfox/server/data/lib/Lib/fpformat.py +142 -0
- data/lib/rubyfox/server/data/lib/Lib/ftplib.py +804 -0
- data/lib/rubyfox/server/data/lib/Lib/getopt.py +143 -0
- data/lib/rubyfox/server/data/lib/Lib/glob.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/gopherlib.py +205 -0
- data/lib/rubyfox/server/data/lib/Lib/gzip.py +390 -0
- data/lib/rubyfox/server/data/lib/Lib/hmac.py +99 -0
- data/lib/rubyfox/server/data/lib/Lib/htmlentitydefs.py +257 -0
- data/lib/rubyfox/server/data/lib/Lib/htmllib.py +475 -0
- data/lib/rubyfox/server/data/lib/Lib/httplib.py +1238 -0
- data/lib/rubyfox/server/data/lib/Lib/imaplib.py +1208 -0
- data/lib/rubyfox/server/data/lib/Lib/imghdr.py +154 -0
- data/lib/rubyfox/server/data/lib/Lib/inspect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/inspect.py +787 -0
- data/lib/rubyfox/server/data/lib/Lib/isql.py +238 -0
- data/lib/rubyfox/server/data/lib/Lib/javaos$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/javaos.py +395 -0
- data/lib/rubyfox/server/data/lib/Lib/javapath$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/javapath.py +349 -0
- data/lib/rubyfox/server/data/lib/Lib/javashell.py +194 -0
- data/lib/rubyfox/server/data/lib/Lib/jreload.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/DiscardHelp.java +59 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/JavaLoaderFactory.java +9 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PackageManager.java +58 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PathVFS.java +98 -0
- data/lib/rubyfox/server/data/lib/Lib/jxxload_help/PathVFSJavaLoader.java +49 -0
- data/lib/rubyfox/server/data/lib/Lib/keyword.py +97 -0
- data/lib/rubyfox/server/data/lib/Lib/linecache$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/linecache.py +101 -0
- data/lib/rubyfox/server/data/lib/Lib/macpath.py +242 -0
- data/lib/rubyfox/server/data/lib/Lib/macurl2path.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/mailbox.py +313 -0
- data/lib/rubyfox/server/data/lib/Lib/mailcap.py +255 -0
- data/lib/rubyfox/server/data/lib/Lib/markupbase.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/marshal.py +315 -0
- data/lib/rubyfox/server/data/lib/Lib/mhlib.py +1003 -0
- data/lib/rubyfox/server/data/lib/Lib/mimetools.py +226 -0
- data/lib/rubyfox/server/data/lib/Lib/mimetypes.py +435 -0
- data/lib/rubyfox/server/data/lib/Lib/mimify.py +464 -0
- data/lib/rubyfox/server/data/lib/Lib/multifile.py +160 -0
- data/lib/rubyfox/server/data/lib/Lib/mutex.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/netrc.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/nntplib.py +575 -0
- data/lib/rubyfox/server/data/lib/Lib/ntpath.py +482 -0
- data/lib/rubyfox/server/data/lib/Lib/nturl2path.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/__init__.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/colors.py +144 -0
- data/lib/rubyfox/server/data/lib/Lib/pawt/swing.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/pdb.py +979 -0
- data/lib/rubyfox/server/data/lib/Lib/pickle.py +990 -0
- data/lib/rubyfox/server/data/lib/Lib/pipes.py +297 -0
- data/lib/rubyfox/server/data/lib/Lib/popen2.py +304 -0
- data/lib/rubyfox/server/data/lib/Lib/poplib.py +335 -0
- data/lib/rubyfox/server/data/lib/Lib/posixfile.py +240 -0
- data/lib/rubyfox/server/data/lib/Lib/posixpath.py +414 -0
- data/lib/rubyfox/server/data/lib/Lib/pprint.py +310 -0
- data/lib/rubyfox/server/data/lib/Lib/profile.py +556 -0
- data/lib/rubyfox/server/data/lib/Lib/pstats.py +641 -0
- data/lib/rubyfox/server/data/lib/Lib/pyclbr.py +337 -0
- data/lib/rubyfox/server/data/lib/Lib/quopri.py +237 -0
- data/lib/rubyfox/server/data/lib/Lib/random$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/random.py +779 -0
- data/lib/rubyfox/server/data/lib/Lib/re$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/re.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/reconvert.py +192 -0
- data/lib/rubyfox/server/data/lib/Lib/reindex$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/repr.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/rfc822.py +1010 -0
- data/lib/rubyfox/server/data/lib/Lib/sched.py +106 -0
- data/lib/rubyfox/server/data/lib/Lib/select.py +211 -0
- data/lib/rubyfox/server/data/lib/Lib/servlet-api-2.5-20081211.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/setsfactory.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/sfs2x-lms.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sgmllib.py +516 -0
- data/lib/rubyfox/server/data/lib/Lib/shelve.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/shlex.py +209 -0
- data/lib/rubyfox/server/data/lib/Lib/shutil$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/shutil.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/site.py +263 -0
- data/lib/rubyfox/server/data/lib/Lib/smtplib.py +729 -0
- data/lib/rubyfox/server/data/lib/Lib/sndhdr.py +228 -0
- data/lib/rubyfox/server/data/lib/Lib/socket.py +902 -0
- data/lib/rubyfox/server/data/lib/Lib/sre$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre.py +311 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_compile$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_compile.py +455 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_constants$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_constants.py +259 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_parse$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/sre_parse.py +738 -0
- data/lib/rubyfox/server/data/lib/Lib/stat$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/stat.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/string$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/string.py +437 -0
- data/lib/rubyfox/server/data/lib/Lib/symbol.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/telnetlib.py +662 -0
- data/lib/rubyfox/server/data/lib/Lib/tempfile.py +255 -0
- data/lib/rubyfox/server/data/lib/Lib/test/Graph.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/test/README +372 -0
- data/lib/rubyfox/server/data/lib/Lib/test/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/audiotest.au +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/autotest.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future3.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future4.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future5.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future6.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_future7.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/badsyntax_nocaret.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/blob.jar +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/bugs100.py +139 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/bugs101.py +57 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/jdkbugs.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr101.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr104.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr112.py +14 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr119.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr127.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133/test.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr133.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr134.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr139.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr142.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr144.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr148.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr149.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr155.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr170.py +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr171.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr174.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr178.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr183.py +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr186.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr191.py +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr192.py +81 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr195.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr208.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr233.py +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr234.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr235.py +14 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr239.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr241.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/bugs/pr242.py +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/PyBanner048.gif +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_01.txt +19 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_02.txt +135 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_03.txt +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_04.txt +37 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_05.txt +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_06.txt +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_07.txt +83 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_08.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_09.txt +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_10.txt +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_11.txt +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_12.txt +36 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_13.txt +94 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_14.txt +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_15.txt +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_16.txt +123 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_17.txt +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_18.txt +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_19.txt +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_20.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_21.txt +22 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_22.txt +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/data/msg_23.txt +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/double_const.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/greyrgb.uue +1547 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/AnonInner.java +20 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/Foo.java +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/JOverload.java +132 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/ListTest.java +638 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/SubFoo.java +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/TestSupport.java +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/javatests/__init__.py +0 -0
- data/lib/rubyfox/server/data/lib/Lib/test/jser2_classes.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_MimeWriter +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_array +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_asynchat +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_augassign +51 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_binascii +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_builtin +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cfgparser +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cgi +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_charmapcodec +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_class +101 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_coercion +1054 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_compare +101 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_compile +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_cookie +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_exceptions +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_extcall +112 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_frozen +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_future +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_gettext +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_global +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_grammar +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_httplib +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_janoninner +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_javalist +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jbasic +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jser +12 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_jsubclass +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_linuxaudiodev +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_longexp +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_math +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_md5 +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_methods +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_mimetools +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_mmap +34 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_new +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_nis +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_opcodes +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_openpty +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_operations +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pkg +45 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_poll +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_popen2 +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_posixpath +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pow +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_profile +17 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pty +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pwd +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_pyexpat +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_re +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_regex +29 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_rgbimg +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_richcmp +187 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_rotor +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_scope +24 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_signal +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_string +18 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_thread +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_threadedtempfile +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_time +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_tokenize +648 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_types +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_ucn +7 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicode +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicode_file +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unicodedata +5 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_unpack +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_urlparse +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_winreg +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_winsound +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/output/test_xreadline +4 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pickletester.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pydocfodder.py +210 -0
- data/lib/rubyfox/server/data/lib/Lib/test/pystone.py +252 -0
- data/lib/rubyfox/server/data/lib/Lib/test/re_tests.py +590 -0
- data/lib/rubyfox/server/data/lib/Lib/test/regex_tests.py +287 -0
- data/lib/rubyfox/server/data/lib/Lib/test/regrtest.py +1096 -0
- data/lib/rubyfox/server/data/lib/Lib/test/reperf.py +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/sortperf.py +141 -0
- data/lib/rubyfox/server/data/lib/Lib/test/string_tests.py +265 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test.xml +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test.xml.out +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_MimeWriter.py +170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_SimpleXMLRPCServer.py +88 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_StringIO.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test___all__.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test___future__.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_al.py +23 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_array.py +438 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_asynchat.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_atexit.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_audioop.py +264 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_augassign.py +261 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_b1.py +632 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_b2.py +365 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_base64.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bastion.py +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binascii.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binhex.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_binop.py +328 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bisect.py +127 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bsddb.py +76 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bufio.py +60 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_bugfixes.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_builtin.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_calendar.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_call.py +131 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_capi.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cd.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cfgparser.py +284 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cgi.py +188 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_charmapcodec.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cl.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_class.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cmath.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_codecs.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_codeop.py +190 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_coercion.py +118 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_commands.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_compare.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_compile.py +129 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_complex.py +68 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_contains.py +133 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cookie.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_copy_reg.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_cpickle.py +81 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_crypt.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_curses.py +210 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_datetime.py +2958 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dbm.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_descr.py +4094 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_descrtut.py +501 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_difflib.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dircache.py +74 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dl.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_doctest.py +2 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_doctest2.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dospath.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_dumbdbm.py +79 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_email.py +13 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_email_codecs.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_enumerate.py +150 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_errno.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_exceptions.py +206 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_extcall.py +268 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fcntl.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_file.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fileinput.py +159 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fnmatch.py +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fork1.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_format.py +218 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_fpformat.py +75 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_frozen.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_funcattrs.py +384 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future1.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future2.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_future3.py +11 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gc.py +346 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gdbm.py +46 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_generators.py +1385 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_getargs.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_getopt.py +110 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gettext.py +200 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gl.py +150 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_glob.py +115 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_global.py +51 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_grammar.py +732 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_grp.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_gzip.py +82 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hash.py +36 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hmac.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_hotshot.py +117 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_htmllib.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_htmlparser.py +294 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_httplib.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_imageop.py +171 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_imgfile.py +116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_import.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_importhooks.py +215 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_inspect.py +365 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_iter.py +784 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_janoninner.py +15 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_javalist.py +53 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_javashell.py +182 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jbasic.py +119 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_joverload.py +138 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jreload.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jser.py +57 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jser2.py +93 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jsubclass.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_compile.py +168 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_generators.py +165 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_jy_internals.py +130 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_largefile.py +169 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_linuxaudiodev.py +89 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_locale.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long.py +445 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long_future.py +55 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_long_int_args.py +61 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_longexp.py +16 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mailbox.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_marshal.py +44 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_math.py +153 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_md5.py +30 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_methods.py +62 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mhlib.py +353 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mimetools.py +18 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mimetypes.py +59 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_minidom.py +648 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mmap.py +317 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_module.py +77 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_multifile.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_mutants.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_netrc.py +42 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_new.py +108 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_nis.py +32 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_ntpath.py +114 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_opcodes.py +65 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_openpty.py +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_operations.py +475 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_operator.py +218 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_os.py +187 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_parser.py +383 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pep247.py +50 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pickle.py +40 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pkg.py +259 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pkgimport.py +84 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_poll.py +3 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_popen2.py +72 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_posixpath.py +40 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pow.py +107 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pprint.py +104 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_profile.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_profilehooks.py +360 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pty.py +98 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pwd.py +71 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pyclbr.py +154 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_pyexpat.py +202 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_queue.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_quopri.py +157 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_random.py +19 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_re.py +304 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_regex.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_repr.py +278 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rfc822.py +211 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rgbimg.py +63 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_richcmp.py +261 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_rotor.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sax.py +727 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_scope.py +530 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_select.py +228 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_select_new.py +229 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sets.py +793 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sgmllib.py +314 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sha.py +52 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_signal.py +66 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socket.py +1116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socket_ssl.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_socketserver.py +165 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sre.py +434 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_str2unicode.py +90 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_strftime.py +146 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_string.py +223 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_strop.py +133 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_struct.py +441 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_structseq.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_subclasses.py +204 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sunaudiodev.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_sundry.py +102 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_support.py +265 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_symtable.py +8 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_tempfile.py +10 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_thread.py +116 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threaded_import.py +56 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threadedtempfile.py +86 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_threading.py +55 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_time.py +47 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_timing.py +21 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_tokenize.py +9 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_trace.py +219 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_traceback.py +49 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_types.py +762 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_ucn.py +113 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unary.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicode.py +815 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicode_file.py +95 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unicodedata.py +125 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_unpack.py +105 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urllib.py +109 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urllib2.py +31 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_urlparse.py +94 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userdict.py +120 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userlist.py +269 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_userstring.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_uu.py +158 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_wave.py +34 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_weakref.py +573 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_winreg.py +151 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_winsound.py +6 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xmllib.py +35 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xmlrpc.py +37 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_xreadline.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_zipfile.py +78 -0
- data/lib/rubyfox/server/data/lib/Lib/test/test_zlib.py +482 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testall.py +43 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testcodec.py +48 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testimg.uue +1170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testimgr.uue +1170 -0
- data/lib/rubyfox/server/data/lib/Lib/test/testrgb.uue +971 -0
- data/lib/rubyfox/server/data/lib/Lib/test/tokenize_tests.py +175 -0
- data/lib/rubyfox/server/data/lib/Lib/test/whrandom.py +96 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/dbextstest.py +266 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/jndi.py +33 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/runner.py +204 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/sptest.py +227 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/test.xml +363 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/test_zxjdbc_dbapi20.py +26 -0
- data/lib/rubyfox/server/data/lib/Lib/test/zxjdbc/zxtest.py +1242 -0
- data/lib/rubyfox/server/data/lib/Lib/this.py +28 -0
- data/lib/rubyfox/server/data/lib/Lib/threading.py +698 -0
- data/lib/rubyfox/server/data/lib/Lib/token$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/token.py +140 -0
- data/lib/rubyfox/server/data/lib/Lib/tokenize$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/tokenize.py +287 -0
- data/lib/rubyfox/server/data/lib/Lib/traceback$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/traceback.py +301 -0
- data/lib/rubyfox/server/data/lib/Lib/tzparse.py +98 -0
- data/lib/rubyfox/server/data/lib/Lib/unittest.py +723 -0
- data/lib/rubyfox/server/data/lib/Lib/urllib.py +1465 -0
- data/lib/rubyfox/server/data/lib/Lib/urllib2.py +1144 -0
- data/lib/rubyfox/server/data/lib/Lib/urlparse.py +276 -0
- data/lib/rubyfox/server/data/lib/Lib/user.py +45 -0
- data/lib/rubyfox/server/data/lib/Lib/uu.py +195 -0
- data/lib/rubyfox/server/data/lib/Lib/warnings$py.class +0 -0
- data/lib/rubyfox/server/data/lib/Lib/warnings.py +258 -0
- data/lib/rubyfox/server/data/lib/Lib/weakref.py +280 -0
- data/lib/rubyfox/server/data/lib/Lib/whichdb.py +87 -0
- data/lib/rubyfox/server/data/lib/Lib/whrandom.py +140 -0
- data/lib/rubyfox/server/data/lib/Lib/xdrlib.py +285 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/FtCore.py +58 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/Uri.py +380 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/__init__.py +41 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/MessageSource.py +54 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/NodeFilter.py +27 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/__init__.py +232 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/domreg.py +99 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/minicompat.py +184 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/minidom.py +1943 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/pulldom.py +350 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/dom/xmlbuilder.py +388 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/__init__.py +102 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/_exceptions.py +127 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/drivers2/__init__.py +1 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/drivers2/drv_javasax.py +333 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/handler.py +345 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/saxlib.py +430 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/saxutils.py +813 -0
- data/lib/rubyfox/server/data/lib/Lib/xml/sax/xmlreader.py +378 -0
- data/lib/rubyfox/server/data/lib/Lib/xmllib.py +926 -0
- data/lib/rubyfox/server/data/lib/Lib/xmlrpclib.py +1019 -0
- data/lib/rubyfox/server/data/lib/Lib/zipfile.py +586 -0
- data/lib/rubyfox/server/data/lib/Lib/zlib.py +156 -0
- data/lib/rubyfox/server/data/lib/boot.jar +0 -0
- data/lib/rubyfox/server/data/lib/cachedir/.keep +0 -0
- data/lib/rubyfox/server/data/lib/commons-beanutils-1.7.0.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-collections-3.2.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-dbcp-1.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-io-1.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-lang-2.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-logging-1.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-pool-1.5.4.jar +0 -0
- data/lib/rubyfox/server/data/lib/commons-vfs-1.0.jar +0 -0
- data/lib/rubyfox/server/data/lib/ezmorph-1.0.6.jar +0 -0
- data/lib/rubyfox/server/data/lib/httpclient-4.0.3.jar +0 -0
- data/lib/rubyfox/server/data/lib/httpcore-4.0.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/imap.jar +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/COPYING.txt +504 -0
- data/lib/rubyfox/server/data/lib/jconsole/bug_test_case.py +49 -0
- data/lib/rubyfox/server/data/lib/jconsole/console$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/console.py +439 -0
- data/lib/rubyfox/server/data/lib/jconsole/history$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/history.py +82 -0
- data/lib/rubyfox/server/data/lib/jconsole/history_test_case.py +133 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect.py +373 -0
- data/lib/rubyfox/server/data/lib/jconsole/introspect_test_case.py +19 -0
- data/lib/rubyfox/server/data/lib/jconsole/issue_17_test_case.py +36 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect.py +316 -0
- data/lib/rubyfox/server/data/lib/jconsole/jintrospect_test_case.py +107 -0
- data/lib/rubyfox/server/data/lib/jconsole/popup$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/popup.py +178 -0
- data/lib/rubyfox/server/data/lib/jconsole/run_tests.py +8 -0
- data/lib/rubyfox/server/data/lib/jconsole/static_test_case.py +36 -0
- data/lib/rubyfox/server/data/lib/jconsole/testcase.py +38 -0
- data/lib/rubyfox/server/data/lib/jconsole/tip$py.class +0 -0
- data/lib/rubyfox/server/data/lib/jconsole/tip.py +47 -0
- data/lib/rubyfox/server/data/lib/jmx-util-1.2.3.jar +0 -0
- data/lib/rubyfox/server/data/lib/joda-time-1.6.jar +0 -0
- data/lib/rubyfox/server/data/lib/js.jar +0 -0
- data/lib/rubyfox/server/data/lib/json-lib-2.2.3-jdk15.jar +0 -0
- data/lib/rubyfox/server/data/lib/jython.jar +0 -0
- data/lib/rubyfox/server/data/lib/log4j-1.2.15.jar +0 -0
- data/lib/rubyfox/server/data/lib/logs-backup-app.jar +0 -0
- data/lib/rubyfox/server/data/lib/mailapi.jar +0 -0
- data/lib/rubyfox/server/data/lib/pop3.jar +0 -0
- data/lib/rubyfox/server/data/lib/scala-library.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-admin.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-core.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x-util.jar +0 -0
- data/lib/rubyfox/server/data/lib/sfs2x.jar +0 -0
- data/lib/rubyfox/server/data/lib/slf4j-api-1.5.10.jar +0 -0
- data/lib/rubyfox/server/data/lib/slf4j-log4j12.jar +0 -0
- data/lib/rubyfox/server/data/lib/smtp.jar +0 -0
- data/lib/rubyfox/server/data/lib/terracotta-api-1.1.1.jar +0 -0
- data/lib/rubyfox/server/data/lib/ws-engine.jar +0 -0
- data/lib/rubyfox/server/data/lib/xpp3_min-1.1.4c.jar +0 -0
- data/lib/rubyfox/server/data/lib/xstream-1.3.1.jar +0 -0
- data/lib/rubyfox/server/data/logs/.keep +0 -0
- data/lib/rubyfox/server/data/logs/bluebox/.keep +0 -0
- data/lib/rubyfox/server/data/logs/boot/.keep +0 -0
- data/lib/rubyfox/server/data/logs/http/.keep +0 -0
- data/lib/rubyfox/server/data/logs/smartfox.log +295 -0
- data/lib/rubyfox/server/data/root/.keep +0 -0
- data/lib/rubyfox/server/data/root/_css_/default.css +170 -0
- data/lib/rubyfox/server/data/root/_css_/reset.css +49 -0
- data/lib/rubyfox/server/data/root/_images_/background_gradient.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/background_logo.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/favicon.png +0 -0
- data/lib/rubyfox/server/data/root/_images_/logo_smartfoxserver.png +0 -0
- data/lib/rubyfox/server/data/root/admin/.keep +0 -0
- data/lib/rubyfox/server/data/root/admin/AdminTool.html +108 -0
- data/lib/rubyfox/server/data/root/admin/AdminTool.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/ReleaseNotes.txt +29 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/adobeFlashPlayer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/advanced.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/banManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bannedIPs.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bannedUsernames.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bookmarks.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/bootLog.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/buddyList.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/buddyProperties.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/connection.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/databaseManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/floodFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/gameSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/general.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/globalServerStatus.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/iPFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/jVMSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/logsDownload.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/mailer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/permissionsAndEvents.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/privilegeManager.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/remoteAdmin.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomExtension.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomVariables.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/roomsAndGroups.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeLog.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeRoomSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeUserSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/runtimeZoneSettings.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/systemQueueStatus.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/userManagement.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/userVariables.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/usersTraffic.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/webServer.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/wordsFilter.png +0 -0
- data/lib/rubyfox/server/data/root/admin/assets/icons/tabs/zoneExtension.png +0 -0
- data/lib/rubyfox/server/data/root/admin/index.html +108 -0
- data/lib/rubyfox/server/data/root/admin/modules/BanManager/BanManager.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BanManager/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BlueBoxMonitor/BlueBoxMonitor.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/BlueBoxMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LicenseManager/LicenseManager.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LicenseManager/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LogViewer/LogViewer.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/LogViewer/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/RuntimeStatistics/RuntimeStatistics.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/RuntimeStatistics/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ServerConfigurator/ServerConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ServerConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneConfigurator/ZoneConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneMonitor/ZoneMonitor.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/ZoneMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/root/admin/modules/config.xml +12 -0
- data/lib/rubyfox/server/data/root/admin/playerProductInstall.swf +0 -0
- data/lib/rubyfox/server/data/root/admin/swfobject.js +777 -0
- data/lib/rubyfox/server/data/root/crossdomain.xml +6 -0
- data/lib/rubyfox/server/data/root/index.html +63 -0
- data/lib/rubyfox/server/data/sfs2x-service +435 -0
- data/lib/rubyfox/server/data/sfs2x-service.vmoptions +5 -0
- data/lib/rubyfox/server/data/sfs2x.sh +12 -0
- data/lib/rubyfox/server/data/www/.keep +0 -0
- data/lib/rubyfox/server/data/www/BlueBox.war +0 -0
- data/lib/rubyfox/server/data/www/root/_css_/default.css +170 -0
- data/lib/rubyfox/server/data/www/root/_css_/reset.css +49 -0
- data/lib/rubyfox/server/data/www/root/_images_/background_gradient.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/background_logo.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/favicon.png +0 -0
- data/lib/rubyfox/server/data/www/root/_images_/logo_smartfoxserver.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/.keep +0 -0
- data/lib/rubyfox/server/data/www/root/admin/AdminTool.html +108 -0
- data/lib/rubyfox/server/data/www/root/admin/AdminTool.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/ReleaseNotes.txt +63 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/adobeFlashPlayer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/advanced.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/banManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bannedIPs.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bannedUsernames.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bookmarks.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/bootLog.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/buddyList.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/buddyProperties.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/connection.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/databaseManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/floodFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/gameSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/general.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/globalServerStatus.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/hTML5WebSockets.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/iPFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/jVMSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/logsDownload.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/mailer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/permissionsAndEvents.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/privilegeManager.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/remoteAdmin.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomExtension.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomVariables.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/roomsAndGroups.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeLog.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeRoomSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeUserSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/runtimeZoneSettings.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/systemQueueStatus.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/userManagement.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/userVariables.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/usersTraffic.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/webServer.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/wordsFilter.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/assets/icons/tabs/zoneExtension.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/index.html +108 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BanManager/BanManager.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BanManager/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BlueBoxMonitor/BlueBoxMonitor.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/BlueBoxMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/Dashboard/Dashboard.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/Dashboard/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LicenseManager/LicenseManager.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LicenseManager/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LogViewer/LogViewer.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/LogViewer/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/RuntimeStatistics/RuntimeStatistics.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/RuntimeStatistics/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ServerConfigurator/ServerConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ServerConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneConfigurator/ZoneConfigurator.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneConfigurator/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneMonitor/ZoneMonitor.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/ZoneMonitor/icon.png +0 -0
- data/lib/rubyfox/server/data/www/root/admin/modules/config.xml +12 -0
- data/lib/rubyfox/server/data/www/root/admin/playerProductInstall.swf +0 -0
- data/lib/rubyfox/server/data/www/root/admin/swfobject.js +777 -0
- data/lib/rubyfox/server/data/www/root/crossdomain.xml +6 -0
- data/lib/rubyfox/server/data/www/root/examples/.keep +0 -0
- data/lib/rubyfox/server/data/www/root/examples/index.html +43 -0
- data/lib/rubyfox/server/data/www/root/index.html +63 -0
- data/lib/rubyfox/server/data/zones/.keep +0 -0
- data/lib/rubyfox/server/environment.rb +31 -0
- data/lib/rubyfox/server/version.rb +5 -0
- data/lib/rubyfox/server.rb +9 -0
- data/rubyfox-server.gemspec +22 -0
- metadata +1076 -0
@@ -0,0 +1,961 @@
|
|
1
|
+
"""Stuff to parse AIFF-C and AIFF files.
|
2
|
+
|
3
|
+
Unless explicitly stated otherwise, the description below is true
|
4
|
+
both for AIFF-C files and AIFF files.
|
5
|
+
|
6
|
+
An AIFF-C file has the following structure.
|
7
|
+
|
8
|
+
+-----------------+
|
9
|
+
| FORM |
|
10
|
+
+-----------------+
|
11
|
+
| <size> |
|
12
|
+
+----+------------+
|
13
|
+
| | AIFC |
|
14
|
+
| +------------+
|
15
|
+
| | <chunks> |
|
16
|
+
| | . |
|
17
|
+
| | . |
|
18
|
+
| | . |
|
19
|
+
+----+------------+
|
20
|
+
|
21
|
+
An AIFF file has the string "AIFF" instead of "AIFC".
|
22
|
+
|
23
|
+
A chunk consists of an identifier (4 bytes) followed by a size (4 bytes,
|
24
|
+
big endian order), followed by the data. The size field does not include
|
25
|
+
the size of the 8 byte header.
|
26
|
+
|
27
|
+
The following chunk types are recognized.
|
28
|
+
|
29
|
+
FVER
|
30
|
+
<version number of AIFF-C defining document> (AIFF-C only).
|
31
|
+
MARK
|
32
|
+
<# of markers> (2 bytes)
|
33
|
+
list of markers:
|
34
|
+
<marker ID> (2 bytes, must be > 0)
|
35
|
+
<position> (4 bytes)
|
36
|
+
<marker name> ("pstring")
|
37
|
+
COMM
|
38
|
+
<# of channels> (2 bytes)
|
39
|
+
<# of sound frames> (4 bytes)
|
40
|
+
<size of the samples> (2 bytes)
|
41
|
+
<sampling frequency> (10 bytes, IEEE 80-bit extended
|
42
|
+
floating point)
|
43
|
+
in AIFF-C files only:
|
44
|
+
<compression type> (4 bytes)
|
45
|
+
<human-readable version of compression type> ("pstring")
|
46
|
+
SSND
|
47
|
+
<offset> (4 bytes, not used by this program)
|
48
|
+
<blocksize> (4 bytes, not used by this program)
|
49
|
+
<sound data>
|
50
|
+
|
51
|
+
A pstring consists of 1 byte length, a string of characters, and 0 or 1
|
52
|
+
byte pad to make the total length even.
|
53
|
+
|
54
|
+
Usage.
|
55
|
+
|
56
|
+
Reading AIFF files:
|
57
|
+
f = aifc.open(file, 'r')
|
58
|
+
where file is either the name of a file or an open file pointer.
|
59
|
+
The open file pointer must have methods read(), seek(), and close().
|
60
|
+
In some types of audio files, if the setpos() method is not used,
|
61
|
+
the seek() method is not necessary.
|
62
|
+
|
63
|
+
This returns an instance of a class with the following public methods:
|
64
|
+
getnchannels() -- returns number of audio channels (1 for
|
65
|
+
mono, 2 for stereo)
|
66
|
+
getsampwidth() -- returns sample width in bytes
|
67
|
+
getframerate() -- returns sampling frequency
|
68
|
+
getnframes() -- returns number of audio frames
|
69
|
+
getcomptype() -- returns compression type ('NONE' for AIFF files)
|
70
|
+
getcompname() -- returns human-readable version of
|
71
|
+
compression type ('not compressed' for AIFF files)
|
72
|
+
getparams() -- returns a tuple consisting of all of the
|
73
|
+
above in the above order
|
74
|
+
getmarkers() -- get the list of marks in the audio file or None
|
75
|
+
if there are no marks
|
76
|
+
getmark(id) -- get mark with the specified id (raises an error
|
77
|
+
if the mark does not exist)
|
78
|
+
readframes(n) -- returns at most n frames of audio
|
79
|
+
rewind() -- rewind to the beginning of the audio stream
|
80
|
+
setpos(pos) -- seek to the specified position
|
81
|
+
tell() -- return the current position
|
82
|
+
close() -- close the instance (make it unusable)
|
83
|
+
The position returned by tell(), the position given to setpos() and
|
84
|
+
the position of marks are all compatible and have nothing to do with
|
85
|
+
the actual position in the file.
|
86
|
+
The close() method is called automatically when the class instance
|
87
|
+
is destroyed.
|
88
|
+
|
89
|
+
Writing AIFF files:
|
90
|
+
f = aifc.open(file, 'w')
|
91
|
+
where file is either the name of a file or an open file pointer.
|
92
|
+
The open file pointer must have methods write(), tell(), seek(), and
|
93
|
+
close().
|
94
|
+
|
95
|
+
This returns an instance of a class with the following public methods:
|
96
|
+
aiff() -- create an AIFF file (AIFF-C default)
|
97
|
+
aifc() -- create an AIFF-C file
|
98
|
+
setnchannels(n) -- set the number of channels
|
99
|
+
setsampwidth(n) -- set the sample width
|
100
|
+
setframerate(n) -- set the frame rate
|
101
|
+
setnframes(n) -- set the number of frames
|
102
|
+
setcomptype(type, name)
|
103
|
+
-- set the compression type and the
|
104
|
+
human-readable compression type
|
105
|
+
setparams(tuple)
|
106
|
+
-- set all parameters at once
|
107
|
+
setmark(id, pos, name)
|
108
|
+
-- add specified mark to the list of marks
|
109
|
+
tell() -- return current position in output file (useful
|
110
|
+
in combination with setmark())
|
111
|
+
writeframesraw(data)
|
112
|
+
-- write audio frames without pathing up the
|
113
|
+
file header
|
114
|
+
writeframes(data)
|
115
|
+
-- write audio frames and patch up the file header
|
116
|
+
close() -- patch up the file header and close the
|
117
|
+
output file
|
118
|
+
You should set the parameters before the first writeframesraw or
|
119
|
+
writeframes. The total number of frames does not need to be set,
|
120
|
+
but when it is set to the correct value, the header does not have to
|
121
|
+
be patched up.
|
122
|
+
It is best to first set all parameters, perhaps possibly the
|
123
|
+
compression type, and then write audio frames using writeframesraw.
|
124
|
+
When all frames have been written, either call writeframes('') or
|
125
|
+
close() to patch up the sizes in the header.
|
126
|
+
Marks can be added anytime. If there are any marks, ypu must call
|
127
|
+
close() after all frames have been written.
|
128
|
+
The close() method is called automatically when the class instance
|
129
|
+
is destroyed.
|
130
|
+
|
131
|
+
When a file is opened with the extension '.aiff', an AIFF file is
|
132
|
+
written, otherwise an AIFF-C file is written. This default can be
|
133
|
+
changed by calling aiff() or aifc() before the first writeframes or
|
134
|
+
writeframesraw.
|
135
|
+
"""
|
136
|
+
|
137
|
+
import struct
|
138
|
+
import __builtin__
|
139
|
+
|
140
|
+
__all__ = ["Error","open","openfp"]
|
141
|
+
|
142
|
+
class Error(Exception):
|
143
|
+
pass
|
144
|
+
|
145
|
+
_AIFC_version = 0xA2805140 # Version 1 of AIFF-C
|
146
|
+
|
147
|
+
_skiplist = 'COMT', 'INST', 'MIDI', 'AESD', \
|
148
|
+
'APPL', 'NAME', 'AUTH', '(c) ', 'ANNO'
|
149
|
+
|
150
|
+
def _read_long(file):
|
151
|
+
try:
|
152
|
+
return struct.unpack('>l', file.read(4))[0]
|
153
|
+
except struct.error:
|
154
|
+
raise EOFError
|
155
|
+
|
156
|
+
def _read_ulong(file):
|
157
|
+
try:
|
158
|
+
return struct.unpack('>L', file.read(4))[0]
|
159
|
+
except struct.error:
|
160
|
+
raise EOFError
|
161
|
+
|
162
|
+
def _read_short(file):
|
163
|
+
try:
|
164
|
+
return struct.unpack('>h', file.read(2))[0]
|
165
|
+
except struct.error:
|
166
|
+
raise EOFError
|
167
|
+
|
168
|
+
def _read_string(file):
|
169
|
+
length = ord(file.read(1))
|
170
|
+
if length == 0:
|
171
|
+
data = ''
|
172
|
+
else:
|
173
|
+
data = file.read(length)
|
174
|
+
if length & 1 == 0:
|
175
|
+
dummy = file.read(1)
|
176
|
+
return data
|
177
|
+
|
178
|
+
_HUGE_VAL = 1.79769313486231e+308 # See <limits.h>
|
179
|
+
|
180
|
+
def _read_float(f): # 10 bytes
|
181
|
+
import math
|
182
|
+
expon = _read_short(f) # 2 bytes
|
183
|
+
sign = 1
|
184
|
+
if expon < 0:
|
185
|
+
sign = -1
|
186
|
+
expon = expon + 0x8000
|
187
|
+
himant = _read_ulong(f) # 4 bytes
|
188
|
+
lomant = _read_ulong(f) # 4 bytes
|
189
|
+
if expon == himant == lomant == 0:
|
190
|
+
f = 0.0
|
191
|
+
elif expon == 0x7FFF:
|
192
|
+
f = _HUGE_VAL
|
193
|
+
else:
|
194
|
+
expon = expon - 16383
|
195
|
+
f = (himant * 0x100000000L + lomant) * pow(2.0, expon - 63)
|
196
|
+
return sign * f
|
197
|
+
|
198
|
+
def _write_short(f, x):
|
199
|
+
f.write(struct.pack('>h', x))
|
200
|
+
|
201
|
+
def _write_long(f, x):
|
202
|
+
f.write(struct.pack('>L', x))
|
203
|
+
|
204
|
+
def _write_string(f, s):
|
205
|
+
f.write(chr(len(s)))
|
206
|
+
f.write(s)
|
207
|
+
if len(s) & 1 == 0:
|
208
|
+
f.write(chr(0))
|
209
|
+
|
210
|
+
def _write_float(f, x):
|
211
|
+
import math
|
212
|
+
if x < 0:
|
213
|
+
sign = 0x8000
|
214
|
+
x = x * -1
|
215
|
+
else:
|
216
|
+
sign = 0
|
217
|
+
if x == 0:
|
218
|
+
expon = 0
|
219
|
+
himant = 0
|
220
|
+
lomant = 0
|
221
|
+
else:
|
222
|
+
fmant, expon = math.frexp(x)
|
223
|
+
if expon > 16384 or fmant >= 1: # Infinity or NaN
|
224
|
+
expon = sign|0x7FFF
|
225
|
+
himant = 0
|
226
|
+
lomant = 0
|
227
|
+
else: # Finite
|
228
|
+
expon = expon + 16382
|
229
|
+
if expon < 0: # denormalized
|
230
|
+
fmant = math.ldexp(fmant, expon)
|
231
|
+
expon = 0
|
232
|
+
expon = expon | sign
|
233
|
+
fmant = math.ldexp(fmant, 32)
|
234
|
+
fsmant = math.floor(fmant)
|
235
|
+
himant = long(fsmant)
|
236
|
+
fmant = math.ldexp(fmant - fsmant, 32)
|
237
|
+
fsmant = math.floor(fmant)
|
238
|
+
lomant = long(fsmant)
|
239
|
+
_write_short(f, expon)
|
240
|
+
_write_long(f, himant)
|
241
|
+
_write_long(f, lomant)
|
242
|
+
|
243
|
+
from chunk import Chunk
|
244
|
+
|
245
|
+
class Aifc_read:
|
246
|
+
# Variables used in this class:
|
247
|
+
#
|
248
|
+
# These variables are available to the user though appropriate
|
249
|
+
# methods of this class:
|
250
|
+
# _file -- the open file with methods read(), close(), and seek()
|
251
|
+
# set through the __init__() method
|
252
|
+
# _nchannels -- the number of audio channels
|
253
|
+
# available through the getnchannels() method
|
254
|
+
# _nframes -- the number of audio frames
|
255
|
+
# available through the getnframes() method
|
256
|
+
# _sampwidth -- the number of bytes per audio sample
|
257
|
+
# available through the getsampwidth() method
|
258
|
+
# _framerate -- the sampling frequency
|
259
|
+
# available through the getframerate() method
|
260
|
+
# _comptype -- the AIFF-C compression type ('NONE' if AIFF)
|
261
|
+
# available through the getcomptype() method
|
262
|
+
# _compname -- the human-readable AIFF-C compression type
|
263
|
+
# available through the getcomptype() method
|
264
|
+
# _markers -- the marks in the audio file
|
265
|
+
# available through the getmarkers() and getmark()
|
266
|
+
# methods
|
267
|
+
# _soundpos -- the position in the audio stream
|
268
|
+
# available through the tell() method, set through the
|
269
|
+
# setpos() method
|
270
|
+
#
|
271
|
+
# These variables are used internally only:
|
272
|
+
# _version -- the AIFF-C version number
|
273
|
+
# _decomp -- the decompressor from builtin module cl
|
274
|
+
# _comm_chunk_read -- 1 iff the COMM chunk has been read
|
275
|
+
# _aifc -- 1 iff reading an AIFF-C file
|
276
|
+
# _ssnd_seek_needed -- 1 iff positioned correctly in audio
|
277
|
+
# file for readframes()
|
278
|
+
# _ssnd_chunk -- instantiation of a chunk class for the SSND chunk
|
279
|
+
# _framesize -- size of one frame in the file
|
280
|
+
|
281
|
+
def initfp(self, file):
|
282
|
+
self._version = 0
|
283
|
+
self._decomp = None
|
284
|
+
self._convert = None
|
285
|
+
self._markers = []
|
286
|
+
self._soundpos = 0
|
287
|
+
self._file = Chunk(file)
|
288
|
+
if self._file.getname() != 'FORM':
|
289
|
+
raise Error, 'file does not start with FORM id'
|
290
|
+
formdata = self._file.read(4)
|
291
|
+
if formdata == 'AIFF':
|
292
|
+
self._aifc = 0
|
293
|
+
elif formdata == 'AIFC':
|
294
|
+
self._aifc = 1
|
295
|
+
else:
|
296
|
+
raise Error, 'not an AIFF or AIFF-C file'
|
297
|
+
self._comm_chunk_read = 0
|
298
|
+
while 1:
|
299
|
+
self._ssnd_seek_needed = 1
|
300
|
+
try:
|
301
|
+
chunk = Chunk(self._file)
|
302
|
+
except EOFError:
|
303
|
+
break
|
304
|
+
chunkname = chunk.getname()
|
305
|
+
if chunkname == 'COMM':
|
306
|
+
self._read_comm_chunk(chunk)
|
307
|
+
self._comm_chunk_read = 1
|
308
|
+
elif chunkname == 'SSND':
|
309
|
+
self._ssnd_chunk = chunk
|
310
|
+
dummy = chunk.read(8)
|
311
|
+
self._ssnd_seek_needed = 0
|
312
|
+
elif chunkname == 'FVER':
|
313
|
+
self._version = _read_long(chunk)
|
314
|
+
elif chunkname == 'MARK':
|
315
|
+
self._readmark(chunk)
|
316
|
+
elif chunkname in _skiplist:
|
317
|
+
pass
|
318
|
+
else:
|
319
|
+
raise Error, 'unrecognized chunk type '+chunk.chunkname
|
320
|
+
chunk.skip()
|
321
|
+
if not self._comm_chunk_read or not self._ssnd_chunk:
|
322
|
+
raise Error, 'COMM chunk and/or SSND chunk missing'
|
323
|
+
if self._aifc and self._decomp:
|
324
|
+
import cl
|
325
|
+
params = [cl.ORIGINAL_FORMAT, 0,
|
326
|
+
cl.BITS_PER_COMPONENT, self._sampwidth * 8,
|
327
|
+
cl.FRAME_RATE, self._framerate]
|
328
|
+
if self._nchannels == 1:
|
329
|
+
params[1] = cl.MONO
|
330
|
+
elif self._nchannels == 2:
|
331
|
+
params[1] = cl.STEREO_INTERLEAVED
|
332
|
+
else:
|
333
|
+
raise Error, 'cannot compress more than 2 channels'
|
334
|
+
self._decomp.SetParams(params)
|
335
|
+
|
336
|
+
def __init__(self, f):
|
337
|
+
if type(f) == type(''):
|
338
|
+
f = __builtin__.open(f, 'rb')
|
339
|
+
# else, assume it is an open file object already
|
340
|
+
self.initfp(f)
|
341
|
+
|
342
|
+
#
|
343
|
+
# User visible methods.
|
344
|
+
#
|
345
|
+
def getfp(self):
|
346
|
+
return self._file
|
347
|
+
|
348
|
+
def rewind(self):
|
349
|
+
self._ssnd_seek_needed = 1
|
350
|
+
self._soundpos = 0
|
351
|
+
|
352
|
+
def close(self):
|
353
|
+
if self._decomp:
|
354
|
+
self._decomp.CloseDecompressor()
|
355
|
+
self._decomp = None
|
356
|
+
self._file = None
|
357
|
+
|
358
|
+
def tell(self):
|
359
|
+
return self._soundpos
|
360
|
+
|
361
|
+
def getnchannels(self):
|
362
|
+
return self._nchannels
|
363
|
+
|
364
|
+
def getnframes(self):
|
365
|
+
return self._nframes
|
366
|
+
|
367
|
+
def getsampwidth(self):
|
368
|
+
return self._sampwidth
|
369
|
+
|
370
|
+
def getframerate(self):
|
371
|
+
return self._framerate
|
372
|
+
|
373
|
+
def getcomptype(self):
|
374
|
+
return self._comptype
|
375
|
+
|
376
|
+
def getcompname(self):
|
377
|
+
return self._compname
|
378
|
+
|
379
|
+
## def getversion(self):
|
380
|
+
## return self._version
|
381
|
+
|
382
|
+
def getparams(self):
|
383
|
+
return self.getnchannels(), self.getsampwidth(), \
|
384
|
+
self.getframerate(), self.getnframes(), \
|
385
|
+
self.getcomptype(), self.getcompname()
|
386
|
+
|
387
|
+
def getmarkers(self):
|
388
|
+
if len(self._markers) == 0:
|
389
|
+
return None
|
390
|
+
return self._markers
|
391
|
+
|
392
|
+
def getmark(self, id):
|
393
|
+
for marker in self._markers:
|
394
|
+
if id == marker[0]:
|
395
|
+
return marker
|
396
|
+
raise Error, 'marker ' + `id` + ' does not exist'
|
397
|
+
|
398
|
+
def setpos(self, pos):
|
399
|
+
if pos < 0 or pos > self._nframes:
|
400
|
+
raise Error, 'position not in range'
|
401
|
+
self._soundpos = pos
|
402
|
+
self._ssnd_seek_needed = 1
|
403
|
+
|
404
|
+
def readframes(self, nframes):
|
405
|
+
if self._ssnd_seek_needed:
|
406
|
+
self._ssnd_chunk.seek(0)
|
407
|
+
dummy = self._ssnd_chunk.read(8)
|
408
|
+
pos = self._soundpos * self._framesize
|
409
|
+
if pos:
|
410
|
+
self._ssnd_chunk.seek(pos + 8)
|
411
|
+
self._ssnd_seek_needed = 0
|
412
|
+
if nframes == 0:
|
413
|
+
return ''
|
414
|
+
data = self._ssnd_chunk.read(nframes * self._framesize)
|
415
|
+
if self._convert and data:
|
416
|
+
data = self._convert(data)
|
417
|
+
self._soundpos = self._soundpos + len(data) / (self._nchannels * self._sampwidth)
|
418
|
+
return data
|
419
|
+
|
420
|
+
#
|
421
|
+
# Internal methods.
|
422
|
+
#
|
423
|
+
|
424
|
+
def _decomp_data(self, data):
|
425
|
+
import cl
|
426
|
+
dummy = self._decomp.SetParam(cl.FRAME_BUFFER_SIZE,
|
427
|
+
len(data) * 2)
|
428
|
+
return self._decomp.Decompress(len(data) / self._nchannels,
|
429
|
+
data)
|
430
|
+
|
431
|
+
def _ulaw2lin(self, data):
|
432
|
+
import audioop
|
433
|
+
return audioop.ulaw2lin(data, 2)
|
434
|
+
|
435
|
+
def _adpcm2lin(self, data):
|
436
|
+
import audioop
|
437
|
+
if not hasattr(self, '_adpcmstate'):
|
438
|
+
# first time
|
439
|
+
self._adpcmstate = None
|
440
|
+
data, self._adpcmstate = audioop.adpcm2lin(data, 2,
|
441
|
+
self._adpcmstate)
|
442
|
+
return data
|
443
|
+
|
444
|
+
def _read_comm_chunk(self, chunk):
|
445
|
+
self._nchannels = _read_short(chunk)
|
446
|
+
self._nframes = _read_long(chunk)
|
447
|
+
self._sampwidth = (_read_short(chunk) + 7) / 8
|
448
|
+
self._framerate = int(_read_float(chunk))
|
449
|
+
self._framesize = self._nchannels * self._sampwidth
|
450
|
+
if self._aifc:
|
451
|
+
#DEBUG: SGI's soundeditor produces a bad size :-(
|
452
|
+
kludge = 0
|
453
|
+
if chunk.chunksize == 18:
|
454
|
+
kludge = 1
|
455
|
+
print 'Warning: bad COMM chunk size'
|
456
|
+
chunk.chunksize = 23
|
457
|
+
#DEBUG end
|
458
|
+
self._comptype = chunk.read(4)
|
459
|
+
#DEBUG start
|
460
|
+
if kludge:
|
461
|
+
length = ord(chunk.file.read(1))
|
462
|
+
if length & 1 == 0:
|
463
|
+
length = length + 1
|
464
|
+
chunk.chunksize = chunk.chunksize + length
|
465
|
+
chunk.file.seek(-1, 1)
|
466
|
+
#DEBUG end
|
467
|
+
self._compname = _read_string(chunk)
|
468
|
+
if self._comptype != 'NONE':
|
469
|
+
if self._comptype == 'G722':
|
470
|
+
try:
|
471
|
+
import audioop
|
472
|
+
except ImportError:
|
473
|
+
pass
|
474
|
+
else:
|
475
|
+
self._convert = self._adpcm2lin
|
476
|
+
self._framesize = self._framesize / 4
|
477
|
+
return
|
478
|
+
# for ULAW and ALAW try Compression Library
|
479
|
+
try:
|
480
|
+
import cl
|
481
|
+
except ImportError:
|
482
|
+
if self._comptype == 'ULAW':
|
483
|
+
try:
|
484
|
+
import audioop
|
485
|
+
self._convert = self._ulaw2lin
|
486
|
+
self._framesize = self._framesize / 2
|
487
|
+
return
|
488
|
+
except ImportError:
|
489
|
+
pass
|
490
|
+
raise Error, 'cannot read compressed AIFF-C files'
|
491
|
+
if self._comptype == 'ULAW':
|
492
|
+
scheme = cl.G711_ULAW
|
493
|
+
self._framesize = self._framesize / 2
|
494
|
+
elif self._comptype == 'ALAW':
|
495
|
+
scheme = cl.G711_ALAW
|
496
|
+
self._framesize = self._framesize / 2
|
497
|
+
else:
|
498
|
+
raise Error, 'unsupported compression type'
|
499
|
+
self._decomp = cl.OpenDecompressor(scheme)
|
500
|
+
self._convert = self._decomp_data
|
501
|
+
else:
|
502
|
+
self._comptype = 'NONE'
|
503
|
+
self._compname = 'not compressed'
|
504
|
+
|
505
|
+
def _readmark(self, chunk):
|
506
|
+
nmarkers = _read_short(chunk)
|
507
|
+
# Some files appear to contain invalid counts.
|
508
|
+
# Cope with this by testing for EOF.
|
509
|
+
try:
|
510
|
+
for i in range(nmarkers):
|
511
|
+
id = _read_short(chunk)
|
512
|
+
pos = _read_long(chunk)
|
513
|
+
name = _read_string(chunk)
|
514
|
+
if pos or name:
|
515
|
+
# some files appear to have
|
516
|
+
# dummy markers consisting of
|
517
|
+
# a position 0 and name ''
|
518
|
+
self._markers.append((id, pos, name))
|
519
|
+
except EOFError:
|
520
|
+
print 'Warning: MARK chunk contains only',
|
521
|
+
print len(self._markers),
|
522
|
+
if len(self._markers) == 1: print 'marker',
|
523
|
+
else: print 'markers',
|
524
|
+
print 'instead of', nmarkers
|
525
|
+
|
526
|
+
class Aifc_write:
|
527
|
+
# Variables used in this class:
|
528
|
+
#
|
529
|
+
# These variables are user settable through appropriate methods
|
530
|
+
# of this class:
|
531
|
+
# _file -- the open file with methods write(), close(), tell(), seek()
|
532
|
+
# set through the __init__() method
|
533
|
+
# _comptype -- the AIFF-C compression type ('NONE' in AIFF)
|
534
|
+
# set through the setcomptype() or setparams() method
|
535
|
+
# _compname -- the human-readable AIFF-C compression type
|
536
|
+
# set through the setcomptype() or setparams() method
|
537
|
+
# _nchannels -- the number of audio channels
|
538
|
+
# set through the setnchannels() or setparams() method
|
539
|
+
# _sampwidth -- the number of bytes per audio sample
|
540
|
+
# set through the setsampwidth() or setparams() method
|
541
|
+
# _framerate -- the sampling frequency
|
542
|
+
# set through the setframerate() or setparams() method
|
543
|
+
# _nframes -- the number of audio frames written to the header
|
544
|
+
# set through the setnframes() or setparams() method
|
545
|
+
# _aifc -- whether we're writing an AIFF-C file or an AIFF file
|
546
|
+
# set through the aifc() method, reset through the
|
547
|
+
# aiff() method
|
548
|
+
#
|
549
|
+
# These variables are used internally only:
|
550
|
+
# _version -- the AIFF-C version number
|
551
|
+
# _comp -- the compressor from builtin module cl
|
552
|
+
# _nframeswritten -- the number of audio frames actually written
|
553
|
+
# _datalength -- the size of the audio samples written to the header
|
554
|
+
# _datawritten -- the size of the audio samples actually written
|
555
|
+
|
556
|
+
def __init__(self, f):
|
557
|
+
if type(f) == type(''):
|
558
|
+
filename = f
|
559
|
+
f = __builtin__.open(f, 'wb')
|
560
|
+
else:
|
561
|
+
# else, assume it is an open file object already
|
562
|
+
filename = '???'
|
563
|
+
self.initfp(f)
|
564
|
+
if filename[-5:] == '.aiff':
|
565
|
+
self._aifc = 0
|
566
|
+
else:
|
567
|
+
self._aifc = 1
|
568
|
+
|
569
|
+
def initfp(self, file):
|
570
|
+
self._file = file
|
571
|
+
self._version = _AIFC_version
|
572
|
+
self._comptype = 'NONE'
|
573
|
+
self._compname = 'not compressed'
|
574
|
+
self._comp = None
|
575
|
+
self._convert = None
|
576
|
+
self._nchannels = 0
|
577
|
+
self._sampwidth = 0
|
578
|
+
self._framerate = 0
|
579
|
+
self._nframes = 0
|
580
|
+
self._nframeswritten = 0
|
581
|
+
self._datawritten = 0
|
582
|
+
self._datalength = 0
|
583
|
+
self._markers = []
|
584
|
+
self._marklength = 0
|
585
|
+
self._aifc = 1 # AIFF-C is default
|
586
|
+
|
587
|
+
def __del__(self):
|
588
|
+
if self._file:
|
589
|
+
self.close()
|
590
|
+
|
591
|
+
#
|
592
|
+
# User visible methods.
|
593
|
+
#
|
594
|
+
def aiff(self):
|
595
|
+
if self._nframeswritten:
|
596
|
+
raise Error, 'cannot change parameters after starting to write'
|
597
|
+
self._aifc = 0
|
598
|
+
|
599
|
+
def aifc(self):
|
600
|
+
if self._nframeswritten:
|
601
|
+
raise Error, 'cannot change parameters after starting to write'
|
602
|
+
self._aifc = 1
|
603
|
+
|
604
|
+
def setnchannels(self, nchannels):
|
605
|
+
if self._nframeswritten:
|
606
|
+
raise Error, 'cannot change parameters after starting to write'
|
607
|
+
if nchannels < 1:
|
608
|
+
raise Error, 'bad # of channels'
|
609
|
+
self._nchannels = nchannels
|
610
|
+
|
611
|
+
def getnchannels(self):
|
612
|
+
if not self._nchannels:
|
613
|
+
raise Error, 'number of channels not set'
|
614
|
+
return self._nchannels
|
615
|
+
|
616
|
+
def setsampwidth(self, sampwidth):
|
617
|
+
if self._nframeswritten:
|
618
|
+
raise Error, 'cannot change parameters after starting to write'
|
619
|
+
if sampwidth < 1 or sampwidth > 4:
|
620
|
+
raise Error, 'bad sample width'
|
621
|
+
self._sampwidth = sampwidth
|
622
|
+
|
623
|
+
def getsampwidth(self):
|
624
|
+
if not self._sampwidth:
|
625
|
+
raise Error, 'sample width not set'
|
626
|
+
return self._sampwidth
|
627
|
+
|
628
|
+
def setframerate(self, framerate):
|
629
|
+
if self._nframeswritten:
|
630
|
+
raise Error, 'cannot change parameters after starting to write'
|
631
|
+
if framerate <= 0:
|
632
|
+
raise Error, 'bad frame rate'
|
633
|
+
self._framerate = framerate
|
634
|
+
|
635
|
+
def getframerate(self):
|
636
|
+
if not self._framerate:
|
637
|
+
raise Error, 'frame rate not set'
|
638
|
+
return self._framerate
|
639
|
+
|
640
|
+
def setnframes(self, nframes):
|
641
|
+
if self._nframeswritten:
|
642
|
+
raise Error, 'cannot change parameters after starting to write'
|
643
|
+
self._nframes = nframes
|
644
|
+
|
645
|
+
def getnframes(self):
|
646
|
+
return self._nframeswritten
|
647
|
+
|
648
|
+
def setcomptype(self, comptype, compname):
|
649
|
+
if self._nframeswritten:
|
650
|
+
raise Error, 'cannot change parameters after starting to write'
|
651
|
+
if comptype not in ('NONE', 'ULAW', 'ALAW', 'G722'):
|
652
|
+
raise Error, 'unsupported compression type'
|
653
|
+
self._comptype = comptype
|
654
|
+
self._compname = compname
|
655
|
+
|
656
|
+
def getcomptype(self):
|
657
|
+
return self._comptype
|
658
|
+
|
659
|
+
def getcompname(self):
|
660
|
+
return self._compname
|
661
|
+
|
662
|
+
## def setversion(self, version):
|
663
|
+
## if self._nframeswritten:
|
664
|
+
## raise Error, 'cannot change parameters after starting to write'
|
665
|
+
## self._version = version
|
666
|
+
|
667
|
+
def setparams(self, (nchannels, sampwidth, framerate, nframes, comptype, compname)):
|
668
|
+
if self._nframeswritten:
|
669
|
+
raise Error, 'cannot change parameters after starting to write'
|
670
|
+
if comptype not in ('NONE', 'ULAW', 'ALAW', 'G722'):
|
671
|
+
raise Error, 'unsupported compression type'
|
672
|
+
self.setnchannels(nchannels)
|
673
|
+
self.setsampwidth(sampwidth)
|
674
|
+
self.setframerate(framerate)
|
675
|
+
self.setnframes(nframes)
|
676
|
+
self.setcomptype(comptype, compname)
|
677
|
+
|
678
|
+
def getparams(self):
|
679
|
+
if not self._nchannels or not self._sampwidth or not self._framerate:
|
680
|
+
raise Error, 'not all parameters set'
|
681
|
+
return self._nchannels, self._sampwidth, self._framerate, \
|
682
|
+
self._nframes, self._comptype, self._compname
|
683
|
+
|
684
|
+
def setmark(self, id, pos, name):
|
685
|
+
if id <= 0:
|
686
|
+
raise Error, 'marker ID must be > 0'
|
687
|
+
if pos < 0:
|
688
|
+
raise Error, 'marker position must be >= 0'
|
689
|
+
if type(name) != type(''):
|
690
|
+
raise Error, 'marker name must be a string'
|
691
|
+
for i in range(len(self._markers)):
|
692
|
+
if id == self._markers[i][0]:
|
693
|
+
self._markers[i] = id, pos, name
|
694
|
+
return
|
695
|
+
self._markers.append((id, pos, name))
|
696
|
+
|
697
|
+
def getmark(self, id):
|
698
|
+
for marker in self._markers:
|
699
|
+
if id == marker[0]:
|
700
|
+
return marker
|
701
|
+
raise Error, 'marker ' + `id` + ' does not exist'
|
702
|
+
|
703
|
+
def getmarkers(self):
|
704
|
+
if len(self._markers) == 0:
|
705
|
+
return None
|
706
|
+
return self._markers
|
707
|
+
|
708
|
+
def tell(self):
|
709
|
+
return self._nframeswritten
|
710
|
+
|
711
|
+
def writeframesraw(self, data):
|
712
|
+
self._ensure_header_written(len(data))
|
713
|
+
nframes = len(data) / (self._sampwidth * self._nchannels)
|
714
|
+
if self._convert:
|
715
|
+
data = self._convert(data)
|
716
|
+
self._file.write(data)
|
717
|
+
self._nframeswritten = self._nframeswritten + nframes
|
718
|
+
self._datawritten = self._datawritten + len(data)
|
719
|
+
|
720
|
+
def writeframes(self, data):
|
721
|
+
self.writeframesraw(data)
|
722
|
+
if self._nframeswritten != self._nframes or \
|
723
|
+
self._datalength != self._datawritten:
|
724
|
+
self._patchheader()
|
725
|
+
|
726
|
+
def close(self):
|
727
|
+
self._ensure_header_written(0)
|
728
|
+
if self._datawritten & 1:
|
729
|
+
# quick pad to even size
|
730
|
+
self._file.write(chr(0))
|
731
|
+
self._datawritten = self._datawritten + 1
|
732
|
+
self._writemarkers()
|
733
|
+
if self._nframeswritten != self._nframes or \
|
734
|
+
self._datalength != self._datawritten or \
|
735
|
+
self._marklength:
|
736
|
+
self._patchheader()
|
737
|
+
if self._comp:
|
738
|
+
self._comp.CloseCompressor()
|
739
|
+
self._comp = None
|
740
|
+
self._file.flush()
|
741
|
+
self._file = None
|
742
|
+
|
743
|
+
#
|
744
|
+
# Internal methods.
|
745
|
+
#
|
746
|
+
|
747
|
+
def _comp_data(self, data):
|
748
|
+
import cl
|
749
|
+
dum = self._comp.SetParam(cl.FRAME_BUFFER_SIZE, len(data))
|
750
|
+
dum = self._comp.SetParam(cl.COMPRESSED_BUFFER_SIZE, len(data))
|
751
|
+
return self._comp.Compress(self._nframes, data)
|
752
|
+
|
753
|
+
def _lin2ulaw(self, data):
|
754
|
+
import audioop
|
755
|
+
return audioop.lin2ulaw(data, 2)
|
756
|
+
|
757
|
+
def _lin2adpcm(self, data):
|
758
|
+
import audioop
|
759
|
+
if not hasattr(self, '_adpcmstate'):
|
760
|
+
self._adpcmstate = None
|
761
|
+
data, self._adpcmstate = audioop.lin2adpcm(data, 2,
|
762
|
+
self._adpcmstate)
|
763
|
+
return data
|
764
|
+
|
765
|
+
def _ensure_header_written(self, datasize):
|
766
|
+
if not self._nframeswritten:
|
767
|
+
if self._comptype in ('ULAW', 'ALAW'):
|
768
|
+
if not self._sampwidth:
|
769
|
+
self._sampwidth = 2
|
770
|
+
if self._sampwidth != 2:
|
771
|
+
raise Error, 'sample width must be 2 when compressing with ULAW or ALAW'
|
772
|
+
if self._comptype == 'G722':
|
773
|
+
if not self._sampwidth:
|
774
|
+
self._sampwidth = 2
|
775
|
+
if self._sampwidth != 2:
|
776
|
+
raise Error, 'sample width must be 2 when compressing with G7.22 (ADPCM)'
|
777
|
+
if not self._nchannels:
|
778
|
+
raise Error, '# channels not specified'
|
779
|
+
if not self._sampwidth:
|
780
|
+
raise Error, 'sample width not specified'
|
781
|
+
if not self._framerate:
|
782
|
+
raise Error, 'sampling rate not specified'
|
783
|
+
self._write_header(datasize)
|
784
|
+
|
785
|
+
def _init_compression(self):
|
786
|
+
if self._comptype == 'G722':
|
787
|
+
import audioop
|
788
|
+
self._convert = self._lin2adpcm
|
789
|
+
return
|
790
|
+
try:
|
791
|
+
import cl
|
792
|
+
except ImportError:
|
793
|
+
if self._comptype == 'ULAW':
|
794
|
+
try:
|
795
|
+
import audioop
|
796
|
+
self._convert = self._lin2ulaw
|
797
|
+
return
|
798
|
+
except ImportError:
|
799
|
+
pass
|
800
|
+
raise Error, 'cannot write compressed AIFF-C files'
|
801
|
+
if self._comptype == 'ULAW':
|
802
|
+
scheme = cl.G711_ULAW
|
803
|
+
elif self._comptype == 'ALAW':
|
804
|
+
scheme = cl.G711_ALAW
|
805
|
+
else:
|
806
|
+
raise Error, 'unsupported compression type'
|
807
|
+
self._comp = cl.OpenCompressor(scheme)
|
808
|
+
params = [cl.ORIGINAL_FORMAT, 0,
|
809
|
+
cl.BITS_PER_COMPONENT, self._sampwidth * 8,
|
810
|
+
cl.FRAME_RATE, self._framerate,
|
811
|
+
cl.FRAME_BUFFER_SIZE, 100,
|
812
|
+
cl.COMPRESSED_BUFFER_SIZE, 100]
|
813
|
+
if self._nchannels == 1:
|
814
|
+
params[1] = cl.MONO
|
815
|
+
elif self._nchannels == 2:
|
816
|
+
params[1] = cl.STEREO_INTERLEAVED
|
817
|
+
else:
|
818
|
+
raise Error, 'cannot compress more than 2 channels'
|
819
|
+
self._comp.SetParams(params)
|
820
|
+
# the compressor produces a header which we ignore
|
821
|
+
dummy = self._comp.Compress(0, '')
|
822
|
+
self._convert = self._comp_data
|
823
|
+
|
824
|
+
def _write_header(self, initlength):
|
825
|
+
if self._aifc and self._comptype != 'NONE':
|
826
|
+
self._init_compression()
|
827
|
+
self._file.write('FORM')
|
828
|
+
if not self._nframes:
|
829
|
+
self._nframes = initlength / (self._nchannels * self._sampwidth)
|
830
|
+
self._datalength = self._nframes * self._nchannels * self._sampwidth
|
831
|
+
if self._datalength & 1:
|
832
|
+
self._datalength = self._datalength + 1
|
833
|
+
if self._aifc:
|
834
|
+
if self._comptype in ('ULAW', 'ALAW'):
|
835
|
+
self._datalength = self._datalength / 2
|
836
|
+
if self._datalength & 1:
|
837
|
+
self._datalength = self._datalength + 1
|
838
|
+
elif self._comptype == 'G722':
|
839
|
+
self._datalength = (self._datalength + 3) / 4
|
840
|
+
if self._datalength & 1:
|
841
|
+
self._datalength = self._datalength + 1
|
842
|
+
self._form_length_pos = self._file.tell()
|
843
|
+
commlength = self._write_form_length(self._datalength)
|
844
|
+
if self._aifc:
|
845
|
+
self._file.write('AIFC')
|
846
|
+
self._file.write('FVER')
|
847
|
+
_write_long(self._file, 4)
|
848
|
+
_write_long(self._file, self._version)
|
849
|
+
else:
|
850
|
+
self._file.write('AIFF')
|
851
|
+
self._file.write('COMM')
|
852
|
+
_write_long(self._file, commlength)
|
853
|
+
_write_short(self._file, self._nchannels)
|
854
|
+
self._nframes_pos = self._file.tell()
|
855
|
+
_write_long(self._file, self._nframes)
|
856
|
+
_write_short(self._file, self._sampwidth * 8)
|
857
|
+
_write_float(self._file, self._framerate)
|
858
|
+
if self._aifc:
|
859
|
+
self._file.write(self._comptype)
|
860
|
+
_write_string(self._file, self._compname)
|
861
|
+
self._file.write('SSND')
|
862
|
+
self._ssnd_length_pos = self._file.tell()
|
863
|
+
_write_long(self._file, self._datalength + 8)
|
864
|
+
_write_long(self._file, 0)
|
865
|
+
_write_long(self._file, 0)
|
866
|
+
|
867
|
+
def _write_form_length(self, datalength):
|
868
|
+
if self._aifc:
|
869
|
+
commlength = 18 + 5 + len(self._compname)
|
870
|
+
if commlength & 1:
|
871
|
+
commlength = commlength + 1
|
872
|
+
verslength = 12
|
873
|
+
else:
|
874
|
+
commlength = 18
|
875
|
+
verslength = 0
|
876
|
+
_write_long(self._file, 4 + verslength + self._marklength + \
|
877
|
+
8 + commlength + 16 + datalength)
|
878
|
+
return commlength
|
879
|
+
|
880
|
+
def _patchheader(self):
|
881
|
+
curpos = self._file.tell()
|
882
|
+
if self._datawritten & 1:
|
883
|
+
datalength = self._datawritten + 1
|
884
|
+
self._file.write(chr(0))
|
885
|
+
else:
|
886
|
+
datalength = self._datawritten
|
887
|
+
if datalength == self._datalength and \
|
888
|
+
self._nframes == self._nframeswritten and \
|
889
|
+
self._marklength == 0:
|
890
|
+
self._file.seek(curpos, 0)
|
891
|
+
return
|
892
|
+
self._file.seek(self._form_length_pos, 0)
|
893
|
+
dummy = self._write_form_length(datalength)
|
894
|
+
self._file.seek(self._nframes_pos, 0)
|
895
|
+
_write_long(self._file, self._nframeswritten)
|
896
|
+
self._file.seek(self._ssnd_length_pos, 0)
|
897
|
+
_write_long(self._file, datalength + 8)
|
898
|
+
self._file.seek(curpos, 0)
|
899
|
+
self._nframes = self._nframeswritten
|
900
|
+
self._datalength = datalength
|
901
|
+
|
902
|
+
def _writemarkers(self):
|
903
|
+
if len(self._markers) == 0:
|
904
|
+
return
|
905
|
+
self._file.write('MARK')
|
906
|
+
length = 2
|
907
|
+
for marker in self._markers:
|
908
|
+
id, pos, name = marker
|
909
|
+
length = length + len(name) + 1 + 6
|
910
|
+
if len(name) & 1 == 0:
|
911
|
+
length = length + 1
|
912
|
+
_write_long(self._file, length)
|
913
|
+
self._marklength = length + 8
|
914
|
+
_write_short(self._file, len(self._markers))
|
915
|
+
for marker in self._markers:
|
916
|
+
id, pos, name = marker
|
917
|
+
_write_short(self._file, id)
|
918
|
+
_write_long(self._file, pos)
|
919
|
+
_write_string(self._file, name)
|
920
|
+
|
921
|
+
def open(f, mode=None):
|
922
|
+
if mode is None:
|
923
|
+
if hasattr(f, 'mode'):
|
924
|
+
mode = f.mode
|
925
|
+
else:
|
926
|
+
mode = 'rb'
|
927
|
+
if mode in ('r', 'rb'):
|
928
|
+
return Aifc_read(f)
|
929
|
+
elif mode in ('w', 'wb'):
|
930
|
+
return Aifc_write(f)
|
931
|
+
else:
|
932
|
+
raise Error, "mode must be 'r', 'rb', 'w', or 'wb'"
|
933
|
+
|
934
|
+
openfp = open # B/W compatibility
|
935
|
+
|
936
|
+
if __name__ == '__main__':
|
937
|
+
import sys
|
938
|
+
if not sys.argv[1:]:
|
939
|
+
sys.argv.append('/usr/demos/data/audio/bach.aiff')
|
940
|
+
fn = sys.argv[1]
|
941
|
+
f = open(fn, 'r')
|
942
|
+
print "Reading", fn
|
943
|
+
print "nchannels =", f.getnchannels()
|
944
|
+
print "nframes =", f.getnframes()
|
945
|
+
print "sampwidth =", f.getsampwidth()
|
946
|
+
print "framerate =", f.getframerate()
|
947
|
+
print "comptype =", f.getcomptype()
|
948
|
+
print "compname =", f.getcompname()
|
949
|
+
if sys.argv[2:]:
|
950
|
+
gn = sys.argv[2]
|
951
|
+
print "Writing", gn
|
952
|
+
g = open(gn, 'w')
|
953
|
+
g.setparams(f.getparams())
|
954
|
+
while 1:
|
955
|
+
data = f.readframes(1024)
|
956
|
+
if not data:
|
957
|
+
break
|
958
|
+
g.writeframes(data)
|
959
|
+
g.close()
|
960
|
+
f.close()
|
961
|
+
print "Done."
|