15,181 Topics

Member Avatar for
Member Avatar for Python23

hello, I was wondering if I could recieve some help? The function I am writing is called pyramid, it consumes a number and produces stars(*) from 1 to that number. For example pyramid(5) would be: * ** *** **** ***** so far I have a function that does that backwards …

Member Avatar for Python23
0
451
Member Avatar for fredzik

Hello every1, I've been googling about but can't seem to find a solution to the following problem: [code=Python] print "Hello world"[/code] How does one colourize the "Hello world" in the results. It can be any colour as long as it's not the standard blue. Also I need to know what …

Member Avatar for fredzik
0
140
Member Avatar for caranjo

Hello all, Need some urgent help with generating Pydoc documentation I have three .py files (a.py, b.py, c.py) on my Desktop I would like to generate the HTML Pydoc for each of these files and place the generated Pydoc onto my Desktop. I just need help running the commands from …

0
59
Member Avatar for sliver_752

How do i put a Button indside the cell of a ListControl in wxPython. Thanks in advance.

0
57
Member Avatar for iluvblender

Hello Folks. This is Satish and my first post on DaniWeb. :) Ok. now that the formalities are over, lets get to business.:cool: I am writing a custom image viewer for Blender using Python+OpengGL. This script runs inside blender window. You can find the status of my project at the …

0
46
Member Avatar for jtxay

Hello, well i have written some code to try and simulate rolling a dice.. my program has to be able to play craps... here is how it should be played.. In a nutshell craps is played with two regular dice. You win a round of craps if your first roll …

Member Avatar for mawe
0
115
Member Avatar for Jellomaster

I need help with a program I am making it creates window but doesn't display buttons aor text controls [code=python] import wx import MySQLdb db = MySQLdb.connect(host="localhost", user="root", passwd="Hornets71", db="soul_society") cursor = db.cursor() class MainWin(wx.Frame): def reg(): number = self.numtxtctrl.GetLineText() name = self.nametxtctrl.GetLineText() uid = self.uidtxtctrl.GetLineText() cursor.execute("INSERT INTO member_list (number, …

Member Avatar for jrcagle
0
78
Member Avatar for atetrault

All, New to python programming so bare with me but I haven't quite seen an easy way to do this and looking for some suggestions. I want to be able to replace some contents of an [B]exisiting[/B] file either by both inserting new statements or modifying/replacing new ones withiout touching …

Member Avatar for jrcagle
0
295
Member Avatar for fredzik

G'day, First of all a very big thank you to both Jeff and Vegaseat for their great help...but sadly :icon_sad: it's not what I needed. Being a novice at Tkinter I did not realize what Tkinter was and was not capable of and I therefore blame myself :icon_redface: for any …

Member Avatar for fredzik
0
878
Member Avatar for muddpigeon

ok so i got the last part finished and working now for the bit i havent done before at all. instead of the pickle file the customer data has to be read in from a data base i have been supplied with the data base and the code but i …

Member Avatar for katharnakh
0
133
Member Avatar for muddpigeon

ok you will probably be sick of my posts but i have tryed and got this far, i ripped the program to pieces and started again. basically its a atm program that i have to do for college. if anyone can see why its not workin properly it would be …

Member Avatar for muddpigeon
0
120
Member Avatar for Blujacker

Hi, it's me again and i have new question: This is my code: [CODE]# -*- coding: cp1250 -*- import string as _string import time as _time import wx from math import* class Canvas: def __init__(self,parent): self.okno=parent self.okno.SetBackgroundColour("#FCFCFE") self.radic = wx.FlexGridSizer(2,2,0,0) self.canvas = wx.ScrolledWindow(self.okno, -1) self.canvas.EnableScrolling(True, True) self.P_WIDTH = 1000 self.P_HEIGHT …

Member Avatar for jrcagle
0
248
Member Avatar for jrcagle

So it's like this: I want to create an 'activebutton' widget with the following properties. * The button itself is text that changes foreground color when the mouse hovers over it. * If the mouse hovers for more than 200ms, a PopupMenu appears that allows the user to select a …

0
74
Member Avatar for newharvar

import httplib conn = httplib.HTTPConnection("<A href="http://www.python.org",80">http://www.python.org",80) conn.request("GET", "/index.php") r1 = conn.getresponse() print r1.status, r1.reason conn.close() where I test it,it show errors as below: Traceback (most recent call last): File "E:\Program\demo\src\testhttp.py", line 6, in <module> conn.request("GET", "/index.php") File "C:\Python25\Lib\httplib.py", line 862, in request self._send_request(method, url, body, headers) File "C:\Python25\Lib\httplib.py", line 885, …

Member Avatar for jrcagle
0
151
Member Avatar for trihaitran

I am trying to run a Cherrypy tutorial from this site: [url]http://www.serpia.org/cherrypy[/url] It is giving me this error when I try to run the start.py: [code] bob-smiths-powerbook-g4-15:~/Desktop/CherryPyTutorial/cgi-bin bobsmith$ python start.py Traceback (most recent call last): File "start.py", line 21, in ? cherrypy.server.start() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/cherrypy/_cpserver.py", line 92, in start raise ValueError("No …

0
60
Member Avatar for pareshv22

hi ppl i m a biologist by profession and wish to learn python , may i request for any online free book or guide ! thankx in advance with regards

Member Avatar for Ene Uran
0
85
Member Avatar for Blujacker

Hi I am solving new problem and i cant find any solutin:( i have wx.PaintDC and i painted there some lines. I am trying to save it as file. I found only something about BufferedDC, but it didnt work corectly:( Thanks for all post!

0
43
Member Avatar for jrcagle

I wanted to do an image viewer for a photo catalog project. Here is the code: [php] import Image, ImageTk from Tkinter import * filename = "C:/Pictures/2006/2006.07.04/E clarus 1 crop.jpg" class MyFrame(Frame): def __init__(self, master): Frame.__init__(self, master) im = Image.open(filename) # <--- chokes! im.resize(250,150) self.image = Label(self, image=ImageTk.PhotoImage(im)) self.image.grid() self.grid() …

Member Avatar for aot
0
6K
Member Avatar for aot

So, it would be nice to be able to insert scrollbars into my program (with Tkinter). Right now I'm using labels to display all my long blocks of text, and people flip through pages to get throught it all. I thought I'd try to add a scrollbar, but it doesn't …

Member Avatar for Lardmeister
0
106
Member Avatar for aot

So I'm at the final stages of my program -- it's a working experiment that creates a data file for each participant. My hope was that when I was done, it would be relatively easy to create an analysis program that searches through all the data files and create a …

Member Avatar for aot
0
127
Member Avatar for muddpigeon

ok you will probably be sick of my posts but i have tryed and got this far, i ripped the program to pieces and started again. basically its a atm program that i have to do for college. if anyone can see why its not workin properly it would be …

Member Avatar for muddpigeon
0
175
Member Avatar for leeqiang

I just wanna use PyScripter.and I found when I run a test with wxpython.it's dummped.(I have installed the wxpython packge)How was that?:'(

Member Avatar for leeqiang
0
111
Member Avatar for Prahaai

Hello. I am not new to Python in general, but i'm new to Tkinter. So, can anyone suggest me HOW can i make an interface like mIRC, with two text-boxes: - the lower text box will be one line and will be used to get the text commands. - the …

Member Avatar for leeqiang
0
86
Member Avatar for trihaitran

Hi I know this sounds really stupid, but I cannot figure out how to run the wxPython demo program. I'm using OS X and I downloaded the latest demo/docs package. When I double click on the "wxPytho demo.app", there is a splash screen with the wxPython logo, but then there …

Member Avatar for leeqiang
0
335
Member Avatar for alba07

I wrote a program in java that takes a message entered in the shell and flashes the message, then click the quit button to quit. Now I am supposed to rewrite it in python. So far in TKinter I only have the actual quit button (gui). I have no idea …

Member Avatar for alba07
0
240
Member Avatar for sliver_752

Hello all, Is there any algorithm to convert a python tuple to [URL="http://www.daniweb.com/techtalkforums/thread74502.html#"]MySql query[/URL]. Ex: [B] ('*','name','sliver')[/B] should convert to [B] select [Pri_Key] from [All Tables] where 'name' = 'sliver';[/B] I have been able to do so ... but my [URL="http://www.daniweb.com/techtalkforums/thread74502.html#"]algorithm[/URL] looks very ugly and have to process everything bit …

Member Avatar for iamthwee
0
73
Member Avatar for fonzali

hi , below is my program which is supposed to accept 3 different numbers , add them up and print the result but what it does is that it takes the first number and mutiplies that by 3 , where have I gone wrong ? [code=python] from Tkinter import * …

Member Avatar for fonzali
0
852
Member Avatar for pinder

hey guys im trying to express this in python, for i in $(ls [B]lsb[/B]/desktop); do tjreport [B]lsb[/B]/desktop/$i/journal* > [B]lsb[/B]/desktop/$i/${i}fail; tjreport -d [B]lsb[/B]/desktop/$i/journal* > [B]lsb[/B]/desktop/$i/${i}all; done its shell commands but i dont know how to do this in python could u guys help please thx

0
59
Member Avatar for grandprix

hello all, i need to write a script for windows server 2003 that will allow me to add new users to the Active Directory, but not conventionally, as i will soon explain. This is a full command right now: dsadd user "CN=ATEST001,OU=local-admins,DC=red,DC=qumranet,DC=com" -display "ATEST001 FAMILYNAME" -pwd 123456 -u RED\administrator -p …

Member Avatar for jrcagle
0
104
Member Avatar for heartheart

I have a script that spawns two threads, one for incoming data off a socket and one for outgoing. The series of execution is currently as so: Connects to server Outgoing thread sends login information Incoming thread recieves some information back Outgoing thread enters / leaves critical section Outgoing thread …

Member Avatar for heartheart
0
76

The End.