Re: CPython on the Web

2011-01-03 Thread azakai
On Jan 3, 10:11 pm, John Nagle wrote: > On 1/1/2011 11:26 PM, azakai wrote: > > > Hello, I hope this will be interesting to people here: CPython running > > on the web, > > >http://syntensity.com/static/python.html > > > That isn't a new implementation of Python, but rather CPython 2.7.1, > > comp

Re: Interrput a thread

2011-01-03 Thread Jean-Paul Calderone
On Jan 3, 6:17 pm, Adam Skutt wrote: > On Jan 3, 5:24 pm, Jean-Paul Calderone > wrote: > > > Of course.  The whole point here is not about threads vs processes. > > It's about shared memory concurrency vs non-shared memory > > concurrency.  You can implement both with threads and both with > > pr

Re: CPython on the Web

2011-01-03 Thread John Nagle
On 1/1/2011 11:26 PM, azakai wrote: Hello, I hope this will be interesting to people here: CPython running on the web, http://syntensity.com/static/python.html That isn't a new implementation of Python, but rather CPython 2.7.1, compiled from C to JavaScript using Emscripten and LLVM. For more

Re: list 2 dict?

2011-01-03 Thread Paul Rubin
"Octavian Rasnita" writes: > If I want to create a dictionary from a list... > l = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b'] dict(l[i:i+2] for i in xrange(0,len(l),2)) seems simplest to me. -- http://mail.python.org/mailman/listinfo/python-list

Re: CPython on the Web

2011-01-03 Thread MrJean1
FYI, The example http://syntensity.com/static/python.html works fine in Safari 4.1.3 on MacOS X Tiger (10.4.11). /Jean On Jan 3, 5:59 pm, azakai wrote: > On Jan 3, 12:23 pm, Gerry Reno wrote: > > > > > > > On 01/03/2011 03:10 PM, azakai wrote: > > > > On Jan 2, 5:55 pm, Gerry Reno wrote:

Re: list 2 dict?

2011-01-03 Thread DevPlayer
An adaptation to Hrvoje Niksic's recipe Use a dictionary comprehention instead of a list comprehension or function call: lyst = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b'] it = iter( lyst ) dyct = {i:it.next() for i in it} # I'm using {} and not [] for those with tiny fonts. #print dyct {8: 'b', 1: 2,

Re: CPython on the Web

2011-01-03 Thread MrJean1
FireFox 3.6.13 on MacOS X Tiger (10.4.11) fails: Error: too much recursion Error: Modules is not defined Source File: http://synthensity.com/static/python.html /Jean On Jan 2, 11:26 pm, Wolfgang Strobl wrote: > azakai : > > >On Jan 2, 4:58 pm, pyt...@bdurham.com wrote: > >> Azakai/Gerry,

Re: Python comparison matrix

2011-01-03 Thread Tomasz Rola
On Mon, 3 Jan 2011, Alex Willmer wrote: > I've created a spreadsheet that compares the built ins, features and > modules of the CPython releases so far. For instance it shows: [...] > I gathered the data from the documentation at python.org. It's work in > progress so there are plenty of rough

Re: String building using join

2011-01-03 Thread Kushal Kumaran
On Mon, Jan 3, 2011 at 3:07 AM, gervaz wrote: > On 2 Gen, 19:14, Emile van Sebille wrote: >> >> >> class Test: >>       def __init__(self, v1, v2): >>           self.v1 = v1 >>           self.v2 = v2 >> >> t1 = Test("hello", None) >> t2 = Test(None, "ciao") >> t3 = Test("salut", "hallo") >> t =

Re: Multiple instances and wrong parental links

2011-01-03 Thread DevPlayer
Mere are my ramblings of a novice (bad) Hobbyst programmer. You mentioned that your having a hard time coming up with a solution to your complex problem. Complex means you are doing lots of different things to different things all over the place where timing is an issue. First it seems you are t

Re: CPython on the Web

2011-01-03 Thread azakai
On Jan 3, 12:23 pm, Gerry Reno wrote: > On 01/03/2011 03:10 PM, azakai wrote: > > > > > > > > > > > On Jan 2, 5:55 pm, Gerry Reno wrote: > > >> I tried printing sys.path and here is the output: > > >> ['', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7/', > >> '/usr/local/lib/python2.7/

Re: Python comparison matrix

2011-01-03 Thread Alex Willmer
Thank you Antoine, I've fixed those errors. Going by the docs, I have VMSError down as first introduced in Python 2.5. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python comparison matrix

2011-01-03 Thread Alex Willmer
On Tuesday, January 4, 2011 12:54:24 AM UTC, Malcolm wrote: > Alex, > > I think this type of documentation is incredibly useful! Thank you. > Is there some type of key which explains symbols like !, *, f, etc? There is a key, it's the second tab from the end, '!' wasn't documented and I forgot

Re: CPython on the Web

2011-01-03 Thread azakai
On Jan 3, 12:13 pm, de...@web.de (Diez B. Roggisch) wrote: > A fun hack. Have you bothered to compare it to the PyPy javascript > backend - perfomance-wise, that is? > Gerry already gave a complete and accurate answer to the status of this project in comparison to PyPy and pyjamas. Regarding perfo

Re: Python comparison matrix

2011-01-03 Thread python
Alex, I think this type of documentation is incredibly useful! Is there some type of key which explains symbols like !, *, f, etc? Thanks for sharing this work with the community. Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Python comparison matrix

2011-01-03 Thread Antoine Pitrou
On Mon, 3 Jan 2011 16:17:00 -0800 (PST) Alex Willmer wrote: > I've created a spreadsheet that compares the built ins, features and modules > of the CPython releases so far. For instance it shows: A couple of errors: - BufferError is also in 3.x - IndentationError is also in 3.x - object is also

Python comparison matrix

2011-01-03 Thread Alex Willmer
I've created a spreadsheet that compares the built ins, features and modules of the CPython releases so far. For instance it shows: - basestring was first introduced at version 2.3 then removed in version 3.0 - List comprehensions (PEP 202) were introduced at version 2.0. - apply() was a built in

Re: CPython on the Web

2011-01-03 Thread astar
On Jan 2, 4:58 pm, pyt...@bdurham.com wrote: > Azakai/Gerry, > > > Errors when using Firefox 3.6.3: > firefox 3.6.13 openbsd i386 4.8 -current error console has some errors: editor not defined module not define too much recursion nothing interested happened on the web page, but wonderful projec

Re: SUNLisp 2: Josh vs. Kenny Flamewars Galore!!

2011-01-03 Thread Thomas 'PointedEars' Lahn
kenny crossposted bullshit over 5 newsgroups again: > […] JFTR: *PLONK* -- http://mail.python.org/mailman/listinfo/python-list

Re: Interrput a thread

2011-01-03 Thread Adam Skutt
On Jan 3, 5:24 pm, Jean-Paul Calderone wrote: > Of course.  The whole point here is not about threads vs processes. > It's about shared memory concurrency vs non-shared memory > concurrency.  You can implement both with threads and both with > processes, but threads are geared towards shared memor

Re: CPython on the Web

2011-01-03 Thread Gerry Reno
On 01/03/2011 05:55 PM, Diez B. Roggisch wrote: > Gerry Reno writes: > > >> On 01/03/2011 03:13 PM, Diez B. Roggisch wrote: >> >>> A fun hack. Have you bothered to compare it to the PyPy javascript >>> backend - perfomance-wise, that is? >>> >>> Diez >>> >>> >> I don't think that

Re: Interrput a thread

2011-01-03 Thread Adam Skutt
On Jan 3, 5:05 pm, gervaz wrote: > Regarding the case pointed out by Adam I think the best way to > deal with it is to create a critical section so that the shared memory > will be updated in an atomic fashion. Ok, so if the OS kills the process between taking the lock and releasing it, what are

Re: Interrput a thread

2011-01-03 Thread Diez B. Roggisch
gervaz writes: > On 3 Gen, 22:17, Adam Skutt wrote: >> On Jan 3, 4:06 pm, Jean-Paul Calderone >> wrote: >> >> >> >> > > Multiple processes, ok, but then regarding processes' interruption >> > > there will be the same problems pointed out by using threads? >> >> > No.  Processes can be terminate

Re: CPython on the Web

2011-01-03 Thread Diez B. Roggisch
Gerry Reno writes: > On 01/03/2011 03:13 PM, Diez B. Roggisch wrote: >> >> A fun hack. Have you bothered to compare it to the PyPy javascript >> backend - perfomance-wise, that is? >> >> Diez >> > > I don't think that exists anymore. Didn't that get removed from PyPy > about 2 years ago? Ah,

SUNLisp 2: Josh vs. Kenny Flamewars Galore!!

2011-01-03 Thread kenny
All they agree on is Common Lisp! Come join the Yobbos of MCNA at the Frog & Toad for booze, vino, and great food and knock down drag out debates galore on everything from Cells to Lisp IDEs: When: Tomorrow Tuesday, at 7pm Where: http://www.thefrogandtoadpub.com/ HK -- http://mail.python.org/ma

Re: Interrput a thread

2011-01-03 Thread Jean-Paul Calderone
On Jan 3, 4:17 pm, Adam Skutt wrote: > On Jan 3, 4:06 pm, Jean-Paul Calderone > wrote: > > > > > > Multiple processes, ok, but then regarding processes' interruption > > > there will be the same problems pointed out by using threads? > > > No.  Processes can be terminated easily on all major plat

Re: Interrput a thread

2011-01-03 Thread gervaz
On 3 Gen, 22:17, Adam Skutt wrote: > On Jan 3, 4:06 pm, Jean-Paul Calderone > wrote: > > > > > > Multiple processes, ok, but then regarding processes' interruption > > > there will be the same problems pointed out by using threads? > > > No.  Processes can be terminated easily on all major platfo

Re: CPython on the Web

2011-01-03 Thread Gerry Reno
On 01/03/2011 03:13 PM, Diez B. Roggisch wrote: > > A fun hack. Have you bothered to compare it to the PyPy javascript > backend - perfomance-wise, that is? > > Diez > I don't think that exists anymore. Didn't that get removed from PyPy about 2 years ago? Regards, Gerry -- http://mail.pyth

Re: Interesting bug

2011-01-03 Thread John Machin
On Jan 2, 12:22 am, Daniel Fetchinson wrote: > An AI bot is playing a trick on us. Yes, it appears that the mystery is solved: Mark V. Shaney is alive and well and living in Bangalore :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: CPython on the Web

2011-01-03 Thread Gerry Reno
On 01/03/2011 03:10 PM, azakai wrote: > On Jan 2, 5:55 pm, Gerry Reno wrote: > >> I tried printing sys.path and here is the output: >> >> ['', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7/', >> '/usr/local/lib/python2.7/plat-linux2', >> '/usr/local/lib/python2.7/lib-tk', '/usr/local

Re: Interrput a thread

2011-01-03 Thread Adam Skutt
On Jan 3, 4:06 pm, Jean-Paul Calderone wrote: > > > Multiple processes, ok, but then regarding processes' interruption > > there will be the same problems pointed out by using threads? > > No.  Processes can be terminated easily on all major platforms.  See > `os.kill`. > Yes, but that's not the

Re: Interrput a thread

2011-01-03 Thread Jean-Paul Calderone
On Jan 3, 3:22 pm, gervaz wrote: > On 3 Gen, 17:47, de...@web.de (Diez B. Roggisch) wrote: > > > > > gervaz writes: > > > On 31 Dic 2010, 23:25, Alice Bevan–McGregor > > > wrote: > > >> On 2010-12-31 10:28:26 -0800, John Nagle said: > > > >> > Even worse, sending control-C to a multi-thread prog

Re: Interrput a thread

2011-01-03 Thread gervaz
On 3 Gen, 17:47, de...@web.de (Diez B. Roggisch) wrote: > gervaz writes: > > On 31 Dic 2010, 23:25, Alice Bevan–McGregor > > wrote: > >> On 2010-12-31 10:28:26 -0800, John Nagle said: > > >> > Even worse, sending control-C to a multi-thread program > >> > is unreliable in CPython.  See "http://bl

Re: CPython on the Web

2011-01-03 Thread Diez B. Roggisch
azakai writes: > Hello, I hope this will be interesting to people here: CPython running > on the web, > > http://syntensity.com/static/python.html > > That isn't a new implementation of Python, but rather CPython 2.7.1, > compiled from C to JavaScript using Emscripten and LLVM. For more > details

Re: CPython on the Web

2011-01-03 Thread azakai
On Jan 2, 5:55 pm, Gerry Reno wrote: > I tried printing sys.path and here is the output: > > ['', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7/', > '/usr/local/lib/python2.7/plat-linux2', > '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', > '/usr/local/lib/lib-dyn

Re: Interrput a thread

2011-01-03 Thread Diez B. Roggisch
gervaz writes: > On 31 Dic 2010, 23:25, Alice Bevan–McGregor > wrote: >> On 2010-12-31 10:28:26 -0800, John Nagle said: >> >> > Even worse, sending control-C to a multi-thread program >> > is unreliable in CPython.  See "http://blip.tv/file/2232410"; >> > for why.  It's painful. >> >> AFIK, that

Re: Is there anyway to run JavaScript in python?

2011-01-03 Thread Diez B. Roggisch
crow writes: > Hi, I'm writing a test tool to simulate Web browser. Is there anyway > to run JavaScript in python? Thanks in advance. Not really. Yes, you can invoke spidermonkey. But the crucial point about running JS is not executing JS, it's about having the *DOM* of the browser available. Wh

Re: String building using join

2011-01-03 Thread Alexander Gattin
Hello, On Sun, Jan 02, 2011 at 10:11:50AM -0800, Alex Willmer wrote: > def prg3(l): > return '\n'.join([str(x) for x in l if x]) just one fix (one fix one fix one fix): return '\n'.join([str(x) for x in l if x is not None]) -- With best regards, xrgtn -- http://mail.python.org/mailman/

Arisingsoft provides the Norton antivirus all in one security suite.

2011-01-03 Thread mani ma
hai, Uses : The package includes a personal firewall, phishing protection and the ability to detect and remove malware. Norton 360 is compatible with 32-bit editions of Windows XP and 32-bit or 64-bit editions of Windows Vista.Windows 7 support has been added. Reviews cited Norton 360's low resour

Re: list 2 dict?

2011-01-03 Thread Glazner
On Jan 2, 3:18 pm, "Octavian Rasnita" wrote: > Hi, > > If I want to create a dictionary from a list, is there a better way than the > long line below? > > l = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b'] > > d = dict(zip([l[x] for x in range(len(l)) if x %2 == 0], [l[x] for x in > range(len(l)) if x %2 ==

A quesstion with matplotlib

2011-01-03 Thread 余亮罡
Dear all, I have a quesstion about change the width of the ylabel.You know the width of the ylabel is relaete to the x axi,how can i change the width of the ylabel not depend on the width of the x-axis? Thank you! George -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: The good, the bad, and the ugly!

2011-01-03 Thread Octavian Rasnita
From: "Hank Fay" Subject: Re: Tkinter: The good, the bad, and the ugly! > That (the desktop app issue) was the big game-change for me. It looks like a > desktop app, it acts like a desktop app, and our enterprise customers would > be delighted to a) have no installs to do for fat clients; or b