15,185 Topics

Member Avatar for
Member Avatar for mahela007

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

Member Avatar for bumsfeld
0
330
Member Avatar for Dan08

Is it possible to open windows files with python? Like notepad, and stuff.. Thanks Dan08.

Member Avatar for Dan08
0
153
Member Avatar for 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. …

Member Avatar for Dan08
0
310
Member Avatar for fallopiano

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 …

Member Avatar for sneekula
0
213
Member Avatar for Stefano Mtangoo

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

Member Avatar for Stefano Mtangoo
0
93
Member Avatar for axeeffect2002

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

Member Avatar for Stefano Mtangoo
0
53
Member Avatar for rajivgupta1107

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 …

Member Avatar for jlm699
0
90
Member Avatar for sallas07

Can I be able to read a text file from any text editor (eg Ms word, wordpad) using python. and then return whats inside?

Member Avatar for jlm699
0
108
Member Avatar for smuteekaanya

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

Member Avatar for smuteekaanya
0
105
Member Avatar for utefan001

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 …

Member Avatar for vegaseat
0
274
Member Avatar for pynoc

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 …

Member Avatar for woooee
0
132
Member Avatar for darangho

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 …

Member Avatar for woooee
0
96
Member Avatar for sab786

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 …

Member Avatar for woooee
0
94
Member Avatar for peterkroon

Hello, I would like to display the current URL from my address bar. How must I do this? Many thanks, Peter Kroon The Netherlands

Member Avatar for peterkroon
0
92
Member Avatar for somada141

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

Member Avatar for Gribouillis
0
561
Member Avatar for blah32

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?

Member Avatar for jlm699
0
59
Member Avatar for nunos

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

Member Avatar for nunos
0
660
Member Avatar for Dan08

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 …

Member Avatar for Dan08
0
248
Member Avatar for nessa203

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 …

Member Avatar for woooee
0
460
Member Avatar for Hagbard_Durden

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 …

Member Avatar for Hagbard_Durden
1
239
Member Avatar for SoulMazer

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 …

Member Avatar for SoulMazer
0
4K
Member Avatar for SoulMazer

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

Member Avatar for SoulMazer
0
543
Member Avatar for filoupython

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 …

Member Avatar for Dan08
0
743
Member Avatar for willygstyle

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

Member Avatar for willygstyle
0
190
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
105
Member Avatar for jcmeyer

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 …

0
58
Member Avatar for Stefano Mtangoo

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

Member Avatar for Stefano Mtangoo
0
132
Member Avatar for Stefano Mtangoo

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.

Member Avatar for Stefano Mtangoo
0
115
Member Avatar for Stefano Mtangoo

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

Member Avatar for Stefano Mtangoo
0
70
Member Avatar for nondecorum

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

Member Avatar for woooee
0
344

The End.