15,194 Topics

Member Avatar for
Member Avatar for mece

I am new to python and posting to this forum and my searches turned up nothing. I am writing a component for a log parser to combine events from matching dates into one file. For some reason the log files split between 19:59:00 and 20:00:00 hours daily. To resolve this …

Member Avatar for mece
0
777
Member Avatar for XxAaronxX

[QUOTE=vegaseat;159480]A units of measurement converter. Think about all the things that are measured, like distance, area, volume, energy, weight, temperature, pressure and so on. Now think about the many units of measurement the people around the globe use, anything from rods, stones, pounds, inches, pints and liters. A rather long …

0
96
Member Avatar for imabut

i'm trying to implement my own edit menu using Tkinter, my cut and copy methods,... seems to work fine but I'm having allot of trouble getting my paste method to work. will someone please help? (((its kinda ugly i know, but i'm still new to programming and i'm more focused …

Member Avatar for imabut
0
3K
Member Avatar for Stefano Mtangoo

I'm just asking for anyone who knows anywhere to get list of inbuilt wx.ID like wx.ID_CLOSE etc (HTML/PDF), because I dont want to use Id while there is built one. Also can I use menu simiral to something like GetId() Method?? Thanks

Member Avatar for Stefano Mtangoo
0
860
Member Avatar for blackrobe

I've been reading an article but the code is written in C language which I don't get at all... The code is: [CODE]void traverse(Tptr p) { if (!p) return; traverse(p->lokid); if (p->splitchar) traverse(p->eqkid); else printf("%s/n", (char *) p->eqkid); traverse(p->hikid); [/CODE] Someone please translate it to python...

Member Avatar for tyincali
0
157
Member Avatar for laspal

Hi, I am trying to create xl file using pyExcelerator in django. response = HttpResponse( mimetype='application/vnd.ms-excel') response['Content-Disposition'] = 'attachment; filename=output.xls' workbook = Workbook() worksheet = workbook.add_sheet('My Test Sheet') worksheet.write(0,0, 'Company', font_style('left', 1, 'red')) worksheet.write(1,1, 'Hello World!', font_style('left', 1, 'black')) workbook.save() return response The problem here is I am not able …

Member Avatar for laspal
0
108
Member Avatar for Clipper34

Hey guys, well my question is i've seen examples of classes being to create like a function. But for example i saw someone made for a socket it was something along the lines of this: pySocket <host> <port> but i'm confused on how to create something like that. To get …

Member Avatar for Gribouillis
0
133
Member Avatar for Lardmeister

I was looking at some statistical evaluations of a dice roll and stumbled onto this strange result: [code=python]import random # faces of a dice dice = [1, 2, 3, 4, 5, 6] rolls = [] for k in range(3): random.shuffle(dice) #test print dice rolls.append(dice) # test print rolls """ my …

Member Avatar for Gribouillis
0
141
Member Avatar for pyth0n

Hi I am created a word guessing game. I have pretty much completed the game, but I cannot get it to do one thing. That is showing the users previous guess along with the new guess. For example, I want it to be like this Guesses Correct apple no blue …

Member Avatar for woooee
0
81
Member Avatar for mathijs

hey i'm currently working on a simple rpg in python. First i was gonna make it text-based but now i've read the wxpython tutorial and i want to try an create a GUI for it. My sister is gonna make some artwork for me (i'm not good at that kind …

Member Avatar for mathijs
0
601
Member Avatar for vmars

Greetings: I am having trouble with reading the code in thread "Tutorial: GUI programming with wxPython" ([url]http://www.daniweb.com/forums/post623598-3.html[/url]) Where tut shows code: [code] import wx """Example with sizers for dynamic resizing.""" app = wx.App(redirect=False) window = wx.Frame(None, title = 'Sample GUI App', pos = (100,100), size = (400,500)) background = wx.Panel(window) …

Member Avatar for vegaseat
0
192
Member Avatar for iamoldest

python 2.4 how do I say... [ICODE] if x is divisible by (random number) then: [/ICODE] in python coding?!? Thanks!!!

Member Avatar for jlm699
0
102
Member Avatar for dinilkarun

Hi All, I have created a two frames(Frame-1 and Frame-2) using BOA Constructor. Frame-1 has a button on it. On click of this button frame-2 is popped up to the user. I want the focus to be set only on Frame-2. What I mean is that: The application should not …

Member Avatar for dinilkarun
0
163
Member Avatar for dinilkarun

Hi all, I have used a status bar on my frame developed in BOA Constructor. I want to split my status bar into two parts in proportion of .75 and .25 i.e., First part should be 75% and 2nd part should be 25% of the total. And then at various …

Member Avatar for dinilkarun
0
172
Member Avatar for pyth0n

Hi, I am creating a game the asks the user if they want to play again at the end. If the user answers yes, I want python to execute the program again starting from the beginning. I have tried searching, but could not find anything. Is there anything in Python …

Member Avatar for pyth0n
0
106
Member Avatar for imcrackinup3

I have a project for which I need to use turtle. I'm very new to python, and our teacher didn't really explain how to use turtle. What's the basic format I need to use to draw a polygon? I have to define a function, polygon(), and run it with two …

Member Avatar for vegaseat
0
78
Member Avatar for MaxManus

When I am trying to install Python on my computer I get the error "administrative rights are required". It is only one account on my computer so I do not understand the message.

Member Avatar for Stefano Mtangoo
0
124
Member Avatar for suresh_iyengar

Hello, I want to fetch a web page and parse links in that. I am using the foll. code [code=python] file =urllib.urlopen("file:///home/suresh/html_parser/Category:Sports.html") content = file.read() # Process the page. [/code] But since the page contains UTF-8 content, its not able to parse it properly. But, if I save the page …

Member Avatar for tyincali
0
103
Member Avatar for massivefermion

Hi Excuse me but i came again Can someone learn me how to work with py2exe? thanks

Member Avatar for lllllIllIlllI
0
101
Member Avatar for dem10

I have been given a project in my Python class that reads in a file, and in the file, 32 attributes are given to determine if a lump is either a benign or a malignant tumor. In my trainClassifier function, I have to find each attributes total for both malin. …

Member Avatar for tyincali
0
206
Member Avatar for Astudent

So I am getting into the swing of python in my class, and am currently trying to take a program from an example, and making it much more condensed. The issue I am having, is there are many classes for a tkinter guessing game. [ICODE]def question5(): if entry5.get() in ["Samus", …

Member Avatar for tyincali
0
127
Member Avatar for Azurea

Hey Daniweb Python forumers, I'm guessing that this is a Vista thing, but when I run my wxPython programs in Vista by double-clicking the file, I get errors from the computer saying that "python.exe has stopped working". I also use the IDLE IDE, so when I run the program from …

Member Avatar for shadwickman
0
137
Member Avatar for dem10
Member Avatar for vmars

What's wrong with this code in Boa: [def OnMenuHelpAboutMenu(self, event) works fine if I use it to open file etc.., but won't work for Dialog2] Thanks! [code=python] #Boa:Frame:Frame2 import wx #import Dialog2 def create(parent): return Frame2(parent) . class Frame2(wx.Frame): . def OnMenuHelpAboutMenu(self, event): # if hasattr(sys, 'debugger_control'): # sys.debugger_control.set_traceable() dlg …

Member Avatar for sneekula
0
538
Member Avatar for oldSoftDev

Hi guys I am back sorry for too late just due to business in class I was unable to visit this site. But for long time I was planning to ask this question but was too busy. I am working on graphic creation in python and I created a basic …

Member Avatar for jlm699
0
94
Member Avatar for hobbz86

write a program that graphically plots a regression line, that is, the line with the best fit through a collection of points.First ask the user to specify the data points by clicking on them in a graphics window. To find the end of input place a small rectangle labeled done …

Member Avatar for jlm699
0
94
Member Avatar for leegeorg07

hi again i have been learning about algorithm solving and designing from the website [URL="http://www.ece.uci.edu/~chou/py02/python.html"]here[/URL] i sort of understood the first code but before i went on any further i wanted to understand it the code is [ICODE]def InsertionSort(A): for j in range(1, len(A)): key = A[j] i = j …

Member Avatar for ZZucker
0
295
Member Avatar for bugmenot

I have tried several things, but I just can't get this to work. What I need is a snippet which scans a program for value X, and then simply assigns a varible within the python script to the X value. I'm new to Python, but not to programming. Please be …

Member Avatar for BearofNH
0
882
Member Avatar for pyth0n

Hi, I am trying to get Python to pick random letters from a given list. However I don't want any repetitions, I just can't seem to figure out how to skip on letters already chose. Any help would be greatly appreciated. Here is what I have so far [code] let …

Member Avatar for pyth0n
0
5K
Member Avatar for ganil123

hi, is there any buitin function like ismethod, to check whether the method exists in the class. for example, Class sample: def fun(): def meth() object = sample(). passing this object(class instance) and fun(function name of class) as inputs i need to find out, whether this function is a member …

Member Avatar for lllllIllIlllI
0
225

The End.