Regarding about the printing script/python


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Regarding about the printing script/python
# 1  
Old 06-29-2009
Regarding about the printing script/python

Hello,
I am not sure whether this is the right forum or not, if not sorry for that.
I am trying to print text at desire column with python script.
eg. in this sentence
print >>AA_sql, "Hello"+ "World"

I want to print "Hello" at column10 and "World" at column30, simple idea is to make space , but i got many mess up lines to print.


That will be great if anyone can advice.


Many thanks,
DAVID
# 2  
Old 06-30-2009
show your input and desired output
# 3  
Old 06-30-2009
Hello, thanks for your reply , i am trying to generate street number , street type and position as follows

Code:
print >>maps_sql, streetname +"                    " + streettype +"     " +position

and at the moment i got output like that




HTML Code:
Shady Oak                    A41     -86436266+32469747 
Newham general                    A41     -86436025+32467506 
Abbey                     A41     -86435810+32466403



What i want is i want A41(street type) at cursor position 29 and i want to display position(lat/lon) at cursor position 37 , so that the put looks like below and i can read these data. Using " " is not effective here as well.


HTML Code:
Shady Oak                   A41     -86436266+32469747
Newham general              A41     -86436025+32467506
Abbey                       A41     -86435810+32466403


Many thanks

Last edited by davidkhan; 06-30-2009 at 10:11 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Print a python script down a list in a text file without printing a lot combinations

In a python script I have 2 files printing side by side on the same line. I want to have 1 of the files to be already displayed at once while the other file print down the list in the file and it still will produce new lines. I want to do it like that to reduce printing a lot of lines and... (0 Replies)
Discussion started by: bigvito19
0 Replies

2. Programming

Create a C source and compile inside Python 1.4.0 to 3.7.0 in Python for ALL? platforms...

Hi all... As you know I like making code backwards compatible for as many platforms as possible. This Python script was in fact dedicated for the AMIGA A1200 using Pythons 1.4.0, 1.5.2, 1.6.0, 2.0.1, and 2.4.6 as that is all we have for varying levels of upgrades from a HDD and 4MB FastRam... (1 Reply)
Discussion started by: wisecracker
1 Replies

3. 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

4. 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

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. 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

7. Programming

Python Script with C++Qt

Hi i work under CentOS 5.5, Qt 4.7, Python 2.4. i need to send data from C++ to Python. i write a code but it's not work, i have an Inferior System error on it. PyObject* objArg = Py_BuildValue("(z)", cKeyNum); PyObject* objFunc = (PyObject*)Init; pValue = PyEval_CallObject(objFunc, objArg);... (12 Replies)
Discussion started by: HanyM.Magdy
12 Replies

8. Shell Programming and Scripting

Hi Python and shell script,the script hangs

Hi I need to run a shell script from a TCL script,the shell script in trun will run a python script 1.Tcl script set filename "./GopiRun.sh" 2.GopiRun.sh python ./psi.py $MYSB/test_scripts/delivery/gpy1.py 3.I have my gpy1.py script. Here the problem i am facing is on running... (0 Replies)
Discussion started by: nathgopi214
0 Replies

9. Shell Programming and Scripting

How to run python script from a Tcl script

Hi I have a python script,i need to run this script from a tcl script.Can anyone let me know how to do this (1 Reply)
Discussion started by: nathgopi214
1 Replies
Login or Register to Ask a Question