15,175 Topics

Member Avatar for
Member Avatar for scoob_m

Hello, I have a code file from the boto framework pasted below, all of the print statements are mine, and the one commented out line is also mine, all else belongs to the attributed author. My question is what is the order in which instantiations and allocations occur in python …

Member Avatar for jrcagle
0
99
Member Avatar for mahela007

I want to copy some files using python. Can someone tell me how to use the shutil.copy() command properly? thanks

Member Avatar for Ene Uran
0
201
Member Avatar for MaxVK

Hi, I have written a nice little editor using the RichTextCtrl, and so far everything is working fine, however, for some reason the delete key does not work as expected. If I select something and hit delete then the selection is removed, but if I click anywhere in the text …

Member Avatar for MaxVK
0
127
Member Avatar for karthik.c

hi guys wat if List is equivalent 2 Arrays in c or do we have Arrays seperately defined in python??

Member Avatar for karthik.c
0
181
Member Avatar for ihatehippies

How do you bind something like a listbox to an event, but keep that events default actions... ie when you bind a listbox to EVT_RIGHT_DOWN it overrides the SetSelection method that is normally called. I'm trying to call a popup menu on the right down event but I also want …

Member Avatar for lllllIllIlllI
0
92
Member Avatar for juzzy

is it possible, well yes of course its possible, but does anyone know the best way to alter the colour of a word within a sentence in a wxpython window. I know how to change the colour of the entire text but not a specific word. So for instance if …

Member Avatar for juzzy
0
1K
Member Avatar for scru

Does Python have a concept of class properties (static properties if you may)? I know there are class attributes, but I can't just use one. It's very critical that I control what values can bet set as the class attribute, which I can use the property setter to do.

Member Avatar for Ene Uran
0
98
Member Avatar for mahela007
Member Avatar for lllllIllIlllI
0
646
Member Avatar for eyewirejets

I'm trying to restrict the users input to the selected characters only. "W" "w" or "L" "l" Anything else entered, an error message should display. Can anyone please look at this and tell me what I'm doing wrong? Thank you [CODE] # User Enters either W = Win and L …

Member Avatar for jrcagle
0
116
Member Avatar for mahela007

Hi.. this is my first post on these forums. I learn python as a hobby. Will learning sequential programming be sufficient for my needs? (I won't be pursuing a career in programming. I just do it so that I can keep my self busy and because I like programming with …

Member Avatar for jrcagle
0
77
Member Avatar for scru

I know Python introspection feature are powerful, what I can't seem to figure out is how to get the name of the current class. Example: class Foo: def bar(self): print(classname) Then my output should be `Foo`. Bonus points if I can get which module it resides in too. Thanks!

Member Avatar for Ene Uran
0
133
Member Avatar for mahela007

I have installed python 3 on my kubuntu PC. However as the default version of python on kubuntu is 2.5 Idle uses python 2.5 instead of the newly installed python 3 (i used the "python3.0" package for installing python and "idle" package for IDLE when i was installing using synaptic …

Member Avatar for Ene Uran
0
65
Member Avatar for curiouskitten

I am a beginner python programmer and need some help with this problem. To provide a code that will lowercase all consonants and upper case all vowels. Needs to be a relatively simple code (like 2-3 lines lol) For example i have started this: S=raw_input("Enter Sentence: ") print S.upper() # …

Member Avatar for Ene Uran
0
11K
Member Avatar for trihaitran

I just reinstalled OS X 10.5 Leopard on my laptop and restored my data/applications from a Time Machine backup. When I use urllib.urlopen() I get the following error: [code] >>> import urllib >>> u=urllib.urlopen(aUrl) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 82, in …

Member Avatar for trihaitran
0
130
Member Avatar for thehivetyrant

I have currently built a database (based on IMDB) that i can add dictionaries too, list them and exit. [B]I will put the program so far at the bottom of the page, just paste it in and run ti to see what it's like.[/B] I am trying to add a …

Member Avatar for thehivetyrant
0
119
Member Avatar for scru

Several things have led me to writing this post However, late last week I did some poking around in the Windows C API from ctypes (not using pywin32) for a project I was finishing up, and I [I]loved it[/I]! Since then I've been playing around with ctypes and Windows function …

Member Avatar for lllllIllIlllI
0
207
Member Avatar for memphis1234

I have to write a program which generates a pascal's triangle. The user inputs the height of the triangle and it supposed to generate one. This is what I have so far and I don't know how you would keep adding rows after the second one. I'm so lost :( …

Member Avatar for yilmazhuseyin
0
995
Member Avatar for strobon

hi...can somebody give me a little help here. i get error message : 'file' object is not callable its a program that call shell script (shell script run "fusion.deb"). here`s the code: test.py [CODE]#!/usr/bin/env python import sys import os try: import pygtk pygtk.require("2.0") except: pass try: import gtk import gtk.glade …

Member Avatar for strobon
0
2K
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
112
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
97
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
69
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
471
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
160
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
100
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
72

The End.