Re: Quirk difference between classes and functions

2019-02-25 Thread Chris Angelico
On Tue, Feb 26, 2019 at 5:06 PM Gregory Ewing wrote: > > Chris Angelico wrote: > > Classes and functions behave differently. Inside a function, a name is > > local if it's ever assigned to; but in a class, this is not the case. > > Actually, it is. Assigning to a name in a class body makes it part

Re: Quirk difference between classes and functions

2019-02-25 Thread Gregory Ewing
Chris Angelico wrote: Classes and functions behave differently. Inside a function, a name is local if it's ever assigned to; but in a class, this is not the case. Actually, it is. Assigning to a name in a class body makes it part of the class namespace, which is the local namespace at the time

Re: Two Tier Cloud Network

2019-02-25 Thread Ben Finney
asimejaz...@gmail.com writes: > I am a beginner in Python, I need your help in Python coding. Welcome! You are in the right place to discuss Python. > I want to create a two-tier cloud network which consists of the > cloudlets and DataCenters, cloudlets and DataCenters have virtual > machines wh

Two Tier Cloud Network

2019-02-25 Thread asimejaz104
I am a beginner in Python, I need your help in Python coding. I want to create a two-tier cloud network which consists of the cloudlets and DataCenters, cloudlets and DataCenters have virtual machines which are attached to each other. Thanks in advance -- https://mail.python.org/mailman/listinf

Re: Encrypting username and password within yaml file

2019-02-25 Thread Chris Angelico
On Tue, Feb 26, 2019 at 2:11 PM Ravindranath Barathy wrote: > > Im trying to create a flask app that can take in a yaml file with the > following values, > > info: > url: http://something.com/api > username: user1 > password: secret > > > This yaml file is then read by the flask app and use

Encrypting username and password within yaml file

2019-02-25 Thread Ravindranath Barathy
Im trying to create a flask app that can take in a yaml file with the following values, info: url: http://something.com/api username: user1 password: secret This yaml file is then read by the flask app and uses the info to interact with the api. Everything works file in dev but, when I w

RE: Connector/Python, MySQL Workbench Issue

2019-02-25 Thread Steve
Check to see if the path was updated. Footnote: Ultrasound Technician Asks Pregnant Woman If She'd Like To Know Baby's Name -Original Message- From: Python-list On Behalf Of Scott Sorgent Sent: Monday, February 25, 2019 8:16 PM To: python-list@python.org Subject: Connector/Python, MySQL

Re: Connector/Python, MySQL Workbench Issue

2019-02-25 Thread DL Neil
Scott, Someone else will be better able to assist - I use Linux. In the mean-time, may I suggest combing-through the MySQL docs for installing on Windows - the suspicion about Administrator cf user remains... Yes, I often find MySQL-Workbench a useful tool when interacting with RDBMSes on re

Re: Connector/Python, MySQL Workbench Issue

2019-02-25 Thread DL Neil
Scott, On 26/02/19 2:15 PM, Scott Sorgent wrote: I was trying to install MySQL Workbench and it asked me to install the Connector/Python 3.7. I installed Python 3.7.2, restarted the computer and tried to install MySQL workbench again and it told me again that I needed to install Connector/P

Connector/Python, MySQL Workbench Issue

2019-02-25 Thread Scott Sorgent
I was trying to install MySQL Workbench and it asked me to install the Connector/Python 3.7. I installed Python 3.7.2, restarted the computer and tried to install MySQL workbench again and it told me again that I needed to install Connector/Python 3.7. I found the download for MySQL Connecto

Re: Best way to (re)load test data in Mongo DB

2019-02-25 Thread Martin Sand Christensen
Nagy László Zsolt writes: > We have a system where we have to create an exact copy of the original > database for testing. The database size is over 800GB. [...] That all sounds pretty cool, but it's precisely the opposite of what I'm trying to acheive: keeping things as simple as possible. Snap

Re: Quirk difference between classes and functions

2019-02-25 Thread Chris Angelico
On Tue, Feb 26, 2019 at 6:58 AM DL Neil wrote: > > On 26/02/19 5:25 AM, ast wrote: > > I noticed a quirk difference between classes and functions > > >>> x=0 > > >>> class Test: > > x = x+1 > > print(x) > > x = x+1 > > print(x) > ... > > > Previous code doesn'

[RELEASE] Python 3.8.0a1 is now available for testing

2019-02-25 Thread Łukasz Langa
I packaged another release. Go get it here: https://www.python.org/downloads/release/python-380a2/ Python 3.8.0a2 is the second of four planned alpha releases of Python 3.8, the next feature release of Python. During the alpha phase, Python 3.8 remains under heavy development: additional features

Re: Quirk difference between classes and functions

2019-02-25 Thread DL Neil
On 26/02/19 5:25 AM, ast wrote: I noticed a quirk difference between classes and functions >>> x=0 >>> class Test:     x = x+1     print(x)     x = x+1     print(x) ... Previous code doesn't generate any errors. x at the right of = in first "x = x+1" line is the global on

Re: How to format a datetime MySQL database field to local using strftime()

2019-02-25 Thread DL Neil
On 26/02/19 7:47 AM, Dennis Lee Bieber wrote: On Mon, 25 Feb 2019 13:00:03 -0500, Dennis Lee Bieber declaimed the following: My apologies for the mis-attribution -- due to spam, I tend to filter out @gmail.com posts (the one flaw with Forte Agent -- it only filters news groups on subje

Quirk difference between classes and functions

2019-02-25 Thread ast
Hello I noticed a quirk difference between classes and functions >>> x=0 >>> >>> class Test: x = x+1 print(x) x = x+1 print(x) 1 2 >>> print(x) 0 Previous code doesn't generate any errors. x at the right of = in first "x = x+1" line is the global one (x=0), then

Re: Dictionary

2019-02-25 Thread ast
Le 24/02/2019 à 05:21, Himanshu Yadav a écrit : fibs={0:0,1:1} def rfib(n): global fibs if not fibs.get(n): fibs[n]=rfib(n-2)+rfib(n-1) return fibs[n] Why it is gives error?? Nothing to do with the malfunction, but you dont need to define fibs as globa