611 Posted Topics
Re: Its turtleworld your own written module or what. ;) | |
Re: If you want CheckBox in staticbox Try this [CODE]import wx class Frame(wx.Frame): def __init__(self,parent): wx.Frame.__init__(self,parent,size=(400,300),title="STATIC CHECK BOX ") self.pan=wx.Panel(self,-1) wx.StaticBox(self.pan, -1, 'BOXES', (5, 5), size=(100, 250)) self.dat() self.Show() def dat(self): for x in range(1,10): wx.CheckBox(self.pan,-1,"%s %d"%("BOX",x),(15,20*x)) a=wx.App() Frame(None) a.MainLoop() [/CODE] | |
Re: Can you post your code again with your import modules if any. Just in short what you have provided is not enough to help assist you. :) | |
Re: Yep ...! python got what is takes. go here my friend! [URL="http://www.mobilenin.com/pys60/menu.htm"]http://www.mobilenin.com/pys60/menu.htm[/URL] Happy coding ;) | |
Re: Well i can thing of these modules 1.os 2.threading (there are many flavours in python) Need for 3.socket 4.time 5.Queue And if you want GUI 6. I recommend wxpython Thats my take. btw i know you can do your project with that. I can any way with what i have … | |
Re: Pay attention to line 23 of tonyjv+ code. That is the solution to why your data was not what you wanted. Goodluck :) | |
Re: can you please paste your code again in the code tags .;) we need this... | |
Re: trim always cleans the data. Expecially if its for a password or user data that needs a check. eg[CODE] $user=" Foo" $pass="pass " [/CODE] This data input will fail without trim to clean the unwanted spaces. Mostly they are not seen but alway do trim exp. when data are comming … | |
Re: [QUOTE] homescore = array('i',[]) visitingscore = array('i',[])[/QUOTE] Python uses [B]list keyword or this sign [] [/B] as array. That is pythonic system. | |
Re: Strange........ Are you hosting yourself?? If not, then talk to your hoster about this issue ok? | |
![]() | Re: This is very simple. Extend the Small list with Uppercase letters. A-Z Just a-z And on line 14. take away [CODE]x.lower()[/CODE] Just put[CODE] x[/CODE] And the job is done. I just tried it and it work fine. Good job. :) |
Re: As [B]list[/B] in python So is [B]array[/B] in c,c++ They are all the same stuff with different names. :) | |
Re: Slice what? which part???? can you please provide more info and any code you have . :) | |
Re: This is another version. You take read the zipfile and use the file type you want to create a new zip file. Simple. [CODE]import zipfile if __name__ =="__main__": ext=["py","txt","doc"] nfile=[] #to take new file list ffile=zipfile.ZipFile("/home/richie/r.zip","w") # New zip zfile= zipfile.ZipFile("/home/richie/GUI2Exe.zip","r")# Main zip for xfile in zfile.namelist(): if xfile.split(".")[-1] in … | |
This is one of the easiest steps to view and convert dcm image useing the [B][COLOR="Red"]snake(python)[/COLOR][/B] There are 3 modules involved. 1. Search for [B]pydicom[/B] and install 2. Search for [B]matplotlib[/B] and install 3. Search for [B]pylab[/B] and install. If you are on ubuntu destro, Installing matplotlib via the repo … | |
| |
Re: if ctype is not allowed....... Are you allowed to use other headers at all?? | |
Re: Nice one [B]woooee[/B] i think using new as a variable is not ok. I know you know that anyway that new is a reserved object. In all, i like your sleakness . Bravo ;) | |
Re: 1. on line 4.... You are missing a coma. [CODE]print "Your net wage is", $netpay [/CODE] 2. This is python not php/perl no need for [CODE]$netpay[/CODE] just [CODE]netpay[/CODE] Unless net pay is a template of which i dont think so. :) | |
Re: You can use wx.Timer to bind to self to do that job. eg. [CODE] import wx class Frame(wx.Frame): """ #Class stuff decl """ def __init__(self,parent): wx.Frame.__init__(self,parent) self.timer=wx.Timer(self) self.count=0 #timer event Always must be bound to self self.Bind(wx.EVT_TIMER,self.evt_timer) self.Bind(wx.EVT_PAINT,self.paint) self.Show() ############### event methods ########### def paint(self,event): self.timer.Start(100)# increase the value for … | |
Re: can you be more specific with your win explorer? ;) | |
Re: [QUOTE]Change log 1b8148505b by darcymason on Oct 10, 2008 Diff Started dicom.image module, show_PIL() function which uses PIL to display pixel data. Works for CT and MR and image_defl but needs palette adjustments. The ExplVR_BigEndian image with RGB looks odd, probably not being interpreted correctly. Reorganized Dataset code to keep … | |
Re: do this. [CODE]print("\n".join(x for x in dc))[/CODE] The dc is a list. You need to run iter it. | |
Re: Hi, look on line 21-25 [B][COLOR="Red"]moveFunction[/COLOR][/B] is not a function but a variable. why are you calling [CODE]moveFunction ("bla bla")[/CODE] instead of [CODE]moveFunction ="bla bla"[/CODE] Fix that ok ;) | |
Re: And dont forget to [CODE]dbi.commit()[/CODE] for action. | |
Re: What you need is a language directory with your languages files. So you open the file to read on the fly and use the names to populate where needed in your application. You must have a wx.choice control listing all your languages and as the user make his/her choice , … | |
Re: Is there not a normal way to do this?? templating i think? ;) | |
![]() | |
Re: why no close this thread and try django forum. I will do that if i were you. ;) | |
Re: [QUOTE]# def enqueue(element, queue): """Insert an element into the back of the queue""" newnode = ListNode(element) if empty(queue): queue.up = newnode elif empty(queue): queue.down = newnode elif empty(queue): queue.left = newnode else: queue.right = newnode[/QUOTE] What is the logic here? Very redundant method i see. Besides you do not have … | |
Re: Quick work out. have fun [CODE]from random import * while 1: ime_f = raw_input("Vnesi ime fanta: "); priimek_f = raw_input("Vnesi priimek fanta: "); ime_z = raw_input("Vnesi ime deklice: "); priimek_z = raw_input("Vnesi priimek deklice: "); x = randint(0, 70); if ime_f == "Lojze" and priimek_f == "Slak" and ime_z == … | |
| |
Re: Your wish list is very strange however itertool permutation module may help you. Just figure what you are looking for because values entered and results wished are far apart. ;) | |
Re: why not. you can install more than 1 version. Are you on linux ,OSX or windows? if linux, what flavour? ;) | |
Re: simple format print [CODE] stuff=""" Hi folk, I fairly new to Python 2.7 and Python 3 and like to find out how I would get a print to appear in the middle of the output screen without putting in a load of spaces into a print statement. Please keep it … | |
Re: Storing images in a php array is the one of the ways. You can also get the from the folder. OR from DB Its all up to your taste . Its very simple. ;) | |
Re: You will need to time and threading modules very carefuly. They can make your life more easier. ;) | |
Re: And try not to use keywords as a variable name. on line 23. the new keyword. ;) | |
Re: urllib module.... read about that may help ;) | |
Re: They work the same, they need the same data type. [CODE]socket.connect((11.11.111.11,"1911")) ##OR socket.bind((11.11.111.11,"1911"))[/CODE] ;) | |
Re: i dont think you wrote this code yourself. Any way what is the problem with your application? ;) | |
Re: because seticon only set icon for your frame that is the little icon on the bar far left. What are you trying to achieve? ;) | |
Re: where and on what data you want to use the random, keywords or the txt file? | |
Re: Do you still need this??? refactor needed i think ;) | |
Re: Your code is not bullet proof. its far from ok. And i was thinking why dont you break them apart into methods in a class. It will be more handy and easy to work on it. | |
Re: And where is his code? no hands????? ;) |
The End.