From: Rajan G. <rjn...@gm...> - 2010-03-10 16:53:05
|
Hi, I have gnuplot-py-1.8 (is residing in site-packages dir of Python) Python 2.5 (residing in C) Gnuplot v4.4 (residing in C:\Program Files and also a different named copy in C:\). O.S: Win ME (I only hope this does not discourage you from reading further) I have been able to run python codes with numpy without much issue but never tried plotting using Gnuplot. I would use Excel to plot the data files until I decided Gnuplot was the way to go. The binary setup installation ran well for all. I think all the paths are defined - because I am able to give a command "python" from any directory and I get to the python shell immediately. Also typing "wgnuplot" or "pgnuplot" from any directory I am able to open the Gnuplot terminal and plot functions such as sinx/x etc. However, when I go to Python25\Lib\site-packages\Gnuplot and run 'python test.py' from command window or run test.py from IDLE, the computer immediately crashes and I have to reboot. Earlier, I would get it to work till print ( 'This program exercises many of the features of Gnuplot.py. The\n' 'commands that are actually sent to gnuplot are printed for your\n' 'enjoyment.' ) wait('Popping up a blank gnuplot window on your screen.') g = Gnuplot.Gnuplot(debug=1) g.clear() # Make two temporary files: if hasattr(tempfile, 'mkstemp'): (fd, filename1,) = tempfile.mkstemp(text=1) f = os.fdopen(fd, 'w') (fd, filename2,) = tempfile.mkstemp(text=1) else: filename1 = tempfile.mktemp() f = open(filename1, 'w') filename2 = tempfile.mktemp() try: for x in numpy.arange(100.)/5. - 10.: f.write('%s %s %s\n' % (x, math.cos(x), math.sin(x))) f.close() print '############### test Func ###################################' wait('Plot a gnuplot-generated function') And then the screen would freeze and I had to reboot. However, I never get the plot window and the Gnuplot terminal to open up. The reason I say the above commands worked is because I can see the printout in my DOS command window. I can also see the tmp files in the TEMP directory. I tried playing around mainly changing the paths or changing the directory of Gnuplot from Program Files to just C:\ - thinking that the space could be an issue. I tried running other programs such as demo.py. After several such trials, now I am not able to see any messages on the command window because DOS window just disappears and I see a blue screen asking me to cntrl-alt-del or to reboot. I further debugged and saw that ' temp' data files e.g., in the demo.py were being written to temp files. It is only when it comes to plotting that the computer hangs. I then tried this: I changed the name of the Gnuplot (i.e., Gnuplot app 4.4) directory to 'guplot' but without making changes to the PATH, and then I ran the demo program - my thought was that it should not be able to find the Gnuplot application and would give me some error messages rather than computer hanging. But unfortunately, the computer still hangs for test.py. It runs all the way till print '############### test Func ###################################' wait('Plot a gnuplot-generated function') and then goes bust. Although the command window diappears in a flash I can make out the long comment line stated above. Again none of the command or plot windows pertaining to Gnuplot open up. The entire screen just blinks and then becomes dead. Another fact I would like to mention is that I tried all the above on Win XP at my work, under similar file configuration and I get no issues at all. I guess this is how far I have been able to proceed. Any help would be appreciated despite that fact that I will be strongly discouraged from using WinME (I will eventually transition to Linux) but it will take some time. I just feel that this is a solvable problem and may not be a Win ME issue (hope!!). Rajan |
From: Benny M. <ben...@gm...> - 2010-03-12 09:27:45
|
Try giving direct commands with gnuplot in python shell, and see if gnuplot can open a window on your OS. So: $ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Gnuplot >>> a = Gnuplot.Gnuplot() >>> a('plot sin(x)') >>> You should see a gnuplot window open up that shows sin(x). Also, check the bug tracker, https://sourceforge.net/tracker/?group_id=17434&atid=117434 , there are several patches posted there for windows. By lack of windows to test, and lack of other windows users to test it, I think those do not get added to the code. Benny 2010/3/10 Rajan Gurjar <rjn...@gm...>: > Hi, > I have gnuplot-py-1.8 (is residing in site-packages dir of Python) > Python 2.5 (residing in C) > Gnuplot v4.4 (residing in C:\Program Files and also a different named copy > in C:\). > > O.S: Win ME (I only hope this does not discourage you from reading further) > > I have been able to run python codes with numpy without much issue but never > tried plotting using Gnuplot. I would use Excel to plot the data files until > I decided Gnuplot was the way to go. > > The binary setup installation ran well for all. I think all the paths are > defined - because I am able to give a command "python" from any directory > and I get to the python shell immediately. > > Also typing "wgnuplot" or "pgnuplot" from any directory I am able to open > the Gnuplot terminal and plot functions such as sinx/x etc. > > However, when I go to Python25\Lib\site-packages\Gnuplot and run 'python > test.py' from command window or run test.py from IDLE, the computer > immediately crashes and I have to reboot. > > Earlier, I would get it to work till > > print ( > 'This program exercises many of the features of Gnuplot.py. The\n' > 'commands that are actually sent to gnuplot are printed for your\n' > 'enjoyment.' > ) > > wait('Popping up a blank gnuplot window on your screen.') > g = Gnuplot.Gnuplot(debug=1) > g.clear() > > # Make two temporary files: > if hasattr(tempfile, 'mkstemp'): > (fd, filename1,) = tempfile.mkstemp(text=1) > f = os.fdopen(fd, 'w') > (fd, filename2,) = tempfile.mkstemp(text=1) > else: > filename1 = tempfile.mktemp() > f = open(filename1, 'w') > filename2 = tempfile.mktemp() > try: > for x in numpy.arange(100.)/5. - 10.: > f.write('%s %s %s\n' % (x, math.cos(x), math.sin(x))) > f.close() > > print '############### test Func > ###################################' > wait('Plot a gnuplot-generated function') > > And then the screen would freeze and I had to reboot. > > However, I never get the plot window and the Gnuplot terminal to open up. > The reason I say the above commands worked is because I can see the printout > in my DOS command window. I can also see the tmp files in the TEMP > directory. > > > I tried playing around mainly changing the paths or changing the directory > of Gnuplot from Program Files to just C:\ - thinking that the space could be > an issue. > I tried running other programs such as demo.py. > > After several such trials, now I am not able to see any messages on the > command window because DOS window just disappears and I see a blue screen > asking me to cntrl-alt-del or to reboot. > > I further debugged and saw that ' temp' data files e.g., in the demo.py were > being written to temp files. It is only when it comes to plotting that the > computer hangs. > > I then tried this: I changed the name of the Gnuplot (i.e., Gnuplot app 4.4) > directory to 'guplot' but without making changes to the PATH, and then I ran > the demo program - my thought was that it should not be able to find the > Gnuplot application and would give me some error messages rather than > computer hanging. > > But unfortunately, the computer still hangs for test.py. It runs all the way > till > > print '############### test Func ###################################' > wait('Plot a gnuplot-generated function') > > and then goes bust. Although the command window diappears in a flash I can > make out the long comment line stated above. Again none of the command or > plot windows pertaining to Gnuplot open up. The entire screen just blinks > and then becomes dead. > > > Another fact I would like to mention is that I tried all the above on Win XP > at my work, under similar file configuration and I get no issues at all. > > I guess this is how far I have been able to proceed. > > Any help would be appreciated despite that fact that I will be strongly > discouraged from using WinME (I will eventually transition to Linux) but it > will take some time. I just feel that this is a solvable problem and may not > be a Win ME issue (hope!!). > > Rajan > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Gnuplot-py-users mailing list > Gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users > > |
From: Rajan G. <rjn...@gm...> - 2010-03-12 17:19:51
|
Thanks Benny, I think I tried it already and if I recollect it did not work, but I will try again when I get home (I have been at it for the last two weeks endlessly booting my computer million times by now). However, I have dug out a Win ME at work and followed the same install procedures as I did at home on my Win ME or on my Win XP. And everything ran perfectly well. I could run the test.py without any problems. In fact I used older versions of python 2.4 and gnuplot 4.2. This suggests something wrong with my Window ME installation? I am going to try and do a system restore to an earlier date. I recently downloaded "registry patrol" software from a vendor and it may have blocked certain applications while cleaning my registry. I notice that I cannot see the .gih file in gnuplot\bin. Also when I click on the gnuplot.hlp file I get a message (I cannot recall exactly and so I am giving a distorted version here -sorry about that) : Cannot open it because the file cannot be found or being used. It may have been renamed.... I however, see all these files at my office WinME and can open the hlp files. Isn't the .gih file used during a gnuplot run? So I am happy that this is not a real bug for WinME in general but some nasty occurrence in my machine. Would you have any suggestions? Thanks and appreciate your response, Rajan On Fri, Mar 12, 2010 at 4:27 AM, Benny Malengier <ben...@gm...>wrote: > Try giving direct commands with gnuplot in python shell, and see if > gnuplot can open a window on your OS. > > So: > > $ python > Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) > [GCC 4.4.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > > >>> import Gnuplot > >>> a = Gnuplot.Gnuplot() > >>> a('plot sin(x)') > >>> > > You should see a gnuplot window open up that shows sin(x). > > Also, check the bug tracker, > https://sourceforge.net/tracker/?group_id=17434&atid=117434 , there > are several patches posted there for windows. By lack of windows to > test, and lack of other windows users to test it, I think those do not > get added to the code. > > Benny > 2010/3/10 Rajan Gurjar <rjn...@gm...>: > > Hi, > > I have gnuplot-py-1.8 (is residing in site-packages dir of Python) > > Python 2.5 (residing in C) > > Gnuplot v4.4 (residing in C:\Program Files and also a different named > copy > > in C:\). > > > > O.S: Win ME (I only hope this does not discourage you from reading > further) > > > > I have been able to run python codes with numpy without much issue but > never > > tried plotting using Gnuplot. I would use Excel to plot the data files > until > > I decided Gnuplot was the way to go. > > > > The binary setup installation ran well for all. I think all the paths are > > defined - because I am able to give a command "python" from any directory > > and I get to the python shell immediately. > > > > Also typing "wgnuplot" or "pgnuplot" from any directory I am able to open > > the Gnuplot terminal and plot functions such as sinx/x etc. > > > > However, when I go to Python25\Lib\site-packages\Gnuplot and run 'python > > test.py' from command window or run test.py from IDLE, the computer > > immediately crashes and I have to reboot. > > > > Earlier, I would get it to work till > > > > print ( > > 'This program exercises many of the features of Gnuplot.py. > The\n' > > 'commands that are actually sent to gnuplot are printed for > your\n' > > 'enjoyment.' > > ) > > > > wait('Popping up a blank gnuplot window on your screen.') > > g = Gnuplot.Gnuplot(debug=1) > > g.clear() > > > > # Make two temporary files: > > if hasattr(tempfile, 'mkstemp'): > > (fd, filename1,) = tempfile.mkstemp(text=1) > > f = os.fdopen(fd, 'w') > > (fd, filename2,) = tempfile.mkstemp(text=1) > > else: > > filename1 = tempfile.mktemp() > > f = open(filename1, 'w') > > filename2 = tempfile.mktemp() > > try: > > for x in numpy.arange(100.)/5. - 10.: > > f.write('%s %s %s\n' % (x, math.cos(x), math.sin(x))) > > f.close() > > > > print '############### test Func > > ###################################' > > wait('Plot a gnuplot-generated function') > > > > And then the screen would freeze and I had to reboot. > > > > However, I never get the plot window and the Gnuplot terminal to open up. > > The reason I say the above commands worked is because I can see the > printout > > in my DOS command window. I can also see the tmp files in the TEMP > > directory. > > > > > > I tried playing around mainly changing the paths or changing the > directory > > of Gnuplot from Program Files to just C:\ - thinking that the space could > be > > an issue. > > I tried running other programs such as demo.py. > > > > After several such trials, now I am not able to see any messages on the > > command window because DOS window just disappears and I see a blue screen > > asking me to cntrl-alt-del or to reboot. > > > > I further debugged and saw that ' temp' data files e.g., in the demo.py > were > > being written to temp files. It is only when it comes to plotting that > the > > computer hangs. > > > > I then tried this: I changed the name of the Gnuplot (i.e., Gnuplot app > 4.4) > > directory to 'guplot' but without making changes to the PATH, and then I > ran > > the demo program - my thought was that it should not be able to find the > > Gnuplot application and would give me some error messages rather than > > computer hanging. > > > > But unfortunately, the computer still hangs for test.py. It runs all the > way > > till > > > > print '############### test Func ###################################' > > wait('Plot a gnuplot-generated function') > > > > and then goes bust. Although the command window diappears in a flash I > can > > make out the long comment line stated above. Again none of the command or > > plot windows pertaining to Gnuplot open up. The entire screen just blinks > > and then becomes dead. > > > > > > Another fact I would like to mention is that I tried all the above on Win > XP > > at my work, under similar file configuration and I get no issues at all. > > > > I guess this is how far I have been able to proceed. > > > > Any help would be appreciated despite that fact that I will be strongly > > discouraged from using WinME (I will eventually transition to Linux) but > it > > will take some time. I just feel that this is a solvable problem and may > not > > be a Win ME issue (hope!!). > > > > Rajan > > > > > > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > Gnuplot-py-users mailing list > > Gnu...@li... > > https://lists.sourceforge.net/lists/listinfo/gnuplot-py-users > > > > > |
From: Benny M. <ben...@gm...> - 2010-03-12 20:31:20
|
2010/3/12 Rajan Gurjar <rjn...@gm...>: > Thanks Benny, > I think I tried it already and if I recollect it did not work, but I will > try again when I get home (I have been at it for the last two weeks > endlessly booting my computer million times by now). > However, I have dug out a Win ME at work and followed the same install > procedures as I did at home on my Win ME or on my Win XP. And everything ran > perfectly well. I could run the test.py without any problems. In fact I used > older versions of python 2.4 and gnuplot 4.2. > This suggests something wrong with my Window ME installation? I am going to > try and do a system restore to an earlier date. I recently downloaded > "registry patrol" software from a vendor and it may have blocked certain > applications while cleaning my registry. > > I notice that I cannot see the .gih file in gnuplot\bin. Also when I click > on the gnuplot.hlp file I get a message (I cannot recall exactly and so I am > giving a distorted version here -sorry about that) : Cannot open it because > the file cannot be found or being used. It may have been renamed.... > I however, see all these files at my office WinME and can open the hlp > files. Isn't the .gih file used during a gnuplot run? So I am happy that > this is not a real bug for WinME in general but some nasty occurrence in my > machine. Would you have any suggestions? No. I stopped with windows after Win95. It seems like disk or OS problem on your machine. I'd say reinstall gnuplot and Gnuplot.py Benny |