User Profile

Collapse

Profile Sidebar

Collapse
Derbylad
Derbylad
Last Activity: May 27 '10, 02:30 PM
Joined: May 7 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Derbylad
    started a topic How to create a menu using pyqt?

    How to create a menu using pyqt?

    Hi does anyone know of any tutorials on PyQt to do with the basics of a branched menu. I'm after an overall design so that the main menu would include buttons linking to new windows enabling the user to perform a few routine tasks.
    See more | Go to post

  • Derbylad
    started a topic List indices must be integers, not str

    List indices must be integers, not str

    Right I'm having a spot of trouble with integer and string values when reading from a '.txt' file.

    The aim is for the programme to read in from a file containing code similar to this...
    A;Ed;Young;e.yo ung@msn.com;223 376;1;0;1;0



    When running I receive this error code...

    Code:
    TypeError                                 Traceback (most recent call last)
    
    C:\Users\Anon\Programming Coursework
    ...
    See more | Go to post

  • Derbylad
    replied to How to delete strings from a list
    Thank you again for a hasty response.

    I've just tested the first code and this works perfectly.
    I was unsure about the second method though...
    Code:
    #
    #     or
        for ctr, memb_class in enumerate(l):
            print("checking names", memb_class.forename, forename)
            if memb_class.forename == forename:
                del l[ctr]
                break
    If you could just explain...
    See more | Go to post

    Leave a comment:


  • Derbylad
    replied to How to delete strings from a list
    Thanks for the reply.

    Ideally in the "new_player function" I want to add a set of objects to the class and move away from the list of attributes. We've only just touched on classes and objects so I'm still pretty new to it.

    The same goes for the delete function. Ideally I want the function to be able to input a specific object i.e. (First Name + Surname or a Unique I.D), and then delete all objects relating to...
    See more | Go to post

    Leave a comment:


  • Derbylad
    started a topic How to delete strings from a list

    How to delete strings from a list

    Right I've come across another problem in my coursework and cant seem to find anything similar in my lecture notes.
    The aim of the definition is to delete a string (i.e. an entire player) from a list (i.e. my list of members) based upon search criteria, such as the players name.

    So far i've only ever deleted single elements from a list not whole strings.
    Here's what i've got so far... My code for deleting a player is...
    See more | Go to post

  • Derbylad
    replied to List index out of range
    Thanks for the quick responses guys, Turned out there was an extra new line at the end of the data code.
    Much appreciated.
    See more | Go to post

    Leave a comment:


  • Derbylad
    started a topic List index out of range

    List index out of range

    After starting my coursework I've come across the following error code... "List index out of range". I was expecting this to be something very simple that I've done wrong and still imagine it will be seeing as I've written code similar to this before.

    The code is designed to turn a list of players/members into separate strings. The code is shown below...

    Code:
    class Member(object):
    	'''a member'''
    ...
    See more | Go to post
No activity results to display
Show More
Working...