Calling Python Script from LabVIEW
Hello Everyone,
I want to call the Python script from LabVIEW.
I tried with using at the command line but i am unable to run that script file..
i have gone through LabPython but i am unable to call the scripts from there also..
If someone has an example of a VI which invokes a python script, it will be very helpful...
Thanks a lot in advance
Regards
Avni
avni wrote:
I have to invoke the Script file at command prompt.
Can you descriobe your restriction(s) concerning "invoke the script at the command prompt"? There may be ways around that.
Similar Messages
-
How to call Python Scripts throght Labview
Hi all,
I am new to this community. Need some inputs for following Questions
Questions:
1) How can I call python script from LabView?
(Basically this python script calls some other DLL and print some message, to run the script using Python net in my application .To run my script in python net using following commands: import python script name )
2) In how many ways we can call Python scripts from labview?
I have tried with this option "System Exec.vi "in labview , able to calling pythonnet but unable to send commands and arguments to run python script(i.e import python script name ).
If anyone have samples".VI " please send to me. If you people want any information and clarification from my side please let me know. Thanks in advance.
Regards,
SambasivareddyOne way is to create a client server app and to send arguments to python (and back) over TCP/IP. This work very well.
There is an example on the old OpenG Website about this. Look it up.
Python client to LabVIEW Server.
PJM
Message Edited by PJM_Labview on 03-12-2008 09:00 AM
Got EasyXML?
JKI.VIPM.EasyXML.OpenG.LAVA.Builder.blog -
Calling perl script from labview
Hi,
I have a perl script and I would like to call the perl script from Labview
anyone can help me with that?
I used system exec but I'm getting an error.
Anyone have a working example like calling a simple perl script from Labview.
Thanks
SL OngHi,
Thanks for the reply from everyone.
The attached is my code to call Perl script and after calling this, I need to query the Perl Script by sending command like @help. Do they have a way to query the Perl script by sending command like @help and get the return result.
I think Joseph you are right, but how do I get the return result if I invoke it in a separate dos session.
SL Ong -
Hi,
I want to call python script from labview and labview vis from python script.
Can anybody send me any sample code for this using LabPython??
Regards
MeenatchiHi Meenatchi,
see this link http://forums.ni.com/ni/board/message?board.id=170&message.id=308245&requireLogin=False
[edit] if you download labPython from there, then you get some examples with it. [/edit]
Hope it helps
Mike
Message Edited by MikeS81 on 05-21-2008 04:05 PM -
How to call a python script from a TestStand sequence?
Please tell me how is it possible to call a python script from a TestStand sequence.
Thank for your help in advance.
ImreHere you can find some information about Python and LabVIEW:
http://forums.ni.com/ni/board/message?board.id=170&message.id=124424&query.id=149647#M124424
If you have LabVIEW, you could use LabVIEW steps to call your Phyton Scipts.
Another solution would be, to do, what is decriibed in the thread directly in TestStand:
You can call a dll or .NET assemblies directly from teststand, or use the "Call Executable" TestStep. -
Call a python script from perl file
This is my first post and am not sure if this is the right forum to post this query. If this is not the right forum, pls redirect me to the appropriate forum.
Query :
I have a python script which was created through WLS console's recording feature. I have to call this python script from a perl script (dte topo block).
Any pointers towards how this can be achieved ?
Thanks,
MadhusudanI am using inline python to execute python statements directly from the perl script. However, i get below error :
[maddeshp@slc01auw forDTE]$ perl -c intro.pl
Can't find string terminator "END_OF_PYTHON_CODE" anywhere before EOF at intro.pl line 2.
Has anyone run into this problem ? Any suggestions on fixing this ?
Thanks,
Madhusudan -
Controlling dialog boxes in a DIAdem script from LabVIEW
I have a DIAdem script that prompts the user for the data file it will process. The datafile was created from a labview test routine. I can now run the script from LabVIEW using the "DIAdem Run Script.VI", but in the interest of automation, I would like to have LabVIEW place the filename in this dialog. I would like to keep the dialog in the script, since sometimes we run this script manually. (without LabVIEW)
Bill W.Bill,
Which dialog are you using to prompt for the file name? It
appears that you cannot send any information to the script through the
Run Script.vi. However, you can call automation commands using
the "DIAdem Run Automation Command.vi". If you want to pass data
to the script, then you can set a Global Variable, or a DIAdem Script
Variable. As an example, you could use the global variable, T1,
and send "T1 := 'myfile'". When the script is executed, that
variable will be accessible within the script and it will be set to
"myfile". You could also set the FileDlgName variable to your
file name. Then it may be possible to send those variables to
your dialog so that they are automatically populated.
Good Luck!
Tyler Tigue
NI -
Calling SAP scripts from WEBDYNPRO
Hi
We need to call SAP scripts from WebDynpro application. As per my understanding we need to do following steps
Create a new RFC function module and create sap script output in PDF format.For this
- use OPEN_FORM , by assigning TDGETOTF='X' in the Options(Structure
ITCPO).
- call function module CLOSE_FORM with option OTFDATA
- convert OTF data to PDF by using function module CONVERT_OTF_2_PDF
Now I would like to know how to display the PDF string from WebDynpro.
Please help....
Regards
SujithHi,
You can call by creating external window method.
create LINK to URL or LINK TO ACTION according to requirement, for this. write code in onaction of that.
data: iv_url type string value 'http://<server>:<port>/sap/bc/gui/sap/its/webgui?~transaction=*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP'.
data: api_component type ref to if_wd_component,
window_manager type ref to if_wd_window_manager,
window type ref to if_wd_window.
api_component = wd_comp_controller->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
window = window_manager->create_external_window(
url = iv_url
modal = abap_false ).
window->open( ).
Cheers,
Kris. -
Calling GUI Scripting from ABAP program
Is it possible to call GUI Scripting from ABAP and thus to use GUI Scripting as an alternative to CALL TRANSACTION?
Is the class CL_JAVA_SCRIPT suitable to access GUI Scripting engine? Accessing ABAP data object would work as well in this case as i think. What SAP Logon and WAS releases are required? Is the 6.20 release sufficient for this case?
I would appreciate if somebody could post an example.Hi,
CL_JAVA_SCRIPT has nothing to do with SAPGUI Scripting.
Calling SAPGUI Scripting API from ABAP could be possible for programmes experienced with OLE automation calls from ABAP coding.
The hardest thing will be, to access the scripting engine handle as an entry point. Once you have a handle in your abap session, any api function can be invoked.
Best regards
Jens
BTW: SAP testtool eCATT does call SAPGUI-Scripting from ABAP. -
Calling Ant script from Jdeveloper
Hello Gurus,
I am trying to call Ant script from Jdeveloper.
I am able to call it when i don't use any javac in ant script.
But as soon as i include a javac command
<javac srcdir="${src}" destdir="${build}"/>
I get below error
C:\ant\windows\svn\AntJava\Project1\build.xml:20: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Oracle\jdk160_24\jre"
Needless to say i already have implemented all the steps mentioned in the internet.
I have my JAVA_HOME correctly set in my PATH environment variable.
I have tools.jar in the CLASSPATH
Please give a solution from JDeveloper perspective and not a generic one as i am done with all the steps provided in internet.any one?????
-
Call TCL script from TestStend or CVI
Hi
I would like to call TCL script from TestStand or CVI.
It’s possible ? and what do I need for it ?
T.UHi,
here is a link to an example
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/e1d9dbb13c6119f786256a3000696642?OpenDocument
Hope this helps
Regards
Ray Farmer
Regards
Ray Farmer -
Not able to call sql script from shell program
Hi Gurus,
I am facing issue while calling sqlplus script from my shell program. Please find below my shell script. This program I've written and registered as for one of concurrent program
in oracle applications.
p_userid_passwd=$1
p_appl_login=$2
p_user_name=$3
p_request_id=$4
v_conc_request_id=${5}
p_to_role=${6}
p_from_role=${7}
p_subject=${8}
p_body=${9}
p_dist_list=${10}
v_request=${11}
v_file_path_name=/u01/oraspt/REQUEST
cd $APPLCSF/$APPLOUT
echo "v_conc_request_id" $v_conc_request_id
echo "p_to_role" $p_to_role
echo "p_from_role" $p_from_role
echo "p_subject" $p_subject
echo "p_body" $p_body
echo "p_dist_list" $p_dist_list
echo "v_request" $v_request
ls -l $v_request
if [ $? -ne 0 ]
then
echo "No output request generated"
else
echo "Output request generated"
fi
echo "connecting to ftp for placing out file to DB server"
echo FTP to 99.60.17.11
echo username: "oraspt"
echo pw:
ftp -i -n 99.60.17.11 << EOF2
user "oraspt" orakdk
cd $v_file_path_name
put $v_request
bye
EOF2
output=`sqlplus -s /nolog <<EOT
whenever sqlerror exit failure;
connect apps/apps
set verify off;
set serveroutput on size 120000;
DECLARE
l_errbuf varchar2(300);
l_retcode varchar2(300);
BEGIN
XXFND_SEND_MAIL.SEND_NOTIFICATIONS( errbuf => l_errbuf
, retcode => l_retcode
, p_request_id => $v_conc_request_id
, p_to_role => $p_to_role
, p_from_role => $p_from_role
, p_subject => $p_subject
, p_body => $p_body
, p_dist_list => $p_dist_list);
EXCEPTION
when others then
dbms_output.put_line('Error encountered :'||SQLERRM);
END;
EOT
`
echo "connecting to ftp for deleting output file"
echo FTP to 99.60.17.11
echo username: "oraspt"
echo pw:
ftp -i -n 99.60.17.11 << EOF2
user "oraspt" orakdk
cd $v_file_path_name
delete $v_request
bye
EOF2
echo "Deleted successfully"Output for script is as below
v_conc_request_id 451906
p_to_role DC.DKHOO
p_from_role DC.DKHOO
p_subject Receivable audit report10
p_body Please find Audit Report Attachment.
p_dist_list
v_request o451906.out
-rw-r--r-- 1 applspt dba 2368 Dec 28 15:06 o451906.out
Output request generated
connecting to ftp for placing out file to DB server
FTP to 10.60.17.11
username: oraspt
pw:
connecting to ftp for deleting output file
FTP to 10.60.17.11
username: oraspt
pw:
Deleted successfullyPlease let me know how to trigger pl/sql script.
Thanks in advance for your help.
Regards
Nagendra
Edited by: 838961 on Dec 27, 2011 11:25 PMPlease find output as suggested, I've placed set -x in script.
+ p_userid_passwd=APPS/APPS
+ p_appl_login=1110
+ p_user_name=DC.DKHOO
+ p_request_id=451949
+ v_conc_request_id=451945
+ p_to_role=DC.DKHOO
+ p_from_role=DC.DKHOO
+ p_subject=Receivabless
+ p_body=report
+ p_dist_list=
+ v_request=o451945.out
+ v_file_path_name=/u01/oraspt/REQUEST
+ cd /u01/applspt/inst/apps/SPT_nfs-stg-app1/logs/appl/conc/out
+ echo v_conc_request_id 451945
v_conc_request_id 451945
+ echo p_to_role DC.DKHOO
p_to_role DC.DKHOO
+ echo p_from_role DC.DKHOO
p_from_role DC.DKHOO
+ echo p_subject Receivabless
p_subject Receivabless
+ echo p_body report
p_body report
+ echo p_dist_list
p_dist_list
+ echo v_request o451945.out
v_request o451945.out
+ ls -l o451945.out
-rw-r--r-- 1 applspt dba 2368 Dec 28 15:54 o451945.out
+ '[' 0 -ne 0 ']'
+ echo 'Output request generated'
Output request generated
+ echo 'connecting to ftp for placing out file to DB server'
connecting to ftp for placing out file to DB server
+ echo FTP to 10.60.17.11
FTP to 10.60.17.11
+ echo username: oraspt
username: oraspt
+ echo pw:
pw:
+ ftp -i -n 10.60.17.11
++ sqlplus -s /nolog
+ output=Connected.
+ echo 'connecting to ftp for deleting output file'
connecting to ftp for deleting output file
+ echo FTP to 10.60.17.11
FTP to 10.60.17.11
+ echo username: oraspt
username: oraspt
+ echo pw:
pw:
+ ftp -i -n 10.60.17.11
+ echo 'Deleted successfully'
Deleted successfully -
Calling shell script from apex application
Please let me know if anyone has tried Calling shell script from apex application, it would be nice enough if you can share how you did it? Thanks
Hi,
Requirements
* CREATE JOB (10g Rel.1)
* CREATE EXTERNAL JOB (10g Rel.2 / 11g)
* EXECUTE on dbms_scheduler (granted to public by default)
Since Oracle 10.2.0.2 the commands are executed as user nobody.
Code:
--Create a Program for dbms_scheduler
exec DBMS_SCHEDULER.create_program('RDS2008','EXECUTABLE','c:\ WINDOWS\system32\cmd.exe /c echo 0wned >> c:\rds3.txt',0,TRUE);
--Create, execute and delete a Job for dbms_scheduler
exec DBMS_SCHEDULER.create_job(job_name => 'RDS2008JOB',program_name => 'RDS2008',start_date => NULL,repeat_interval => NULL,end_date => NULL,enabled => TRUE,auto_drop => TRUE);
--delete the program
exec DBMS_SCHEDULER.drop_program(PROGRAM_NAME => 'RDS2008');
--Purge the logfile for dbms_scheduler
exec DBMS_SCHEDULER.PURGE_LOG;
This is one way as suggested by Trent.
We can also achieve as follows.
http://www.dba-oracle.com/t_execute_shell_script_plsql_procedure.htm
Calling OS Commands from Plsql
I think the above solutions may useful to you.
Let me know if you are facing any problem.
Thanks and Regards
Maheswara -
Calling PERL script from scheduler
Hello All,
I am trying to call PERL script from dbms_scheduler which makes the database connection using DBD module to read some values to perform the operation. My scheduler job kept failing with the following error:
ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory
STANDARD_ERROR="install_driver(Oracle) failed: Can't load '/usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: libclntsh.so.10.1: cannot open shared object file
It can't open libclntsh.so.10.1 file when I run the job, I guess because in job session, it creates a new shell and doesn't inherit the .profile and none of the environmental variables get set. When I run the PERL script manually it works because of all the env variables, so I put all those variables from my .profile into PERL script itself using ENV function but it still doesn't work, failed with very same error. And yes I do set LD_LIBRARY_PATH to point to $ORACLE_HOME/lib directory. Moreover, if I run the PERL script manually from a shell where I dont inherit .profile, it fails with very same error, so it is related to the environment issues but I have no idea how to fix it. I read somewhere the setting those env variable in PERL script itself doesn't help because by the time PERL get executed all the compilers are already initialized and and they don't use those environement variables anymore then. So the question is how to make it work?
I would really appreciate if someone can help me fixing this, it's gonna change my life here :)
DB Version: 10.2.0.2 (also tested on 11R2, same problem)
OS: SUSE Linux 64 bit
And here is my libclntsh file in $ORACLE_HOME/lib
$ls -l libclnt*
lrwxrwxrwx 1 epsora epsdba 52 2009-09-15 13:39 libclntsh.so -> /u01/app/epsora/product/10.2.0/lib/libclntsh.so.10.1
-rwxr-xr-- 1 epsora epsdba 20274415 2009-09-15 13:39 libclntsh.so.10.1
-rw-r----- 1 epsora epsdba 36840968 2009-09-15 13:38 libclntst10.a
Please let me know if you need more information about this setup.
Thanks
Daljit Singh
Edited by: Daljit on Jul 6, 2010 10:06 AMNothing in your post indicates that you created a directory object and granted privileges.
http://www.morganslibrary.org/reference/directories.html
did you? -
Calling javaFX script from Java program
I am trying to call JavaFX script from a simple Java program. code as follows:
import java.io.*;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class My{
public static void main(String[] args) {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByExtension("fx");
try {
InputStreamReader reader = new InputStreamReader(My.class.getResourceAsStream("first.fx"));
engine.eval(reader);
reader.close();
} catch (Exception e) {
e.printStackTrace();
my first.fx file code is here:
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.text.TextAlignment;
Stage {
title: "My First JavaFX Sphere"
scene: Scene {
width: 250
height: 250
content: [
Text {
font: Font { size: 24 }
x: 20, y: 90
textAlignment: TextAlignment.CENTER
content:"Welcome to \nJavaFX World"
} //Text
] // content
} // Scene
} // Stage
I am not able to run My.java. runtime error as follows:
java.lang.NullpointerException
Kindly correct me, where I am wrongI am able to call .fx file from Java. Thank you all for helping me to resolve this problem
Regards,
Ritu
Maybe you are looking for
-
Hotspot core dumping during JVM garbage collection ?
We have an application which calls a 3rd party supplied server API which has recently been upgraded to use Java 1.5 We are getting the following error reported by our client application. The application is also now running Java 1.5 but references man
-
ITunes failing to open - error message reads "New iTunes Library"
My computer turned itself off last night after overheating.. this has happened before. I went to turn it on this morning and it went through a start up process to ensure now problems occurred. It is now back up and running yet my iTunes will not open
-
Regarding report s_alr_87012082.
Hi all, I want the output of standard report s_alr_87012082 in alv format ... is there any relevant standard report available ?? Also if i want the output values of report s_alr_87012082, from which tables i can get vendor no, vendor
-
Get description of tables and columns
Good afternoon. Is there any option in SAP B1 to get a description of table and column dynamically? That is, without the "Tools -> Queries -> Query Generator"? I am developing an add-on, which lists all the tables and columns of the sap, and I have t
-
What's the best method for securely erasing files on OS X?
Hello, I'm looking for a method for securely erasing files on OS X. I know OS X has the srm command doable in the Terminal, but this command uses the 35-pass Gutmann algorithm which is, to me, obsolete as of now. Do you know modern methods for secure