Re: [Tutor] Storing passwords and version control

2018-05-27 Thread Steven D'Aprano
On Sun, May 27, 2018 at 09:08:29AM -0700, Pat Martin wrote: > The process I am currently thinking of using is having a separate file with > the username and password in it and just having that ignored by source > control. That of course doesn't solve the problem of the password sitting > in a file

Re: [Tutor] get key value from Redis instance

2018-05-27 Thread Steven D'Aprano
On Sun, May 27, 2018 at 08:31:26PM +0200, Silviu Chiric wrote: > try: > conn = redis.StrictRedis( host=' > redis-15838.c44.us-east-1-2.ec2.cloud.redislabs.com', port=15838, > password='DavidLavinia2') You just shared your password with the entire world. > print (conn) > conn.ping()

Re: [Tutor] get key value from Redis instance

2018-05-27 Thread Alan Gauld via Tutor
On 27/05/18 19:31, Silviu Chiric wrote: > Dear all > > I need to get the value of given key from Redis, or both key and value, the > below code snippet fails always, even the connection is okay Please post the output. You print the error trace but we cant see it. Or if that is the the whole outp

Re: [Tutor] get key value from Redis instance

2018-05-27 Thread Danny Yoo
One other recommendation: remove the try/except block for now. Don't use exception handling. We want to use exception handling if we have any significant recovery logic, or if it's important not to expose program errors to the end user. But your situation doesn't match this. In fact, you want to

Re: [Tutor] get key value from Redis instance

2018-05-27 Thread Danny Yoo
> From a first glance: it looks like one of your print statements is not > vertically aligned with the rest of your print statements, so I would > expect Python to be reporting a SyntaxError because of this misalignment. Substitute the word "vertical" with "horizontal". Sorry: I made yet anoth

Re: [Tutor] get key value from Redis instance

2018-05-27 Thread Danny Yoo
On Sun, May 27, 2018 at 3:02 PM Silviu Chiric wrote: > Dear all > I need to get the value of given key from Redis, or both key and value, the > below code snippet fails always, even the connection is okay What is the error you see? Please also include the error message, verbatim. Computer sys

[Tutor] get key value from Redis instance

2018-05-27 Thread Silviu Chiric
Dear all I need to get the value of given key from Redis, or both key and value, the below code snippet fails always, even the connection is okay StrictRedis>> Connected! My code import redis try: conn = redis.StrictRedis( host=' redis-15838.c44.us-east-1-2.ec2.cloud.redislabs.com', port=15

Re: [Tutor] Storing passwords and version control

2018-05-27 Thread Danny Yoo
The recommendations in https://stackoverflow.com/questions/7014953/i-need-to-securely-store-a-username-and-password-in-python-what-are-my-options might apply. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://m

Re: [Tutor] Storing passwords and version control

2018-05-27 Thread Mats Wichmann
On 05/27/2018 11:08 AM, Alan Gauld via Tutor wrote: > On 27/05/18 17:21, Joel Goldstick wrote: >> On Sun, May 27, 2018 at 12:08 PM, Pat Martin wrote: >>> ... Since it will be a script I will be running >>> through cron I won't be able to type the password > >> You can set environment variables o

Re: [Tutor] Storing passwords and version control

2018-05-27 Thread Alan Gauld via Tutor
On 27/05/18 17:21, Joel Goldstick wrote: > On Sun, May 27, 2018 at 12:08 PM, Pat Martin wrote: >> ... Since it will be a script I will be running >> through cron I won't be able to type the password > You can set environment variables on the system that runs the script. EV was my initial though

Re: [Tutor] Tkinter widget (label) updated by TCP/IP message

2018-05-27 Thread Alan Gauld via Tutor
On 27/05/18 16:18, Alejandro Chirife via Tutor wrote: > > Hi all, I am having a hard time to create what at first looked like a simple > program with Python 3 and Tkinter: > The UI consist of a window with a label and a button.   > The label shows "waiting for a message" and the button shows "res

Re: [Tutor] Storing passwords and version control

2018-05-27 Thread Joel Goldstick
On Sun, May 27, 2018 at 12:08 PM, Pat Martin wrote: > Hello all, > > I am writing a script that will be using an API to connect to some systems > to pull info for a search. Since it will be a script I will be running > through cron I won't be able to type the password at time of running. I > also

[Tutor] Storing passwords and version control

2018-05-27 Thread Pat Martin
Hello all, I am writing a script that will be using an API to connect to some systems to pull info for a search. Since it will be a script I will be running through cron I won't be able to type the password at time of running. I also am going to be putting this in source control, using git specifi

[Tutor] Tkinter widget (label) updated by TCP/IP message

2018-05-27 Thread Alejandro Chirife via Tutor
Hi all, I am having a hard time to create what at first looked like a simple program with Python 3 and Tkinter: The UI consist of a window with a label and a button.   The label shows "waiting for a message" and the button shows "reset display".   The handler for the button click just resets the

Re: [Tutor] Problem importing pandas library

2018-05-27 Thread Mats Wichmann
On 05/27/2018 01:18 AM, Alan Gauld via Tutor wrote: > On 27/05/18 04:43, Bhavna Soni wrote: >> I installed pandas library using pip9. I get errors while importing >> it, Uninstalling and Re-installing won't help. It says DLL load failed >> as window file is not found. The next time I import it says

Re: [Tutor] Problem importing pandas library

2018-05-27 Thread Alan Gauld via Tutor
On 27/05/18 04:43, Bhavna Soni wrote: > I installed pandas library using pip9. I get errors while importing > it, Uninstalling and Re-installing won't help. It says DLL load failed > as window file is not found. The next time I import it says pandas > don't have core attribute, ut core folder is pr

[Tutor] Problem importing pandas library

2018-05-27 Thread Bhavna Soni
I installed pandas library using pip9. I get errors while importing it, Uninstalling and Re-installing won't help. It says DLL load failed as window file is not found. The next time I import it says pandas don't have core attribute, ut core folder is present in the directory. I am using Python 3.6