15,190 Topics

Member Avatar for
Member Avatar for punter999

hello, i want to utilize the demo code given in the wxpython 2.8 documentation & demos. can any one guide me how can i do that??? when i try to copy that code to editor to change it according to my requirements ..it gives me an error message and close …

Member Avatar for vegaseat
0
96
Member Avatar for fferrandini

Hi, I wonder how to use wx.FileDialog with turbogears . I have this turbogears project, and i have a form which add new employees, and for each employee i need to let the person who is adding them to pick a photo from his filesystem. And all wxPython guides already …

Member Avatar for Stefano Mtangoo
0
96
Member Avatar for Benou

Hello everybody, I am having trouble to create the following script: I would like a screenshot been taken each time a click is detected. Also (if possible) to be able to modify the x and y of the size of the screenshot. There is my code (doesn't work yet): [CODE] …

0
36
Member Avatar for Stefano Mtangoo

Duh! I'm now using Linux from my external HDD again. Please suggest a good IDE for me Thanks

Member Avatar for Stefano Mtangoo
0
123
Member Avatar for gzm_e

I really need help because of my senior project. I don't know the Python syntax and how I write. So please help me...! I have a prototype presentation on monday and I have to show login, logout and sending a mail code parts... Can you help meee???? pleaseeeee=((((

Member Avatar for Stefano Mtangoo
0
73
Member Avatar for masterinex

Hi , Im trying to extract the number 7.2 from the html string below using python: '''<a href="/ratings_explained">weighted average</a> vote of <a href="/List?ratings=7">7.2</a> / 10</p><p>''' I thought this would be code to do this .But how come this doesnt work ? averageget = re.compile('<a href="/List?ratings=7">(.*?)</a>') average = averageget.findall(htmlr) Could it …

Member Avatar for ghostdog74
0
99
Member Avatar for mahela007

Would it be of interest to learn C or C++ if one already know python? I'm a linux and programming enthusiast (i.e hobbyist ;-) ) and C is pretty common on linux and many other applications. But is it worthwhile learning C if I already know python? What are the …

Member Avatar for Narue
0
137
Member Avatar for rajeshwari_ib
Member Avatar for eva yang
0
7K
Member Avatar for Kruptein

First: Yes I'm comparing apples to oranges but in this case it is kind of possible to compare them Context: I'm a php-developer for 3-4 years I think and I really like php, I also use python for 2 years. I recently came in contact with django (python framework) and …

Member Avatar for ShawnCplus
0
58
Member Avatar for ribot

Hello, I'm trying to deal a bit with IRC and Python 3. The decoding from bytes to Unicode create quite a dilemma. 1. Somehow it works to convert the Ã¥ character from utf-8 to bytes, but the received bytes seem to often be encoded in latin-1, or at least they …

0
67
Member Avatar for hondros

Okay, so I have a tuple for a game, and this is it: [icode]['Hondros', {'Equiped': [['none', [], 0], ['Rags', [0, 1, 0, 0], 1, 1], ['Mocassins', [0, 0, 1, 0], 1, 1], ['Gauntlets', [0, 0, 0, 1], 6, 5]], 'Equipment': [0, 1, 1, 1], 'Stats': {'AC': 14, 'Strength': 15, 'Constitution': …

Member Avatar for hondros
0
172
Member Avatar for pyguy420

Im trying to write a code for a colour picker, so a user can pick 4 different colours and then it would return them so i can use them in a different par tof the program, but its not working properly and i can work out why. any ideas? [CODE]def …

Member Avatar for woooee
0
111
Member Avatar for lewashby

In the program below, I have two questions. First, the first object, card1 passes the strings A & c to it's master class. What I want to know is, what do these two strings have to do with the A & c in RANKS & SUITS? If the class had …

Member Avatar for woooee
0
97
Member Avatar for lrh9

I'm thinking about writing a small command line directory management program in Python. The most basic functionality I want is to be able to compare the the files in a directory and sub-directory, and if there are any duplicates then delete the lower most duplicate. I all ready have a …

Member Avatar for Gribouillis
0
92
Member Avatar for ffs82defxp

lets say i want to make a function that accepts a single argument that is supposed to be a number. lets say the function displays the range between 0 and the argument. Normally I'd do something like this: [CODE] def range_display(integer): set = [] for num in range(0, integer): range_list …

Member Avatar for snippsat
0
90
Member Avatar for stymiee

I use [url=http://www.en.wampserver.com/]WAMP[/url] to develop my PHP/MySQL applications locally before moving them to a production server. I want to start teaching myself Python and wish to add Python to my installation. I have downloaded and installed Python 2.5 and also installed mod_python. Unfortunately getting Apache to recognize that Python is …

Member Avatar for tweetychums
0
3K
Member Avatar for teenspirits

I made this code: [CODE]import random wish = "j" max_multiplications = 10 while wish == "j": multi = 0 right_answer = 0 while max_multiplications != multi: randomint1 = random.randint(1, 10) randomint2 = random.randint(1, 10) print randomint1, "*", randomint2, "=" ik = float(raw_input ("Insert your answer ")) multi += 1 answer …

Member Avatar for teenspirits
0
90
Member Avatar for cnuzzo

I have been teaching myself python for several months and have started working on an rpg project. Right now I am trying to code an armor class for a basic character. I am not sure if my approach is even a correct way to go about implementing this class. The …

Member Avatar for Mathhax0r
0
360
Member Avatar for fatalblade

hi , I have my python code but I couldn't solve it. here my sample loop: [CODE= python]import os import sys whileloop = True while(whileloop): initial_drive = "C:\\" inputline = input(initial_drive) <<< PROBLEM... if inputline == "exit": whileloop = False elif inputline == "about": print("no input") elif inputline == "": …

Member Avatar for fatalblade
0
166
Member Avatar for explorepython

Can you please tell me why i can't run this sample test program?? [CODE]from PyQt4 import QtGui class testui(QtGui.QTabWidget): def __init__(self,parent=None): QtGui.QTabWidget.__init__(self) def test(self): QtGui.QMessageBox.warning(self,"Hello","This is a test message") def frun(objec): time.sleep(8) print('hello') objec.test() app=QtGui.QApplication(sys.argv) obj=testui() obj.show() threading.Thread(target=frun,args=(obj,)).start() app.exec_()[/CODE] But in real i want to receive messages from the threads …

Member Avatar for explorepython
0
609
Member Avatar for bunkus

I have written code to use the automatic CD-Burn routine inside WinXP and above. But I cannot start the CD Writing Wizard by python code. Has anybody any idea how to do it? This is my code so far: [CODE]#!/usr/bin/env python # -*- coding: utf-8 -*- import os, sys import …

Member Avatar for bunkus
0
275
Member Avatar for hondros

Okay, I am in the middle of creating a rather large console RPG. It'll include ability to equip armor, weapons, interacting with NPC's, battles, saving/loading characters, etc. I don't want to save all of my classes and functions in the same file, for easier readability. I have a few questions: …

Member Avatar for vegaseat
0
87
Member Avatar for badboy00z

Hi everyone. I'm new to Python and programming in general. I'm currently reading [URL="http://www.dickbaldwin.com/tocpyth.htm"]this[/URL] tutorial. In the scripts section he mentions "setting the path" and that it needs to be done in order for scripts to work. How do I set the path in Windows XP? Thanks!

Member Avatar for vegaseat
0
114
Member Avatar for jcao219

This code is IronPython! Won't work with CPython. IronPython - Hello World [CODE] import clr clr.AddReference('System.Windows.Forms') from System.Windows.Forms import Application, Form, Label form = Form(Text="Hello World Form") label = Label(Text="Hello World!") form.Controls.Add(label) Application.Run(form) [/CODE] Editor's note: This post moved from Python GUI Programming sticky thread. Please follow the rules of …

Member Avatar for jcao219
0
117
Member Avatar for mdawaina

I need to know more about turbogears as one tools used to develop web by python (rapid development ). if any person know more information about this topic

Member Avatar for Stefano Mtangoo
0
48
Member Avatar for ShadyTyrant

Hi there daniweb, im looking for some help. I have two classes MainWindow(wx.Frame), and AddTask(wx.Dialog). MainWindow contains a listbox called task_list. When AddTask is created I want the user to fill out the required info and and then click a button activating an on_click event. In that event I want …

Member Avatar for ShadyTyrant
0
110
Member Avatar for vegaseat

Python uses the Mersenne Twister as the core random generator. The module random contains a fair number of methods (or functions) that help you to do random things. Here are some examples ...

Member Avatar for sainandan
1
218
Member Avatar for WOPR

>>> from os import * >>> a = [] >>> a = listdir('.') >>> f = open(a[0],'r') Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> f = open(a[0],'r') TypeError: an integer is required doesn't work, please help me

Member Avatar for WOPR
0
87
Member Avatar for Destray

I'm working with Tkinter and I need to make 600 buttons in a grid of 6x100. Is there a way to produce generic variables by going through a for loop? Or do I have to type all 600?

Member Avatar for Destray
0
205
Member Avatar for Scuppery

If you are on school and you are taking algebra like me or just want to find the missing length of one side of the triangle than this program should help you out. Pythagorean Theorem Calculator is great and extremely essay to use thanks to this little program I pass …

Member Avatar for hondros
-2
2K

The End.