Sponsored Content
Full Discussion: Problem with python script
Top Forums Shell Programming and Scripting Problem with python script Post 302733679 by Vijeta Laad on Wednesday 21st of November 2012 12:23:01 AM
Old 11-21-2012
Thanks for your help itkamaraj. As you mentioned, above code generated 2 files with unique flags. however, my requirement is to get only one message containing unique flag value instead of multiple unique flags.


For example : After executing the code above, file ganerated with flag x00000000 contains 2 set of messages and 1 message set for x00000010, where as I just want to print any one message with flag x00000000 and x00000010 in one single output text file. Please share the modified code. Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python tkinter grid problem?

There seems to be some problem with the grid geometry manager, or maybe its just my syntax thats incorrect. Im using Python 2.3.4. My problem is that even when I use the sticky='news' option in any grid method, it just doesnt work period. For example, the following code gives be a window with a... (0 Replies)
Discussion started by: SRCoder!
0 Replies

2. UNIX for Dummies Questions & Answers

problem with python on mac

Hi, I'm sure there's a very easy way to fix this but i'm a newbie so I'm posting this. The problem is that whenever I run python on the terminal I can no longer use the left and right arrows to move left or right, or the up/down arrows to call commands used before. Whenever I click an arrow I get... (0 Replies)
Discussion started by: thefloydpink
0 Replies

3. Shell Programming and Scripting

Passing variable from shell script to python script

I have a shell script main.sh which inturn call the python script ofdm.py, I want to pass two variables from shell script to python script for its execution. How do i achieve this ????? Eg: main.sh a=3 b=3; c= a+b exec python ofdm.py ofdm.py d=c+a Thanks in Anticipation (4 Replies)
Discussion started by: shashi792
4 Replies

4. Shell Programming and Scripting

Problem passing arguments to a Python script

I have part of the script below and I tried calling the script using ./tsimplex.py --fstmod=chris.cmod --nxz=8x6 --varp=0.25 but am getting the error option --fstmod must not have an argument Any idea on how to fix this would be highly appreciated #! /usr/bin/python import... (0 Replies)
Discussion started by: kristinu
0 Replies

5. Shell Programming and Scripting

Python script called by a shell script

experts, i wrote a python script to do a certain job, i tried it and it is working fine, i want this script to be executed automatically after a ksh script, the problem is when i execute the ksh script my python script runes perfectly after the ksh script as I have include it at the end of the ksh... (1 Reply)
Discussion started by: q8devilish
1 Replies

6. AIX

Strange problem running python program from within ant

Hello, I'm currently trying to port an ant based build to AIX 6.1. The build queries the underlying version control system (Mercurial) for some data, which works fine on other platforms (Linux, Solaris). However, on AIX the hg command fails to load python's md5 module when used in the build,... (1 Reply)
Discussion started by: dhs
1 Replies

7. Shell Programming and Scripting

Python SSH problem

Hello geeks, Am trying to write a custom plugin using python but it seems python is not handling the SSH part well, find below for the code: #!/usr/bin/python import os, sys host = sys.argv pdpactgsm=os.popen("ssh -l GbeAdi $host "pdc_kpi.pl" | grep -A 4 sgsn_g | awk 'NR == 5 ' |... (1 Reply)
Discussion started by: infinitydon
1 Replies

8. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies

9. Shell Programming and Scripting

Python problem with input

Hello everyone, I have just started python, and there is something that escapes me. I don't understand why my little script doesn't work. When I do, it work: my_string = "bonjour" if len(my_string) < "6": print(my_string + " < 6") else: print(my_string + " > 6") ... (2 Replies)
Discussion started by: Arnaudh78
2 Replies

10. Windows & DOS: Issues & Discussions

How to execute python script on remote with python way..?

Hi all, I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine.. Below is the code I am trying: #!/usr/bin/env python import wmi c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Discussion started by: onenessboy
1 Replies
hx509 error functions(3)					Heimdalx509library					  hx509 error functions(3)

NAME
hx509 error functions - Functions void hx509_clear_error_string (hx509_context context) void hx509_set_error_stringv (hx509_context context, int flags, int code, const char *fmt, va_list ap) void hx509_set_error_string (hx509_context context, int flags, int code, const char *fmt,...) char * hx509_get_error_string (hx509_context context, int error_code) void hx509_free_error_string (char *str) void hx509_err (hx509_context context, int exit_code, int error_code, const char *fmt,...) Detailed Description See the Hx509 error reporting functions for description and examples. Function Documentation void hx509_clear_error_string (hx509_context context) Resets the error strings the hx509 context. Parameters: context A hx509 context. void hx509_err (hx509_context context, int exit_code, int error_code, const char * fmt, ...) Print error message and fatally exit from error code Parameters: context A hx509 context. exit_code exit() code from process. error_code Error code for the reason to exit. fmt format string with the exit message. ... argument to format string. void hx509_free_error_string (char * str) Free error string returned by hx509_get_error_string(). Parameters: str error string to free. char* hx509_get_error_string (hx509_context context, int error_code) Get an error string from context associated with error_code. Parameters: context A hx509 context. error_code Get error message for this error code. Returns: error string, free with hx509_free_error_string(). void hx509_set_error_string (hx509_context context, int flags, int code, const char * fmt, ...) See hx509_set_error_stringv(). Parameters: context A hx509 context. flags o HX509_ERROR_APPEND appends the error string to the old messages (code is updated). code error code related to error message fmt error message format ... arguments to error message format void hx509_set_error_stringv (hx509_context context, int flags, int code, const char * fmt, va_list ap) Add an error message to the hx509 context. Parameters: context A hx509 context. flags o HX509_ERROR_APPEND appends the error string to the old messages (code is updated). code error code related to error message fmt error message format ap arguments to error message format Version 1.5.2 11 Jan 2012 hx509 error functions(3)
All times are GMT -4. The time now is 11:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy