Graph, Math and Stats Online Software
have designed and developed Graphing tools and Math/Stats online software that is available on internet. Most of my visitor are from US academia. The list of programs include the following 1. Graphing Rectangular 2D 2. Graphing Rectangular 3D 3. Graphing Polar 4. Graphing 2D Parametric curves 5. Graphing 3D Parametric curves 6. Graphing 3D Parametric surfaces 7. Finding Area under curve (Rectangular) 8. Finding Area under curve (Polar) 9. Finding Area between curves (Rectangular) 10. Finding ArcLength (Rectangular) 11. Finding ArcLength (Parametric) 12 Finding Arc Length (Polar) 13. Finding Differentials f' (x) 14. Finding Volume (Disks) 15. Finding Volume (Washers) 16. Finding Surface Area (Disks) 17. Finding Centroid 18. Probability (Dice) 19. Measures of Central Location and Dispersion 20. Regression Analysis 21. Correlation Analysis All these programs are available on two of my sites 1. http://www.thinkanddone.com 2. http://www.britishcomputercolleges.com -- http://mail.python.org/mailman/listinfo/python-list
Re: Weirdness with python and stdin redirection under Win32
On Saturday, December 7, 2002 5:10:07 AM UTC+5:30, Jonathan M. Gilligan wrote: > The bug is NOT fixed in Win2k. That's where I am seeing it (Win2K Pro SP3). > > Jonathan > > "Thomas Heller" wrote in message > news:fzteezlp@python.net... > > norbert.klam...@klamann-software.de (Norbert Klamann) writes: > > > If I remember correctly this is a Windows bug, it was mentioned > sometimes on this > > > list. > > > > > Right, but it is fixed in Win2k (and hopefully also on XP). > > > > Thomas Guys, I am trying my hands on Python, and i bump into an error and woah! when you google it up, it's an bug in windows. The bug which you people are discussing about is still not patched up in Win XP. I have updated all the my windows update and have installed all kinds of patch. regards dexter -- http://mail.python.org/mailman/listinfo/python-list
Re: Not Responding When Dealing with Large Data
On Wed, Jun 18, 2014 at 1:20 PM, cutey Love wrote: > I'm trying to read in 10 lines of text, use some functions to edit them > and then return a new list. > > The problem is my program always goes not responding when the amount of lines > are a high number. > > I don't care how long the program takes to work, just need it to stop > crashing? What are you doing with the data? Try reading in the file chunks at a time -- https://mail.python.org/mailman/listinfo/python-list
Problems with sockets and threads
When i try to run this code and to connect to server (server is written in java that part of code is ok) everything stalls. Thread that i created here occupies processor all the time and GUI freezes. It's supposed to be waiting for message from server. (asynchronous one) Is there something that i did wrong here, or is there better way to do this? from tkinter import * from threading import * import time import socket import sys comPort=0 msg="" name=socket.gethostbyname(socket.gethostname()) sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM) testArea=0 thread=0 def threadFunc(): global sock global textArea data="" while(data==""): try: data=str((sock.recvfrom(256)),"UTF-8") except BlockingIOError: print("failed") time.sleep(1) data="" textArea.add((data+"\n")) def sendMsg(): global sock message=name+": "+msg.get()+"\n" sock.send(bytes(message,"UTF-8")) def aboutCommand(): messagebox.showinfo(title="About",message="This is first (serious) aplication in python.") def helpCommand(): messagebox.showinfo(title="Help",message="BAZINGA!") def Connect(): global sock global thread sock.connect((serverIPString.get(), 16000)) sock.send(bytes("#connect request#\n",'UTF-8')) data=sock.recvfrom(256) reply=str(data[0],"UTF-8") answer=(reply.split("#",3)) if(answer[1]!="connected"): messagebox.showinfo(title="Error",message="Connection failed!") return sock.close(); sock=None comPort=int(answer[2]) #for new connection sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect((serverIPString.get(), comPort)) sock.setblocking(0) thread=Thread(target=threadFunc()) thread.start() def Disconnect(): global sock sock.send(bytes("#END#\n","UTF-8")) sock.close() def ExitApplication(): Disconnect() mGui.destroy() return mGui=Tk() msg=StringVar() serverIPString=StringVar() mGui.geometry("400x600+200+20") mGui.title("Chat client v1.0") labServer=Label(mGui,text="Server IP adress: ").pack() entServer=Entry(mGui,textvariable=serverIPString).pack() btnConnect=Button(mGui,text="Connect",fg="red",bg="blue",command=Connect).pack() btnDisconnect=Button(mGui,text="Disconnect",fg="red",bg="blue",command=Disconnect).pack() textArea=Text(mGui,bg="yellow").pack() entMessage=Entry(mGui,textvariable=msg).pack() btnSendMsg=Button(mGui,text="Send message",fg="white",bg="black",command=sendMsg).pack() menuBar=Menu(mGui) fileMenu=Menu(menuBar,tearoff=0) fileMenu.add_command(label="Exit",command=ExitApplication) menuBar.add_cascade(label="File",menu=fileMenu) optionsMenu=Menu(menuBar,tearoff=0) optionsMenu.add_command(label="Change chat name") optionsMenu.add_command(label="Connect",command=Connect) optionsMenu.add_command(label="Disconnect",command=Disconnect) menuBar.add_cascade(label="Options",menu=optionsMenu) helpMenu=Menu(menuBar,tearoff=0) helpMenu.add_command(label="Help",command=helpCommand) helpMenu.add_command(label="About",command=aboutCommand) menuBar.add_cascade(label="Info",menu=helpMenu) mGui.config(menu=menuBar) mGui.mainloop() -- http://mail.python.org/mailman/listinfo/python-list
Re: Problems with sockets and threads
Yeah, that seems to be problem. Waiting for message is in theory infinite. But why doesn't this separate thread leave processor while it is sleeping? -- http://mail.python.org/mailman/listinfo/python-list
Re: Problems with sockets and threads
Thanks for help. Do you have any reference to pint me out for that subprocess creation? -- http://mail.python.org/mailman/listinfo/python-list
Re: Problems with sockets and threads
Thanks for help. Do you have any reference to direct me for that subprocess creation? -- http://mail.python.org/mailman/listinfo/python-list
Re: Problems with sockets and threads
FOUND ERROR! :D In creatin method of thread i wrote treadFunc() and should have said threadFunc (as pointer). Now i have problem with Text component. How to append string at end of it? -- http://mail.python.org/mailman/listinfo/python-list
Re: Problems with sockets and threads
Thanks! :D -- http://mail.python.org/mailman/listinfo/python-list
Re: problems getting os.system and wxmenu to read options from a file and then execute
On Jun 27, 5:56 pm, MRAB wrote: > eric_dex...@msn.com wrote: > > I managed to get the program running and the menu options are > > appearing on the list but the programs are not running. I suspect it > > is my onexecutemethod > > [snip] > > > #add execute files from the text file list > > idtool = 400 > > for e in menuoptions: > > wx.EVT_MENU(self, idtool, self.OnExecute(idtool, e)) > > This calls the OnExecute method and then passes its result to > wx.EVT_MENU. If, for example, OnExecute is returning None, then that's > what is being passed into wx.EVT_MENU. > > What you should actually be doing is passing a function which can be > called when the menu item is clicked, something like this: > > wx.EVT_MENU(self, idtool, lambda idtool=idtool, e=e: > self.OnExecute(idtool, e)) > > > idtool += 1 > > ##print e > > [snip] > > def OnExecute(self,tool,e): > > print tool > > os.system(e) > > #print tool > > # Get rid of the dialog to keep things tidy > > [snip] wx.EVT_MENU(self, idtool, self.OnExecute(idtool, e)) I changed it to this and it seems to be calling self.OnExecute befour the editor comes up and then after the editor is up it doesn't respond to anything. I got rid off all the spaces but one in the text file (I supose I need to use the strip method in real like though).. I was able to get an infinite loop by calling the editor as one of the options and then it keeps calling itself. It may be another problem or perhaps I didn't grasp the answer. -- http://mail.python.org/mailman/listinfo/python-list
Re: Why Python3
On Jun 27, 7:46 pm, MRAB wrote: > Stephen Hansen wrote: > > On 6/27/10 6:09 PM, MRAB wrote: > >> Terry Reedy wrote: > >>> Another would have been to add but never remove anthing, with the > >>> consequence that Python would become increasingly difficult to learn > >>> and the interpreter increasingly difficult to maintain with > >>> volunteers. I think 2.7 is far enough in that direction. > > >> [snip] > >> It's clear that Guido's time machine is limited in how far it can travel > >> in time, because if it wasn't then Python 1 would've been more like > >> Python 3 and the changes would not have been necessary! :-) > > > I'm pretty sure he wrote the Time Machine in Python 1.4, or maybe 1.3? > > Either way, its well established that a time machine can't go back in > > time any farther then the moment its created. > > > I don't at all remember why, don't even vaguely understand the physics > > behind it, but Morgan Freeman said it on TV, so its true. > > That's if the time machines uses a wormhole: > > >>> import wormhole > > Unfortunately it's not part of the standard library. :-( > > > So he couldn't go back and fix 1.0, physics won't allow him. So we're > > stuck with the Py3k break. :) > > planned obselence.. It would be nice if a pause was taken at 3.5 and a huge number of libraries were made available for 3.5.. -- http://mail.python.org/mailman/listinfo/python-list
Re: problems getting os.system and wxmenu to read options from a file and then execute
On Jun 27, 8:18 pm, MRAB wrote: > eric dexter wrote: > > On Jun 27, 5:56 pm, MRAB wrote: > >> eric_dex...@msn.com wrote: > >>> I managed to get the program running and the menu options are > >>> appearing on the list but the programs are not running. I suspect it > >>> is my onexecutemethod > >> [snip] > > >>> #add execute files from the text file list > >>> idtool = 400 > >>> for e in menuoptions: > >>> wx.EVT_MENU(self, idtool, self.OnExecute(idtool, e)) > >> This calls the OnExecute method and then passes its result to > >> wx.EVT_MENU. If, for example, OnExecute is returning None, then that's > >> what is being passed into wx.EVT_MENU. > > >> What you should actually be doing is passing a function which can be > >> called when the menu item is clicked, something like this: > > >> wx.EVT_MENU(self, idtool, lambda idtool=idtool, e=e: > >> self.OnExecute(idtool, e)) > > >>> idtool += 1 > >>> ##print e > >> [snip] > >>> def OnExecute(self,tool,e): > >>> print tool > >>> os.system(e) > >>> #print tool > >>> # Get rid of the dialog to keep things tidy > >> [snip] > > > wx.EVT_MENU(self, idtool, self.OnExecute(idtool, e)) > > > I changed it to this and it seems to be calling self.OnExecute befour > > the editor comes up and then after the editor is up it doesn't respond > > to anything. > > > > That is what the line was in your original post, and I explained the > change you needed to do. > > > I got rid off all the spaces but one in the text file (I> supose I need to > use the strip method in real like though).. I was > > able to get an infinite loop by calling the editor as one of the > > options and then it keeps calling itself. It may be another problem > > or perhaps I didn't grasp the answer. > > > > I've noticed that you're opening the menu file before the class > statement but reading from it in the __init__ method. It would be better > if you opened the file in the __init__ method itself. You can split a > line on whitespace with: > > t = line.split() > > It won't then matter how many spaces or tabs are between the fields. I think it may and that is why there is a strip method. all 4 files want to execute befour the editor comes up so there is a problem of some sort that isn't adressed by that but it probily would be nice if I coded it that way. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python as a scripting language. Alternative to bash script?
On Jun 28, 5:48 am, Dave Pawson wrote: > I've a fairly long bash script and I'm wondering > how easy it would be to port to Python. > > Main queries are: > Ease of calling out to bash to use something like imageMagick or Java? > Ease of grabbing return parameters? E.g. convert can return both > height and width of an image. Can this be returned to the Python program? > Can Python access the exit status of a program? > > I'd prefer the advantages of using Python, just wondering if I got > so far with the port then found it wouldn't do something? > > Has anyone made this comparison please? > > TIA > > -- > Dave Pawson > XSLT XSL-FO FAQ. > Docbook FAQ.http://www.dpawson.co.uk You do have a couple of couple of python scriting programs that are like bash. I don't know if they are worth using though (you would have to look them up I don't recall the names right now) -- http://mail.python.org/mailman/listinfo/python-list