15,181 Topics

Member Avatar for
Member Avatar for JA5ONS

guys, im after a piece of code that when embedded into a button, clears the text entry boxes of the GUI so new information may be added. Like adding a new customer after you press save. At the moment you press save but the information stays there cheers.

Member Avatar for vegaseat
0
104
Member Avatar for vegaseat

This post by [B]s7plc[/B] was moved from the Starting wxPython (GUI code) thread ... [QUOTE]I've been working with various widgets from the wxPython demo library, and am making pretty good progress. But I just ran into a problem that I am sure has a simple answer, but I just can't …

0
81
Member Avatar for Peter_Saumur

Hi all, First-timer and first post. I have been given a task of convert large data files to/from a self-defined format. In the "xml" form, the format for each record is: [CODE] <power> <name> </name> <level> </level> <kind> </kind> <source> </source> <flavor> </flavor> <type> </type> <keywords> </keywords> <action> </action> <attackTypeAndRange> …

Member Avatar for Peter_Saumur
0
85
Member Avatar for JA5ONS

so i have created a program, im not sure how to change gui screens, for example, the first screen is username/password on the opening scree, and than it will move onto the next screen where i can input data when i have enterd password correctly. cheers

Member Avatar for shadwickman
0
106
Member Avatar for Dekudude

[code=Python] def checkIt(arr,inp): bool = 0 for i in arr: if i in inp: bool = 1 break return bool array = ['hi','hey','hello'] string = "Hi there!" if checkIt(array,string) print "Yay!"; [/code] That's my code. It returns, "Yay!". Now... I like what it does-- it searches the string for a …

Member Avatar for shadwickman
0
122
Member Avatar for slendergreen

I'm new to Python and not anywhere near a competent programmer. Anyway, if someone could help me get over this hump, I'd appreciate it. I need to write a Python script that calls commands from the OS that may have lengthy output. Let's say I want to see the results …

Member Avatar for Gribouillis
0
123
Member Avatar for Gribouillis

In the Perl language, you can fork a child process with the following syntax [code=perl] open CHILD, " | programA | programB | program C"; print CHILD "this is an example input"; [/code] (at least, you can do this under linux). This statement starts 3 processes in fact; programA, B …

Member Avatar for slate
0
225
Member Avatar for agibbons

I am making my own file manager for linux, hopefully it will be cross platform, and I am trying to identify different file types, in particular folders. I have already searched google but I could only find a way of identifying text files. Does anyone have any advice on identifying …

Member Avatar for slate
0
305
Member Avatar for magicMan123

Hey everyone, I am a beginner at python, and on these forums (even though I have lurked here quite a bit). Anyway, I really need some help with recursive functions. I don't exactly know how they work, and I have to be able to answer the following questions: [code] Turn …

Member Avatar for slate
0
184
Member Avatar for magicMan123

I need to do the following question: [code]Turn a line of input containing matching pairs of round (()) or curly ({}) brackets into a mountain range. The height of the mountain should indicate how deeply nested the brackets are. For example, given this input: {({(){}()}{(){}()})({(){}()}{(){}()})({(){}()}{(){}()})} Your program should output: (){}() …

Member Avatar for slate
0
315
Member Avatar for dmlandrum

I'm trying to create a table of values based upon tanh(x) (nevermind the cubic function for the moment): [code=python]#!/usr/bin/python import math def cubic(y0, y1, y2, y3, mu): a0 = y3 - y2 - y0 + y1 a1 = y0 - y1 - a0 a2 = y2 - y0 a3 = …

Member Avatar for dmlandrum
0
112
Member Avatar for JA5ONS

I have created a program that records my input through the python command line, it asks for ie, name, favourite food, (they are examples only) it than writes the inputs to a text file, and calls the text file by one of the inputs (eg, name) i now want it …

Member Avatar for slate
0
98
Member Avatar for bimaljr

Hi I just want to count files of particular type (like *.txt) in a folder. I searched net and found this for all files count : file_count = len(os.walk(valid_path).next()[2]) But I need perticuler type like *.txt . (means how many .txt files in folder) How to do this ? Thanks …

Member Avatar for bimaljr
0
8K
Member Avatar for OffbeatPatriot

I'm making my first python program that uses multiple threads. Basically you have the main program, in this program by use of various widgets you can define how many threads you want to run and the details of how these threads will run, then you can click on a menu …

Member Avatar for Gribouillis
0
94
Member Avatar for keripix

Im making this application that lists all of my ebook and the subjects i assign them to. But i have problem to display the value of the item that i select in the QListWidget to the lineeditor. Can somebody help me? And last question, how do i open the ebook …

0
50
Member Avatar for Jadellll

My code is below. Try running it if possible to see the problem. But basically, after returning the word as backwards (cc2) it then displays none on a new line. Why? and how do I prevent this in the future? [CODE]print "Welcome to the string reverser and palindrome checker. \n …

Member Avatar for Aia
0
137
Member Avatar for Scuppery

Hi everyone I am having a little problem with a program that I wrote [code=Python] def P(): a = "a" aa = "aa" b = "b" bb = "bb" text = raw_input("Enter Text: ") SpacedText = ' '.join(list(text)) OutputText = SpacedText if a in OutputText: print aa if b in …

Member Avatar for shadwickman
0
96
Member Avatar for Dekudude

Hi there! For starters, let me say I am something of a Python newbie at the moment, but I'm learning more every day! Unfortunately, my script is at a standstill, and I can't figure out how to continue. I don't have an error, per se, but rather the inability to …

Member Avatar for Dekudude
0
218
Member Avatar for Jadellll

Hi, I'm looking for where either the sort module or the sorted() function resides. I'm thinking a module in the default folders, but have no idea where it is, or how to locate it (sorted is in the path, but I don't know how to display a parent based of …

Member Avatar for Jadellll
0
105
Member Avatar for autumnwinter

hiya, I am new to python but I must using it to write for my assessment. I am required to write an IMAP program which use to test the response time and throughput from the Courier-IMAP server in time-being. It is mainly uses to measure the courier-IMAP server performance. I …

Member Avatar for shadwickman
0
82
Member Avatar for besktrap
Member Avatar for besktrap
0
194
Member Avatar for flhtc

Please excuse me if I'm posting something that's been asked 100 times. I've done some searching but can't find what I'm looking for. Also please forgive my greenness, I've only been at this for a week now. I've have extensive experience with shell scripting, some C++, although non of the …

Member Avatar for flhtc
0
112
Member Avatar for mruane

I intend on creating, or at least simulating, Artificial Intelligence in a birthday gift I am making in python. The basic package is planned to be a multi-purposed program mostly concerned with entertaining. I am attempting to create Sally, the programs 'brain' if you will. Basic Idea came from the …

Member Avatar for Alonechild101
0
145
Member Avatar for rob spade

I was trying to create a control script for an HP procurve switch. The chararcters being returned from the python telnet read_until command appear to contain a variety of unexpected characters. See example below. When accessing the same device using the default redhat telnet client the characters do not appear …

Member Avatar for Gribouillis
0
934
Member Avatar for ccclay

Looking for help : I run abc.py with normal output as I expect, but get error in abc.pyc. Below is what I have done. Would you tell me what I have mistaken ? Thank you very much !! abc.py #!/usr/bin/python import datetime test_time = open('test.time', 'w') test_time.write('oh, today is\n') test_time.close() …

Member Avatar for Gribouillis
0
175
Member Avatar for Jadellll

I'm new here, so if this isn't the right place for this, just let me know and I'll move :) So I'm just learning python, and reading the tutorial [URL="http://www.python.org/doc/tut/node7.html"]python tutorial[/URL] and I don't really get this part. The first (seq = 0,1,2...,8) is fine, but then how does map …

Member Avatar for Gribouillis
0
127
Member Avatar for ohyeah

Hi I just started out with python.. I'm trying to write some code that will request a file with HTTP GET, be able to send custom headers to the remote host, download this file and save it locally, and show some kind of percentage downloaded which updates WHILE its downloading. …

Member Avatar for EAnder
0
480
Member Avatar for Jadellll

I know there exists the sort() function. What I want to know is how it was built. Is there a function in python to call the contents of a function Or can someone show me how that one was made. I'm doing a test, and it wants me to sort …

Member Avatar for sneekula
0
104
Member Avatar for dmpop

Hello, I need to fetch and display message subjects containing a specific word. Here is what I've got so far: [CODE]import imaplib imap = IMAP4("imap.mail.com") imap.login("username", "password") r, data = imap.select('INBOX') r, data = imap.search(None, '(SUBJECT "Reminder")')[/CODE] What I need now is to print a list of subjects of the …

Member Avatar for dmpop
0
7K
Member Avatar for Seagull One

Hello again, everybody. Now that I've just about learned all I can for programming my robot with 'smarts' (I think), I think I'm ready for a bigger challenge: Having my robot program aspects of itself. Right now I'm going to try to implement it into my robot's human socialization program. …

Member Avatar for Seagull One
0
452

The End.