15,190 Topics

Member Avatar for
Member Avatar for RICH148

Hi all, I'm trying to make a Poker program. This is what I have so far but I'm not sure how I can check to see if the deck is a Royal Flush, Straight, etc. Could anyone help me get started? This is what my output should be. Enter the …

Member Avatar for bpatt22
0
233
Member Avatar for joeywheels

I'm having difficulty figuring out how to append two user inputs into a list as a tuple. I would also like to call the list and enumerate the list (e.g., 0. dog_name:dog_breed). I'm not sure how to call display or if it is even written properly. Here's what I have …

Member Avatar for woooee
0
145
Member Avatar for canyvr

i am a beginner of using python,and i am doing an project about "Tic-Tac-Toe". well,the project needs very basci code.....however,i could not get it.... The following conditons are the project requested: 1.When the computer randonm selected a available number,so which means computer doesn have logic....the winner are user..... 2.user and …

Member Avatar for woooee
0
127
Member Avatar for hughesadam_87

I have a series of data files with large headers. Here is an example: [COLOR="red"]SpectraSuite Data File ++++++++++++++++++++++++++++++++++++ Date: Fri Feb 25 13:43:55 EST 2011 User: group Dark Spectrum Present: No Reference Spectrum Present: No Number of Sampled Component Spectra: 1 Spectrometers: USB2E7196 Integration Time (usec): 11000 (USB2E7196) Spectra Averaged: …

Member Avatar for hughesadam_87
0
146
Member Avatar for tcl76

hi, i found a module called xlwt ([url]http://www.python-excel.org/[/url]) that can write to Excel. i want the code to read from a file (robert.txt) and then write to excel in a column. however, it seems that the output from this code is that it only writes to one cell in the …

Member Avatar for tcl76
0
2K
Member Avatar for BirdaoGwra

HI, Could someone kindly tell me how to change the x y position of an empty bitmap. Say I have a rectangle on the window now I want to position the EmptyBitmap according to x y position of that rectangle? Thanks in advance Regards

Member Avatar for richieking
0
162
Member Avatar for Thristan_

Hi I am not a very experienced programmer, but I searched around and couldn't fint an answer to my question, so I am posting it here. I am trying to seach through a local directory and process all the files in that folder. The files are alle named "label" + …

Member Avatar for richieking
0
418
Member Avatar for Boubakr

Let's say this: [CODE]print """ Wleomce... * To start the quiz press <s> * For more information quiz press <i> * To exit press <q> """ main_menu = raw_input('Your choice: ').lower().strip() if mai_menu == 's': print """\ * Press <n> to write yoyr name. * Press <l> to choice your …

Member Avatar for Boubakr
0
115
Member Avatar for Behseini

Hi Guys, Here I am trying to create a very simple function to change a Frame background color as by a btn event handling as following: [CODE] from Tkinter import * class App: def __init__(self, parent): self.myParent = parent self.fm = Frame(parent) self.fm.pack() self.btnBlue = Button(self.fm, text = "Blue") self.btnBlue.bind("<Button-1>", …

Member Avatar for Behseini
0
156
Member Avatar for yeleek

Hi, I've a multi line string, which I want to delete the first 22 lines from, I then want to use re.findall (which appears to only work on strings). Is there an easier way to do it than writing the string to a file, reading in as a list, deleting …

Member Avatar for TrustyTony
0
131
Member Avatar for hughesadam_87

I wrote a program that interactively allows you to import files directly from your HDD into another python program. When building a new program, you simply call my program, navigator, and it lets you choose a directory and it prints out a numbered list of file: file a 1 file …

Member Avatar for Gribouillis
0
159
Member Avatar for joaep2

Hi guys. I downloaded pygame and a few other modules for Python. I know that I have to put them in a certain folder to make sure Python can read them, but what is that exactly? I'm running a Mac, OS 10.6.6. I already tried putting it in the main …

Member Avatar for joaep2
0
907
Member Avatar for Celtrix

Yes i realize this is the fibonacci sequence and i understand the math im just having trouble understanding the line in red what does it equate to in laymans terms? Thanks in advance :D [CODE] a,b=0,1 while b < 100: print b [COLOR="Red"]a,b=b,a+b[/COLOR][/CODE]

Member Avatar for Celtrix
0
107
Member Avatar for tottletj

Hi, I'm currently trying to do something which I thought would be relatively straightforward, but it appears not. Basically, I have a set of data that needs to be done logarithmically in a histogram, but appears the 'log=True' command in the pylab.hist() only refers to the y axis, rather than …

Member Avatar for tottletj
0
84
Member Avatar for stefh

Hi every one! :) Based on the example of StyledTextCtrl of the wxPython demo i managed to write a small application intended to Php code writing. Does anyone know how to set styles for Php codes? I found it's necessary to use SetLexer(stc.STC_LEX_HTML) because STC_LEX_PHP is deprecated. But i have …

Member Avatar for stefh
0
436
Member Avatar for peguin1089

How do you write a Python program that takes DNA sequence and give number of ORFs found in the sequence?

Member Avatar for hughesadam_87
0
160
Member Avatar for doomas10

Hello all, just a quick question! I was wondering how can you pace lines together in python. In my case i have a file like this: [CODE]<word> <word> <number>.txt <word> <word> <number>.txt <word> <word> <word> <number>.txt <word> <word><word><word> <number>.txt <word> <word> <number>.txt <word> <number>.txt <word> <word> <number>.txt [/CODE] Does anyone …

Member Avatar for doomas10
0
209
Member Avatar for Archenemie

I've tried every way I can possibly see to try and convert the value from the numctrl to a decimal but the problem lies with the retrieved value being a float. I cant covert the float to a string first because it looses the trailing 0 in values such as …

Member Avatar for zentraders
0
293
Member Avatar for madval88

I have saved a 2D matrix in a numpy file (.npy) in python. Is there a way I can access the same from C++ and possibly read in the values in a stl vector? [URL="http://www.scipy.org/C++_Extensions_that_use_NumPy_arrays"]This [/URL] is vaguely relevant. But here you make the call from python. I want to …

Member Avatar for madval88
0
763
Member Avatar for And1

I am fairly new to python and am trying to create a table for work. At the moment I use a paper based system with 11 columns. I wanted to see if I could replicate my table in python 3.1.1 The column names are: 1. RMA number 2. Customer 3. …

Member Avatar for vegaseat
0
14K
Member Avatar for maddy5326

Is there any way by which one could pass a HTML form variables to a python script? Is there any library for it?? Any help would be appreciated...

Member Avatar for maddy5326
0
78
Member Avatar for tombliboo

Hi python fans, hope someone can help me with this. I have a text file the result of another program which looks like: 2,6,3,5,0 4,0,2,5,2 5,7,9,1,0 4,6,8,2,5 2,7,9,1,6 This may vary in size but will always be square i.e. 5x5, 9x9 etc so the code needs to accomodate this, the …

Member Avatar for snippsat
0
193
Member Avatar for Vertana

I'm trying to turn my PyQt4 into a .exe in order to give it my end users. I'm so-so familiar with cx-freeze and I know how to use Innosetup. My problem is that when run from the command line my Qt application uses the icon correctly. After I freeze the …

0
171
Member Avatar for mwaidyanatha

Hi, I want to get installed Xen kernels & initrds in my computer using a python code. When I do a ls /boot I get the following results. config-2.6.26-2-686 config-2.6.26-2-xen-686 grub initrd.img-2.6.26-2-686 initrd.img-2.6.26-2-686.bak initrd.img-2.6.26-2-xen-686 initrd.img-2.6.26-2-xen-686.bak System.map-2.6.26-2-686 System.map-2.6.26-2-xen-686 vmlinuz-2.6.26-2-686 vmlinuz-2.6.26-2-xen-686 xen-3.2-1-i386.gz and what I want is "vmlinuz-2.6.26-2-xen-686" & "initrd.img-2.6.26-2-xen-686". We can …

Member Avatar for Gribouillis
0
276
Member Avatar for flebber

I started writing a python script to rename files. I wanted it to be able to rename multiple files in a given directory. I started off trying to use rename but then found other options Can't quite get it to happen. Hope my code is understandable, can anyone assist in …

Member Avatar for snippsat
0
2K
Member Avatar for Archenemie

I basically need to make the repeat button work. I've tried several approaches but i've hit a brick wall and there doesn't seem to be a function I can find to get the values of the selected item and repeat them. self.listctrl.GetItemString() will only get the string from item in …

Member Avatar for Archenemie
0
214
Member Avatar for snippetGirl

im a newbie here in python and in this forum site. im using python 2.7.1. and im making a simple calculator that can trap if the second input is zero in division 0peration.. is it possible to call def to def within the if-else statement where ?? because im trying …

Member Avatar for Archenemie
0
120
Member Avatar for Archenemie

I'm trying to find a way to make a wx.Frame stay on top of my other windows until I call hide(). I do not mind if it stays on top of all windows or just the windows called by my program. I think I need to set a style on …

Member Avatar for Archenemie
0
178
Member Avatar for buhoasa

hey guys.....i need for a part of my homework in python...to change the text in color. for each letter a specific color will be assigned, in this way, the text that will be typed in will be turned into the specific color. can anybody help me?

Member Avatar for Gribouillis
0
249
Member Avatar for WSCman44

I am new to programming and trying create a program that will be able to input students test scores. After this another prompt will ask you for the students name who received that score. When finished inputting, the program should tell me the highest score and lowest score, along with …

Member Avatar for Archenemie
0
146

The End.