14,952 Topics

Member Avatar for
Member Avatar for Stefano Mtangoo

I have Dictionary that I update time after time and the dictionary result get inserted to the wxListCtrl in report mode. The problem comes when I insert new data. It seems that the unicode character (u') is also get inserted as part of data. Is there any way to strip …

Member Avatar for Stefano Mtangoo
0
111
Member Avatar for apollo1492

i need to be able to have python spit out a date like this (mm/dd/yyyy) even if the user doesnt add the "/" to there input. here is what i got so far. import string date = raw_input(enter your date:") print date[0:2]+'/',date[2:4]+'/',date[4:8] the output is mm/ dd/ yyyy. how would …

Member Avatar for yilmazhuseyin
0
96
Member Avatar for RRamya
Member Avatar for RRamya
0
93
Member Avatar for besktrap

hey everyone. i am writing a program in python w/ Tkinter and ran into a problem with padding. So, i have a Label object named DataPool_Text. when I run it (side=TOP), it goes to the top middle of the screen. I know how to use padx, but what would I …

Member Avatar for woooee
0
68
Member Avatar for thehivetyrant

I have been asked the following: create inputs for a half-adder using python and the outputs i expect. I was hoping someone could just have a look at this for me and see if i've got the right idea. This will work from a copy and paste straight off the …

Member Avatar for BearofNH
0
103
Member Avatar for drew7py

I am trying to create an array of integers from a list of strings to do some calculations, but all I can get is an array of strings or an error. Does numpy have any functions to do this? any help at all would be much appreciated. infile: 23 CL …

Member Avatar for Ene Uran
0
3K
Member Avatar for drew7py

I need to add a column to a list of strings and then print it back to a new text file without [] or "". I tried this below but it is not the result I wanted. infile looks like this: 23 CL 006 2004 DBA8ORPU 41 8Y S0111P 2 …

Member Avatar for Ene Uran
0
4K
Member Avatar for smtareq

Hello everyone, Can someone kindly explain me what is the basic difference between python statements and expressions? I'm too much confused about them and cannot upgrade my knowledge about Python until I get a full grasp on them because they are everywhere! Some explanation with example may help me a …

Member Avatar for Stefano Mtangoo
0
218
Member Avatar for planetPlosion

I am trying to make a 8 x 8 grid of boxes to manipulate for a matching game. I started with wxPython since I have no experience with pygame. I have it laid out with: [code] WINDOW_WIDTH = 1200 WINDOW_HEIGHT = 1200 class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, title = …

Member Avatar for planetPlosion
0
468
Member Avatar for artemis_f

I am a complete beginner to python (I have only used it for a statistics class in the past). I want to develop a program that is kind of like [URL="http://en.wikipedia.org/wiki/FreeMind"]FreeMind[/URL] - it will allow the user to create Ishikawa diagrams for a particular purpose. So essentially I want the …

Member Avatar for Stefano Mtangoo
0
157
Member Avatar for mruane

I ask the user in my program to enter up to four types of income, with 0 filling the unused income slots. Then, the program is supposed to add up the incomes. It goes like this: user defines values for incomes 1, 2, 3 and 4. Program adds together the …

Member Avatar for gbrokaw
0
99
Member Avatar for haydenal

I have a start date and an end date and I'd like to know how many months that occurrence fell in. For example if my start date was 2009, 01, 31 and the end date was 2009, 02, 01 I'd like to calculate that the occurrence fell in 2 different …

Member Avatar for oldSoftDev
0
71
Member Avatar for LinkMaster03

Using curses, how can I echo and capture input at the current cursor position? I have moved the cursor using scr.move(y,x) and turned on echoing. I can type into it and have it displayed. How can I capture this data as a string after the user presses enter?

Member Avatar for LinkMaster03
0
109
Member Avatar for Bidamin

Hi, I am trying to write a script that takes in a user inputed Excel file and adds/deletes/edits a row and re-saves it. Because xlrd and xlwt dont work together I am forced to combine them together and copy the xlrd workbook to an xlwt workbook. I am using python …

Member Avatar for slate
0
803
Member Avatar for Alien15x

am i correct in assuming that when a computer behind a router with port forwarding opens a port (port 1337, when i run my server), that the router automatically notices and sets itself up to send all port 1337 traffic to that computer? i've got two simple applications, a client …

Member Avatar for Freaky_Chris
0
947
Member Avatar for lllllIllIlllI

Well this is probably a really stupid question but i was doing pygame tutorial and i dont know what a vector is and they keep talking about them, there were special vector classes and things like that, im rather confused, so if someone could teach me what a vector is …

Member Avatar for Ene Uran
0
117
Member Avatar for Ghostenshell

Having trouble with the final loop in this craps program. Any suggestions. Problem starts on line 28. Was thinking about breaking the whole thing into functions but I don't exactly know where to call them at. When I do call them I get accessed before argument errors or something to …

Member Avatar for oldSoftDev
0
124
Member Avatar for MaxManus

Hey, I got an array with float values from 0 - 120. How can I find the first element over 100 and which element it is?

Member Avatar for scru
0
4K
Member Avatar for adam291086

Why wont my cookie set in firefox [CODE]#!/usr/bin/python import Cookie print "Content-type: text/html\n" C = Cookie.SimpleCookie() C["number"] = 7 C["string"] = "seven" print C["number"].value print C["string"].value print C print "Set-Cookie: string=seven; " [/CODE]

Member Avatar for adam291086
0
79
Member Avatar for drone626

I have a simple rational number class which looks roughly like: [CODE] class Rational: def __init__(self, numerator,denominator): self.numerator= numerator self.denominator= denominator more functions... [/CODE] but when I work with really large numbers such as the following example: [CODE] >>>a= Rational(2**64, 1) >>>a [/CODE] python crashes telling me Rational instance has …

Member Avatar for drone626
0
124
Member Avatar for Ghostenshell

First I like to thank everyone that helped me with my work... Please bear with me I don't know how to explain my problem. Trying to get the random number to remain the same through out the length of the program. When the player guess the right number the player …

Member Avatar for Ghostenshell
0
140
Member Avatar for happymadman

Hi, how would I get the timer() class to change time display()'s self.time I'm new to threads and classes and have been sitting here thinking about it for the last half hour and still have know idea Thanks heaps for any help. [code=python] # Count down timer import time import …

Member Avatar for happymadman
0
101
Member Avatar for n0p

First of all I apologize for my bad english I am beginner in writing GUI apps with Glade and python, i am having problem with libglade.. well I know that glade-3 hasn't yet good implementation with gtkbuilder, so python users are saving projects in libglade format, and then we convert …

0
32
Member Avatar for chebude

I have too collect a daily rainfall data from a certain model output. The model ouput gives out each stations daily data separately which I have to collect together and further analyse. [I have tried the following, it works but my data - thousands of pcp_#.txt which makes the process …

Member Avatar for chebude
0
164
Member Avatar for leegeorg07

i looked at the python 3k print module from griboullis and i want to use it for python 2.5 without having to import it every time, i think it needs to be builtin but how can it do this, i don't mind if the old print is still there but …

Member Avatar for leegeorg07
0
84
Member Avatar for Deepak.G

hi im trying to write a python script for a telnet client. So far im able to establish a connection with a server. My problem is that i want to print (at the client) all the activities at the server end. Let me put it this way. Suppose i send …

Member Avatar for Stefano Mtangoo
0
3K
Member Avatar for SoulMazer

Hi, so I just have a question that I at least think will be pretty easy. So, I am making a script that basically gives you a "vocabulary test". There is just one feature I would like to implement that I need help with. I would like to make it …

Member Avatar for SoulMazer
0
237
Member Avatar for mruane

I am preparing for my a+ exams, and am turning all of my notes into a test. I plan on doing this in python, of course. But, I am a little lost at what would be best. Should I create each question as a specific function, calling the next question …

Member Avatar for mruane
0
144
Member Avatar for darkfury18

for example if i write hello on one line and then wanted to write goodbye right underneath what do i have to do? as when i press the enter key it just prints hello

Member Avatar for scru
0
4K
Member Avatar for eyewirejets

Can someone please look at my code and see if I'm writing it efficiently using parameters and return values. Thank you for your support [code] PAY_RATE = 12.75 #This program ask the user for: hours worked, then calculates gross pay. def get_hours(): hours = input("How many hours did you work?: …

Member Avatar for jrcagle
0
193

The End.