Re: need some basic help

2015-12-24 Thread Steven D'Aprano
On Thu, 24 Dec 2015 12:53 pm, Qurrat ul Ainy wrote: > Hello, > > Can someone please explain this code below. I am new at Python . > Thanks > > > def receive_messages(self, msgs, time): > for msg in msgs: > msg.set_recv_time(time) > self.msgs_received.extend(msgs) This is

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

2015-12-24 Thread princeudo52
On Saturday, December 12, 2015 at 10:05:29 AM UTC+1, 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: Why doesn't os.remove work on directories?

2015-12-24 Thread Laurent Delacroix
On 23/12/15 05:29, Random832 wrote: > > This is surprising to anyone accustomed to the POSIX C remove > function, which can remove either files or directories. Is there > any known rationale for this decision? > Hello, in POSIX C the remove() function is actually rmdir() when called on a direct

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

2015-12-24 Thread princeudo52
here is what i came up with Class BankAccount(object): def_init_(self, balance): self.Balance = balance def deposit(self, amount): self.Balance = amount def withdraw(self,amount): if(self.Balance += amount): return invalid transaction #but my challange now is :Create a subclass MinimumBalanceAccou

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

2015-12-24 Thread Chris Angelico
On Thu, Dec 24, 2015 at 11:59 PM, wrote: > here is what i came up with > Class BankAccount(object): > def_init_(self, balance): > self.Balance = balance > def deposit(self, amount): > self.Balance = amount > def withdraw(self,amount): > if(self.Balance += amount): > return invalid transaction > #

SSL over TCP Client\server

2015-12-24 Thread Tal Bar-Or
Hi All , I need to write some basic tcp client/server that communicate over SSL Its seems i managed to run the server side listen with SSL but i am missing the client part. If someone could advice me how to saet the client will be appreciated Thanks Server side class SingleTCPHand

Re: need some basic help

2015-12-24 Thread Andrew Farrell
This code snippet is a method on a class. What is a method? This chapter of the book Think Python does a good job of explaining it. Without understanding this foundation, it isn't possible to really answer your question, so definit

Bug in Python 3.5.1

2015-12-24 Thread nisthesecond
Dear Sir, I downloaded and installed Python 3.5.1 in Windows 10. The pip command was not part of it. In the future, can you kindly include numpy, scipy, and pygame as part of the Python release? I am a teacher trying to teach Python to my students. To get a working version of

Command line for silent Install & Uninstall

2015-12-24 Thread White, Dalton
Hi Support I have seen many documents on the internet regarding installs of MSI but I only see the option to download exe's from your website. How can I get the MSI for Python version 3.5.1? I am using ""python-3.5.1rc1-amd64.exe" /passive /uninstall" to uninstall the software but the uninstal

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread Nicky Mac
Hello again.] not sure what you mean by "my profile". following your suggestion, looks normal: C:\Users\Nick> python -c "import importlib; print(importlib.find_loader('idlelib').path)" C:\Python\Python35\lib\idlelib\__init__.pyc A search for idlelib shows this one plus one deep inside OpenOffice

can i subscribe python mailing list?

2015-12-24 Thread 우종민
i want to subscribe mailing list [1][IMG] References Visible links 1. mailto:wjm0...@hanmail.net -- https://mail.python.org/mailman/listinfo/python-list

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread Nicky Mac
Dear python Team I think I've been wasting your time: C:\Users\Nick>path PATH=C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShel

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

2015-12-24 Thread princeudo52
i am getting to believe that no one can provide a solution to this challenge, every-one here is just beating around the bush -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in Python 3.5.1

2015-12-24 Thread Mark Lawrence
On 24/12/2015 00:57, nisthesec...@verizon.net wrote: Dear Sir, I downloaded and installed Python 3.5.1 in Windows 10. The pip command was not part of it. In the future, can you kindly include numpy, scipy, and pygame as part of the Python release? I am a teacher trying to

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

2015-12-24 Thread Chris Angelico
On Fri, Dec 25, 2015 at 1:17 AM, wrote: > i am getting to believe that no one can provide a solution to this challenge, > every-one here is just beating around the bush It's not a question of 'can' but 'will'. We will not provide the answer to your homework question. This has already been expla

Re: Bug in Python 3.5.1

2015-12-24 Thread Cody Piersall
On Wed, Dec 23, 2015 at 6:57 PM, wrote: > Dear Sir, >In the future, can you kindly include numpy, scipy, and pygame as part of >the Python release? >Nick Srinivasan Hello Nick, Any time you want to install a Python package, the first thing you should try is typing "pip install [p

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread eryk sun
On Thu, Dec 24, 2015 at 5:06 AM, Nicky Mac wrote: > > not sure what you mean by "my profile". > following your suggestion, looks normal: I meant your profile directory, "C:\Users\Nick". But printing the package path showed the problem is in your Python 3 installation itself. > C:\Users\Nick> pyt

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

2015-12-24 Thread Joel Goldstick
On Thu, Dec 24, 2015 at 9:39 AM, Chris Angelico wrote: > On Fri, Dec 25, 2015 at 1:17 AM, wrote: > > i am getting to believe that no one can provide a solution to this > challenge, every-one here is just beating around the bush > > It's not a question of 'can' but 'will'. We will not provide th

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

2015-12-24 Thread D'Arcy J.M. Cain
On Thu, 24 Dec 2015 10:47:04 -0500 Joel Goldstick wrote: > Not to be rude, but if your style of methodology for asking for help > is indicative of your general attitude, and interest in learning to > write software, you may be better served to find a new calling. Its > not a good profession for p

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

2015-12-24 Thread Chris Angelico
On Fri, Dec 25, 2015 at 3:14 AM, D'Arcy J.M. Cain wrote: > It reminds me of when one day people started claiming to be "building" > computers and they didn't even own a soldering iron. Hey! Don't judge me just because I use my dad's! :) ChrisA -- https://mail.python.org/mailman/listinfo/python-

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread eryk sun
On Thu, Dec 24, 2015 at 8:52 AM, Nicky Mac wrote: > seems the user profile PATH is a registry entry, and was not updated when I > deinstalled Python2.7 > still haven't figured out how to change it - I will NOT attempy a regedit. I don't use the option to add the installation and Scripts directo

Re: Bug in Python 3.5.1

2015-12-24 Thread Laurent Pointal
Hello, nisthesec...@verizon.net wrote: > Dear Sir, >I downloaded and installed Python 3.5.1 in Windows 10. >The pip command was not part of it. >In the future, can you kindly include numpy, scipy, and pygame as part >of the Python release? >I am a teacher trying to teach P

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread Nicky Mac
what a horrible environment windows is to support anything! (I was a UNIX professional). seems the user profile PATH is a registry entry, and was not updated when I deinstalled Python2.7 still haven't figured out how to change it - I will NOT attempy a regedit. season's greetings On 24 December

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread Nicky Mac
sorry to be such a darned nuisance - fixed the PATH to eliminate Py2.7 references but get same result: C:\Users\Nick>path PATH=C:\Python\Python35\Scripts\;C:\Python\Python35\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;;C:\WINDOWS\system32;C:\WINDO

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

2015-12-24 Thread Grant Edwards
On 2015-12-24, D'Arcy J.M. Cain wrote: > It reminds me of when one day people started claiming to be "building" > computers and they didn't even own a soldering iron. And don't get me started on those people who use those "integrated circuits" instead of transistors, relays, and tubes... -- Gr

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread eryk sun
On Thu, Dec 24, 2015 at 8:52 AM, Nicky Mac wrote: > seems the user profile PATH is a registry entry, and was not updated when I > deinstalled Python2.7 > still haven't figured out how to change it - I will NOT attempy a regedit. As to PATH on Windows, it's split into system and user components,

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread Mark Lawrence
On 24/12/2015 14:52, Nicky Mac wrote: what a horrible environment windows is to support anything! (I was a UNIX professional). seems the user profile PATH is a registry entry, and was not updated when I deinstalled Python2.7 still haven't figured out how to change it - I will NOT attempy a reged

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

2015-12-24 Thread Gene Heskett
On Thursday 24 December 2015 12:30:08 Grant Edwards wrote: > On 2015-12-24, D'Arcy J.M. Cain wrote: > > It reminds me of when one day people started claiming to be > > "building" computers and they didn't even own a soldering iron. > > And don't get me started on those people who use those "integ

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

2015-12-24 Thread D'Arcy J.M. Cain
On Thu, 24 Dec 2015 17:30:08 + (UTC) Grant Edwards wrote: > And don't get me started on those people who use those "integrated > circuits" instead of transistors, relays, and tubes... Mmmm. Tubes. Still use them in my guitar amp. Transistors just aren't the same thing. -- D'Arcy J.M. Cai

Re: need some basic help

2015-12-24 Thread Qurrat ul Ainy
what is snippet ?? On Thursday, December 24, 2015 at 5:25:18 AM UTC+1, Benjamin Kulas wrote: > On Wednesday, December 23, 2015 at 7:53:43 PM UTC-6, Qurrat ul Ainy wrote: > > Hello, > > > > Can someone please explain this code below. I am new at Python . > > Thanks > > > > > > def receive_mes

Python and multiple user access via super cool fancy website

2015-12-24 Thread Aaron Christensen
Hi all, I am not sure if this is the correct venue for my question, but I'd like to submit my question just in case. I am not a programmer but I do have an incredible interest in it, so please excuse my lack of understanding if my question isn't very thorough. As an example, a website backend is

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

2015-12-24 Thread malitician
On Thursday, December 24, 2015 at 3:39:34 PM UTC+1, Chris Angelico wrote: > On Fri, Dec 25, 2015 at 1:17 AM, wrote: > > i am getting to believe that no one can provide a solution to this > > challenge, every-one here is just beating around the bush > > It's not a question of 'can' but 'will'. W

Re: need some basic help

2015-12-24 Thread Qurrat ul Ainy
On Thursday, December 24, 2015 at 8:33:59 PM UTC+1, Qurrat ul Ainy wrote: > what is snippet ?? > > > > On Thursday, December 24, 2015 at 5:25:18 AM UTC+1, Benjamin Kulas wrote: > > On Wednesday, December 23, 2015 at 7:53:43 PM UTC-6, Qurrat ul Ainy wrote: > > > Hello, > > > > > > Can someone pl

Re: Python and multiple user access via super cool fancy website

2015-12-24 Thread Chris Warrick
On 24 December 2015 at 20:39, Aaron Christensen wrote: > Hi all, > > I am not sure if this is the correct venue for my question, but I'd like to > submit my question just in case. I am not a programmer but I do have an > incredible interest in it, so please excuse my lack of understanding if my >

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

2015-12-24 Thread Tim Chase
On 2015-12-24 11:36, malitic...@gmail.com wrote: > it is a homework, but we are to figure out the solution first , all > we need is some guidance please and not to be spoon fed like many > thought Ah, with the intended interface as given by the tests, and the code you've already put together, you

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

2015-12-24 Thread Erik
On 24/12/15 19:36, malitic...@gmail.com wrote: you are right chris it is a homework, but we are to figure out the solution first , all we need is some guidance please and not to be spoon fed like many thought From your response, it seems that this is a homework question that a group of you ar

Re: Python and multiple user access via super cool fancy website

2015-12-24 Thread Tim Chase
On 2015-12-24 14:39, Aaron Christensen wrote: > I am not sure if this is the correct venue for my question, but I'd > like to submit my question just in case. I am not a programmer but > I do have an incredible interest in it, so please excuse my lack of > understanding if my question isn't very t

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread Nicky Mac
wow - a very comprehensive answer. However it seems I have now got it correctly reinstalled with the correct environment and path (as below) So I'm back to my original problem: C:\Users\Nick>python -m idlelib ** IDLE can't import Tkinter. Your Python may not be configured for Tk. ** On doing a r

Idiom for this case?

2015-12-24 Thread KP
Given: cfg = {'c': ('3840', '1024'), 'p1': {'gpio': '1', 'id': '4', 'coord': ('0', '0', '1280', '1024')}, 'p2': {'gpio': '2', 'id': '5', 'coord': ('1280', '0', '2560', '1024')}, 'p3': {'gpio': '3', 'id': '6', 'coord': ('2560', '0', '3840', '1024')}} for config in cfg: i

Is there an idiom for this?

2015-12-24 Thread KP
Given: cfg = {'c': ('3840', '1024'), 'p1': {'gpio': '1', 'id': '4', 'coord': ('0', '0', '1280', '1024')}, 'p2': {'gpio': '2', 'id': '5', 'coord': ('1280', '0', '2560', '1024')}, 'p3': {'gpio': '3', 'id': '6', 'coord': ('2560', '0', '3840', '1024')}} for config in cfg:

Re: need some basic help

2015-12-24 Thread Terry Reedy
On 12/24/2015 2:33 PM, Qurrat ul Ainy wrote: what is snippet ?? Search 'snippet definition' on the web with your browser. It comes from 'snip', so something 'snipped'. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread eryk sun
On Thu, Dec 24, 2015 at 3:29 PM, Nicky Mac wrote: > > C:\Users\Nick>python -m idlelib > ** IDLE can't import Tkinter. > Your Python may not be configured for Tk. ** In the 3.5 installation directory, ensure that tkinter is installed in Lib/tkinter. There should be an "__init__.py" and several oth

Re: Is there an idiom for this?

2015-12-24 Thread Paul Rubin
KP writes: > for config in cfg: > if config != 'c': > print config > > Is there an idiom that combines the 'for...' & the 'if..' lines into one? Maybe you actually want print [config for config in cfg if config != 'c'] That prints all the relevant keys as a list, rather than o

Re: Idiom for this case?

2015-12-24 Thread Ben Finney
KP writes: > Given: > > cfg = {'c': ('3840', '1024'), >'p1': {'gpio': '1', 'id': '4', 'coord': ('0', '0', '1280', '1024')}, >'p2': {'gpio': '2', 'id': '5', 'coord': ('1280', '0', '2560', '1024')}, >'p3': {'gpio': '3', 'id': '6', 'coord': ('2560', '0', '3840', '1024')}} >

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread Terry Reedy
On 12/24/2015 8:59 AM, Nicky Mac wrote: Dear python Team I think I've been wasting your time: C:\Users\Nick>path PATH=C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32

Re: Is there an idiom for this?

2015-12-24 Thread KP
Thanks Paul, you just pointed out one of my blonder moments: I actually want all nested dicts one by one, but not the one with the 'c' key... On Thursday, 24 December 2015 14:15:45 UTC-8, Paul Rubin wrote: > KP writes: > > for config in cfg: > > if config != 'c': > > print confi

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread Terry Reedy
On 12/24/2015 9:59 AM, eryk sun wrote: On Thu, Dec 24, 2015 at 5:06 AM, Nicky Mac wrote: not sure what you mean by "my profile". following your suggestion, looks normal: I meant your profile directory, "C:\Users\Nick". But printing the package path showed the problem is in your Python 3 inst

Re: Idiom for this case?

2015-12-24 Thread Terry Reedy
On 12/24/2015 5:04 PM, KP wrote: Given: cfg = {'c': ('3840', '1024'), 'p1': {'gpio': '1', 'id': '4', 'coord': ('0', '0', '1280', '1024')}, 'p2': {'gpio': '2', 'id': '5', 'coord': ('1280', '0', '2560', '1024')}, 'p3': {'gpio': '3', 'id': '6', 'coord': ('2560', '0', '3840'

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread eryk sun
On Thu, Dec 24, 2015 at 4:33 PM, Terry Reedy wrote: >> somehow the new py3.5 has been added to the end, not the beginning. >> guess this path is what you meant by "my profile". > > Bizarre. I just installed 3.5.1 on top of 3.5.1rc1, on Win10 with the 64bit > .exe installer, and the 3.5 dirs are a

Re: unable to open IDLE for Python3.50rc1 on windows10 64bit AMD

2015-12-24 Thread eryk sun
On Thu, Dec 24, 2015 at 4:45 PM, Terry Reedy wrote: > >> This file should not exist. Python 3 stores .pyc files in a >> __pycache__ subdirectory. It won't even run "idlelib\__init__.pyc" if >> "idlelib\__init__.py" exists, so your installation is incomplete and >> damaged. I suggest that you unins

Re: can i subscribe python mailing list?

2015-12-24 Thread Cameron Simpson
On 24Dec2015 22:22, 우종민 wrote: i want to subscribe mailing list [1][IMG] You can do that here: https://mail.python.org/mailman/listinfo/python-list Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and multiple user access via super cool fancy website

2015-12-24 Thread Jason Friedman
> I am not sure if this is the correct venue for my question, but I'd like to > submit my question just in case. I am not a programmer but I do have an > incredible interest in it, so please excuse my lack of understanding if my > question isn't very thorough. > > As an example, a website backend