15,181 Topics
| |
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 … | |
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 … | |
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 … | |
How do i put a Button indside the cell of a ListControl in wxPython. Thanks in advance. | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 | |
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! | |
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() … | |
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 … | |
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 … | |
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 … | |
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?:'( | |
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 … | |
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 … | |
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 … | |
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 … | |
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 * … | |
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 | |
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 … | |
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 … |
The End.