15,185 Topics
| |
I've come across EOF (something called "end of file " right? ) on numerous occasions when I was browsing though the python documentation. What is it and what is it's significance? Also what is a buffer? eg: "incomplete data is buffered until more data is fed or close() is called." | |
Is it possible to open windows files with python? Like notepad, and stuff.. Thanks Dan08. | |
Hey everyone, first to start im using python 2.6, and what basically i am makin' is a program that we put some text in a Text Box, and then we can save it to the computer. My problem is that i cant get the text and save it using tkFileDialog. … | |
Hi all. I'm working on a python file that will be included in a project I am working on. Unfortunately, I ran into some problems when it came to passing arguments from a function, to another function. Let me explain; I have two functions: dist and return_mouse_angle. dist returns the … | |
Hi All, I was asking if it is possible to hide the wx.MediaCtrl window so that Only controls (play, stop, pause etc) can be shown? I plan to play audio only and never video for this project. Thanks alot :D | |
Hi, Just now I've downloaded jython plugin for eclipse through software updates. Now when I try to create a jython project it cries for configuring an interpreter. I don't know what path should I provide. please help... | |
Hi, We need to zip files having '2009' in their names from a particular directory. How can we do the same. Code: file = zipfile.ZipFile("test.zip", "w") os.chdir(rawFileLocation) dirList = os.listdir(rawFileLocation) for fnames in dirList: file.write(fnames) file.close() It is zipping all the files. Please tell me the logic for adding files … | |
Can I be able to read a text file from any text editor (eg Ms word, wordpad) using python. and then return whats inside? | |
The following program has two mistakes in it that cause it to print an incorrect answer. [code=python] # Computes how much interest is earned on a given amount of principal. principal = float(raw_input('Enter principal: ')) interestRate = float(raw_input('Enter interest rate as a percent: ')) years = int(raw_input('Enter number of years: … | |
When dealing with big numbers (over 100,000 digits). I find str(myint) too slow. The code below takes my machine 8 seconds. Doing a quick test in java takes 0.186 seconds [code=python] import time #**setup part** i = 0 myint = 1 while i < 100000: i = i + 1 … | |
I recently got into Python and I'm having trouble finding a good IDE for it. I'm on Windows. IDLE works but I'd rather use a different editor with more features. I tried Wing IDE and I can't even find a Run command. Using the command line and typing in the … | |
Hi all I am attaching a Text area to my gui program. For some reason, whenever i try to write/put a string that has a length greater than the width of the text area, It changes line automatically, (seems like it's not adding new line chracter to existing string, but … | |
ok so my code is as follows: [ICODE]read=open('mon_17.py','r') reader=read.readlines() a=[] for line in reader: reader1=[] for i, entry in enumerate(line.split()): if i in range(0,4)+[6]: reader1.append(int(entry)) else: reader1.append(float(entry)) #float the 2 purity values only at this point #reader1=map(float,line.split())#this was made everthing diff made all floats a.append(reader1) a.sort(lambda x,y:cmp(x,y)) read.close() match={} for … | |
Hello, I would like to display the current URL from my address bar. How must I do this? Many thanks, Peter Kroon The Netherlands | |
| Dear Pythoneers, I have been reading really good answers on this forum so I thought I'll give it a try and see whether someone can help me. What I want to do: "I want to embed Python in C++ and use Python's capabilities in order to create a expression evaluator" … |
In python 3, I have to use the __ge__ __le__ and so on members in the class. MY question is, how do I combine 2 objects of the same class type using __eq__ or must it be done from outside? | |
Hi. I need some help here with a unicode string I want to use with strptime. [code=python] >>> date u'\xa08/15/2009' >>> datetime.strptime(date, "%m/%d/%Y") Traceback (most recent call last): File "<pyshell#75>", line 1, in <module> datetime.strptime(date, "%m/%d/%Y") UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128) … | |
Hi there, I'd like to know if is there a way to check my e-mail and send e-mails with python. I am trying to do that in Window Vista, and I've tried some codes with smtp, but I couldn't find a solution. Can anyone help me out with this, thanks … | |
I thought I'd set myself a challenge as I've been programming in Python a little while now (nothing too heavy, mind you!) and make a 4-in-a-row game which I could play against the computer or another person, on a grid which i specify how big. I though I had the … | |
Hello. I'm new here, and new to Python. I have a little experience with C++, and assembly, and just started learning Python about 2 weeks ago. I'm trying to write a program that will control servo motors in sync with an audio file (probably .wav). So far I've written programs … | |
Ok, I am writing a client for the "instant messaging" server I just wrote. The client is in all Python, and the GUI is made with Tkinter. Anyways, my first question is this: is there a way to make a scrollbar widget automatically scroll to the bottom? Second, in a … | |
Hi, so in order to make my problem more clear, I shall just make a simple example of what I am trying to do. I will start with a little code: [code=python]from Tkinter import * master = Tk() msgbox = Text(master) msgbox.pack() mytext = raw_input("> ") msgbox.insert(END, mytext) master.mainloop()[/code] Now, … | |
Hello, I have created a telnet server in python. Maybe you wonder why to create a telnet server while Windows has one? Because the windows telnet server does not allow to interract with the desktop. If you try to start a GUI app, it will start and run but will … | |
Hello all, I'm trying to run a simple client/server socket progaram from a refrence of the net to get my feet wet a bit with network programming. I can connect fine but can't seem to send data from the client due to the fact python is saying its of type"str" … | |
Hi, I want to track changes done to wxListCtrl as user Updates it (via my custom dialog of course). I will be querying and saving updates from and to database. the problem I have in thinking how to track changes and enable/disable save button as well as update the database … | |
I am creating a validator for the text entered in the items of a tree. I am using the EVT_TREE_BEGIN_LABEL_EDIT and EVT_TREE_END_LABEL_EDIT to accomplish this. In the scenario that the user enters text that is not allowed, I want a message dialog to pop up to tell them what they … | |
Hi, I cannot see a separator, though it adds spaces between tools. What am I doing wrong? Here is a code below [CODE=python] self.toolbar.AddLabelTool(wx.ID_REDO, "redo", wx.Bitmap("./icons/edit-redo.png")) self.toolbar.AddSeparator() [/CODE] Also what is difference between AddLabelTool() and AddSimpleTool() ? | |
Can Anyone tell me how to use debugger. I have only once used Wingware Wing IDE. I just clicked debugger and it will highlight error! I want to be advanced with debuggers and debugging in python. can anyone tell me how thing go up? Thanks in Advance, S. | |
Hello Guys can somebody provide examples and explanations on how to embed MySQL server using SQLmylibd.dll (If I remember well). Appreciation to all answers, Steve | |
Hi All, Sorry for my posting if it was already in the forum. I could not find the answer to my question. I am newbie. I have never programmed anything. I just started to learn. Now I want to do is to produce automated searches. How can I do that? … |
The End.