15,181 Topics

Member Avatar for
Member Avatar for docaholic

how would you sort a class object? say..you have a card class, and in the card class, you can have the suits and face value of a card. how would you sort the cards by face values? (smallest to biggest?) thanks

Member Avatar for docaholic
0
159
Member Avatar for raymarquise

Hi, I know nothing about compiling a program, but I desperately need a program that is written in python. I installed python and tried to compile it, but got errors. If someone would be kind enough to compile it for me and sent it to my email address, I would …

Member Avatar for vegaseat
0
124
Member Avatar for FreezeBlink

I'm currently working on an application to which sound integration is important. Currently I'm using winsound for all the sound-related aspects of the program, but it is sub-optimal. I've been unable to make it completely work, and .wav files are bulky. Are there any equally usable alternatives to winsound?

Member Avatar for lllllIllIlllI
0
79
Member Avatar for Mazille

I'm having trouble with creating a function that would generate a random word from a list of four-Letter words from a file called fiveLetterWords.txt. I know how to generate the list and print it but I can't seem to get the random part right. I have attached the fiveLetterWords.txt file …

Member Avatar for Mazille
0
2K
Member Avatar for Billg

I need help on the use of Classes. I am trying to use the Font class in Python to create my own instance. Erro is no Font! I though Font was a standard class in Python. Any help for a newbie will be appreciated. ----------------------------------------------------- [code]from Tkinter import * class …

Member Avatar for vegaseat
0
100
Member Avatar for besktrap

how would I tell python (using pygame code) to do an event after a certain amount of time? Would I use pygame.time.Clock()?

Member Avatar for Scuppery
0
64
Member Avatar for bimaljr

Hello I am fresh newbie in Python world. I need a python code that just copy my input file with a different name. I just want to test it. Example. A simple scipt file : [B]copyfile.py[/B] when I do a command like "python copyfile.py 1.jpg" it would copy the "1.jpg" …

Member Avatar for bimaljr
0
108
Member Avatar for ChrisP_Buffalo

This is a follow up to my solved thread a few days ago about extracting parts of a RegEx search in a web scraping app. Now, I have a script that includes 4 RegEx searches that each work individually. Now I want to compile all 4 into a single search …

Member Avatar for bvdet
0
5K
Member Avatar for flagrl

i downloaded and put linux mint on a Cd it took about 3 hours i started the CD up and it's just files that i can't do nyhting with. what should i do?

Member Avatar for tomleo
0
81
Member Avatar for MikeyFTW

Can anyone help me in graphics in python GUI using Tkinter toolkit...can anyone give me a code that can implement simple images onto the canvas of a GUI program, i know i have to use bmp. or gif. images which is fine because i got that. Thanks...

Member Avatar for TheOneElectroni
0
344
Member Avatar for PoovenM

Hi there, I'm trying to connect to a PostGIS database (which is basically an enriched PostgreSQL database) and I'm having trouble with the [I]INSERT[/I] statement. Here's my code: [code=python] import psycopg2 try: conn = psycopg2.connect("dbname='postgis' user='fdi' host='localhost' password='fdi'"); print "Database connection established" except: print "Critical Error: Unable to connect to …

Member Avatar for jlm699
0
262
Member Avatar for bibaso

Heigh.. I have made an html editor which is a wx.stc.StyledTextCtrl with style=wx.TE_LINEWRAP definition. (stc.STC_LEX_HTML) when the lines are wrapped, they starts in the left side of the editor window. I found out only haw to make them start at fixed numbers of characters frrom the left, but I really …

0
46
Member Avatar for bibaso

High.... I am making a multi editor to use in my (some days in a month) job relateed to web building, and i have a problem in my html editor. I transformed the StyledTextCtrl_2 module from the wxPython Demo, from Python editor to HTML editor. Thats mean that i [B]changed …

Member Avatar for bibaso
0
179
Member Avatar for flagrl

when you are writing a program and you get an errer do you have to start all over again or is it ok to go on. i am just writing some of the programs that are on this site in the sticky's i am writing them in the command line …

Member Avatar for Epic Tissue
0
142
Member Avatar for keripix

can u guyz help me on how to make a program that's able to read chm file? i got this idea when i want to convert an entire chm file to pdf. i kno theres awready a software on that. but i reckon it would b interesting if we can …

Member Avatar for jlm699
0
312
Member Avatar for Das246

Hello, I'm very much new to Python and I am stumbling on my first 'experiment'. What I want to do is create an application that operates as an on-screen log viewer where Python prints information it is processing into a wxTextCrl widget (called 'sampler' in my example). I am using …

Member Avatar for jlm699
0
149
Member Avatar for rpjanaka
0
58
Member Avatar for ihateusernames

Hello there everyone. For a summer project I'm doing, I have to use a phone to pass an image I've taken (on the phone) to a dedicated server I've made on a local ubuntu machine. For the upload code, I decided on python (seeing on how its easy to learn, …

Member Avatar for digital-ether
0
138
Member Avatar for MikeyFTW

[B][U]Ok heres the deal they're both a mathematics program but i want to make it like this...[/U][/B] [ICODE]from Tkinter import * import tkMessageBox import random def ask(): global num1 num1 = random.randint(1, 100) global num2 num2 = random.randint(1, 100) global answer answer = num1 + num2 label1.config(text='What is ' + …

Member Avatar for MikeyFTW
0
1K
Member Avatar for linuxabhinav

[code] url='http://www.google.com' webbrowser.open_new_tab(url) [/code] This should open the google.com webpage, but instead it attempts to open : "file:///u/guest/python/%22http%3A//www.google.com%22 guest is my username, and /u/guest/python is where I execute the script from . Could you please tell me why this is happening ? Thanks

0
60
Member Avatar for axn

i have a python script and would like to know how to email the output of the script in python. i can do it from the command line(kshell) with in *nix but would like something like this in the script. somescript.py; echo "test" | mailx [email]john_smith@xyz.com[/email]

Member Avatar for woooee
0
263
Member Avatar for Seagull One

Hello again, everyone. My program for my robot is progressing. Thanks to your help its coming along great. I've also found that I'm more and more able to solve my own problems with programming now. One thing that I can't seem to solve: I'm working on a part of my …

Member Avatar for Seagull One
0
100
Member Avatar for ddwyer50

Helo All, I need to write a python script that will automatically log into a website and retrieve a URL once it has logged in. I already know how to fetch the html of a page, but how do I make the script log into the page first? On the …

Member Avatar for EAnder
0
215
Member Avatar for ChrisP_Buffalo

I'm trying to write my first web scraper with Python using simple regular expressions to match the info I want to extract (I realize BeautifulSoup is available, but I'm not ready to use that yet, so I want to figure out how to use reg ex first) . I want …

Member Avatar for jlm699
0
62
Member Avatar for flagrl

i m new to programming where do i start? i have python on my computer and have played around with it. but dont know where to start or what to do. any advice would help me so much.

Member Avatar for jlm699
0
94
Member Avatar for StarryEyedSoy

I have a list of the stock prices over 14 years and am required to calculate the daily returns as Returns = log(today_s price/yesterday_s price) Here's what my data looks like: 7/18/2008 19.57 7/17/2008 18.08 7/16/2008 14.27 How do I calculate this while reading the data from excel? I have …

Member Avatar for StarryEyedSoy
0
109
Member Avatar for dinilkarun

Hi, I have a treectrl and a checklistbox with some data in them. On click of a button I want to freeze the treectrl and the checklistbox. However, I want the scrollbars in both of these controls to move. Is there any way to implement this? Please Help. Thanks and …

Member Avatar for jlm699
0
72
Member Avatar for siberian1991

For my new job I need to learn a bit of Python to parse and extract data from .txt files. Essentially, I have a table that looks like this: Pair NO. Sense Antisense Coding/Noncoding Cis/Trans Overlap ATH00001 At1g02170 At1g02180 coding-coding cis 3 As you can see, the top are simply …

Member Avatar for jlm699
0
189
Member Avatar for thatoneguyx

[code] # #hangman.py # import random import sys wlist = ['apple', 'blue', 'house', 'frog'] guessed = [] gright = [] choice = None word = random.choice(wlist) guesses = 0 # add dictionary for category def menu(): while True: print 'Welcome to hangman!' print 'To start a new game type "n"\n' …

Member Avatar for jlm699
0
148
Member Avatar for kodavalilaxmi

I am using python Qt Designer. There i created for with widget. In that form i placed many textEdits nearly 15. So form size is more than screen size, iam not able to see all textEdits. How can i put scroll bar to this form to view total form. -------------------------------------------------------------------------------------------------------------------------------------- …

0
72

The End.