When pyjs.py tests/algorithms/fib.py -o fib.js is run via command prompt, pyjs.py opens
When I run pyjs.py tests/algorithms/fib.py -o fib.js, via command prompt, pyjs.py opens in my IDE. The javascript file does not get written. how can I fix this?
What OS do you run?
2014-02-20 5:01 GMT+01:00 derpasaurs [email protected]:
When I run pyjs.py tests/algorithms/fib.py -o fib.js, via command prompt, pyjs.py opens in my IDE. The javascript file does not get written. how can I fix this?
— Reply to this email directly or view it on GitHubhttps://github.com/chrivers/pyjaco/issues/83 .
Samuel Ytterbrink
windows
try to prefix pyjs,py with python $ python pyjs.py tests/algorithms/fib.py -o fib.js
2014-02-20 19:23 GMT+01:00 derpasaurs [email protected]:
windows
— Reply to this email directly or view it on GitHubhttps://github.com/chrivers/pyjaco/issues/83#issuecomment-35652435 .
Samuel Ytterbrink
yes, this works, but when i open it in note pad:
var fib = function() { var __kwargs = __kwargs_get(arguments); var __varargs = __varargs_get(arguments); var $v1 = Array.prototype.slice.call(arguments).concat(js(__varargs)); var x = ('x' in __kwargs) ? __kwargs['x'] : $v1[0]; delete __kwargs.x if (x === undefined) { py_builtins.print('fib() did not get parameter x'); }; if (bool(x.PY$__eq__($c1)) === True) { return x; } else { return x.PY$__mul__(fib(x.PY$__sub__($c1))); } return None; } py_builtins.print(fib($c4));
This is not js. Also how do i put it in my browser
how can i make it JS
That is JavaScript.
Can someone elese help me out here (ping CI), and explain this?
fredagen den 21:e februari 2014 skrev derpasaurs [email protected]:
how can i make it JS
— Reply to this email directly or view it on GitHubhttps://github.com/chrivers/pyjaco/issues/83#issuecomment-35683392 .
Samuel Ytterbrink
whats the : py_builtins.print??
Its pythons print function, its located in the builtins javascript library that are shipped with pyjaco.
2014-02-21 2:51 GMT+01:00 derpasaurs [email protected]:
whats the : py_builtins.print??
— Reply to this email directly or view it on GitHubhttps://github.com/chrivers/pyjaco/issues/83#issuecomment-35691495 .
Samuel Ytterbrink
so: how can I run a python script that will count up to 50 in my web browser?
number = 0
for i in range(51):
print (number)
number = number + 1