equal
deleted
inserted
replaced
104 pyjs_eval(onload_fn); |
104 pyjs_eval(onload_fn); |
105 } |
105 } |
106 |
106 |
107 """) |
107 """) |
108 |
108 |
|
109 |
109 JS(""" |
110 JS(""" |
110 function import_wait(proceed_fn, parent_mod, dynamic) { |
111 function import_wait(proceed_fn, parent_mod, dynamic) { |
111 |
112 |
112 var data = ''; |
113 var data = ''; |
113 var element = $doc.createElement("div"); |
114 var element = $doc.createElement("div"); |
186 """) |
187 """) |
187 |
188 |
188 |
189 |
189 class Object: |
190 class Object: |
190 pass |
191 pass |
|
192 |
191 |
193 |
192 object = Object |
194 object = Object |
193 |
195 |
194 |
196 |
195 class Modload: |
197 class Modload: |
226 parent_mod=None): |
228 parent_mod=None): |
227 |
229 |
228 loader = Modload(path, app_modnames, app_imported_fn, dynamic, parent_mod) |
230 loader = Modload(path, app_modnames, app_imported_fn, dynamic, parent_mod) |
229 loader.next() |
231 loader.next() |
230 |
232 |
|
233 |
231 import sys |
234 import sys |
232 |
235 |
233 |
236 |
234 class BaseException: |
237 class BaseException: |
235 |
238 |
275 class AttributeError(StandardError): |
278 class AttributeError(StandardError): |
276 name = "AttributeError" |
279 name = "AttributeError" |
277 |
280 |
278 def toString(self): |
281 def toString(self): |
279 return "AttributeError: %s of %s" % (self.args[1], self.args[0]) |
282 return "AttributeError: %s of %s" % (self.args[1], self.args[0]) |
|
283 |
280 |
284 |
281 JS(""" |
285 JS(""" |
282 pyjslib.StopIteration = function () { }; |
286 pyjslib.StopIteration = function () { }; |
283 pyjslib.StopIteration.prototype = new Error(); |
287 pyjslib.StopIteration.prototype = new Error(); |
284 pyjslib.StopIteration.name = 'StopIteration'; |
288 pyjslib.StopIteration.name = 'StopIteration'; |
616 return self.l |
620 return self.l |
617 |
621 |
618 def __str__(self): |
622 def __str__(self): |
619 return repr(self) |
623 return repr(self) |
620 |
624 |
|
625 |
621 list = List |
626 list = List |
622 |
627 |
623 |
628 |
624 class Tuple: |
629 class Tuple: |
625 def __init__(self, data=None): |
630 def __init__(self, data=None): |
766 return self.l |
771 return self.l |
767 |
772 |
768 def __str__(self): |
773 def __str__(self): |
769 return repr(self) |
774 return repr(self) |
770 |
775 |
|
776 |
771 tuple = Tuple |
777 tuple = Tuple |
772 |
778 |
773 |
779 |
774 class Dict: |
780 class Dict: |
775 def __init__(self, data=None): |
781 def __init__(self, data=None): |
910 def copy(self): |
916 def copy(self): |
911 return Dict(self.items()) |
917 return Dict(self.items()) |
912 |
918 |
913 def __str__(self): |
919 def __str__(self): |
914 return repr(self) |
920 return repr(self) |
|
921 |
915 |
922 |
916 dict = Dict |
923 dict = Dict |
917 |
924 |
918 # taken from mochikit: range( [start,] stop[, step] ) |
925 # taken from mochikit: range( [start,] stop[, step] ) |
919 |
926 |