14,947 Topics

Member Avatar for
Member Avatar for vital101

Hey everyone, I've recently needed to use python to retrieve a cookie from someone visiting my web site. This is all needing to be done server-side, so I will (i think) need to use the Cookie module. I've looked online everywhere, and I'm having a hard time figuring out exactley …

Member Avatar for vegaseat
0
87
Member Avatar for aot

So I would really like to use Python to play some sound files -- it doesn't particularly matter what format, as they're just going to be basic "ping" type noises. However, it seems like whatever advice I find doesn't work out for my situation -- most modules seem to be …

Member Avatar for aot
0
94
Member Avatar for jwjazz

Why does entering the expression 011 evaluate to 9? and 0111 = 73, 01111 = 585, and so on.

Member Avatar for sneekula
0
109
Member Avatar for jwjazz

This function is part of a program to convert numbers between different bases. [code=language] num = 32 b1 = 10 b2 = 2 x = 1 def increasex(num,b2,x): if num%(b2**x) < num: x = x+1 increasex(num, b2, x) else: print x return x print increasex(num,b2,x) [/code] The parameters are the …

Member Avatar for jrcagle
0
135
Member Avatar for leonardo01

Over the past two weeks I have let a lot of negative thoughts creep into my mind and has resulted in the feeling of being lost. I'm working on my visualization again and trying to get back on track. Any suggestions, tips, tricks etc on how to remain in line …

Member Avatar for elizabeth_7w
0
95
Member Avatar for qwerty__123

Hey, I'm having trouble with an exercise from a book, here it is; " Write a program that reads the values for a random list of card from a file,(cards.txt) where each line in the file represents a single card with the rank and then suit seperated by a space. …

Member Avatar for bumsfeld
0
100
Member Avatar for thian_seng

Hi all, Can I know if there's any other way to load and call functions inside a dll, besides using ctypes module? Thanks...... Best Regards Vincent

Member Avatar for bumsfeld
0
88
Member Avatar for nam5a

I was wondering if there is something in python similar to the begin expression in Scheme, and if not how would you write something in python to simulate it.

Member Avatar for nam5a
0
113
Member Avatar for chris99

I've successfully made an engine for a point and click game, but I want to know how to put subtitles so you know what the characters are saying. All I know is how to parent text to a background, do I just need to make an invisible layer with a …

Member Avatar for chris99
0
141
Member Avatar for dwrick

I am new to python and Tkinter. I was trying to build an addressbook for my class. I have the Tkinter GUI looking good - nothing fancy. Now I can't get my python part working. I want to keep the GUI in its own class and file. My two files …

Member Avatar for vegaseat
0
1K
Member Avatar for olufunkky

Please I need help with the following exercise: 1.Write a program that continually reads in numbers from the user and adds them together until the sum reaches 100. Write another program that reads 100 numbers from the user and prints out the sum 2. Write a function that implements Euclid's …

Member Avatar for olufunkky
0
269
Member Avatar for fidolip

Hi! Probably that's gonna be absolutely no0b question, but I have to ask it: Say, I have two files, program.py and GUI.py. I have to launch the GUI from the program.py file, i.e. I have to call main function of GUI.py file from within the program.py. Could someone tell me …

Member Avatar for fidolip
0
27
Member Avatar for wandie

How do i take results in a mutli dim array and write it to a text file. Each sub array goes on a new line. I am a newbie at this. [code] [[2934110, 'B1', 'D4', '7C7C7C7C804040404040F140404000'], [2934110, 5, 1, 1, '01', 'Actes Sud '], [2934110, 4, 1, 2, '8C00Dubbelganger (motief)'], …

Member Avatar for wandie
0
102
Member Avatar for Blujacker

Hi I am trying to get the mouse position on my Canvas [code] # -*- coding: cp1250 -*- import wx class Okno: def __init__(self,parent): self.okno=wx.MDIChildFrame(parent,title=u"Náhled situace",id=-1) self.okno.Maximize() self.okno.SetAutoLayout(True) self.okno.SetBackgroundColour("#FCFCFE") self.sizer = wx.FlexGridSizer(2,2,0,0) # Add canvas self.platno = wx.ScrolledWindow(self.okno, id=wx.ID_ANY) self.platno.EnableScrolling(True, True) self.sirka = 10000 self.vyska = 10000 self.platno.SetScrollbars(20, 20, self.sirka/20, …

Member Avatar for Blujacker
0
229
Member Avatar for fredzik

Hi, I'm puzzled by how one positions in Tkinter. Take a look at the following code: [code=Python]print "...................................Hello, world!"[/code] This works fine in the Main Idle but when it comes to Tkinter I'm confused:confused: . The game I'm working on has about 30 "clues" dotted all about the screen. About …

Member Avatar for fredzik
0
135
Member Avatar for thian_seng

Hi All, Urgent SOS!!! I developed my project using pyton 2.5 under winXP and had an issue in loading my dll if the target user is using Win2000. Initially, I thought it was caused by the dlls I created were not compatible with Win2k. Then, I wrote a simple MFC …

0
48
Member Avatar for fredzik

G'day, I've worked on your code Vegaseat and have come up with the following rough sketch of how my game will look in the end: [code=Python]# using geometry manager Tkinter.Place for layouts # tested with Python24 vegaseat 28apr2007 import Tkinter as tk import random as rn #help('Tkinter.Place') root = tk.Tk() …

Member Avatar for fredzik
0
118
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
450
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
45
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
104
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
77
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
223
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
856
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
132
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
114
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
237
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
73

The End.