Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: vlc module error
Post: vlc module error

Getting this error when i run the program below I am trying to play a youtube video: AttributeError: module 'vlc' has no attribute 'Instance'. How do I fix this? import datetime import webbrowser imp...
pythonprogrammer General Coding Help 1 2,820 Apr-23-2020, 01:03 AM
    Thread: Taking brackets out of list in print statement
Post: Taking brackets out of list in print statement

How do I take brackets out of multiple lists in a print statement. Say I have the following lists of numbers: j = [2,5] k = [4,6] e = [7,8] r = [9,1]How would I print "The numbers you have selected a...
pythonprogrammer General Coding Help 3 2,340 Apr-13-2020, 01:25 AM
    Thread: Trying to get help with checkbuttons
Post: Trying to get help with checkbuttons

in the following code below it prints out 1s when i hit the submit button for the boxes that are checked off and 0s for boxes that are not checked off. I have a Yahtzee game and the same code below is...
pythonprogrammer GUI 1 1,688 Mar-24-2020, 12:09 AM
    Thread: need help with xpath
Post: need help with xpath

<p class='drug-subtitle'><b>Generic Name:</b> ziprasidone (zi PRAY si done)<br><b>Brand Names:</b> <i>Geodon</i></p> i am trying to figure out wh...
pythonprogrammer Web Scraping & Web Development 1 2,732 Jan-18-2020, 08:23 PM
    Thread: Need tkinter help with clicking buttons
Post: Need tkinter help with clicking buttons

In the code below I have images of 3 dice (1,2,3) randomly selected and I have the on_click method in place to change the background to red for that die whenever the button for that die is clicked. Ho...
pythonprogrammer GUI 2 2,402 Dec-30-2019, 05:02 AM
    Thread: tkinter canvas help
Post: RE: tkinter canvas help

What I'm trying to do here is create a Yahtzee game and use buttons to chart the score on the canvas after each button is clicked. When I try and click on ones to use the chart ones method I'm getting...
pythonprogrammer GUI 5 3,270 Dec-23-2019, 03:27 AM
    Thread: tkinter canvas help
Post: tkinter canvas help

Trying to get some help with Tkinter canvas. In the code below in the def chartones() method I am trying to figure out how to access the canvas I have created in the class score above. I want to be ab...
pythonprogrammer GUI 5 3,270 Dec-22-2019, 03:17 AM
    Thread: Restoring Tkinter widget background to original color
Post: Restoring Tkinter widget background to original co...

I am trying to restore the widget background back to it's original color if the button is clicked again for the 5 buttons listed below as btn1,btn2,btn3,btn4,btn5. The first time the buttons are click...
pythonprogrammer GUI 1 2,913 Dec-16-2019, 01:46 AM
    Thread: Question
Post: RE: Question

ok thanks for your help
pythonprogrammer General Coding Help 2 1,591 Oct-02-2019, 01:59 AM
    Thread: Question
Post: Question

Card = collections.namedtuple('Card',['rank','suit']) class FrenchDeck: ranks = [str(n) for n in range(2,11)] + list('JQKA') suits = 'spades diamonds clubs hearts'.split() def __init__(s...
pythonprogrammer General Coding Help 2 1,591 Oct-02-2019, 12:09 AM
    Thread: rjust part of a string
Post: rjust part of a string

I am trying to use the rjust method to align part of a string in the following text: for key in breakfast: print('%s \t %d calories'%(key,breakfast[key])) I want to rjust the %d calori...
pythonprogrammer General Coding Help 2 2,023 Sep-16-2019, 11:29 PM
    Thread: Trying to prompt user for 2 inputs on one line
Post: Trying to prompt user for 2 inputs on one line

I am trying to see if I can prompt the user for two inputs at once. The code below will prompt the user for the food first and then after that is entered another prompt will appear asking the user to ...
pythonprogrammer General Coding Help 2 2,459 Sep-15-2019, 02:50 PM
    Thread: Why is ordertotal returning zero in my code?
Post: Why is ordertotal returning zero in my code?

I am trying to use a variable ordertotal to compute the total of an order with tax included in the code below. In the last line of my code I am trying to figure out why the ordertotal variable returns...
pythonprogrammer General Coding Help 1 1,449 Sep-02-2019, 12:56 AM
    Thread: How do I sum instance attributes?
Post: RE: How do I sum instance attributes?

class Player: def __init__(self,player,pos,salary,age): self.player = player self.pos = pos self.salary = salary self.age = age Player1 = Player('John Smith','R...
pythonprogrammer General Coding Help 9 6,990 Jul-18-2019, 12:20 AM
    Thread: How do I sum instance attributes?
Post: RE: How do I sum instance attributes?

Thanks I appreciate it! Is there an easier way to to put the instances in a list without having to append each instance one at a time? I have a lot of instances of this class.
pythonprogrammer General Coding Help 9 6,990 Jul-17-2019, 01:23 AM
    Thread: How do I sum instance attributes?
Post: RE: How do I sum instance attributes?

class Player: def __init__(self,player,pos,salary,age): self.player = player self.pos = pos self.salary = salary self.age = age
pythonprogrammer General Coding Help 9 6,990 Jul-16-2019, 11:17 PM
    Thread: How do I sum instance attributes?
Post: How do I sum instance attributes?

Say I have a bunch of instances of a class and one of the attributes below is the salary for every player. How would I calculate the sum of the salary for all players every time an instance is created...
pythonprogrammer General Coding Help 9 6,990 Jul-16-2019, 03:33 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020