15,406 Topics

Member Avatar for
Member Avatar for chris99

The attached program uses buttons to take you to a set of links. The links that the three buttons point to are here, gamefaqs and toontown. You can customise by altering the links and button names within the code, this is just practice. What do you think?

Member Avatar for chris99
0
133
Member Avatar for Mouche

Hello, I am a high school student learning Python (and have a tiny bit of experience with C and C++). I mostly cruise the python-forum.org, but someone from there directed me to a certain python post here. I think this site looks very helpful, so I decided to join. I …

Member Avatar for ~s.o.s~
0
74
Member Avatar for briggs1987

I need help. I have my program set up except for a graphWin and I don;t know how to set that up

Member Avatar for Ene Uran
0
90
Member Avatar for pfunix

Greetings All! I would like to get some feedback to all ya good python folks here at daniweb regarding some implementations that you guys doing with Python and using MySQL db. I'm looking for some mysql plugin for python. I've tried sourceforge 's mysql-python but with no luck(installing) .. maybe …

Member Avatar for ghostdog74
0
160
Member Avatar for Matt Tacular

I am taking grade 12 programing and in the course, you can make any program in any language for a final project, and I want to do one in python, but I dont know what to make, I need help to come up with an idea for a rather useful …

Member Avatar for Ene Uran
0
135
Member Avatar for dunderhead

Hi, I am having a problem with function and class syntax. I have one class (MakePanel1) that creates a button and label. The button-click event of the button is linked to a function (daclick1) that changes the text of the label. This works well. I have another class (MakePanel2) that …

Member Avatar for dunderhead
0
2K
Member Avatar for FireSBurnsmuP

Okay, I know that Python is a programming language (it comes with some Linux installs), but what are its stats? I mean, how efficient is its build? How much larger or smaller are the programs than C++? How much faster are the programs than those created by C++? What are …

Member Avatar for vegaseat
0
180
Member Avatar for JyotiC

Hi, i am using Pygtk to make GUI . I have a frame in which i have added a VBox.. I want to add scrollbar in that VBox.. but couldn't figure out how to add it. [code] vscrollbar = gtk.VSscrollbar(adjustment=None) AttributeError: 'module' object has no attribute 'VSscrollbar' [/code] it's giving …

Member Avatar for JyotiC
0
295
Member Avatar for alcapone

Hello there! I'm a student of Physics at the University of Chile in Chile, South America. Actually, i have a course on Programming & Numerical Methods. We work just a little with bash & python and for all the hard work, we use C++. You probably will seen me often …

Member Avatar for happygeek
0
38
Member Avatar for bumsfeld

I read in the news that Python in going from version 2.4 to version 2.5 fixed 450 bugs. That seems to be lots of bugs! I used Python a lot and never found a single one of those bugs. What is your experience?

Member Avatar for nytrokiss
0
269
Member Avatar for jrcagle

Hi, I've written a nifty projectile simulator using pygames with the livewires wrapper for physic class: rocket on launch pad has assignable speed and direction, launching causes rocket to move under influence of gravity. Currently, the user can use the mouse to change the initial direction of the rocket, but …

Member Avatar for vegaseat
0
146
Member Avatar for etxulid

Hi, is there any built in function for converting an int to a byte? Thanks

Member Avatar for vegaseat
0
219
Member Avatar for etxulid

Hi, got a hex string 3E 65 72 3D 65 which first needs to be reversed to C7 6A E4 CB 6A then I need to move the 4 LSB in each byte to the 4 LSB in the next byte, need also to include 4 new bits (x) in …

Member Avatar for ghostdog74
0
200
Member Avatar for reRanger

Greetings: I have been working with code examples (from the good people on this site) and I have been learning quite a bit about Python and becoming more comfortable with. The program I am working on is being done in pieces, the GUI being really the primary area of problems …

Member Avatar for vegaseat
0
140
Member Avatar for swapnamishra

Hi, I have a function in Vc++ called Execute. I pass arguments to the function in hex and it returns the value in hex. >>> p.Execute(s1) The return value is handled in unicode format by python. u'\u1211\u2b08' I am supposed to convert the hex return value to BCD. Since python …

Member Avatar for Ene Uran
0
164
Member Avatar for jrcagle

Here is the code that burned me today. I'm re-writing my Sudoku solver to make it more "Pythonic" -- it was my first Python project, and the old code looks like translated C :lol: -- anyways, at one point, I need a dictionary to hold the possible locations in a …

Member Avatar for Ene Uran
1
136
Member Avatar for FireSBurnsmuP

Actually, i was thinking of starting up my PERL training. So I'd like to know this: what are it's most common uses? How efficient is it compared to C++? What are the strengths and weaknesses? (This is kind of a repeat of what I said in the Python forum)

Member Avatar for vonfeldt
0
111
Member Avatar for Gorilla

I am learing the book: Foundations of Python Network Programming - Apress 2004 When I tried this: [CODE] import socket, sys host = sys.argv[1] textport = sys.argv[2] #.... [/CODE] Then my IDE notify me this exception when debug: """IndexError: list index out of range: host = sys.argv[1] """ When I …

Member Avatar for Gorilla
0
132
Member Avatar for reRanger

Greetings: I am having trouble understanding how buttons launch actions such as, for example, loading a new (2nd) canvas. Suppose I have an application, a game, that will respond at some point to user imput via buttons: I have two buttons named "Yes" and "No"; now if the user selects …

Member Avatar for reRanger
0
183
Member Avatar for Matt Tacular

I have been trying to search the web to find a way to code a python program that can scan a given directory (ex. "C:\Documents and Settings\Matt\Desktop") and assign every file name found there (ex. "test.py" and "essay.doc") to a seperate variable or inside a list. Is there any way …

Member Avatar for Matt Tacular
0
403
Member Avatar for canerkocamaz

i am newbie and have a problem. i have a text file(rawfile.txt) like below. NAME:XXXXXXXXXXXX SURNAME:XXXXXXXXXXXX DATE:23.09.2006 A B C D E F G H (column names) 40 250 300 01.01.2006 13:43:21 250 12345678 KENTBANK 31 123 455 02.02.2006 11:22:43 450 CAPITALBANK . . . . PAGE 1 40 150 …

Member Avatar for vegaseat
0
100
Member Avatar for reRanger

Hello: I have been reading today about creating and using Sets. I have tried some sample code to see the results and I think it might be useful for me. I am in search of a data type that will be able to store strings and\ or values culled from …

Member Avatar for vegaseat
0
123
Member Avatar for akadri

Hi, I want to know how to convert a decimal integer into its binary form?? I came across a code which used BIT OPERATORS; I could not understand it. pLEASE HELP ME WITH THIS. Note: This is not my ASSIGNMENT PROBLEM. I know one way of converting decimal into binary …

Member Avatar for Ene Uran
0
179
Member Avatar for reRanger

Hello: I was wondering if anyone in this forum could point me in a direction (a link) where I could find practice projects (similar to Python [URL="http://www.daniweb.com/techtalkforums/thread32007.html"]Projects for the Beginner[/URL]) dealing specifically with C++ classes and their related functions? Thank-you in advance, reRanger

Member Avatar for Ene Uran
0
108
Member Avatar for reRanger

Hello: I was wondering if anyone in this forum could point me in a direction (a link) where I could find practice projects (similar to Python [URL="http://www.daniweb.com/techtalkforums/thread32007.html"]Projects for the Beginner[/URL]) dealing specifically with C++ classes and their related functions? Thank-you in advance, reRanger

Member Avatar for Bench
1
117
Member Avatar for msaenz

:mrgreen: hi im am tryingto create a dimensional analysis thing going on and so far i have this [code] def mult(self,other): tempTuple1=list() tempTuple2=list() i=0 for unit,value in other.expr: for unit2,value2 in self.expr: if unit2 == unit: tempTuple1.append((unit, value+value2)) #self.expr[i]=tempTuple1 ## for unit2,value2 in self.expr: ## for unit,value in other.expr: ## …

Member Avatar for msaenz
0
151
Member Avatar for JoeyAlva

Name is Rickard for those worthy of it (you) and Joey to everyone not worthy (someone else than you). 25 years old Swedish wannabe knowitall, Good at nothing average at everything. :cheesy: Been a happy hobby "learning to program" IT dude for as long as I've had a computer (14 …

Member Avatar for happygeek
0
92
Member Avatar for reRanger

Hello again: I seek assistance on what I believed would be an easy problem to solve, but, after much searching, I have not yet discovered a valid answer: I have a canvas which consists of a background GIF upon which (when triggered) at least one new (smaller) GIF will appear, …

Member Avatar for reRanger
0
116
Member Avatar for whisper

Hello there, I am trying to write a script for an old 133mhz laptop I have, that will bind every key to different functions, and on a key press a different image, or video will be displayed, and/or a sound file. I have figured out how to bind keys with …

Member Avatar for whisper
0
82
Member Avatar for linux

I was wondering what an appropriate programming language would be for creating a simple yet expandable (GUI) operating system. Is it possible in: Python? Java? Perl? QBASIC? Ruby? Thanks!

Member Avatar for Cerberus
0
76
Member Avatar for reRanger

Hi: I am beginning to develop a project (game) that will be using graphics: I am trying to implement a view that is an image onto where other images will be added on "top"-- the other images do not have to move via user imput-- I just need to place …

Member Avatar for reRanger
0
8K
Member Avatar for Peagles

Hi! How can i derive the used integer from variable a, when i use following code: [code] a = unichr(275).encode('utf8') [/code] When i try this: [code] print ord(a) [/code] It raises an error...

Member Avatar for Ene Uran
0
1K
Member Avatar for chris99

The dictionary currently has a few definitions in it, but it keeps only returning the definition for "noob". Anything that's entered returns that index. Why? Here's the code: [code]#1337 to Human dictionary: leet={"1337":"l-EET/nReally Awesome","noob":"(n00b) nOOb/nPerson who can't accept that s/he's wrong", "-xxors":"Suffix, pron: zors.\nUsed to accent an important verb, e.g. …

Member Avatar for ghostdog74
0
232
Member Avatar for jrcagle

Hi all, What are your thoughts about how many and which type of errors should be caught and handled within functions, especially roll-your-own utility functions? For example: suppose I have a function that removes a directory and all subdirectories and files underneath it. Should that function test for path existence? …

Member Avatar for vegaseat
0
122
Member Avatar for Matt Tacular

I made a program that has no REAL purpose, but i did it solely to see if i could do it, because i am new to python (somewhat) and i did: It will open a .txt file, and add a word of your choice inbetween each word that exists in …

Member Avatar for jrcagle
0
145
Member Avatar for dunderhead

Hello, I am a wxpython newbie and would like some help on using custom classes to create and change widgets. I have a program with 2 classes, each of which creates a panel with widgets. These panels are then added to the main frame of an application. In one class …

Member Avatar for dunderhead
0
280
Member Avatar for sylvaticus

Hello.. I'd like to renew my old perl-based website and I am thinking to Python compared with PHP for many reasons (not last that I can use it for many other things that just web-development). However there are tons of "web-frameworks" and I am very dishoriented with all this "offer".. …

Member Avatar for vegaseat
0
99
Member Avatar for jrcagle

Hi all, I am testing a somewhat large module, and I would like to automate the testing of the documentation (I know, I could just look at the code, but I wanted to make sure *and* the question became a cool one :cheesy:) Here's the basic idea: [code] for i …

Member Avatar for vegaseat
0
291
Member Avatar for jrcagle

OK, this is a minor quibble from someone who is not *normally* concerned with neatness. I want to put docstrings in my functions. If I put them in using the 'textbook' method: [code] def is_same(self,x): """A.is_same(x) --> Bool\n\nReturns True if A and x represent essentially the same item, as determined …

Member Avatar for vegaseat
0
284
Member Avatar for akadri

Does anyone have an idea about implementing two dimensional arrays in Python?? I want to write two programs: (1) a program for matrix multiplication (2) a program for displaying Pascal's triangle. Both these programs require two dimensional array..? Or is there any other way to solve this.. Thanks in anticipation.. …

Member Avatar for jrcagle
0
131
Member Avatar for reRanger

Hallo: I am new to this forum and am very glad to be here. I am currently working on a Python project which will be using Tkinter for a graphical (Windows)(XP) output. I have studied Python while completing my software engineering degree but have not used it for 2-years. I …

Member Avatar for vegaseat
0
136
Member Avatar for chris99

Unique random variables. I've tried modifying the code in varying ways, but nothing is working. The program won't add new numbers to replace the ones that were duplicates. [CODE]import random b=0 numbers=[] print "show 6 random unique integers from 1 to 50: " while b < 6: for k in …

Member Avatar for vegaseat
0
133
Member Avatar for jan1024188

im realy new on python(started today) and i want to know how to write this script in python [CODE]#!/bin/bash function press_enter { echo "" echo -n "Press Enter to continue" read clear } selection= until [ "$selection" = "0" ]; do echo "" echo "PROGRAM MENU" echo "1 - open …

Member Avatar for jan1024188
0
145
Member Avatar for jan1024188

i wanna learn C and python so i decided to buy this books [URL="http://www.amazon.com/Beginning-Python-Novice-Professional/dp/159059519X/sr=1-2/qid=1158329988/ref=pd_bbs_2/002-5524795-3083268?ie=UTF8&s=books"]http://www.amazon.com/Beginning-Pyth...e=UTF8&s=books[/URL] [URL="http://www.amazon.com/Absolute-Beginner-Guide-Greg-Perry/dp/0672305100/sr=1-1/qid=1158329590/ref=sr_1_1/002-5524795-3083268?ie=UTF8&s=books"]http://www.amazon.com/Absolute-Begin...e=UTF8&s=books[/URL] i also want to use other shells so [URL="http://www.amazon.com/UNIX-Shells-Example-4th/dp/013147572X/sr=1-5/qid=1158329052/ref=sr_1_5/002-5524795-3083268?ie=UTF8&s=books"]http://www.amazon.com/UNIX-Shells-Ex...e=UTF8&s=books[/URL] my question is.Are this books good.?will i get what i wanted?is there anything better? __________________

0
68
Member Avatar for chris99

[quote]Print a 9x9 diamond shaped pattern.......using loops[/quote] [code]#written by Chris O'Leary: #Filename: star.py star=1 space=5 def star_decrease(star,space): while star > 0: print " "*space + "*"*star space = space+1 star = star-2 def star_increase(star,space): while star < 9: print " "*space + "*"*star space = space-1 star = star+2 if …

Member Avatar for chris99
0
132
Member Avatar for chris99

This program print the verse of "charlie was a pidgeon" 10 times, and finishes off with a cute little surprise. THE DEATH OF CHARLIE SHALL OCCUR! [code] #by Christopher O'Leary #The death of Charlie! def print_charlieVerse(): print "Charlie was a pidgeon, a pidgeon, a pidgeon." print "Charlie was a pidgeon, …

Member Avatar for Ene Uran
0
117
Member Avatar for chris99

Based off the Self defence class skit: [CODE]# Filename: Madlibs.py noun = raw_input("Type a noun: ") verb = raw_input("Type a verb: ") adjective = raw_input("Type an adjective: ") sound_disgust = raw_input("Type a random sound of disgust, eg 'Uuurh': ") noun1 = noun verb1 = verb adjective1 = adjective moan = …

Member Avatar for chris99
0
165
Member Avatar for chris99

The code won't even display the root, let alone the menus. Even when the conversion works, nothing else does, so what do I do? [code]from Tkinter import * root = Tk() def hello(): print "Hello!" def metres_to_centimetres(metre,cm): metre = input("Put in a distance in metres: ") cm = metre*100 print …

Member Avatar for chris99
0
143
Member Avatar for katharnakh
Member Avatar for vegaseat
0
272
Member Avatar for chris99

I really don't think that text adventures, even simple ones are within my grasp. How would you do that anyway, write a seperate Data file for each room or something? They seem very complicated, even the one in the Programs for Beginners thread. Bear in mind, the tutorial missed a …

Member Avatar for bumsfeld
0
139

The End.