command

Discord.py mute command

Discord.py mute command Question: So I finished my mute command then I tested it out on one person and it worked. But when it comes to muting to different people it doesn’t. I muted one person for 1 minute and the other person for 10 seconds. Since I did the 1m mute first it did …

Total answers: 2

Print command writing in one line

Print command writing in one line Question: I am learning Python and have a question about the print command. Why in the following case the code with print command works in one line: text = “The vegetables are in the fridge.” print(text.replace(“vegetables”, “fruits”)) but here when I write like this, I get no result ? …

Total answers: 4

How to launch PyCharm from terminal/command prompt

How to launch PyCharm from terminal/command prompt Question: How can I launch PyCharm from terminal / command prompt? I tried charm, charm., pycharm., pycharm. None of these commands work. Is it possible to open/launch PyCharm from a command prompt / terminal ? Asked By: zzob || Source Answers: If you are using ubuntu, go to …

Total answers: 9

A Python script that activates the virtualenv and then runs another Python script?

A Python script that activates the virtualenv and then runs another Python script? Question: On Windows Vista, I need a script that starts the activate (to activate the virtualenv) script in: C:UsersAdminDesktopvenvScripts And later, in the virtual environment, starts to the manage.py runserver in the folder: C:UsersAdminDesktophelloworld How should I do? What modules should I use? …

Total answers: 7

How to split up the command here for using subprocess.Popen()

How to split up the command here for using subprocess.Popen() Question: ip = subprocess.Popen([“/sbin/ifconfig $(/sbin/route | awk ‘/default/ {print $8}’) | grep “inet addr” | awk -F: ‘{print $2}’ | awk ‘{print $1}'”], stdout=subprocess.PIPE) I am not sure where to put the commas to separate them to use this command using subprocess.Popen. Does anyone know? …

Total answers: 3

twistd using usage.options in a *.tac file

twistd using usage.options in a *.tac file Question: I’m writing a server with Twisted that is based on a *.tac file that starts the services and the application. I’d like to get one additional command line argument to specify a yaml configuration file. I’ve tried using usage.Options by building a class that inherits from it, …

Total answers: 1

Python Twisted using argparse module

Python Twisted using argparse module Question: I’m building Python Twisted applications and would like to use the argparse module to parse command line options, instead of the Twisted usage.Options, which seems kind of old school. I’d like to run the app with twistd, and am concerned about argparse interfering with twistd’s command line argument parsing. …

Total answers: 1

Have multiple commands when button is pressed

Have multiple commands when button is pressed Question: I want to run multiple functions when I click a button. For example I want my button to look like self.testButton = Button(self, text = “test”, command = func1(), command = func2()) when I execute this statement I get an error because I cannot allocate something to …

Total answers: 10

Python command not working in command prompt

Python command not working in command prompt Question: When I type python into the command line, the command prompt says python is not recognized as an internal or external command, operable program, or batch file. What should I do? Note: I have Python 2.7 and Python 3.2 installed on my computer. Asked By: Rohit Rayudu …

Total answers: 24