15,175 Topics
| |
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 … | |
I want to copy some files using python. Can someone tell me how to use the shutil.copy() command properly? thanks | |
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 … | |
hi guys wat if List is equivalent 2 Arrays in c or do we have Arrays seperately defined in python?? | |
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 … | |
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 … | |
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. | |
Why is inheritance an important aspect of object oriented programming? | |
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 … | |
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 … | |
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! | |
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 … | |
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() # … | |
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 … | |
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 … | |
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 … | |
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 :( … | |
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 … | |
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 … | |
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 … | |
How to redirect to another page (for Example: to my login page) using python. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … |
The End.