Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Steve Hayes
On Sat, 26 Jul 2014 14:40:56 -0400, Dennis Lee Bieber wrote: >On Sat, 26 Jul 2014 19:05:21 +1000, Chris Angelico >declaimed the following: > >>IMO it's an attractive nuisance at best. Make it easy to build >>something simple and flawed, and people will build things that aren't >>simple but are s

What's the difference between gevent.sleep and time.sleep?

2014-07-26 Thread Xiadong Zhu
Hi, I'm learning gevent, but I didn't found the difference with gevent.sleep and time.sleep, does anybody could give me a sample code to show their difference? Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Best place to find sample data

2014-07-26 Thread Nicholas Cannon
Oh the above is quoted here just the bottom line in added in -- https://mail.python.org/mailman/listinfo/python-list

Re: Best place to find sample data

2014-07-26 Thread Nicholas Cannon
On Saturday, July 26, 2014 9:41:11 PM UTC+8, Nicholas Cannon wrote: Also I am having troubles with Numpy and its loadtxt function: > > > > ValueError: cannot set an array element with a sequence I found out why this has occurred because the csv file i was using didnt have a consistent amount

Re: Best place to find sample data

2014-07-26 Thread Denis McMahon
On Sat, 26 Jul 2014 06:41:11 -0700, Nicholas Cannon wrote: > Hey I need some sample data to test out and do stuff with. When I want sample data I usually write a python script to generate it. > Also I am > having strange errors with idle when i load a .txt file read it and then > print it, idle

"Full stack python" should be linked on python.org

2014-07-26 Thread Tymoteusz Jankowski
Hi! Anyone shares my opinion that www.fullstackpython.com should be referenced here or at least here ? What do you think? It's great source for python web newbies (and not only). -- Tymoteusz Jankowski tel. 698 14

Re: Return class.

2014-07-26 Thread Satish ML
Hi, Which lines of code prints [4] and [4, 5, 6, 7] in the output? Output: CARST Trace: display 1 Spam!Spam!Spam!Spam!Spam!Spam!Spam!Spam! [1] Trace: name 1 Bob Trace: pay 2 2000 Trace: name 1 Sue Trace: pay 2 6000 Trace: name 3 Bob Trace: pay 4 2000 [4, 2] INSIDE MyList [1, 2, 3] Trace: appen

Re: Return class.

2014-07-26 Thread Satish ML
Actual program: def Tracer(aClass): class Wrapper: def __init__(self, *args, **kargs): self.fetches = 0 self.wrapped = aClass(*args, **kargs) def __getattr__(self, attrname): print('Trace: ' + attrname) self.fetches += 1

Re: Return class.

2014-07-26 Thread Chris Angelico
On Sun, Jul 27, 2014 at 5:04 AM, Satish ML wrote: > Which line of code is printing [4] and [4, 5, 6, 7] in the output? These lines: > print(x.wrapped) The .wrapped attribute has the wrapped object, so you're printing out the thing that would be in x if you weren't using the decorator. Since tha

Re: Return class.

2014-07-26 Thread Satish ML
Which line of code is printing [4] and [4, 5, 6, 7] in the output? from tracer import Tracer @Tracer class MyList(list): def __init__(self, *args): print("INSIDE MyList") print(*args) x = MyList([1, 2, 3]) x.append(4) print(x.wrapped) WrapList = Tracer(list) x = WrapLis

Re: Return class.

2014-07-26 Thread Satish ML
Which line of code is printing [4] and [4, 5, 6, 7] in the output? from tracer import Tracer @Tracer class MyList(list): def __init__(self, *args): print("INSIDE MyList") print(*args) x = MyList([1, 2, 3]) x.append(4) print(x.wrapped) WrapList = Tracer(list) x = WrapList([4, 5,

Re: Return class.

2014-07-26 Thread Satish ML
Which line of code is printing [4] and [4, 5, 6, 7] in the output? from tracer import Tracer @Tracer class MyList(list): def __init__(self, *args): print("INSIDE MyList") print(*args) x = MyList([1, 2, 3]) x.append(4) print(x.wrapped) WrapList = Tracer(list) x = WrapLis

Re: Return class.

2014-07-26 Thread Chris Angelico
On Sun, Jul 27, 2014 at 4:29 AM, Satish ML wrote: > What does "return Wrapper" do in the following piece of code? Which method > does it invoke? > I mean "return Wrapper" invokes __init__ method? > > def Tracer(aClass): > class Wrapper: > def __init__(self, *args, **kargs): >

Return class.

2014-07-26 Thread Satish ML
Hi, What does "return Wrapper" do in the following piece of code? Which method does it invoke? I mean "return Wrapper" invokes __init__ method? def Tracer(aClass): class Wrapper: def __init__(self, *args, **kargs): self.fetches = 0 self.wrapped = aClass(*args,

Re: Best place to find sample data

2014-07-26 Thread memilanuk
On 07/26/2014 09:57 AM, Irmen de Jong wrote: On 26-7-2014 15:41, Nicholas Cannon wrote: Hey I need some sample data to test out and do stuff with. Also I am having strange errors with idle when i load a .txt file read it and then print it, idle crashes well kind of freezes. Not sure what is wron

Re: Best place to find sample data

2014-07-26 Thread Irmen de Jong
On 26-7-2014 15:41, Nicholas Cannon wrote: > Hey I need some sample data to test out and do stuff with. Also I am having > strange errors with idle when i load a .txt file read it and then print it, > idle crashes well kind of freezes. Not sure what is wrong here. Also I am > having troubles wit

Best place to find sample data

2014-07-26 Thread Nicholas Cannon
Hey I need some sample data to test out and do stuff with. Also I am having strange errors with idle when i load a .txt file read it and then print it, idle crashes well kind of freezes. Not sure what is wrong here. Also I am having troubles with Numpy and its loadtxt function: ValueError: cann

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Steven D'Aprano
On Sat, 26 Jul 2014 10:51:31 +, Sturla Molden wrote: > Martin S wrote: > >> Also if you look at any newbie programmer software, it's flawed. But it >> wouldn't hurt making it easier creating flawed software. Better than >> less software (unless it it's malware) > > Malware is rarely flawed.

Online Python Channel

2014-07-26 Thread Adam Nowak
To whom it may concern We at Eyn2k (Everything you need to know) have dedicated our time to create a free educational channel. Our first subject being Python Programming. Soon excercises will be added, progressing to a graphics calculator and 2D vector collisions. Would it be possible to get a me

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Dietmar Schwertberger
Am 26.07.2014 12:25, schrieb Chris Angelico: The only difference is that you outgrow paper sooner than VB, which means porting is done on a much smaller "code"-base and is less of a problem. Most Excel or VB based tools are never replaced. They are the replacement and final implementation of th

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Sturla Molden
Martin S wrote: > Also if you look at any newbie programmer software, it's flawed. But it > wouldn't hurt making it easier creating flawed software. Better than less > software (unless it it's malware) Malware is rarely flawed. I wish it were, though. -- https://mail.python.org/mailman/listinf

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Martin S
On 26 Jul 2014 12:16, "Dietmar Schwertberger" wrote: > > Am 26.07.2014 11:05, schrieb Chris Angelico: > >> IMO it's an attractive nuisance at best. Make it easy to build >> something simple and flawed, and people will build things that aren't >> simple but are still flawed. Microsoft has done this

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Chris Angelico
On Sat, Jul 26, 2014 at 8:14 PM, Dietmar Schwertberger wrote: > For most software/tools that's good enough. It's better to have this than > having > nothing. > Sure, when you have a look at the VB-created programs, most of them are > flawed, > but still they solve problems. > > Currently, Python i

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Dietmar Schwertberger
Am 26.07.2014 11:05, schrieb Chris Angelico: IMO it's an attractive nuisance at best. Make it easy to build something simple and flawed, and people will build things that aren't simple but are still flawed. Microsoft has done this to the world a For most software/tools that's good enough. It's be

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Chris Angelico
On Sat, Jul 26, 2014 at 5:19 PM, Martin S wrote: > From the newbie point of view, VS is the perfect tool to get people coding. > All the way back to Visual Basic, Microsoft has consistently pushed the ease > of creating applications for Windows as a point of adoption. IMO it's an attractive nuisa

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Martin S
>From the newbie point of view, VS is the perfect tool to get people coding. >All the way back to Visual Basic, Microsoft has consistently pushed the ease >of creating applications for Windows as a point of adoption. Hence Borland Delphi, and the now abandoned Kylix. Pascal has the Lazarus pro

Re: .Net Like Gui Builder for Python?

2014-07-26 Thread Martin S
>From the newbie point of view, VS is the perfect tool to get people coding. >All the way back to Visual Basic, Microsoft has consistently pushed the ease >of creating applications for Windows as a point of adoption. Hence Borland Delphi, and the now abandoned Kylix. Pascal has the Lazarus pro

Re: Prob. Code Downloaded for Programming the Semantic Web (python code)

2014-07-26 Thread Terry Reedy
On 7/25/2014 8:06 PM, Bruce Whealton wrote: The book has python 2.x code. If the modules in the book use the Natural Language Toolkit (nltk), then I believe you are currently stuck with using 2.7. If it does not, and you want to run with 3.3 or 3.4, then use 2to3 to do most to all of the con