Permalink
Browse files

add 1st revision of HTML5 video and audio

  • Loading branch information...
Luke Leighton
Luke Leighton committed Mar 27, 2012
1 parent 1ccb865 commit 7f7bfcf60db82bf2740b17231de931c9a7742309
View
@@ -256,12 +256,13 @@ def java2python(txt):
return '\n'.join(l)
if __name__ == "__main__":
- fname = sys.argv[1]
- f = open(fname + ".java", "r")
- txt = java2python(f.read())
- f.close()
+ fnames = sys.argv[1:]
+ for fname in fnames:
+ f = open(fname, "r")
+ txt = java2python(f.read())
+ f.close()
- f = open(fname + ".py", "w")
- f.write(txt)
- f.close()
+ f = open(fname[:-5] + ".py", "w")
+ f.write(txt)
+ f.close()
@@ -0,0 +1,30 @@
+"""
+* Copyright 2009 Mark Renouf
+*
+* Licensed under the Apache License, Version 2.0 (the "License"); you may not
+* use this file except in compliance with the License. You may obtain a copy of
+* the License at
+*
+* http:#www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS, WITHDIR
+* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+* License for the specific language governing permissions and limitations under
+* the License.
+"""
+
+from pyjamas.media.Media import Media
+from pyjamas import DOM
+
+"""*
+* An HTML5 AUDIO element
+"""
+class Audio(Media):
+
+ def __init__(self, src=None):
+ self.setElement(DOM.createElement("audio"))
+ if src:
+ self.setSrc(src)
+
+
Oops, something went wrong.

0 comments on commit 7f7bfcf

Please sign in to comment.