611 Posted Topics
Re: [COLOR="Green"]Shodow14l be friendly ok?[/COLOR] | |
Re: [Code]s = "abc def ghi jkl" Print("\t".join(s.split())[/code] Or [CODE]print("Hello \t world")[/CODE] | |
Re: with better check with unique number. I think its not a good idea using enumerate function. Since enumearte repeates the number once new directory of files/ data in called. I use anydbm alot and i think the best way is to use a counter with a dict. Then you check … | |
Re: You must chmod cgi scripts to 0755. Cgi's only works with that permission. ok? :) | |
Re: but i dont see any prolem with binding a button to self. Infact i think its a good idea. Well not to start te holy war here but but that is my view [CODE] self.Bind(wx.EVT_BUTTON, self.OnSubmit, self.sendButton)[/CODE] have alot of advantages.... | |
Re: More user friendly :) [CODE] def prompt(acts): while True: print """ Please select one of the choices\n ==================================\n\n north\t south\n east\t west\n""" m = input("choice please: ") message = m.lower()[0] if message == "n": acts['north'] break elif message == "e": acts['east'] break elif message == "s": acts['south'] break elif message … | |
Re: or this.........[CODE] a = a= [(x+2,x*2) for x in range(1,300)] [/CODE] And plot some graph with it ;) | |
Re: You can import the wx module into you code. implemet the class of wx.grid. and call it into your Tkinter app. One thing you must be carefule is to destroy the wx.grid before you call the close/destroy else you will have a crash in your app. eg.....[CODE] def OnClose(self,event): self.grid.Destroy() … | |
Re: why dont you try pyqt forum my friend. :) | |
Re: Just save the path to the movie file into the database. Then you call the movie name from the data base by splitting the path. eg... [CODE]filename= pathtofile.split("/")[-1].split(".")[0][/CODE] Then you get the filename :) | |
Re: idle just got so many problems. Even on the linux box like ubuntu. You cant rely on idle gui. Thats a fact.! | |
Re: translate swedish to english using google translate and post that. ok? | |
Re: When lis pop. it removes the item from the stack. Take it like you got items ... [CODE] llist = [1,2,3,4,5,6,7,] llist.pop(3) ## removes : 4th item [/CODE] The pop means give out. So when you give out, you dont still have that. Like you cant eat your cake and … | |
Re: can you pls put your code into the code tags :) | |
Re: Nice one Gris. You are a teacher :) | |
Re: Here you are as you wanted buddy :) [CODE]import wx import os.path class MainWindow(wx.Frame): def __init__(self, filename='noname.txt'): super(MainWindow, self).__init__(None, size=(400,200)) self.filename = filename self.dirname = '.' self.CreateInteriorWindowComponents() self.CreateExteriorWindowComponents() self.prin=4004 def CreateInteriorWindowComponents(self): ''' Create "interior" window components. In this case it is just a simple multiline text control. ''' self.control = … | |
Re: You can also use re to remove all characters with the W flag. :) | |
Re: Gris you forgot about provideing the first word. [CODE]line[0][/CODE] Nice job mate :) | |
Re: mmmmmmmmmmmmm not bad. I jus dont see any real life need for this algo. besides There should be a better way than this. :) | |
Re: you will need pickle/anydb modules to save you words aginst a key. Thus for easy lookup. :) | |
Re: what module are you using? [CODE]self.request.get('path')[/CODE] means nothing | |
Re: [QUOTE]def on_paint(event): self.dc == wx.PaintDC(event.GetEventObject()) self.dc.SetPen(wx.Pen("BLACK", 4)) self.hangingman.Bind(wx.EVT_PAINT, on_paint)[/QUOTE] There error is this method you creadted is not part of the class without the keyword self. try this....... [CODE]def on_paint(self,event): self.dc == wx.PaintDC(event.GetEventObject()) self.dc.SetPen(wx.Pen("BLACK", 4)) self.hangingman.Bind(wx.EVT_PAINT, on_paint)[/CODE] And here you go ;) | |
Re: Pay attention to this and how its implemented please :) [CODE] element_list = ["H.jpg","He.jpg","Li.jpg"] for i in range(len(element_list)): image_id = int(i+1) image_current = wx.Image("/Applications/PeriodicTable/ButtonBitMap/%s" % element_list[i], wx.BITMAP_TYPE_ANY).ConvertToBitmap() current = wx.BitmapButton(self,id=image_id,bitmap=image_current,style=wx.BORDER_NONE) main.Add(current,1) self.Bind(wx.EVT_BUTTON,self.OnButtonClick,current) ## add thiss line def OnButtonClick(self,event): # And this is how you checked for the pressed button ButtonId=event.GetId() … | |
| |
Re: well but your code does not show where you defined 'MIMEMultipart()' but its implemented on line 30. | |
Re: This is even a basic one. Python can do almost everything you want to do. :) | |
Re: Well you can not just call your module and expect the imported modules to work right away. Say we got text.py which contains...[CODE] import socket, re, time import urllib.request, os, sys import pickle from RushFunctions impor [/CODE] to have any of the imported modules called from text.py, you must inherit … |
The End.