Skip to content

How do I do the positional parameter in discord.py

This is not working. I totally followed what documentation says, but the bot doesn’t repond to me when I type “!test hello” It should work like this, but mine has nothing respond to me, idk what’s wrong at all This is the original documentation https://discordpy.readthedocs.io/en/lates…

How to correctly read specific csv column

Hey everyone my question is kinda silly but i am new to python) I am writing a python script for c# aplication and i got kinda strange issue when i work with csv document. When i open it it and work with Date column it works fine But when i try to work with another columns it throws error KeyError:

case-insensitive treeview sorting

I am using below code to sort the treeview column but it is case sensitive i.e. if the column value is [a,c,A] the sorted value will be [a,c,A]but i want it as [a,A,c] and even the number sorting is only based on first digit i.e. if [2,1,11] is the column value, the output will be [1,11,2] what i want it

How to use python -c “code here” with newlines?

The command runs the code inside the quotes successfully, both in Linux (bash) and Windows (cmd.exe). But how to pass code with newlines, with python -c? Example: both fail. Example use case: I need to send a SSH command (with paramiko) to execute a short Python code on a remote server, so I need to pass one …

Selenium click on ng-click button

I am trying to automate a website with selenium to download an excel file. I have the following HTML for the button: I have tried clicking on the button with the following find element by class: The error message I get is: I have also tried: And received the following error: I have logged in this website succ…

How to take infinite number of arguments in argparse?

I am making a Python command line tool with argparse that decodes and encodes Morse code. Here is the code: when I type more that one argument after encode or decode it returns this: How will I take more arguments and not just the first word? Answer The shell splits the input into separate strings on space, s…

Python Flask Hosting on Windows 10 IIS server

I Want to Host my Python Rest API on Windows 10 IIS server. First I tried to host a sample application but can not able to that. my_app.py web.config I have tried the below tutorials but it is not working for me. https://medium.com/@rajesh.r6r/deploying-a-python-flask-rest-api-on-iis-d8d9ebf886e9 https://www.…