15,181 Topics
| |
I want to see if a certain word is in a text file, how do I go about that? | |
Hello all, Is there any algorithm to convert a python tuple to MySql query. 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 algorithm looks very ugly and have to process everything bit … | |
G'day, I've been googling for the last three weeks :eek: trying to get an example of a program larger than a simple "Hello World" that works inside it's own GUI. I've been working on the "GUI with calculator" in this same section of Daniweb, but as soon as I put … | |
Does anyone know if there's a way to make a larger entry box in Tkinter? I'm looking to allow users to enter comments at the end of my program, so there should be plenty of space. | |
hi everyone, i am newbie for python.. what i want to do is to click on the button and the python script will add up for what i ordered/choose from the webste... th can some one give me idea? | |
Does anyone know where this comes from or comes in! I haven't seen it and now i have seen it in my code ( i know what it means but can anyone provide somemore info....) | |
Hi I am creating a loop, and for one of the ?possibilities (or answer things or whatever they're called when you can execute commands from the results) i have a result of None. This is the code. ready = False while not ready: input = raw_input("Are you ready?") if input … | |
Hello everyone, I am trying to run my .psp project on the IIS.But It is giving the some CGI ERROR. I dont know why it is giving such error. The project is working wee on the Wamp Apache server. I went through the microsoft support help. And follow the instruction,But … | |
Hi all, I've been working on a program that simulates a racquetball match. The problem I am having is getting the match to end when one player is the clear winner of 'n' games. I've tried adding modules, altering loops, adding variables, etc. Is anyone able to help by pointing … | |
i am trying to sort a list using recursive function... the first thing i want to do is to extract the maximum element and append it to a recursively sorted sublist. def selsort(l,maximum = 0, appending = ""): if l: if l[maximum]<l[len(l)-1]: appending = l[0] selsort(l[len(l)-1:0],maximum +1) sort_list = sort_list.append(appending) … | |
I have a problem is phasing the extended charactors in TK(). Any help would be apreciated. a='itself ‘a parody’.' >>> a "return" 'itself \x91a parody\x92.' >>> def display(data): root = Tk() scrollbar = Scrollbar(root) myTextWidget= Text(root,yscrollcommand=scrollbar.set) myTextWidget.insert(0.0, data) scrollbar.config(command=myTextWidget.yview) scrollbar.pack(side=RIGHT, fill=Y) myTextWidget.pack(side=LEFT, expand=0, fill=BOTH) >>> display(a) I ended up geting … | |
Hi, I'm looking at writing python script to enable me to trigger multiple ftp processes concurrently in the background mode, like using "&" in shell programming. Can someone share with me the command to do so? Thank You. LYL | |
I wasn't able to run a Python script. But then later I was able to run it through the Shell. I was experimenting with cron jobs and set up the python execution in as a cron. The first time it ran, It was fine but then after that, it started … | |
This is what I have. I know I am missing something can you help [code = python]import string def main(): print "This program replaces 4 lettter words in a file with xxxx" # get the sequence of words from the file fname = raw_input("File to analyze: ") text = open(fname,'r').read() … | |
I want to make find in my text editor like in mozilla firefox on the bottom of my gui this is only for learning. [code=PYTHON] class MyClass(Frame): def onFind(self, target=None): if target == None: target = tkSimpleDialog.askstring('Find!', 'Search for string!') if target: where = self.text.search(target, INSERT, END) if where: pastit … | |
#!/usr/bin/python import string import re import random import sys import time import fileinput tn = time.time() t = str(tn) ss = "5571" lv = open("/usr/local/https/data/session1.txt","r") lvr = lv.readlines() l_lvr = len(lvr) #print lvr l_list = [] for i in range(l_lvr): test = re.split('\|', lvr[i]) l_list.append(test) #print l_list for u,s,t,sp in … | |
I want to make undo/redo functions for my text editor and my paint editor writen in tkinter. which will be the easiest or the better way to do that? thanks | |
hi all i cant figure out how to put popup window to show in the middle of my text editor? It is writen with Toplevel in tkinter. thx | |
HI, I am very very new to python and I am tring to work on a homework assignment. I know that you only give help to those who help themselves, so I am hoping that you can help me. I have to write two python programs, one that will take … | |
What am I doing wrong? I am to take the average number of each cooled, heated, regular and either subtract the degrees below 60(heated) or above 80(cooled),then add that number to the number of days # Chpt 8#11Tempdays.py # A program to add a set of temperatures enter by the … | |
hi friends, i am able to parse the xml file and retrieve the corresponding tag values. Now how can i send the retrieved values from python function to the c functions. And also can any one help me in retrieving all the sub tag values from a particular action tag. … | |
I have encountered a problem with variables which I have defined in a module and then manipulating them from other modules. I have something like this in moduleA.py: [code] gVar = None def getVar(): return gVar def setVar(val): gVar = val [/code] Then, in moduleB.py I have this: [code] import … | |
Hi All, I'm having huge problems with a program that i am attempting to write. What i have is a program that prints Acronyms and sentences to a text file already, now i am trying to create a new program that reads that text file and if the user inputs … | |
Hello, I am having a great amount of difficulty understanding events for wxPython and have read many tutorials and other things so I was wondering if you could try to help me understand. First of all I am using Boa-Constructor so practially all of my code so far is autogenerated. … | |
Hey, I'm doing a project with Python right now and am wondering what the heck a "/n" command does? ANY help would be greatly appreciated! | |
Can anyone recommend some good wxPython tutorials for wxPython 2.8.3 please? | |
G'day, I've been working with Pyhton for about six months and have been wanting to put a program into a seperate Tkinter GUI but have had no luck. I need to have a Tk GUI that has vertical scrolling exactly like the normal IDE except that positioned in the upper … | |
how do i collect ip address of browser to validate him | |
I found this code, but can't find the needed module: [CODE] # display the info of a list, dictionary and tuple # needs apihelper.py from apihelper import info # create a list (or other container) li = [] # now display the available inormation print info(li) print "-------------------------------------------" # create … | |
Hi, For some reason, every Python script I try to run in the Windows command prompt fails to run. I get this output for "python setup.py py2exe": [code] Traceback (most recent call last): File "setup.py", line 4, in ? import py2exe ImportError: No module named py2exe [/code] I've installed py2exe … |
The End.