Re: JavaScript Calculator Program

2019-12-07 Thread Chris Angelico
On Sat, Dec 7, 2019 at 11:21 PM ferzan saglam wrote: > > Hi People, I am working on a simple calculator which uses operands (+-*/). > The program allows me to choose an operand and enter the first two values, > but when it gets to doing the maths, it gives me an error on > "console.log ("The resu

Re: Javascript website scraping using WebKit and Selenium tools

2015-07-01 Thread Veek M
dieter wrote: > Once the problems to get the "final" HTML code solved, > I would use "lxml" and its "xpath" support to locate any > relevant HTML information. Hello Dieter, yes - you are correct. (though I don't think there's any auth to browse - nice that you actually tried) He's using jsonP an

Re: Javascript website scraping using WebKit and Selenium tools

2015-07-01 Thread dieter
Veek M writes: > I tried scraping a javascript website using two tools, both didn't work. The > website link is: http://xdguo.taobao.com/category-499399872.htm The relevant > text I'm trying to extract is 'GY-68...': > > > > > > id="4002-6778075404" data-spm-anchor-i

Re: JavaScript vs Python

2010-11-09 Thread Stef Mientki
On 09-11-2010 10:25, Lawrence D'Oliveiro wrote: > In message , Chris > Rebert wrote: > >> On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro >> wrote: >> >>> Because JavaScript is actually a decent language in its own right. >> "The Good Parts" of it anyway. > Python, too, has its good parts, y

Re: JavaScript vs Python

2010-11-09 Thread Lawrence D'Oliveiro
In message , Chris Rebert wrote: > On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro > wrote: > >> Because JavaScript is actually a decent language in its own right. > > "The Good Parts" of it anyway. Python, too, has its good parts, you have to admit... -- http://mail.python.org/mailman/l

Re: JavaScript vs Python (was Re: Commercial or Famous Applicattions.?)

2010-11-08 Thread Ian Kelly
On Tue, Nov 9, 2010 at 12:30 AM, Chris Rebert wrote: > "The Good Parts" of it anyway. > > All hail William Goldman! Wait, what were talking about? Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: JavaScript vs Python (was Re: Commercial or Famous Applicattions.?)

2010-11-08 Thread Chris Rebert
On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro wrote: > In message , John Bond > wrote: > >> On 9/11/2010 5:54 AM, Lawrence D'Oliveiro wrote: >>> In message, John Bond >>> wrote: >>> I once got asked to write a list things that I'd make different in the technology world if I could,

Re: JavaScript vs Python (was Re: Commercial or Famous Applicattions.?)

2010-11-08 Thread Lawrence D'Oliveiro
In message , John Bond wrote: > On 9/11/2010 5:54 AM, Lawrence D'Oliveiro wrote: > >> In message, John Bond >> wrote: >> >>> I once got asked to write a list things that I'd make different in the >>> technology world if I could, to make it better for everyone. Number 3 >>> was "everywhere you now

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-08-01 Thread lkcl
On Jul 21, 12:55 pm, Paul Boddie wrote: > On 20 Jul, 18:00, a...@pythoncraft.com (Aahz) wrote: > > > > > Out of curiosity, are there anyJavaScripttoolkits that generate code > > that degrades gracefully whenJavaScriptis disabled? > > You mean "Web toolkits which useJavaScript", I presume. I have >

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-08-01 Thread lkcl
On Jul 20, 4:00 pm, a...@pythoncraft.com (Aahz) wrote: > Out of curiosity, are there anyJavaScripttoolkits or python-to-javascript compilers > that generate code > that degrades gracefully whenJavaScriptis disabled? http://advogato.org/article/981.html you'll need to do a little bit of work

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-23 Thread Paul Boddie
On 23 Jul, 05:55, a...@pythoncraft.com (Aahz) wrote: > In article > <1c994086-8c58-488f-b3b3-6161c4b2b...@k30g2000yqf.googlegroups.com>, > Paul Boddie   wrote: > > >http://www.boddie.org.uk/python/XSLTools.html > > Thanks!  I'll take a look after OSCON. The JavaScript parts of the framework are a

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-22 Thread Aahz
In article <1c994086-8c58-488f-b3b3-6161c4b2b...@k30g2000yqf.googlegroups.com>, Paul Boddie wrote: >On 20 Jul, 18:00, a...@pythoncraft.com (Aahz) wrote: >> >> Out of curiosity, are there any JavaScript toolkits that generate code >> that degrades gracefully when JavaScript is disabled? > >You mea

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-22 Thread Aahz
In article , D'Arcy J.M. Cain wrote: >On 20 Jul 2009 17:10:55 -0700 >a...@pythoncraft.com (Aahz) wrote: >>>I understand what you want but I can't see how a toolkit can do that. >>>How do you program "graceful?" It seems pretty application specific. >> >> Presumably the JS toolkit generates both

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-21 Thread Paul Boddie
On 20 Jul, 18:00, a...@pythoncraft.com (Aahz) wrote: > > Out of curiosity, are there any JavaScript toolkits that generate code > that degrades gracefully when JavaScript is disabled? You mean "Web toolkits which use JavaScript", I presume. I have written (and use myself) a toolkit/framework calle

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-20 Thread D'Arcy J.M. Cain
On 20 Jul 2009 17:10:55 -0700 a...@pythoncraft.com (Aahz) wrote: > >I understand what you want but I can't see how a toolkit can do that. > >How do you program "graceful?" It seems pretty application specific. > > Presumably the JS toolkit generates both code and HTML. Actions that > normally ge

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-20 Thread Aahz
In article , D'Arcy J.M. Cain wrote: >On 20 Jul 2009 09:00:33 -0700 >a...@pythoncraft.com (Aahz) wrote: >> >> Out of curiosity, are there any JavaScript toolkits that generate code >> that degrades gracefully when JavaScript is disabled? > >I understand what you want but I can't see how a toolkit

Re: JavaScript toolkits (was Re: ANN: Porcupine Web Application Server 0.6 is released!)

2009-07-20 Thread D'Arcy J.M. Cain
On 20 Jul 2009 09:00:33 -0700 a...@pythoncraft.com (Aahz) wrote: > Out of curiosity, are there any JavaScript toolkits that generate code > that degrades gracefully when JavaScript is disabled? I understand what you want but I can't see how a toolkit can do that. How do you program "graceful?" It

Re: javascript to python

2008-10-03 Thread Bruno Desthuilliers
lkcl a écrit : On Oct 3, 10:29 am, Bruno Desthuilliers wrote: lkcl a écrit :> On Oct 2, 7:42 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: lkcl a écrit : And as far as I'm concerned, the point is exactly here : it's doing "a little bit more" than the original code. yeah, i know. a

Re: javascript to python

2008-10-03 Thread lkcl
> so, if i do this: > > d = dataListener() > e = dataListener() > > d.data = "fred" > > print f.data duh, duh - that should be print e.data :) -- http://mail.python.org/mailman/listinfo/python-list

Re: javascript to python

2008-10-03 Thread lkcl
On Oct 3, 10:29 am, Bruno Desthuilliers wrote: > lkcl a écrit :> On Oct 2, 7:42 pm, Bruno Desthuilliers > > <[EMAIL PROTECTED]> wrote: > >> lkcl a écrit : > Not 'mine' - I'm not the OP. whoops, yes - i missed that. sorry! > And as far as I'm concerned, the point is > exactly here : it's doing

Re: javascript to python

2008-10-03 Thread Bruno Desthuilliers
lkcl a écrit : On Oct 2, 7:42 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: lkcl a écrit : (snip) for fits and giggles, compile the above python using pyjs.py, the python-to-javascript compiler (seehttp://pyjamas.sf.net) and compare the resultant javascript to your original code-fragment

Re: javascript to python

2008-10-03 Thread lkcl
On Oct 2, 7:42 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > lkcl a écrit : > > > > > On Oct 2, 5:54 pm, Joe Hrbek <[EMAIL PROTECTED]> wrote: > >> Could someone help me translate to something that would close to it in > >> python? The anonymous functions are giving me problems. > > > class

Re: javascript to python

2008-10-02 Thread Bruno Desthuilliers
lkcl a écrit : On Oct 2, 5:54 pm, Joe Hrbek <[EMAIL PROTECTED]> wrote: Could someone help me translate to something that would close to it in python? The anonymous functions are giving me problems. class dataListener: def __init__(self): data = "" def onStartRequest(self, req

Re: javascript to python

2008-10-02 Thread Bruno Desthuilliers
Joe Hrbek a écrit : Could someone help me translate to something that would close to it in python? The anonymous functions are giving me problems. var dataListener = { data : "", onStartRequest: function(request, context){}, onStopRequest: function(request, context, status

Re: javascript to python

2008-10-02 Thread lkcl
On Oct 2, 5:54 pm, Joe Hrbek <[EMAIL PROTECTED]> wrote: > Could someone help me translate to something that would close to it in > python? The anonymous functions are giving me problems. class dataListener: def __init__(self): data = "" def onStartRequest(self, request, context)

Re: Javascript - Python RSA encryption interoperability

2008-07-17 Thread Paul Rubin
Evren Esat Ozkan <[EMAIL PROTECTED]> writes: > I'm trying to encrypt a string with RSA. But it needs to be compitable > with Dave's JavaScript RSA implementation*. What exactly are you trying to do? That Javascript implementation looks like bad news. If you're trying to secure a web page, use S

Re: Javascript - Python RSA encryption interoperability

2008-07-17 Thread Evren Esat Ozkan
Hi, Thank you very much. Your code is worked like a charm and saved my honeymoon :) Thanks again, Evren On Jul 4, 6:19 pm, [EMAIL PROTECTED] wrote: > Evren Esat Ozkan napisa³(a): > > > > > > > Hello, > > > I'm trying to encrypt a string with RSA. But it needs to be compitable > > with Dave's Ja

Re: Javascript - Python RSA encryption interoperability

2008-07-04 Thread marek . rocki
Evren Esat Ozkan napisał(a): > Hello, > > I'm trying to encrypt a string with RSA. But it needs to be compitable > with Dave's JavaScript RSA implementation*. I'm already read and tried > lots of different things about RSA and RSA in Python. But could not > produce the same result with the javascri

Re: JavaScript

2007-08-31 Thread MC
Hi! I know "how to", but only with IE on windows. -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: JavaScript

2007-08-31 Thread iapain
>python has modules for forms and other things... and for it? Check out httplib and urlib2, it might be useful for you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Javascript is turning into Python?!

2006-11-03 Thread Fredrik Lundh
Steve Holden wrote: > Wouldn't that be > > with f() as x, g() as y: > blah(x, y) or with f(), g() as x, y: pass see guido's comment at the bottom of this page: http://effbot.org/pyref/with.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: Javascript is turning into Python?!

2006-11-03 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes: > Wouldn't that be > > with f() as x, g() as y: > blah(x, y) Probably. I haven't started using 2.5 yet. -- http://mail.python.org/mailman/listinfo/python-list

Re: Javascript is turning into Python?!

2006-11-03 Thread Klaas
Paul Rubin wrote: > "Carl Banks" <[EMAIL PROTECTED]> writes: > > > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 > > Maybe in exchange, Python can borrow the let statement. > > Maybe the with statement could be extended to allow binding more than > one variable. > with x as f(), y

Re: Javascript is turning into Python?!

2006-11-03 Thread Steve Holden
Paul Rubin wrote: > "Carl Banks" <[EMAIL PROTECTED]> writes: > >>>http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 >> >>Maybe in exchange, Python can borrow the let statement. > > > Maybe the with statement could be extended to allow binding more than > one variable. > with x as

Re: Javascript is turning into Python?!

2006-11-03 Thread Paul Rubin
"Carl Banks" <[EMAIL PROTECTED]> writes: > > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 > Maybe in exchange, Python can borrow the let statement. Maybe the with statement could be extended to allow binding more than one variable. with x as f(), y as g(): blah (x, y) --

Re: Javascript is turning into Python?!

2006-11-03 Thread Carl Banks
Paul Rubin wrote: > I hadn't seem this before. New Javascript 1.7 features: > > - Generators > - Iterators > - Array comprehensions > - Destructuring assignment > > Sounds like another language we know. > > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 Maybe in exchange, Python can b

Re: Javascript is turning into Python?!

2006-11-03 Thread MC
Hi! > (ECMAscript), then, well I haven't seen any progress there. 1) in IE-7, the last release (of JScript) has few evolutions (more important, a new garbage collector) 2) in Windows, with Active-Scripting, it's possible to integrate JScript in Python, call JScript's functions from Python's co

Re: Javascript is turning into Python?!

2006-11-03 Thread Robert Thorpe
Paul Rubin wrote: > I hadn't seem this before. New Javascript 1.7 features: > > - Generators > - Iterators > - Array comprehensions > - Destructuring assignment > > Sounds like another language we know. > > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 Indeed, this is a consequence o

Re: Javascript is turning into Python?!

2006-11-03 Thread Ben Finney
Paul Rubin <"http://phr.cx"@NOSPAM.invalid> writes: > I hadn't seen this before. New Javascript 1.7 features: > - Generators > - Iterators > - Array comprehensions > - Destructuring assignment > > Sounds like another language we know. The current developers of Javascript have been quite open dur

Re: Javascript is turning into Python?!

2006-11-02 Thread Fredrik Lundh
Paul Rubin wrote: > I hadn't seen this before. New Javascript 1.7 features: > > - Generators > - Iterators > - Array comprehensions > - Destructuring assignment > > Sounds like another language we know. > > http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 http://weblogs.mozillazine.

Re: Javascript is turning into Python?!

2006-11-02 Thread Maxim Sloyko
Paul Rubin wrote: > [Correction of earlier accidental crosspost] > > I hadn't seen this before. New Javascript 1.7 features: > > - Generators > - Iterators > - Array comprehensions > - Destructuring assignment > > Sounds like another language we know. > > http://developer.mozilla.org/en/docs/New_

Re: Javascript is turning into Python?!

2006-11-02 Thread Paul Rubin
[Correction of earlier accidental crosspost] I hadn't seen this before. New Javascript 1.7 features: - Generators - Iterators - Array comprehensions - Destructuring assignment Sounds like another language we know. http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7 -- http://mail.pytho