Read utf-8 file131 (3/18/2013 9:34:58 AM) comp.lang.python File have China Made
=A4=A4=B0=EA =BBs
http://www.fileformat.info/info/unicode/char/4e2d/index.htm
UTF-16 (hex) 0x4E2D (4e2d)
UTF-8 (hex) 0xE4 0xB8 0xAD (e4b8ad)
Read by od -cx utf_a.text
0000000 ... moonhkt
Split string data have ","333 (1/29/2013 4:59:47 PM) comp.lang.python Hi All
Python 2.6.2 on AIX 5.3
How to using split o
>>> y = '"abc.p,zip.p",a,b'
>>> print y
"abc.p,zip.p",a,b
>>>
>>> k= y.split(",")
>>> print k[0]
"abc.p
>>>
Need Result, First element is
... moonhkt
create object base on text file338 (1/25/2013 12:06:22 PM) comp.lang.python Hi All
Python 2.6.x on AIX
Data file
PrinterA
print Production batch1
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
print Production batch2
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
... moonhkt
Increase value in hash table1350 (1/23/2013 7:26:45 AM) comp.lang.python Hi Al
I have Data file have below
Data file
V1
V2
V3
V4
V4
V3
How to using count number of data ?
Output
V1 = 1
V2 = 1
V3 =2
V4 = 2
# Global Veriable
printque = {}
in def have bel... moonhkt
About UNIX shell trap, any relative function in Python ?385 (12/15/2012 3:34:29 PM) comp.lang.python
Hi All
Machine : AIX 5.3
Python : 2.6.2
In UNIX have, trap to run defined CLEAN_UP function. When HUP INT
KILL STOP TERM will run CLEAN_UP function.
trap 'echo "\n\nProcessing Clean up"; CLEAN_UP;... moonhkt
About open file for Read390 (12/10/2012 4:36:22 PM) comp.lang.python Hi All
I am new in Python. When using open and then for line in f .
Does it read all the data into f object ? or read line by line ?
f=open(file, 'r')
for line in f:
if u... moonhkt
How to list a file which already created a 2 mins ago284 (12/6/2012 4:49:21 PM) comp.lang.python Hi All
AIX.5.3
Python 2.6.2
File ftp to Machine A, need to rename then send to Machine B.
How to list a file which already created a 2 mins ago ? If file aging
more than 2 mins. I want to rename fil... moonhkt
using smtp sent large file upto 60MB978 (12/4/2012 8:15:22 AM) comp.lang.python Hi All
How to using python send file uptp 60MB ?
s = smtplib.SMTP("localhost")
#~~ s.set_debuglevel(1)
s.sendmail(from_addr, to_addr,m.as_string())
s.quit
For 13MB file have below error
s.s... moonhkt
skip Trackback error for ftp checking378 (11/10/2012 4:51:47 AM) comp.lang.python HI All
How to skip Trackback warning/error when input ftp address is not
correct or reject ?
AIX 5.3
from ftplib import FTP
import ftplib
import sys
from optparse import OptionParser
parser = Op... moonhkt
Import files with different format6173 (2/27/2012 3:09:25 PM) comp.lang.awk Hi All File1 FS = tab File2 using fix field widths Does below position of FS and FIELDWIDTHS are correct ? gawk 'BEGIN { FS="\t" } NR==FNR { itemcov[$1]=$1 itemst[$1]=$9 ... moonhkt(146)
seeking Highlight selected strings4178 (2/28/2012 3:58:42 PM) comp.lang.awk Hi All AIX 5.3 , GNU Awk 3.1.3 Data_file, Want to bold selected text. What is good way for highlight ? I can handle single string, But not good for mulit string such as hightlight="ITEM01|WC003", Any string ... moonhkt(146)
Timed Input9161 (3/9/2012 8:29:49 PM) comp.lang.awk I have a process writing multi-line records to a log file "foo.log". Each record starts with the string "START". I want to be able to tail the log file and extract records that match the text "FOO" while the lo... mortonspam(827)
using tee and 2>1&3171 (6/28/2012 2:58:38 PM) comp.unix.shell Hi All
Machine AIX OS 5.3
When abc.txt file not exist. cp case error. How to capture error out to
log1.log.today and log1.log ?
cp abc.txt a1.txt | tee -a log1.log.today 2>1& | tee -a log1.log 2>1&
... moonhkt(146)
skip warnning14149 (7/19/2012 4:21:26 AM) comp.lang.awk Hi All
How to skip below warning
gawk: cmd. line:92: warning: escape sequence `\>' treated as plain `>'
gawk: cmd. line:94: warning: escape sequence `\ to > for generate Excel XML file
function Wr... moonhkt(146)
skip Trackback error for ftp checking378 (11/10/2012 4:51:47 AM) comp.lang.python HI All
How to skip Trackback warning/error when input ftp address is not
correct or reject ?
AIX 5.3
from ftplib import FTP
import ftplib
import sys
from optparse import OptionParser
parser = Op... moonhkt(146)
using smtp sent large file upto 60MB978 (12/4/2012 8:15:22 AM) comp.lang.python Hi All
How to using python send file uptp 60MB ?
s = smtplib.SMTP("localhost")
#~~ s.set_debuglevel(1)
s.sendmail(from_addr, to_addr,m.as_string())
s.quit
For 13MB file have below error
s.s... moonhkt(146)
Increase value in hash table1350 (1/23/2013 7:26:45 AM) comp.lang.python Hi Al
I have Data file have below
Data file
V1
V2
V3
V4
V4
V3
How to using count number of data ?
Output
V1 = 1
V2 = 1
V3 =2
V4 = 2
# Global Veriable
printque = {}
in def have bel... moonhkt(146)
Split string data have ","333 (1/29/2013 4:59:47 PM) comp.lang.python Hi All
Python 2.6.2 on AIX 5.3
How to using split o
>>> y = '"abc.p,zip.p",a,b'
>>> print y
"abc.p,zip.p",a,b
>>>
>>> k= y.split(",")
>>> print k[0]
"abc.p
>>>
Need Result, First element is
... moonhkt(146)