<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Does the function have to be a pro Fit function? Or do you just need a piece of code that can be called from two different pro Fit programs?<div class=""><br class=""></div><div class="">In the former case, have a look at the “Complete Program” example, which is pasted into a the window when you choose Help->Source Examples->Complete Program from the toolbar of a script window (in Python mode). It shows how two programs can share a common global variable. Similarly, they could share a common Python function. The only drawback here is that both programs and the function reside in the same source script.</div><div class=""><br class=""></div><div class="">In the latter case, i.e. if you need that function to be a pro Fit function, you can probably just add a ‘## function’ statement that exports the common function to pro Fit as a pro Fit function — did not try this, though.</div><div class=""><br class=""></div><div class="">An alternative approach would be to pass the data through a pro Fit window. This would, however, be considerably slower than direct communication between two Python scripts.</div><div class=""><br class=""></div><div class="">Best regards</div><div class=""><br class=""></div><div class="">Kurt Sutter</div><div class="">QuantumSoft</div><div class=""><br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 26 Feb 2016, at 23:38, Calvert, Andrew <<a href="mailto:acalvert@usgs.gov" class="">acalvert@usgs.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I need to perform calculations on 1D and 2D lists using Python functions and programs.  I can get the calculations to work within a program (build the 2D list from a data window and perform the calculations), however, I would prefer to do the calculations in a function because I would like to access the same function from several programs.  <div class=""><br class=""></div><div class="">I seem to be unable to pass a list as an argument to a proFit function.  I am able to pass single variables, but not lists.  Is this true?</div><div class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature">Andrew Calvert (<a href="mailto:acalvert@usgs.gov" target="_blank" class="">acalvert@usgs.gov</a>)<div class="">Volcano Science Center, US Geological Survey</div><div class="">345 Middlefield Road, MS-910</div><div class="">Menlo Park, CA 94025</div><div class="">ph: 650-329-5276; fax: 650-329-5203</div></div>
</div></div>
_______________________________________________<br class="">proFit-list mailing list<br class=""><a href="mailto:proFit-list@quantum-soft.com" class="">proFit-list@quantum-soft.com</a><br class="">http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com<br class=""></div></blockquote></div><br class=""></div></div></body></html>