611 Posted Topics

Member Avatar for ub007
Member Avatar for shiningstar100

[Code]s = "abc def ghi jkl" Print("\t".join(s.split())[/code] Or [CODE]print("Hello \t world")[/CODE]

Member Avatar for richieking
0
78
Member Avatar for jordan0420

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 …

Member Avatar for jordan0420
0
157
Member Avatar for dos_killer
Re: cgi

You must chmod cgi scripts to 0755. Cgi's only works with that permission. ok? :)

Member Avatar for richieking
0
276
Member Avatar for Dane2259
Member Avatar for dythanor

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....

Member Avatar for dythanor
0
470
Member Avatar for Geemon

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 …

Member Avatar for griswolf
0
207
Member Avatar for ramesh125

or this.........[CODE] a = a= [(x+2,x*2) for x in range(1,300)] [/CODE] And plot some graph with it ;)

Member Avatar for TrustyTony
0
173
Member Avatar for hogdogjr

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() …

Member Avatar for richieking
0
216
Member Avatar for blenkhn
Member Avatar for jordan0420

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 :)

Member Avatar for jordan0420
0
911
Member Avatar for scru

idle just got so many problems. Even on the linux box like ubuntu. You cant rely on idle gui. Thats a fact.!

Member Avatar for richieking
0
234
Member Avatar for suri94
Member Avatar for richieking
0
91
Member Avatar for razax

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 …

Member Avatar for razax
0
212
Member Avatar for ytrewq1
Member Avatar for gunneronaspooky
Member Avatar for rebo544
Member Avatar for sohel807

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 = …

Member Avatar for richieking
0
422
Member Avatar for pythonn00b
Member Avatar for aint
Member Avatar for aint
0
133
Member Avatar for jamd200

mmmmmmmmmmmmm not bad. I jus dont see any real life need for this algo. besides There should be a better way than this. :)

Member Avatar for jamd200
0
343
Member Avatar for kitjo
Member Avatar for benqb

what module are you using? [CODE]self.request.get('path')[/CODE] means nothing

Member Avatar for GDICommander
0
227
Member Avatar for owilliam

[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 ;)

Member Avatar for richieking
0
104
Member Avatar for owilliam

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() …

Member Avatar for richieking
0
95
Member Avatar for ShadyTyrant
Member Avatar for lewashby
Member Avatar for mbox_96

well but your code does not show where you defined 'MIMEMultipart()' but its implemented on line 30.

Member Avatar for mbox_96
0
4K
Member Avatar for -ordi-

This is even a basic one. Python can do almost everything you want to do. :)

Member Avatar for richieking
0
174
Member Avatar for zizuno

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 …

Member Avatar for zizuno
0
173

The End.