Re: Which Python editor has this feature?

2016-01-11 Thread Terry Reedy
On 1/11/2016 8:51 PM, jf...@ms4.hinet.net wrote: Terry Reedy at 2016/1/12 UTC+8 5:22:35AM wrote: IDLE has an optional 'code context' feature that shows header lines that have scrolled up off the top of the screen. This would let you see which class you are in, Thanks, Terry. It's just what I

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-11 Thread mrkimanindegwa
On Saturday, December 12, 2015 at 12:05:29 PM UTC+3, Harbey Leke wrote: > Create a class called BankAccount > > .Create a constructor that takes in an integer and assigns this to a > `balance` property. > > .Create a method called `deposit` that takes in cash deposit amount and > updates the ba

Re: I'm missing something here...

2016-01-11 Thread Cameron Simpson
On 11Jan2016 23:55, Erik wrote: On 11/01/16 23:26, Skip Montanaro wrote: If I change the last line of find_problems to call prob_dates.update(), the message disappears. Why is pylint (1.4.2 BTW) complaining that the prob_dates argument of find_problems is unused when I use the |= operator? Is

Re: OT: There are no words for how broken everything is

2016-01-11 Thread Rick Johnson
On Monday, January 11, 2016 at 10:26:40 PM UTC-6, Steven D'Aprano wrote: > [...] > Took me three weeks to remove the last of the malware, and another two weeks > to track down the cause of an annoying glitch where every 30 seconds the PC > would freeze up for a fraction of a second. It was one of

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-11 Thread ifeanyioprah
How do I use hack to move to the next question -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-11 Thread ifeanyioprah
How do I use hack to move to the next question -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-11 Thread ifeanyioprah
How do I use hack to move to the next question -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-11 Thread ifeanyioprah
Please how did you back it to move over to the next question pls need your help -- https://mail.python.org/mailman/listinfo/python-list

OT: There are no words for how broken everything is

2016-01-11 Thread Steven D'Aprano
There are no words to explain just how broken everything is. This post tries: https://medium.com/message/everything-is-broken-81e5f33a24e1 but barely covers even a fraction of the breakage. Thanks goodness for anti-virus, right? One of the leading anti-virus vendors in the world, TrendMicro, h

Re: How to remove item from heap efficiently?

2016-01-11 Thread Paul Rubin
srinivas devaki writes: > I googled about "timing wheels" and "Linux kernel scheduler" Sorry, correct term was "timer wheel" rather than "timing wheel". http://www.elinux.org/Kernel_Timer_Systems has some links. The Erlang BEAM internal scheduler works the same way, iirc. -- https://mail.pyth

Re: How to remove item from heap efficiently?

2016-01-11 Thread srinivas devaki
On Jan 10, 2016 12:05 AM, "Paul Rubin" wrote: > > You could look up "timing wheels" for a simpler practical approach that > the Linux kernel scheduler used to use (I think it changed a few years > ago). this is not related to OP's topic I googled about "timing wheels" and "Linux kernel scheduler

Re: How to remove item from heap efficiently?

2016-01-11 Thread Cem Karan
On Jan 11, 2016, at 9:53 AM, srinivas devaki wrote: > On Jan 11, 2016 12:18 AM, "Sven R. Kunze" wrote: >> Indeed. I already do the sweep method as you suggested. ;) >> >> Additionally, you provided me with a reasonable condition when to do the > sweep in order to achieve O(log n). Thanks much

Re: Which Python editor has this feature?

2016-01-11 Thread jfong
Terry Reedy at 2016/1/12 UTC+8 5:22:35AM wrote: > IDLE has an optional 'code context' feature that shows header lines that > have scrolled up off the top of the screen. This would let you see > which class you are in, Thanks, Terry. It's just what I am looking for:-) By the way, do you know how

Re: When I need classes?

2016-01-11 Thread Chris Angelico
On Tue, Jan 12, 2016 at 11:53 AM, Bernardo Sulzbach wrote: > On Mon, Jan 11, 2016 at 9:45 PM, Travis Griggs wrote: >> >>> On Jan 10, 2016, at 9:48 AM, Bernardo Sulzbach >>> wrote: >>> >>> Essentially, classes (as modules) are used mainly for organizational >>> purposes. >>> >>> Although you ca

Re: Understanding " 'xml.etree.ElementTree.Element' does not support the buffer interface"

2016-01-11 Thread Steven D'Aprano
On Tue, 12 Jan 2016 08:54 am, Saran Ahluwalia wrote: > Hi Steven: > > Just as an update - apparently there were bytes in the Windows Command > Terminal that were interrupting the process execution. I didn't realize > this was happening until I dug around Windows' Q&A forum. Thanks for letting us

Re: Which Python editor has this feature?

2016-01-11 Thread Chris Angelico
On Tue, Jan 12, 2016 at 11:55 AM, Bernardo Sulzbach wrote: > On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico wrote: >> >> Next IDLE feature request: Can you make it so that, across all >> platforms, it magically installs PostgreSQL and psycopg2? That would >> solve so many of my students' proble

Re: I'm missing something here...

2016-01-11 Thread Skip Montanaro
Sorry, I should have been explicit. prob_dates (the actual argument of the call) is a set. As far as I know pylint does no type inference, so pylint can't tell if the LHS and RHS of the |= operator are appropriate, nor can it tell if it has an update() method. Before writing, I had more-or-less co

Re: Which Python editor has this feature?

2016-01-11 Thread Bernardo Sulzbach
On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico wrote: > > Next IDLE feature request: Can you make it so that, across all > platforms, it magically installs PostgreSQL and psycopg2? That would > solve so many of my students' problems... > Wouldn't this make the installer much bigger? -- Bernar

Re: When I need classes?

2016-01-11 Thread Bernardo Sulzbach
On Mon, Jan 11, 2016 at 9:45 PM, Travis Griggs wrote: > >> On Jan 10, 2016, at 9:48 AM, Bernardo Sulzbach >> wrote: >> >> Essentially, classes (as modules) are used mainly for organizational >> purposes. >> >> Although you can solve any problem you would solve using classes >> without classes,

Re: I'm missing something here...

2016-01-11 Thread Terry Reedy
On 1/11/2016 6:26 PM, Skip Montanaro wrote: Here's a dumb little bit of code, adapted from a slightly larger script: #!/usr/bin/env python "dummy" import glob import os def compare_prices(*_args): "dummy" return set() def find_problems(cx1, cx2, cx3, prob_dates): "dummy"

Re: I'm missing something here...

2016-01-11 Thread sohcahtoa82
On Monday, January 11, 2016 at 3:27:21 PM UTC-8, Skip Montanaro wrote: > Here's a dumb little bit of code, adapted from a slightly larger script: > > #!/usr/bin/env python > > "dummy" > > import glob > import os > > def compare_prices(*_args): > "dummy" > return set() > > def find_prob

Re: Which Python editor has this feature?

2016-01-11 Thread Chris Angelico
On Tue, Jan 12, 2016 at 8:21 AM, Terry Reedy wrote: > > The context is currently read-only. Clicking on context lines does nothing. > As a result of this thread, I am thinking that clicking on a context line > should scroll up the main text window to display that line at the top (and > remove tha

Re: When I need classes?

2016-01-11 Thread Michael Torrie
On 01/11/2016 04:45 PM, Travis Griggs wrote: > As a long term OO purist practitioner, I would add to this. > Obviously, you can organize your code any way you want, with or > without classes. You could put all your functions with an odd number > of letters in one class, and all of the even numbered

Re: I'm missing something here...

2016-01-11 Thread Erik
On 11/01/16 23:26, Skip Montanaro wrote: If I change the last line of find_problems to call prob_dates.update(), the message disappears. Why is pylint (1.4.2 BTW) complaining that the prob_dates argument of find_problems is unused when I use the |= operator? Is it complaining about that, or is

Re: When I need classes?

2016-01-11 Thread Travis Griggs
> On Jan 10, 2016, at 9:48 AM, Bernardo Sulzbach > wrote: > > Essentially, classes (as modules) are used mainly for organizational purposes. > > Although you can solve any problem you would solve using classes > without classes, solutions to some big problems may be cheaper and > more feasible

I'm missing something here...

2016-01-11 Thread Skip Montanaro
Here's a dumb little bit of code, adapted from a slightly larger script: #!/usr/bin/env python "dummy" import glob import os def compare_prices(*_args): "dummy" return set() def find_problems(cx1, cx2, cx3, prob_dates): "dummy" for fff in sorted(glob.glob("/path/to/*.nrm")):

Confused by python-dbus weird behavior

2016-01-11 Thread Travis Griggs
This may not be a great list for this question (which would be?); it’s a big group, and I’m hoping there’s some people here that cross into these same areas. I’m new to dbus, it seems it’s a sort of CORBA for the Linux world. :) Python seems to be a popular way to interact with it. I’m trying to

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-11 Thread homiemusa
On Tuesday, December 29, 2015 at 1:30:18 AM UTC+3, Cameron Simpson wrote: > On 28Dec2015 01:34, Prince Udoka wrote: > >bu i have come up with a solution, that will work but encounter a problem in > >the set, giving set not manipulated correctly: > > > >def manipulate_data(kind, data): > >if k

Re: Understanding " 'xml.etree.ElementTree.Element' does not support the buffer interface"

2016-01-11 Thread Saran Ahluwalia
Hi Steven: Just as an update - apparently there were bytes in the Windows Command Terminal that were interrupting the process execution. I didn't realize this was happening until I dug around Windows' Q&A forum. Cheers On Sun, Jan 10, 2016 at 12:53 PM, Saran Ahluwalia < ahlusar.ahluwa...@gmail.c

Re: python

2016-01-11 Thread Terry Reedy
On 1/11/2016 2:17 PM, Sean Melville wrote: I've downloaded python 3.5.1 but when I try and open it You need to be more specific. (Is 'it' the python installer or python program?) 1. What version of Windows, including 32/64 bit. For pre-10, service packs matter (you should have the latest

Re: python

2016-01-11 Thread Thomas 'PointedEars' Lahn
Sean Melville wrote: >> On 11 Jan 2016, at 20:33, Cameron Simpson wrote: >>> On 11Jan2016 19:17, Sean Melville wrote: >>> I've downloaded python 3.5.1 but when I try and open it always says that >>> I have to either uninstall it, repair it or modify it. However, I've >>> tried all of them and it

Re: Need help on a project To :"Create a class called BankAccount with the following parameters "

2016-01-11 Thread homiemusa
On Monday, December 28, 2015 at 12:39:41 PM UTC+3, Won Chang wrote: > def manipulate_data(kind, data): > if kind == 'list': > return list(data)[::-1] > elif kind == 'set': > return set(data) > elif kind == 'dictionary': > return dict.keys(data) > manipulate_

Re: Which Python editor has this feature?

2016-01-11 Thread Terry Reedy
On 1/11/2016 6:04 AM, jf...@ms4.hinet.net wrote: I am studying the PyUSB package now as the learning object of how to write a Python program in a "formal" way. In those modules, there are many comment inserted between codes to explain what it does. It's good to the user comprehension, but also e

Re: python

2016-01-11 Thread Sean Melville
I don't believe it's xp, it's a new laptop > On 11 Jan 2016, at 20:33, Cameron Simpson wrote: > >> On 11Jan2016 19:17, Sean Melville wrote: >> I've downloaded python 3.5.1 but when I try and open it always says that I >> have to either uninstall it, repair it or modify it. However, I've trie

Re: python

2016-01-11 Thread Cameron Simpson
On 11Jan2016 19:17, Sean Melville wrote: I've downloaded python 3.5.1 but when I try and open it always says that I have to either uninstall it, repair it or modify it. However, I've tried all of them and it still doesn't work. On what operating system are you trying to install it? If you are

python

2016-01-11 Thread Sean Melville
Hello, I've downloaded python 3.5.1 but when I try and open it always says that I have to either uninstall it, repair it or modify it. However, I've tried all of them and it still doesn't work. >From Callum -- https://mail.python.org/mailman/listinfo/python-list

Re: Python installation in windows

2016-01-11 Thread Cameron Simpson
On 11Jan2016 07:19, rusi wrote: On Monday, January 11, 2016 at 6:32:14 PM UTC+5:30, navneet bhatele wrote: I have been trying to install the "python-3.5.1-amd64-webinstall " many times and the Set up failed is shown up with named 0*80070002 - file doesn't exist in dialog box Which windows?

Re: licenses

2016-01-11 Thread Grant Edwards
On 2016-01-10, Cody Piersall wrote: > It's never a bad idea to consult a lawyer. Since you work for GE, I would > imagine there is an army of lawyers That is udoubtedly true. > happy to answer this question Whether you can actually get an answer out of any of them within before the expiry of

Re: Python installation in windows

2016-01-11 Thread Rustom Mody
On Monday, January 11, 2016 at 6:32:14 PM UTC+5:30, navneet bhatele wrote: > I have been trying to install the "python-3.5.1-amd64-webinstall " many > times and the Set up failed is shown up with named 0*80070002 - file > doesn't exist in dialog box Which windows? XP and 3.5 are not compatible F

Re: How to remove item from heap efficiently?

2016-01-11 Thread srinivas devaki
On Jan 11, 2016 12:18 AM, "Sven R. Kunze" wrote: > Indeed. I already do the sweep method as you suggested. ;) > > Additionally, you provided me with a reasonable condition when to do the sweep in order to achieve O(log n). Thanks much for that. I currently used a time-bases approached (sweep each

Re: Continously opening modify setup

2016-01-11 Thread Bernardo Sulzbach
This seems to be an issue with your PyCharm installation, not with Python itself. Also, this looks a lot like malware to me. If you are sure it is not a problem with your (almost certainly Windows) machine, consider contacting JetBrains. -- https://mail.python.org/mailman/listinfo/python-list

Re: can't decompress data; zlib not available

2016-01-11 Thread Alister
On 11/01/16 13:24, loial wrote: I am migrating a python script from Red hat linux REL 6.6 to AIX 7.1 I am using python 2.7.10 On AIX I the ror zipimport.ZipImportError: can't decompress data; zlib not available Any ideas how to get this to work on AIX? install the zlib library's (these ar

RE: licenses

2016-01-11 Thread Martinez, Jorge Alberto (GE Aviation)
Thank you very much for your reply. Best Regards From: Cody Piersall [mailto:cody.piers...@gmail.com] Sent: Sunday, January 10, 2016 1:43 PM To: python-list@python.org Cc: Martinez, Jorge Alberto (GE Aviation) Subject: Re: licenses On Fri, Jan 8, 2016 at 1:41 PM, Martinez, Jorge Alberto (GE Avi

can't decompress data; zlib not available

2016-01-11 Thread loial
I am migrating a python script from Red hat linux REL 6.6 to AIX 7.1 I am using python 2.7.10 On AIX I the ror zipimport.ZipImportError: can't decompress data; zlib not available Any ideas how to get this to work on AIX? -- https://mail.python.org/mailman/listinfo/python-list

RE: Python 3.4.4 Install

2016-01-11 Thread Emanuel Barry
> Date: Sat, 9 Jan 2016 14:25:40 -0800 > Subject: Python 3.4.4 Install > From: cjwilliam...@gmail.com > To: python-list@python.org > > The reponse is not understood. Which response? Obviously Python's, but response to what? More context would be useful. > *** Python 3.4.4rc1 (v3.4.4rc1:04f3f72589

Continously opening modify setup

2016-01-11 Thread Lucifer onetwothree
When ever i open pycharm there is a pop-up opening continously with modify,repair,unistall options in it.even I've installed python correctly and specified path correctly. Please help me to sort this out. -- https://mail.python.org/mailman/listinfo/python-list

Python installation in windows

2016-01-11 Thread navneet bhatele
I have been trying to install the "python-3.5.1-amd64-webinstall " many times and the Set up failed is shown up with named 0*80070002 - file doesn't exist in dialog box -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.4.4 Install

2016-01-11 Thread Colin W .
Steven D'Aprano pearwood.info> writes: > > On Sun, 10 Jan 2016 09:25 am, Colin J. Williams wrote: > > > The reponse is not understood. > > > > *** Python 3.4.4rc1 (v3.4.4rc1:04f3f725896c, Dec 6 2015, 17:06:10) [MSC > > v.1600 64 bit (AMD64)] on win32. *** > File "C:\Users\Adm\AppData\R

Re: Which Python editor has this feature?

2016-01-11 Thread Frank Haun
On Sun, 10 Jan 2016 19:49:47 -0800 (PST), Rustom Mody wrote: > On Monday, January 11, 2016 at 7:30:10 AM UTC+5:30, jf...@ms4.hinet.net wrote: >> It lets you jump between the current cursor position and the line the >> upper level indentation start, something like the bracket matching in >> C edito

Re: Which Python editor has this feature?

2016-01-11 Thread Tim Chase
On 2016-01-11 03:08, jf...@ms4.hinet.net wrote: > Tim Chase at 2016/1/11 UTC+8 11:16:27AM wrote: > > :nnoremap Q '?^'.repeat(' ', > > (strlen(substitute(getline('.'), '\S.*', '', > > ''))-&sw)).'\S?e'."\" > > But, but... this line??? won't it goes too far for a human being to > read? Yes, it's

Re: Which Python editor has this feature?

2016-01-11 Thread jfong
Gordon Levi at 2016/1/11 UTC+8 4:41:20PM wrote: > Jetbrains Pycharm has "go to start of block" and "go to end of block" > commands . Thanks, Gordon. But this seems only jump between the current code block's start and end, not to the code one level above:-( --J

Re: Which Python editor has this feature?

2016-01-11 Thread jfong
Tim Chase at 2016/1/11 UTC+8 11:16:27AM wrote: > On 2016-01-10 17:59, jf...@ms4.hinet.net wrote: > > It lets you jump between the current cursor position and the line > > the upper level indentation start, something like the bracket > > matching in C editor. Because of Python use indentation as its

Re: Which Python editor has this feature?

2016-01-11 Thread jfong
Chris Angelico at 2016/1/11 UTC+8 10:59:47AM wrote: > On Mon, Jan 11, 2016 at 12:59 PM, wrote: > > It lets you jump between the current cursor position and the line the upper > > level indentation start, something like the bracket matching in C editor. > > Because of Python use indentation as

Re: Fwd: python unit test framework sample code

2016-01-11 Thread Ganesh Pal
Totally stuck with this On Jan 10, 2016 7:11 PM, "Ganesh Pal" wrote: > Apologies, looks like I did a reply instead of reply-all. So > forwarding this email , please provide guidance on the same > > -- Forwarded message -- > From: Ganesh Pal > Date: Thu, Jan 7, 2016 at 12:26 PM >

looking for windows testers

2016-01-11 Thread Ulli Horlacher
I have written a Python client for F*EX(*). It is designed for Windows users, though it runs on UNIX, too. I am now looking for testers. If you are interested, I will give you an account on my server. (*) Frams' Fast File EXchange is a service to send files of any size to any user anywhere in

Re: Which Python editor has this feature?

2016-01-11 Thread Gordon Levi
jf...@ms4.hinet.net wrote: >It lets you jump between the current cursor position and the line the upper >level indentation start, something like the bracket matching in C editor. >Because of Python use indentation as its code block mark, It might be helpful >if we can jump between different lev

Re: Strange crash while running a script with a embedded python interpreter

2016-01-11 Thread Chris Angelico
On Mon, Jan 11, 2016 at 6:55 PM, Rickard Englund wrote: > On Friday, January 8, 2016 at 11:28:53 PM UTC+1, Michael Torrie wrote: >> On 01/08/2016 09:18 AM, Rickard Englund wrote: >> > First, some system info >> > * Windows 7 (also tested on 8 and 10) >> > * Python 3.5.1 64bit (previously also test

Re: Strange crash while running a script with a embedded python interpreter

2016-01-11 Thread Rickard Englund
On Friday, January 8, 2016 at 11:28:53 PM UTC+1, Michael Torrie wrote: > On 01/08/2016 09:18 AM, Rickard Englund wrote: > > First, some system info > > * Windows 7 (also tested on 8 and 10) > > * Python 3.5.1 64bit (previously also tested using several 3.x versions) > > (also tested with 32 bit,