473,837 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change settings directory to run gnuplot on linux [solved?]

1 New Member
Hi, I'm a chemist trying to use the python script GaussSum.py with gnuplot for creating dataplots, and need some help. Whenever I try to produce a plot from the GaussSum GUI I get the error

sh: line 1: /Users/kristine/Desktop/GaussSum-1.0.5/gnuplot400/bin/wgnuplot.exe: No such file or directory

in my terminal. At the moment, I have gnuplot in the path /usr/local/bin instead. So I need to know how to change the settings directory to enable GaussSum to call gnuplot. Can anyone advise me on what or where to edit in the script please? I've pasted a section of the GaussSum.py where I'm guessing should be editted.

Thanks in advance!

Expand|Select|Wrap|Line Numbers
  1.     def preferences(self):
  2.         # The Preferences Dialog Box
  3.         oldsettings=copy.deepcopy(self.settings) # Remember the old settings
  4.         d=PreferencesPopupBox(root,self.settings,title="Settings")
  5.         if self.settings!=oldsettings: # if there are any changes
  6.             self.saveprefs()
  8.     def saveprefs(self):
  9.         # Save the settings
  10.         appdata=os.getenv("HOME")
  11.         settingsfile=os.path.join(appdata,".GaussSum1.0","GaussSum.ini")
  12.         writeoutconfigfile(self.settings,settingsfile)
  15.     def readprefs(self):
  16.         # Check for GaussSum.ini in $HOME/GaussSum1.0 (XP)
  17.         #                        or $HOME/.gausssum1.0 (Linux)
  19.         appdata=os.getenv("HOME")
  20.         self.settings={}
  22.         if appdata==None: # Must not be a Windows machine!!
  23.             self.screen.write("Environmental variable HOME is not defined!\n\
  24.                                I cannot continue, as I need HOME to know\
  25.                                where to store GaussSum settings.\n")
  26.         else: # If everything is normal so far
  27.             settingsdir=os.path.join(appdata,".GaussSum1.0")
  28.             settingsfile=os.path.join(settingsdir,"GaussSum.ini")
  30.             if os.path.isfile(settingsfile): # Check for settings file
  31.                 # Found it! - so read it in.
  32.                 self.settings=readinconfigfile(settingsfile)
  34.             else: # Initialise the settings file (and directory)
  35.                 if not os.path.isdir(settingsdir):
  36.                     os.mkdir(settingsdir)
  37.                 self.settings={'global settings.filetype':'Gaussian',
  38.                                'global settings.gnuplot':os.path.join(sys.path[0],"gnuplot400","bin","wgnuplot.exe"),
  39.                                'find.text1':'SCF Done',
  40.                                'find.text2':'k 501%k502',
  41.                                'find.text3':'imaginary',
  42.                                'find.text4':'Framework',
  43.                                'ir_raman.start':'0',
  44.                                'ir_raman.end':'4000',
  45.                                'ir_raman.numpoints':'500',
  46.                                'ir_raman.fwhm':'3',
  47.                                'mo.start':'-20',
  48.                                'mo.end':'0',
  49.                                'mo.fwhm':'0.3',
  50.                                'uvvis.start':'300',
  51.                                'uvvis.end':'800',
  52.                                'uvvis.numpoints':'500',
  53.                                'uvvis.fwhm':'3000',
  54.                                'uvvis.sigma':'0.2',
  55.                                'eddm.cubman':'C:\\Gaussian\\cubman.exe',
  56.                                'eddm.formchk':'C:\\Gaussian\\formchk.exe',
  57.                                'eddm.cubegen':'C:\\Gaussian\\cubegen.exe',
  58.                                'nmr.data':os.path.join(settingsdir,"nmrdata.txt")
  59.                                }
  60.                 self.saveprefs() # Save the inital settings file
Oct 24 '06 #1
2 5370
2,851 Recognized Expert Moderator Specialist
I guess sometimes when having problems with Python stuff, so I will guess here. Have you tried to determine your current value of 'sys.path[0]? If it is '/Users/kristine/Desktop/GaussSum-1.0.5', you may try substituting your path here:
Expand|Select|Wrap|Line Numbers
  1.  else: # Initialise the settings file (and directory)
  2.                 if not os.path.isdir(settingsdir):
  3.                     os.mkdir(settingsdir)
  4.                 self.settings={'global settings.filetype':'Gaussian',
  5.                                'global settings.gnuplot':os.path.join('usr', 'local', 'bin'),
  6.                                .......
Sometimes I get lucky, but not usually the first time.
Oct 24 '06 #2
6,596 Recognized Expert Expert
Looks like the key is here:

Expand|Select|Wrap|Line Numbers
  1.     def readprefs(self):
  2.         # Check for GaussSum.ini in $HOME/GaussSum1.0 (XP)
  3.         # or $HOME/.gausssum1.0 (Linux)
  5.         appdata=os.getenv("HOME")
My guess is that the since $HOME is /Users/kristine/Desktop/, you need the /GaussSum-1.0.5 directory there with /gnuplot400/bin/wgnuplot.exe in it.
If you don't want the directory there, look in the .gausssum1.0 file and change the path if it's in there.
Good luck,
Oct 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Rama Calaga | last post by:
Hi, I use both python and gnuplot a lot, but I am unable to find a way to embed gnuplot "window/canvas" into tkinter. BLT option in PMW is not so powerful and not so great, any suggestions ?? thanks ram
by: Jive | last post by:
Here's my sitch: I use gnuplot.py at work, platform Win32. I want to upgrade to Python 2.4. Gnuplot.py uses extension module Numeric. Numeric is now "unsupported." The documentation says "If you are new to Numerical Python, please use Numarray.". It's not that easy, dangit. The download page for numpy does not contain a 2.4 version of Numeric, and I suspect they do not intend to release one, because there IS a 2.4 version of...
by: Cousin Stanley | last post by:
Experimenting with the gnuplot package under Debian Linux, I've found that the -reverse option when used to start gnuplot from the command-line will produce plots that are color-reversed and render with white text on a black background .... However, I'm too dense to see how to easily achieve the same effect when using the python-gnuplot package .... Any clues would be greatly appreciated ....
by: syd | last post by:
I don't even know where to begin. This is just bizarre. I just picked up the Gnuplot.py module (a light interface to gnuplot commands) and was messing around with it today. I've got a tiny script, but it only works from the command line about half the time! In the python interpreter, 100%. Ipython, 100%. I'm not kidding. #!/bin/env python import Gnuplot
by: Joseph Suprenant | last post by:
Hello all, I have a C++ program, it does some calculations on things and then prints out a file in the format in which GNUPLOT can use. So my question is how would i call GNUPLOT from my C++ program. I know in some operating systems you can do system("gnuplot"); But not with red hat 7.3. So could some kind soul help me out? After it starts up GNUPLOT my program will terminate. Thanks
by: Kamil Grymuza | last post by:
Can anyone help me controlling gnuplot from my program? I can't use any 3rd party libraries or so. I found on the net, that i can be done via pipes, but i don't know how to use them. All i need to do i to plot some data, maybe replot and then close the gnuplot window. Thanks Kamil
by: Titi Anggono | last post by:
Hi all, I have some questions: 1. Can we use Tkinter for web application such as Java ? 2. I use gnuplot.py module for interfacing with gnuplot in linux. Can we make the plot result shown in web ? I tried using cgi, and it didn't work.
by: Nicola Kaiser | last post by:
Hi, I´m using Gnuplot via gnuplot.py and I´m looking for a way to get the plotting output (terminal set to png in my case) piped in a string instead of to stdout or a file. Is there any method in gnuplot.py that does this for me? If not, I tried something like:
by: cybervigilante | last post by:
I can't seem to change the include path on my local winmachine no matter what I do. It comes up as includ_path .;C:\php5\pear in phpinfo() but there is no such file. I installed the WAMP package and PEAR is in c:\wamp\php\pear I modified php.ini in the c:\wamp\php directory to reflect the actual path, but even stopping and restarting my server shows the c: \php5\pear path. I can't change it no matter what I do I also tried the...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.