15,190 Topics
![]() | |
I am new to Python and I'm trying to make a simple updating window. Most suggest I should use wxtimer for the task. I have tried to get it going but it fails. Here is the code without a timer that works for me. I had been using time.sleep in … | |
Hello, I have a question about wx.ListCtrl. How i can add to cell resize image ( 300, 500 for example ). | |
I'm having a hard time figuring out the best way to approach this problem. Security is not much of a concern in this particular setup, but performance is. I have a script that will Telnet to a telecommunications switch and run a series of commands, display the output, and logout … | |
Greetings, I am stepping thru the "Changing a PythonCard Application" @ [url]http://pythoncard.sourceforge.net/walkthrough1.html[/url] With NO changes, pgm runs fine. But when I make the change and run it program just Flashes a Console screen and immediately ends. Can someone spot the error? #!/usr/bin/python """ __version__ = "$Revision: 1.8 $" __date__ = … | |
Hello everyone. Today I decided to write a little Caesar cipher script in Python. After tweaking the code and testing it, I shot up my browser and had a look at other snippets on the web. I was shocked at what I saw. All of the Python solutions I went … | |
Hi all ; [ICODE]ask=raw_input("type the query: ") [/ICODE] when i type [ICODE]23+9[/ICODE] after this; i wanna get '32' result.. like ; [ICODE]>>>type the query: 3+5 >>>result : 8[/ICODE] this is what i want.. thank you.. | |
So I've finally fixed up the functionality of an address book I've been writing (not on to utilizing a GUI yet of course though.)However to save or reclaim the data from the last use of the address book I, obviously, need to write and reclaim it from a .txt file, … | |
i have about a 1000 excel files that have data sets.it was collected from about a 20 patients. so i have a script that reads data sets for each patient from all of the excel files. im having trouble printing the values in separate excel files that each file represents … | |
Hi OK, so I am reading on OOP in Python, and I am an old C/C++ programmer so I have somewhat high expectations :). My question is regarding private/public variables. Per default, all class data members are public, but if we precede them with a double underscore, they become private. … | |
I am having trouble structuring an sqlite update statement that has multiple parameters. The following code does not raise an exception, but nor does it update my table. After extensive googling and searching Daniweb, I think I'm looking right at the blindingly obvious and missing it. I have a list … | |
Hi Everything in Python is treated as an object, so [CODE] i=5 i.imag [/CODE] makes sense, i.e. the variable [I]i[/I] has some associated methods. But why doesn't the following example work? [CODE] 5.imag #error [/CODE] One would think that it should work, since the integer "5" is an object just … | |
As [URL="http://www.daniweb.com/software-development/c/threads/377568/1625821#post1625821"]Goddess Narues' C code in C forum[/URL] was over my head and her critique of simplistic solution maybe overflowing the integer range was valid in C, I worked out a recursive solution more suitable to my brain in my preferable language. Maybe one day I put in C, now … | |
Thought all of the following was handled and not: 1) python runs script which opens file and prints to screen OK 2) when cx_freeze distilled script is run it reports file to open is not there, when it is 3) the distilled script can be run from a term with … | |
Hi. I am working on improvement of my program. Here is it's code. [CODE]import wx class bucky(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, id, "Testing erea", size=(280,400)) panel = wx.Panel(self) food = wx.Button(panel,label='Food',pos=(10,10),size=(80,40)) drink= wx.Button(panel,label='Drink',pos=(100,10), size=(80,40)) self.Bind(wx.EVT_BUTTON, self.drink, drink) self.Bind(wx.EVT_BUTTON, self.food, food) def food(self, event): box = wx.TextEntryDialog(None, 'What is … | |
[code] class List(): def __init__(self,values=0): self.numb=values self.linker=self def add(self,values): self=self.linker self.numb=values self.linker=List() def show(self): while self!=self.linker: print self.numb self=self.linker [/code] In main call i want some thing like this [code] list1=List() list1.add(43) #i want to add numbers to liked list node like this list1.add(22) list1.add(938) list1.show()#Then retrieve it from the … | |
So, i am trying to have an explosion when the asteroid and house collides. And i think i have the code written down, but something might me be missing. Please help me figure this out. Thanks a lot. [CODE]# Fresh Start # Classes: House; Asteroid; Explosion from livewires import games … | |
im supposed to be writing a python script that enables receiving SMS (GSM), on the hyper terminal i used the same AT commands i wrote in the script and they worked just fine, but when i download the script on the GSM module ( GT863-PY ) i get nothing at … | |
Hi all, This is my first post here so please bear with me. I am trying to get my QGraphicsView widget to output as an image. I have the following code. [CODE] def outputImg(self,dir=None): if dir == None: dir = os.getcwd() img = QtGui.QImage(self.size()) print img.isNull() # This == True … | |
Edit: The title could have been more descriptive, I am sorry for that! Hello! First time poster, frequent reader. I am very green to both programming and python, trying my best and this board has been helpful just by reading. Now, I have a problem of my own that I … | |
Hey guys, my name is Robert Scubelek, I've been lurking around these forums for a couple of weeks now, and have found more answers here than anywhere else on the internet, so I figured that its about time to become a member and try to contribute something. I'm in the … | |
how can we use the same condition by using the iteration for the numbers automatically? Like 1 after 2. 2 after 3. till 50? ![]() | |
Hi Can anyone share Python Study material slides.. It will be really helpful for me ,Plz | |
How to create a png image containing a fragment of source code ? Well, don't do it yourself, the [url=http://pygments.org]pygments module[/url] contains all the necessary tools. The example below shows how to produce a png image from python code, but pygments supports lexers for many other languages and its formatter … | |
Hi I have made a python code for running an operation on a csv file ,But when i am getting error ie:the csv file not found, where should i save the csv file | |
I'd like to change a Python shortcut icon, to make it custom in my standalone applications. Any ideas? Thank you in anticipation. | |
Hi I have a CSV file with column headings as [Serial Number,Reader Name,Book name,Author,Publisher] I want 1)To filter all books with Book name :'Aristotle' 2)to remove duplicates in books with same author name ie.Different Publishers 3)To take a sample of 30 books for Each Reader and copy it to a … | |
![]() | Hey guys, I've been fiddling around with Tkinter for a bit and can't for the love of me figure out why this code won't work. I'm making a GUI that outputs the price of a product depending on what buttons the user pressed. I have three calculations that revolve around … |
1.[url]http://www.renren.com/Login.do[/url] it is ok,my code: import cookielib, urllib2, urllib cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) exheaders = [("User-Agent","Mozilla/4.0 (compatible; MSIE 7.1; Windows NT 5.1; SV1)"),] opener.addheaders=exheaders url_login = 'http://www.renren.com/Login.do' body = (('email',' '), ('password', ')) req1 = opener.open(url_login, urllib.urlencode(body)) file=open('/tmp/sample','w') file.write(req1.read()) file.close() 2.[url]https://passport.baidu.com/?login[/url] can't login,my code: import cookielib, urllib2, urllib … | |
Hi. I am having a problem in creating of one simple program in Python. Here is code. [CODE]import wx class bucky(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, id, "Testing erea", size=(280,400)) panel = wx.Panel(self) food = wx.Button(panel,label='Food',pos=(10,10),size=(80,40)) pets = wx.Button(panel, label='Pets', pos=(100,10), size=(80,40)) self.Bind(wx.EVT_BUTTON, self.food, food ) def food(self, event): … | |
I am new to Django. When I tried creating a template, I got the following error. Please help. [CODE]>>> from django.template import Template, Context >>> t = Template("The name is {{name}}") Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> t = Template("The name is {{name}}") File "C:\Python27\lib\site-packages\django\template\base.py", … ![]() |
The End.