skip to main
|
skip to sidebar
Boardash
Boardash me, Major. The space has no more room for cadets.
Sunday, August 8, 2010
Work as a medical coder
Work from home as a medical coder
Start Now
On Wed, 14 Jan 2009 14:48:17 -0500, "Jerry D. Hedden" < jdhe ... @cpan.org > wrote: The format of the .patch file is no longer an integer change number, and generates an error when processed by Configure. As .patch is now handled by make_patchnum.pl, remove processing of .patch from Configure. On Wed, Jan 14, 2009 at 4:02 PM, H.Merijn Brand< h.m. ... @xs4all.nl > wrote: True, but changes to Configure were hold-off till the dust has settled. I wait for Yves to make me rip that out of Configure. The dust should be settled by now. How about processing this patch? Dear durgam : Thanks your help and now I have another questions from your answer. (Q1) I know PLI is a mechanism to invoke C or C++ functions from Verilog code. I going into $DV_ROOT/tools/pli/iop and write command "% mkplilib ncverilog" to recomplier PLIs, but i got the error message below: /bin/sh: ncbits: not found /bin/sh: test: argument expected cc: unrecognized option `-KPIC' cc: language CC not recognized cc: mem.c: linker input file unused because linking not done cc `[ \`ncbits\` = 64 ] && echo -xarch=v9 || echo` -G -Bdynamic -o /home/MS97 /max1/OpenSPARCT1/tools/pli/mem/libmem_pli_ncv.so mem.o /bin/sh: ncbits: not found /bin/sh: test: argument expected cc: mem.o: No such file or directory cc: no input files make[1]: *** [/home/MS97/max1/OpenSPARCT1/tools/pli/mem/libmem_pli_ncv.so] Error 1 make[1]: Leaving directory `/home/MS97/max1/OpenSPARCT1/tools/pli/mem' make: *** [/home/MS97/max1/OpenSPARCT1/tools/pli/mem/libmem_pli_ncv.so] Error 2 I don't understand the meaning of error messages clearly. I guess that maybe I didn't set the correct path, so it can't find some file at the path which define in makefile.ncv . Should i chang some variables or path in makefile.ncv or do something else? (Q2) I find the some PLI dynamic library (.so) at $DV_ROOT/tools/SunOS/sparc/lib . Can i directly use this PLI dynamic library (.so) which had compiled without compiling PLI source codes as Q1 ? (Q3) If i can directly use this PLI dynamic library (.so), how could i link these dynamic library(.so) and hardware module(.v) while running a regression by using sims and ncverilog . Or i don't worry about the linking problem because Sims could do automatically? (Q4) The error message shown in previous article which i post include "library -lSysSciTask, -lC, -lcx not found ". Are these library belong to part of PLI library or other system library like gcc library or Sims simulator? (Q5) {quote:title=durgam wrote:}{quote} Try recompiling PLIs for your particular platform and gcc version using mkplilib utility. Pre-packaged PLIs are compiled with Sun studio suit and will not work with gcc moel build. In general , pli and model should be build with the same compiler. At final line as You say "In general , pli and model should be build with the same compiler." and i didn't understand the "model" you mean ? Does "model" mean hardware model like core1_mini, core1_full, chip8_mini...etc? If I guess right, i think the PLI code written by C or C++ should be compilied by gcc and "model" like sparc core written by verilog should be compilied by another HDL complier . Why did you say "pli" and "model" should be build with "the same compiler" or i misunderstood for "model"? Sorry for questioning so many problems . If anyone has suggestion, you can do me a favor. On 11/23/06 6:15 AM, Rob Wolfe wrote: wo_shi_big_ stomach wrote: Newbie to python writing a script to recurse a directory tree and delete the first line of a file if it contains a given string. I get the same error on a Mac running OS X 10.4.8 and FreeBSD 6.1. Here's the script: # start of program # p.pl - fix broken SMTP headers in email files # # recurses from dir and searches all subdirs # for each file, evaluates whether 1st line starts with "From " # for each match, program deletes line import fileinput import os import re import string import sys from path import path # recurse dirs dir = path(/home/wsbs/Maildir) for f in dir.walkfiles('*'): # # test: # print f Are you absolutely sure that f list doesn't contain any path to directory, not file? Add this: f = filter(os.path.isfile, f) and try one more time. Sorry, no joy. Printing f then produces: rppp rppppp rppppp rpppr rppppp rpppP rppppp rppppp which I assure you are not the filenames in this directory. I've tried this with f and f.name. The former prints the full pathname and filename; the latter prints just the filename. But neither works with the fileinput.input() call below. I get the same error with the filtered mod as before: File "./p", line 23, in ? for line in fileinput.input(f, inplace=1, backup='.bak'): Thanks again for info on what to feed fileinput.input() # # open file, search, change if necessary, write backup for line in fileinput.input(f, inplace=1, backup='.bak'): # check first line only if fileinput.isfirstline(): if not re.search('^From ',line): print line.rstrip('\n') # just print all other lines if not fileinput.isfirstline(): print line.rstrip('\n') fileinput.close() # end of program Dennis Lee Bieber wrote: On Sat, 25 Nov 2006 07:58:26 -0800, wo_shi_big_ stomach declaimed the following in comp.lang.python: File "p2.py", line 23, in ? for line in fileinput.input(f,): File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/fileinput.py", line 231, in next line = self.readline() File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/fileinput.py", line 320, in readline self._file = open(self._filename, "r") This looks similar to before -- fileinput.input() still isn't operating on the input. And where is the actual exception message line -- the one with the error code/description. dir = path('/home/wsbs/Maildir') #for f in dir.walkfiles('*'): for f in filter(os.path.isfile, dir.walkfiles('*')): If I understand the documentation of fileinput, you shouldn't even need this output loop; fileinput is designed to expect a list of files (that it works with a single file seems an afterthought) Yes, thanks. This is the key point. Feeding fileinput.input() a list rather than a single file (or whatever it's called in Python) got my program working. Thanks! for line in fileinput.input(f,): for line in fileinput.input(filter(os.path.isfile, dir.walkfiles("*")), inplace=1): should handle all the files... Indeed it does -- too many times. Sorry, but this (and the program you provided) iterate over the entire list N times, where N is the number of files, rather than doing one iteration on each file. For instance, using your program with inplace editing and a ".bak" file extension for the originals, I ended up with filenames like name.bak.bak.bak.bak.bak in a directory with five files in it. I don't have this third party path module, so the directory tree walking isn't active, but... The path module: http://www.jorendorff.com/articles/python/path/ is a *lot* cleaner than os.path; see the examples at that URL. Thanks for the great tip about fileinput.input(), and thanks to all who answered my query. I've pasted the working code below. /wsbs import fileinput import os import re import string import sys from path import path # p2.py - fix broken SMTP headers in email files # # recurses from dir and searches all subdirs # for each file, evaluates whether 1st line starts with "From " # for each match, program deletes line # recurse dirs dir = path('/home/wsbs/Maildir') g = dir.walkfiles('*') for line in fileinput.input(g, inplace=1, backup='.bak'): # just print 2nd and subsequent lines if not fileinput.isfirstline(): print line.rstrip('\n') # check first line only elif fileinput.isfirstline(): if not re.search('^From ',line): print line.rstrip('\n') fileinput.close()
Newer Post
Older Post
Home
Followers
Blog Archive
►
2024
(16)
►
December
(2)
►
July
(1)
►
June
(2)
►
May
(4)
►
April
(2)
►
March
(1)
►
February
(4)
►
2023
(16)
►
October
(7)
►
September
(1)
►
August
(2)
►
July
(2)
►
June
(2)
►
May
(1)
►
February
(1)
►
2022
(17)
►
November
(3)
►
September
(4)
►
July
(3)
►
June
(1)
►
May
(1)
►
April
(2)
►
March
(3)
►
2021
(157)
►
December
(1)
►
November
(4)
►
July
(22)
►
June
(2)
►
May
(19)
►
April
(28)
►
March
(33)
►
February
(24)
►
January
(24)
►
2020
(302)
►
December
(26)
►
November
(35)
►
October
(29)
►
September
(35)
►
August
(47)
►
July
(25)
►
June
(12)
►
May
(22)
►
April
(14)
►
March
(33)
►
February
(13)
►
January
(11)
►
2019
(200)
►
December
(10)
►
November
(19)
►
October
(17)
►
September
(20)
►
August
(23)
►
July
(24)
►
June
(10)
►
May
(16)
►
April
(22)
►
March
(13)
►
February
(10)
►
January
(16)
►
2018
(227)
►
December
(14)
►
November
(14)
►
October
(22)
►
September
(19)
►
August
(25)
►
July
(10)
►
June
(3)
►
May
(27)
►
April
(32)
►
March
(21)
►
February
(16)
►
January
(24)
►
2017
(221)
►
December
(17)
►
November
(28)
►
October
(35)
►
September
(29)
►
August
(38)
►
July
(4)
►
June
(16)
►
May
(10)
►
April
(14)
►
March
(11)
►
February
(8)
►
January
(11)
►
2016
(106)
►
December
(18)
►
November
(9)
►
October
(9)
►
September
(3)
►
August
(9)
►
July
(11)
►
June
(3)
►
May
(7)
►
April
(16)
►
March
(11)
►
February
(4)
►
January
(6)
►
2015
(147)
►
December
(11)
►
November
(8)
►
October
(16)
►
September
(11)
►
August
(7)
►
July
(18)
►
June
(18)
►
May
(9)
►
April
(13)
►
March
(14)
►
February
(14)
►
January
(8)
►
2014
(135)
►
December
(12)
►
November
(9)
►
October
(11)
►
September
(20)
►
August
(12)
►
July
(13)
►
June
(8)
►
May
(10)
►
April
(12)
►
March
(8)
►
February
(11)
►
January
(9)
►
2013
(140)
►
December
(4)
►
November
(6)
►
October
(25)
►
September
(11)
►
August
(15)
►
July
(12)
►
June
(13)
►
May
(13)
►
April
(7)
►
March
(12)
►
February
(9)
►
January
(13)
►
2012
(91)
►
December
(10)
►
November
(7)
►
October
(11)
►
September
(8)
►
August
(7)
►
July
(6)
►
June
(8)
►
May
(14)
►
April
(6)
►
March
(3)
►
February
(4)
►
January
(7)
►
2011
(364)
►
December
(5)
►
November
(7)
►
October
(15)
►
September
(13)
►
August
(23)
►
July
(45)
►
June
(27)
►
May
(3)
►
April
(12)
►
March
(25)
►
February
(152)
►
January
(37)
▼
2010
(2424)
►
December
(22)
►
November
(24)
►
October
(19)
►
September
(27)
▼
August
(34)
arbcombo -- Presentation and Updated Agenda Posted...
tire-pressure -- Tire Pressure Regulation Approved
Classes are starting soon
Choose From Top Health Insurance Carriers.
Prepare for a healthcare career
cc -- SAVE THE DATE - Climate Action Team (CAT) Me...
arbcombo -- Changes in upcoming diesel workshops
cc -- August 30-31, 2010 -- CAPCOA Climate Change ...
Be successful from home
arbcombo -- Today - Public Meeting on Cap-and-Trad...
View comparisons on coverage
Look to get employed today
arbcombo -- ARB Chair's Seminar Series: Wednesday,...
HeatherN is inviting you to Daceband!
Protect Your Family
Act now to study coding
Fight the criminals as a Forensics Scientist
arbcombo -- Public Workshops to Discuss Revised Em...
arbcombo -- Public Meeting to Discuss Analysis to ...
Compare Health Plans
Don't overlook public sector jobs
arbcombo -- ARB Chair's Seminar Series: Wednesday,...
arbcombo -- ARB Chair's Seminar Series: Tuesday, S...
Be prepared when accidents happen
arbcombo -- ARB Chair's Seminar Series: Wednesday,...
Work as a medical coder
Certified CSI Techs needed
cc -- August 16 AB 32 Environmental Justice Advis...
cc -- August 18 California Carbon Capture and Stor...
Find out the benefits of becoming a Pharmaceutical...
arbcombo -- Delay of Board Hearing to Nov for Cons...
Get the best rates possible
Medical Imaging courses online
Don't Settle for Retail Prices
►
July
(33)
►
June
(36)
►
May
(18)
►
April
(61)
►
March
(749)
►
February
(656)
►
January
(745)
►
2009
(3239)
►
December
(769)
►
November
(724)
►
October
(670)
►
September
(483)
►
August
(250)
►
July
(256)
►
June
(87)
►
2006
(1)
►
December
(1)
About Me
Cadet Boardash
View my complete profile