prompt

Can't lauch spyder on new envs

Can't lauch spyder on new envs Question: When i lauch spyder on another env than "base" i get this error : fromIccProfile: failed minimal tag size sanity C:Usersesto5anaconda3envsPIPlibsite-packagesparamikotransport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated "class": algorithms.Blowfish, Traceback (most recent call last): File "C:Usersesto5anaconda3envsPIPScriptsspyder-script.py", line 10, in <module> sys.exit(main()) File "C:Usersesto5anaconda3envsPIPlibsite-packagesspyderappstart.py", line 252, in main mainwindow.main(options, args) …

Total answers: 1

How to put this in a loop

How to put this in a loop Question: I need to put this code in a loop so that you can choose whichever number first and go back to the start after whichever one you choose, but everything I’ve tried hasn’t worked and need help. peoples = { "Mary": { "name": "Mary", "budget": 100, "items": …

Total answers: 1

How do I format text using a variable?

How do I format text using a variable? Question: Basically, I want to be able to ask a question like "What colour do you want?" and then make it so that based on the answer it will set a variable and be usable in formatting. So something like this: print("33[1;35m33[1;4m What colour would you like …

Total answers: 2

click custom option prompt function

click custom option prompt function Question: I have noticed that prompt using click accepts inputs with trailing spaces ftp_server = click.prompt(“FTP Server”) Is there a way to use a custom return function like this to reject trailing spaces? def custom_prompt(value): if value.strip(): return True else: return False ftp_server = click.prompt(“FTP Server”, custom_prompt) I have already …

Total answers: 1

Python + bash prompt: how to print width calculation wrappers?

Python + bash prompt: how to print width calculation wrappers? Question: I wrote a Python script to replace "powerline" as a terminal prompt solution for myself here: https://github.com/diogobaeder/dotfiles/blob/master/.bash_prompt.py Then all I do is to define the prompt from the output of that script: # in my ~/.bashrc export PS1="$(python ~/.bash_prompt.py)" The script itself works fine, …

Total answers: 1

Anaconda / Python: Change Anaconda Prompt User Path

Anaconda / Python: Change Anaconda Prompt User Path Question: I want to change my Anaconda Prompt User file path. Currently it is as follows: I want it to change to: C:Usersu354590 How do I do this? The current version of anaconda I have is: Python 3.6.3 |Anaconda, Inc.| (default, Oct 15 2017, 03:27:45) [MSC v.1900 …

Total answers: 7

Randomly change the prompt in the Python interpreter

Randomly change the prompt in the Python interpreter Question: It’s kind of boring to always see the >>> prompt in Python. What would be the best way to go about randomly changing the prompt prefix? I imagine an interaction like: This is a tobbaconist!>> import sys Sorry?>> import math Sorry?>> print sys.ps1 Sorry? What?>> Asked …

Total answers: 4

Python; User Prompts; choose multiple files

Python; User Prompts; choose multiple files Question: I would like to have my code bring up a window where you can select multiple files within a folder and it assigns these filenames to elements of a list. Currently, I can only select a single file at a time and it assigns the filename to a …

Total answers: 3

Read password from stdin

Read password from stdin Question: Scenario: An interactive CLI Python program, that is in need for a password. That means also, there’s no GUI solution possible. In bash I could get a password read in without re-prompting it on screen via read -s Is there something similar for Python? I.e., password = raw_input(‘Password: ‘, dont_print_statement_back_to_screen) …

Total answers: 2