Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js2py/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def is_generic_descriptor(desc):

##############################################################################


@six.python_2_unicode_compatible
class PyJs(object):
PRIMITIVES = frozenset(
['String', 'Number', 'Boolean', 'Undefined', 'Null'])
Expand Down Expand Up @@ -952,7 +952,7 @@ def create(self, *args):
'''Generally not a constructor, raise an error'''
raise MakeError('TypeError', '%s is not a constructor' % self.Class)

def __unicode__(self):
def __str__(self):
return self.to_string().value

def __repr__(self):
Expand Down
4 changes: 3 additions & 1 deletion js2py/host/console.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
from ..base import *

@Js
Expand All @@ -6,7 +7,8 @@ def console():

@Js
def log():
print(arguments[0])
args = arguments
print(*(args[i] for i in args))

console.put('log', log)
console.put('debug', log)
Expand Down