Re: spidering script

2007-01-23 Thread William Park
In David Waizer <[EMAIL PROTECTED]> wrote: > Hello.. > > I'm looking for a script (perl, python, sh...)or program (such as wget) > that will help me get a list of ALL the links on a website. lynx -dump (look at the bottom) -- William Park <[EMAIL PROTECTED]&g

Re: batch tiff to jpeg conversion script

2006-01-29 Thread William Park
you tried ImageMagick utilities. For example, man convert -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Super Bash shell http://freshmeat.net/projects/bashdiff/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning Values from Bash Scripts

2006-01-07 Thread William Park
text, GDBM, Python source format, etc) and read it back in Python. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Super Bash shell http://freshmeat.net/pro

Re: XML GUI

2005-11-09 Thread William Park
for Python projects...even > Jython. If you're talking about simple "dialog" thing, where you ask question and users respond, then take a look at http://home.eol.ca/~parkw/index.html#gtk Also, you may want to look at Glade which spits out the layout in XML. But, for more intricate t

Re: best way to replace first word in string?

2005-10-22 Thread William Park
Chris F.A. Johnson <[EMAIL PROTECTED]> wrote: > On 2005-10-22, William Park wrote: > > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> I am looking for the best and efficient way to replace the first word > >> in a str, like this: > >> "aa

Re: best way to replace first word in string?

2005-10-21 Thread William Park
expressions > and I sure there is a lot ways, but I need realy efficient one I doubt you'll find faster than Sed. man sed -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html

Re: need some advice on x y plot

2005-10-21 Thread William Park
s since january of 1970 doesn't make a neat chart. > > any suggestions? Python is capable of integer arithmetic, eg. >>> 2000 - 500 1500 -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http:

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-11 Thread William Park
; > Yeah, "if C then A else B" is a ancient tradition stretching from > Algol-60 to OCAML, and who knows what all else in between. I'm not > sure what Guido saw in the "A if C else B" syntax but it's not a big > deal. Perhaps, he's preparing Python for

Re: Dynamic character substitution.

2005-09-29 Thread William Park
s > arrays data1(1000,2), data2(1000,2).. > > *vread,data%n%,filename%n%#fills arrays with data > from filename1,. I await English translation of the above. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (

Re: Simple Dialogs

2005-09-29 Thread William Park
If you must run it inside Python, then you should look into Python wrapper for GTK+, and write the code yourself. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Su

Re: Python CSV writer confusion.

2005-09-15 Thread William Park
googleboy <[EMAIL PROTECTED]> wrote: > Hi. I am trying to write out a csv file with | instead of comma, > because I have a field that may have many commas in it. I read in a > csv file, sort it, and want to write it out again. CSV can handle comma within the field. -- Willi

Re: Sorting Unix mailboxes

2005-09-15 Thread William Park
hon script, perhaps, you should look at man procmailrc man formail and take the relevant process and implement that in Python. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html

Re: dual processor

2005-09-04 Thread William Park
might be info from people trying to make > Python run 64-bit, on multiple processors? Thanks! Break up your problem into 2 independent parts, and run 2 Python processes. Your kernel should be SMP kernel, though. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thi

Re: File parser

2005-08-29 Thread William Park
Angelic Devil <[EMAIL PROTECTED]> wrote: > BAR > END BAR > > FOOBAR > END FOOBAR man csplit -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html

Re: python xml DOM? pulldom? SAX?

2005-08-29 Thread William Park
TACK[2]} in title.page.*) title=$1 ;; text.revision.page) text=$1 ;; esac } end() # Usage: end tag { case $1 in page) echo "title=$title text=$text" ;; esac } expat -s start -d data -e end < f

Re: formal math ?

2005-08-28 Thread William Park
ther from a library or function imported from module. For simple cases, I use RPN calculator recently added to Bash shell, like rpn 'f(x)= 1 +' 0 1 secant = rpn 'f(x)= 1 +' 'fd(x)= 1' 0 newton = -- William Park <[EMAIL PROTECTED]>, Toronto, Can

Re: split function

2005-08-22 Thread William Park
input for each line, so the out put should look > like > 0 2 3 4 > and so on > 1 2 4 > 2 3 > 3 4 Use Python's dictionary (also known as associative array or hash). Read documentation. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client

Re: UCALC equivalent

2005-08-12 Thread William Park
on, like --> func () { rpn $1 dup 5 + x 10 - = } func 1 func 5 Sum(x^2+5, 1, 10). I assume this is sum of x^2+5, for x=1,2,...,10 --> rpn clear for i in {1..10}; do rpn $i x^2 5 + +

Re: Splitting a string into groups of three characters

2005-08-08 Thread William Park
"${a|?...}" # extract '...' separators pp_collapse # remove null items printf '{%s}\n' "[EMAIL PROTECTED]" Translating to Python is left as homework. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFla

Re: sample code for parsing html file to get contents of td fields

2005-08-04 Thread William Park
e.eol.ca/~parkw/index.html#expat Expat is everywhere. Python has it and even Gawk has it. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Super Bash shell

Re: Why Tcl/Tk?

2005-08-02 Thread William Park
Thomas Bartkus <[EMAIL PROTECTED]> wrote: > > "William Park" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Jerry He <[EMAIL PROTECTED]> wrote: > > > I'm a little curious, why does most scripting > > > languges(i

Re: Why Tcl/Tk?

2005-07-27 Thread William Park
the DrPython IDE that uses wxpython. But > that makes no sense, Tk is based on Tcl, a scripting > language, but wx is written in C++. Old habits die hard. Soon, these folks will die off, and we'll be left with GTK+ or wxWidgets. -- William Park <[EMAIL PROTECTED]>, Toronto, Can

Re: how to build email message with attachment?

2005-07-26 Thread William Park
praba kar <[EMAIL PROTECTED]> wrote: > Dear All, > >Can any one let me know? How to build > email in python? with some some examples. If all else fails, mutt -a ... -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client

Re: How to kill easygui dialog?

2005-07-19 Thread William Park
der to call it from Python, you'd have to use os.system(), and store the shell variable to file or print it out to stdout. Then, you can read it back from Python. In fact, you can feed the input data directly from Python to shell. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada T

Re: Parsing html :: output to comma delimited

2005-07-16 Thread William Park
to use, examples... Thanks! I'm sure others will give proper Python solution. But, here, shell is not a bad tool. lynx -dump 'http://www.rentalhq.com/store.asp?id=907%2F272%2D4425' | \ awk '/Return to List of Rental Stores/,/To reserve an item/'

Re: all possible combinations

2005-07-14 Thread William Park
echo {a,b,c}{a,b,c}{a,b,c}{a,b,c} or maybe two, abc=(a b c) echo {^abc}{^abc}{^abc}{^abc} -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Super Bash shell http://freshmeat.net/projects/bashdiff/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter Button widget

2005-07-14 Thread William Park
nd, next time, remember to post some code alongside > with your question. Hmm, maybe I should learn Tk + Python. Telepathetic powers of Python programmers are amazing. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive ht

Re: Escaping commas within parens in CSV parsing?

2005-07-03 Thread William Park
changing '(' or ')' into three double-quotes '"""'? That will solve splitting issue. But, I'm not sure how you would get back '(' or ')', without much coding. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Super Bash shell http://freshmeat.net/projects/bashdiff/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python choice of database

2005-06-20 Thread William Park
t; As I start with Python objects, I thought of using shelve, but looking > at the restrictions (record size + potential collisions) I feel I > should study my options a bit further before I get started. Possible approach might be: 1. 5000 files -- my personal favourite. 2. GDB

Re: count string replace occurances

2005-06-13 Thread William Park
erence between length of 'a' and 'b'. If they are same length, - Split 'mytext', and count items. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing bash_history and inputting into mysql (Intrusion Detection)

2005-05-20 Thread William Park
it. That > said > > Could any one tell me how exactly to go abt all this? > > Any tools or code that would make my life easier? > > Suggestions (which modules to use etc) ? -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on U

Comparing 2 similar strings?

2005-05-18 Thread William Park
e sequence --> 85% max But, for qawerty qwerbty max correlation is - 3 chars out of 7 are the same sequence --> 42% max (Crossposted to 3 of my favourite newsgroup.) -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash)

Re: Strip white spaces from source

2005-05-10 Thread William Park
em), > the problem is instead caused by the reserved words (like 'and'). > > Can you help me? Thanks. Perhaps, you can make indent(1) do what you want. It's designed for C program, but... -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-c

Re: Fast plotting?

2005-04-27 Thread William Park
e (and well > integrated with most or all GUI toolkits). Unfortunately it is just too > slow -- at least when driving plots integrated with the Tkinter app. (It > is getting faster and so are computers, so at some point this will be a > great way to go. But for now...) > &g

Re: XML parsing per record

2005-04-21 Thread William Park
Willem Ligtenberg <[EMAIL PROTECTED]> wrote: > On Sun, 17 Apr 2005 02:16:04 +, William Park wrote: > > Care to post more details? > > The XML file I need to parse contains information about genes. > So the first element is a gene and then there are a lot sub-element

Re: XML parsing per record

2005-04-16 Thread William Park
er to it. You can feed small piece at a time, say by lines or whatever. Of course, it all depends on what kind of parsing you have in mind. :-) Care to post more details? -- William Park <[EMAIL PROTECTED]>, Toronto, Canada Slackware Linux -- because it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question of speed - Flat file DBMS

2005-03-06 Thread William Park
s to which language will be faster, python or C++?? GDBM. It's already flat file. -- William Park <[EMAIL PROTECTED]>, Toronto, Canada Slackware Linux -- because it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting HTML to ASCII

2005-02-24 Thread William Park
dumped > the JavaScript as well. > > 2) Not embellish the text in any way - no asterisks, > no bracket links, no __ for underlines. > > Can anyone direct me to something which could help me > for this? man lynx man links man w3m -- William Park <[EMAIL PROTECTED

Re: Parse XML using Python

2004-12-09 Thread William Park
e.eol.ca/~parkw/park-january.html on "Expat XML" section towards the end. Translating it to Python is left for homework. In essence, indent=.. start () { local "${@:2}" echo "${indent|*XML_ELEMENT_DEPTH-1}$label" } xml -s start &qu

Re: Help With Hiring Python Developers

2004-12-03 Thread William Park
e that you don't know what you are doing, so you're simply listing what any clueless HR would be doing. - Manhattan, New York is expensive place to live in, even you're paying Manhattan dollar. Instead of listing what I should know, why don't you list what I