611 Posted Topics

Member Avatar for HoneyBadger

I dont see why you cant change that. You extended the wx.Frame class so you can overide methods and variables in your calss if you want. The only problem i see is your gridsizer not well coded hence breaks apart when expanded. ;)

Member Avatar for richieking
0
239
Member Avatar for FAITH2011

i will wait till you put your code in the code tag tomorrow before i comment. ;)

Member Avatar for griswolf
0
216
Member Avatar for dragonstear

well this is a way to atleast find a word and its position out. [CODE]from __future__ import print_function list= ["gene","fooo","spam","spat","foo","gene","geni","spilat"] print([(count,gene) for count,gene in enumerate(list)if gene=="gene"], end="") ##output [(0, 'gene'), (5, 'gene')] [/CODE] Hope it helps ;)

Member Avatar for dragonstear
0
165
Member Avatar for brianmitchell
Member Avatar for HoneyBadger

This thread is off the hook. Is this about reordering a dict in order(sorting) or printing and finding some words and their locations + ordering them ???? ???? ;)

Member Avatar for seanbp
0
145
Member Avatar for Python_Doofus
Member Avatar for furret
Member Avatar for kpxny2sk
Member Avatar for Blackberryy
Member Avatar for barthooper

Sometimes binding 2 events need a skip() function. eg. [CODE] def more_proc(self,event): """do your stuff here and call the skip() after that.""" skip() ## needed so that the event fall through to another event [/CODE] Try including that. ;)

Member Avatar for richieking
0
91
Member Avatar for Xeex

gethostbyname / gethostbyaddress will always provide the main ip. That is if the sever is a shared hosting type. Why not simply provide the ip address you want to bind to?

Member Avatar for richieking
0
200
Member Avatar for halien

That shouldnt be hard. How exactly is your text formatted? can you shoe a copy of that? or is the same as what you got up there. [QUOTE]This code would loop through 60/2 data combination (1 combination = TEXT + BINARY DATA). What I tried, was to read the entire …

Member Avatar for woooee
0
117
Member Avatar for Simplified

Well get a pencil and a notebook. Always write down what you want your application to do and arreange them how they should work step by step. Is a good idea to understand what you want to do. Dont rush with big tasks. Design by divide and conquer. Meaning make …

Member Avatar for Simplified
0
107
Member Avatar for kk12345
Member Avatar for TrustyTony
0
375
Member Avatar for novice20
Member Avatar for flayer84
Member Avatar for flayer84
0
192
Member Avatar for nosehat

Why not just provide text to every field what sort of inputs acceptable.... Won't that be more robust? ;)

Member Avatar for richieking
0
131
Member Avatar for PhEnSciLaBu

I think he ment printing image just like printing plain txt files. No you cant print image like that. Thay can be worked on and as Gribouillis stated. You can read in work on it, then save the image. Using PIL module or Image module will give you very interesting …

Member Avatar for PhEnSciLaBu
0
290
Member Avatar for dmurder

I realy dont get what you want but i just optimised your code. Hope it helps[CODE] def getScores(totalScores, number): score = input('Enter their score: ') while score <=0 or score >=100: print'You must enter a number between 0 and 100' score = input('Enter a number between 0 and 100:') for …

Member Avatar for richieking
0
150
Member Avatar for dmurder
Member Avatar for novice20

Start reading python ftp lib. Connect via ftp then you get access to the remote system. bingo ;)

Member Avatar for richieking
0
639
Member Avatar for wazaa
Member Avatar for Swedenrock
Member Avatar for woooee
0
143
Member Avatar for 1989sam

[B]or this[/B] [CODE]from __future__ import print_function products = ["YELLOW,SMALL,STRETCH,ADULT,T21fdsfdsfs", "YELLOW,SMALL,STRETCH,ADULT,Tdsfs", "YELLOW,SMALL,STRETCH,ADULT,TD"] print([this.split(",")[0:-1] for this in products],end="") ##output## [['YELLOW', 'SMALL', 'STRETCH', 'ADULT'], ['YELLOW', 'SMALL', 'STRETCH', 'ADULT'], ['YELLOW', 'SMALL', 'STRETCH', 'ADULT']] [/CODE]

Member Avatar for seanbp
0
107
Member Avatar for xtra333
Member Avatar for richieking
0
149
Member Avatar for Banjoplucker

Try this..... [CODE]import re WORDPERFECT="\x0a" with open(wordsearch,"rb")as word: buff=word.read()# You can also just read a small buffer to check. word.read(10) if re.search("^(\\x0a)$", buff,re.M ): print("Wordperfect registered") print(buff.find(WORDPERFECT))[/CODE]

Member Avatar for richieking
0
121
Member Avatar for twohot

I dont know about Multiprocessing but i know that threading+socket will do this job without any issues at all. ;)

Member Avatar for woooee
0
117
Member Avatar for Naynah
Member Avatar for polanski

Do you want to strip all spaces ??? This will join all the text together. New line is also counted as space so what are you realy looking for? ;)

Member Avatar for richieking
0
161
Member Avatar for convoluted

With image stuff. Try and refresh after update. This will show image nicely else the output of your image will differ from OS to OS and you dont need that do you ? :)

Member Avatar for richieking
0
176
Member Avatar for longlongsilver

There are several ways to achieve this. You can define enumration of colors. These color got id which are int. eg.[CODE] RED=200 BLUE=300 YELLOW=400 PINK=500 [/CODE] Then import random to rand the range from 200-500 by 100 (100,500,100) Then provide the result in the bind method to set the color …

Member Avatar for richieking
0
309
Member Avatar for testie

[B]Polanski[/B] rstrip()/strip() methods only strip well only on inputs. To make things simple. if you recieve input from the user, then use the r/strip(). You can not use the strip only mechanism to strip a text file which is already formatted. Also strip() methods will only strip the buffer provided. …

Member Avatar for richieking
0
106
Member Avatar for HoneyBadger

well you can try this ok? GPL feel free to use it ;) [CODE] from __future__ import print_function import re with open("frisky.py","r") as file: real_value=[ re.sub('[_\W]*', "", value) for value in file] #I could make all one-liner but i thought you may want to extend on the code. wont you? …

Member Avatar for HoneyBadger
0
101
Member Avatar for Thropian
Member Avatar for nejger
Member Avatar for woooee
0
109
Member Avatar for Binika

I think you need a GUI script. That will be more handy. Writting a recursive script to recurse through your entire file system is not that good on resources. Think about it. ;)

Member Avatar for TrustyTony
0
217
Member Avatar for MaC-CK

Hi, on #35 you provided a return statement. That is good but return will not print a value. you must either use a print there or use a print on #14 on the function. Mixing print and return can get confuse noob. optimise that part. ok ? ;)

Member Avatar for MaC-CK
0
135
Member Avatar for ciliath

Use the style wx.TE_RIGHT ok? eg [CODE]wx.TextCtrl(self,-1,style=wx.TE_RIGHT)[/CODE]

Member Avatar for ciliath
0
224
Member Avatar for ljjfb

[B]Gribouillis updated[/B] Information like this will always need a callback into action. Therefore i thought of updating your script a little. [CODE] with open("logfile.txt","a+") as logfile: logfile.writelines(str(stdout_value)+"\n") # To get the newline. easy to work with that [/CODE] In the end. You can read-in your data for further manipulation if …

Member Avatar for richieking
0
191
Member Avatar for Favolas

[B]Favolas[/B] Try this ok.?? [CODE] sd=[] sd.append("b"*2) for x in range(3): sd.append("a"*5) sd.append("b"*4) df=sd[0:-1] df.append("b"*2) print(df) ## output ## ['bb', 'aaaaa', 'bbbb', 'aaaaa', 'bbbb', 'aaaaa', 'bb'] [/CODE] Hope it does work

Member Avatar for woooee
0
115
Member Avatar for yellowkaiq

Improve over this script. This should work for you. [CODE]from __future__ import print_function words=["happy",'monty python',"hello","zombi","bone","monty"] def word(words): for x in words: if x.endswith('y'): #get the ends f=[y for y in x] #strip to list for easy slicing fex1=f[0:-1] #take the end away fex1.append("ier") # append your wish print("".join(fex1)) #convert to …

Member Avatar for yellowkaiq
0
187
Member Avatar for blacknred

Another easy way is formating as [B]woooee[/B] just stated. Here format so that your data show on line by line. So lets say you have the whole time stuff on line 5. You just replace all line 5 with your new time stamp. Always think about future and updates. Planing …

Member Avatar for richieking
0
187
Member Avatar for Roriomphe
Member Avatar for richieking
0
126
Member Avatar for king_koder
Member Avatar for Harris00
Member Avatar for imanewbie015
Member Avatar for convoluted

Well you can also place your loop in a function then use threading. With this you can manage the flow of your programme and CPU usage. use modules sys,os,thread and time together. Why am i saying this?... you can check with the CPU percentage or even give one core of …

Member Avatar for convoluted
0
198
Member Avatar for funfullson

You need the API of the client eg. Yahoo or msn or google then you ceck if there is python wrapper to that. Start looking into the API of the client and google around for any python module to start from there :)

Member Avatar for richieking
0
274
Member Avatar for atla

try this [CODE]import time, a = 0 b = 0 FirstRun = True while 1: a = a + 1 #Adds one second if a > 59: #Accounts for minutes b = b + 1 a = a - 60 print("The current time is %d :%d"%( b ,a)) time.sleep(1) [/CODE] …

Member Avatar for richieking
0
170
Member Avatar for Awah Mohamed

There are several ways to achieve this. I will talk about 2 of them. 1. You can have a script to create a mail account on your server eg.like gmail,yahoo. The user get created account with the pop/smtp client once signed up. 2. You cant jest create a php/mysql backend …

Member Avatar for richieking
0
68

The End.