Re: logo design

2006-11-01 Thread Xah Lee
eds a logo, i'll post a reply to this thread wthin a month. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ [EMAIL PROTECTED] wrote: > On Oct 28, 10:24 pm, "Xah Lee" <[EMAIL PROTECTED]> wrote: > > I have brought this topic here here before... that i think LISP really

Re: scared about refrences...

2006-11-01 Thread Inyeol Lee
passed by value rather than by > refrence? > What you're confused with is assignment. Check this example; >>> def f(x): ... print id(x) ... x = x + 1 ... print id(x) ... >>> f(1234) 1617596 1617608 >>> a = 5678

Re: Is there any python lib for calling CVS api?

2006-11-06 Thread Kevien Lee
Paul : Thanks ,but the viewvc lib so simple useable for python:( Paul Boddie wrote: > [EMAIL PROTECTED] wrote: > > Hi everyone, this should be a quick question. I'm writing some scripts > > to take some file and move them into a CVS repository, but it's pretty > > slow, because it uses system ca

Re: Strange behavior with iterables - is this a bug?

2006-05-30 Thread Inyeol Lee
#x27;a', 'a'), ('c', 'a', 'b'), > ('c', 'a', 'c'), ('c', 'b', 'a'), ('c', 'b', 'b'), ('c', 'b', 'c'), > ('c', 'c', 'a'), ('c', 'c', 'b'), ('c', 'c', 'c')] > > explanation of code: the files word1.txt, word2.txt and word3.txt are > all identical conataining the letters a,b and c one letter per line. > The lists I've added the "\n" so that the lists are identical to what > is returned by the file objects. Just eliminating any possible > differences. You're comparing file, which is ITERATOR, and list, which is ITERABLE, not ITERATOR. To get the result you want, use this instead; >>> print [(i1.strip(),i2.strip(),i3.strip(),) for i1 in open('word1.txt') for i2 in open('word2.txt') for i3 in open('word3.txt')] FIY, to get the same buggy(?) result using list, try this instead; >>> l1 = iter(['a\n','b\n','c\n']) >>> l2 = iter(['a\n','b\n','c\n']) >>> l3 = iter(['a\n','b\n','c\n']) >>> print [(i1.strip(),i2.strip(),i3.strip(),) for i1 in l1 for i2 in l2 for i3 >>> in l3] [('a', 'a', 'a'), ('a', 'a', 'b'), ('a', 'a', 'c')] >>> -Inyeol Lee -- http://mail.python.org/mailman/listinfo/python-list

Re: Software Needs Philosophers

2006-05-31 Thread Xah Lee
The Condition of Industrial Programers Xah Lee, 2006-05 Before i stepped into the computing industry, my first industrial programing experience is at Wolfram Research Inc as a intern in 1995. (Wolfram Research is famously known for their highly successful flagship product Mathematica) I thought

Re: John Bokma harassment

2006-05-31 Thread Xah Lee
f you do know a web hosting company that can take some 80 G of bandwidth/month for less than $25 a month, please let me know! (i do hope if someone here runs a hosting business and can host my site. I will certainly return the favor.) Thanks. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Xa

The Nature of the “Unix Philosophy”

2006-06-07 Thread Xah Lee
The Nature of the “Unix Philosophy” Xah Lee, 2006-05 In the computing industry, especially among unix community, we often hear that there's a “Unix Philosophy”. In this essay, i dissect the nature and characterization of such “unix philosophy”, as have been described by Brian Kernighan, Rob

What is Expressiveness in a Computer Language

2006-06-08 Thread Xah Lee
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic paper written on this subject. On the Expressive Power of Programming Languages, by Matthias Felleisen, 19

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Xah Lee
ive of extraneous concepts in languages, i'll have to write a essay in detail some other day. Thanks for the summary. Is there no one else who are able to read that paper? Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ > Xah Lee wrote: > > in March, i posted a essay "

Interactive Find and Replace String Patterns on Multiple Files

2006-06-14 Thread Xah Lee
Interactive Find and Replace String Patterns on Multiple Files Xah Lee, 2006-06 Suppose you need to do find and replace of a string pattern, for all files in a directory. However, you do not want to replace all of them. You need to look at it in a case-by-case basis. What can you do? Answer

Re: Cross-site scripting (XSS) defense

2006-06-16 Thread Lee Harr
On 2006-06-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there a module (or, better yet, sample code) that scrubs > user-entered text to remove cross-site scripting attacks, while also > allowing a small subset of HTML through? > > Contemplated application: a message board that allows peopl

languages with full unicode support

2006-06-25 Thread Xah Lee
Languages with Full Unicode Support As far as i know, Java and JavaScript are languages with full, complete unicode support. That is, they allow names to be defined using unicode. (the JavaScript engine used by FireFox support this) As far as i know, here's few other lang's status: C → No. Pytho

Re: A Sort Optimization Technique: decorate-sort-dedecorate

2006-09-08 Thread Xah Lee
i just want to make it known that i think most if not all of the replies in this thread are of not much technical value. They are either wrong and or misleading, and the perl module mentioned about sorting or the Java language aspect on sorting, as they are discussed or represented, are rather stup

String Pattern Matching: regex and Python regex documentation

2006-09-17 Thread Xah Lee
the Python regex documentation is available at: http://xahlee.org/perl-python/python_re-write/lib/module-re.html Note that, i've just made the terms of use clear. Also, can anyone answer what is the precise terms of license of the official python documentation? The official python.org doc site is

Re: String Pattern Matching: regex and Python regex documentation

2006-09-24 Thread Xah Lee
Xah Lee wrote: « the Python regex documentation is available at: http://xahlee.org/perl-python/python_re-write/lib/module-re.html ...» Jürgen Exner wrote: «Yeah, sure, and the Perl regex documentation is available at 'perldoc perlre'. So what? Is that anything new or surprising?»

Computer Language Popularity Trend

2006-09-26 Thread Xah Lee
Computer Language Popularity Trend This page gives a visual report of computer languages's popularity, as indicated by their traffic level in newsgroups. This is not a comprehensive or fair survey, but does give some indications of popularity trends. http://xahlee.org/lang_traf/index.html Xah

Return float problem.

2006-11-25 Thread YunBin Lee
Hi, all. I have a problem of float return error in python c binding module. Below is my c sources, compile commands and result of program. == wrap.c = #include PyObject *wrap_fact(PyObject *self, PyObject *args) { double n=0.0,result=0.0; if (!PyArg_ParseTuple (args,"d:fact",

Re: Return float problem.

2006-11-25 Thread YunBin Lee
John, Thanks for your help! > Did you notice that the garbage is a whole number? Why? Because you > have been (more or less) plucking ints out of some arbitrary place on > the stack, floating them, and printing them. I don't know how to solve it (or the right way), could you give me some examples

Re: Return float problem.

2006-11-25 Thread YunBin Lee
.h = Anyway, Thanks for you answer again! On 11月26日, 上午11时12分, "YunBin Lee" <[EMAIL PROTECTED]> wrote: > John, Thanks for your help! > > > Did you notice that the garbage is a whole number? Why? Because you > > have been (more or less) plucking ints out o

Re: logo design

2006-12-05 Thread Xah Lee
Logo LISP Xah Lee, 2006-12 Ken Tilton wrote: «Small problem. You forget that Ron Garret wants us to change the name of Common Lisp as the sure-fire way to make it more popular (well, hang on, he says it is necessary, not sufficient. Anyway...) I do not think we can safely pick a new logo

Xah's Edu Corner: Introduction to 3D Graphics Programing

2006-12-22 Thread Xah Lee
Of Interest: Introduction to 3D Graphics Programing http://xahlee.org/3d/index.html Currently, this introduction introduces you to the graphics format of Mathematica, and two Java Applet utilities that allows you to view them with live rotation in a web browser. Also, it includes a introductory t

Re: Persistent variables in python

2006-12-26 Thread Lee Harr
> Found out a quite fun way to store persistent variables in functions in > python. > > Is this concidered bad coding practice since I guess persistent > variables in functions are not meant to be? I am using is in one of my recent projects. I was thinking of it sort of like "static" variables

Re: Xah's Edu Corner: Introduction to 3D Graphics Programing

2006-12-27 Thread Xah Lee
far as i know, Mathematica is the platform that allows one to do graphics programing. But, i think Flash probably is another platform that does it. And i think VisualPython is also. I'm interested in other platforms that allows one to do this. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ J

Re: Xah's Edu Corner: Introduction to 3D Graphics Programing

2006-12-27 Thread Xah Lee
Here's their license: http://www.vpython.org/webdoc/visual/license.txt I read it wrong before. Thanks for correction. This is superb! I'll be looking into vpython! Xah Ravi Teja wrote: > Xah Lee wrote: > > > Regarding VisualPython... i saw a demo in 2002 by a professor

Re: import datetime

2006-01-31 Thread Lee Harr
> I have just installed Python2.4.2 on our HP-UX system. But when I try > to import datetime modlue I get the following error > > ~~~ from datetime import datetime > Traceback (most recent call last): > File "", line 1, in ? > ImportError: No module named datetime > ~

Re: import datetime

2006-02-01 Thread Lee Harr
>> I did look at the sys.path but the issue is that I dont see a module >> name datetime anywhere. Only datetime thing that is there is in include >> directory and it is datetime.h, which I think is for C interface. I >> have a python installed on my Windows desktop and it is working fine >> there.

Re: load module named "datetime" and change the directory of output file?

2006-02-01 Thread Lee Harr
> 1. How can I add a standard module named "datetime" in > Jython when the error happens :"Traceback (innermost > last): > File "C:\python\test.py", line 3, in ? > ImportError: no module named datetime " > The line 3 is writen: "from datetime import datetime, > tzinfor" > The datetime module wa

threads and memory

2006-02-06 Thread Lee Leahu
ython\n\nimport time\nf"..., 4096) = 1037 write(2, "", 4) = 4 write(2, "current.start()\n", 16current.start() -------- Is there a way to accomplish what I am trying to do, perhaps in a more memory-friendly way? My source code is attached. Ple

Re: threads and memory

2006-02-06 Thread Lee Leahu
in poll r, w, e = select.select(r, w, e, timeout) ValueError: filedescriptor out of range in select() Is there a limitation on the number of simultaneous connects that can be made with asyncore ? Attached is the updated source code. Thanks! -- Lee Leahu

Re: threads and memory

2006-02-06 Thread Lee Leahu
use_poll=True to the > asyncore.loop function. I will give this a try. > if use_poll doesn't work, you may have to rebuild Python's select > module to support more handles. see the comments at the top of > Modules/selectmodule.c for details. Thanks! -- Lee Leahu

Xah's Edu Corner: Unix damage: color names

2006-02-07 Thread Xah Lee
http://en.wikipedia.org/wiki/X11_color_names excerpt: « In computing, on the X Window System, X11 color names are represented in a simple text file, which maps certain strings to RGB color values. It is shipped with every X11 installation, hence the name, and is usually located in /lib/rgb.txt. I

Xah's Edu Corner: accountability & lying thru the teeth

2006-02-14 Thread Xah Lee
here's a site: http://www.longbets.org/bets that takes socially important predictions. I might have to enter one or two. i longed for such a accountable predictions for a long time. Usually, some fucking fart will do predictions, but the problem is that it's not accountable. So, lots fuckhead moro

Re: editor for Python on Linux

2006-02-24 Thread Lee Phillips
The indentation-based folding in vim makes it great for python; other folding editors might be almost as good. -- http://mail.python.org/mailman/listinfo/python-list

HTML/DOM parser

2006-02-28 Thread Xah Lee
is there a module that lets me parse validated html files and store it as a tree? for example, i want to be able to easily, say, replace the following References • a... ... to References a... ... Thanks. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman

license preamble template

2006-03-04 Thread Xah Lee
I noticed, that in just about all emacs programs on the web (elisp code), it comes with this template text as its preamble: ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundatio

Re: My personal candidate for QOTW (was: Python interpreter in Basic or a Python-2-Basic translator.)

2005-05-01 Thread Lee Cullens
reminiscent of HR department policy - of course you know what floats to the top in corporate (as well as government) ranks. QOTW? Only for lack of anything more original (no disrespect intended :~) Lee C "God save us from those that would save us" -- my grandmother c1945 PS: Though I

Re: MRO problems with diamond inheritance?

2005-05-01 Thread Lee Cullens
, but recognized (as in intuitive suspicion) that such could be a concern in a complex class pattern design. One of those things that keeps nagging when addressing other issues. Now I can compartmentalize it and make better progress :~) Thanks again, Lee C -- http://mail.python.org/mailman/listinfo/python-list

Re: Form and Database

2005-05-03 Thread Lee Harr
On 2005-05-03, v <[EMAIL PROTECTED]> wrote: > Please help. I'm new with Python. > Using Boa (or Pythoncard) and pysqlite, how can I read/write from/to > database, thanks > > Have you tried the pysqlite basic intro? http://initd.org/tracker/pysqlite/wiki/basicintro Doesn't mention boa or pyth

RE: Regular Expression tools?

2005-05-03 Thread Lee Cullens
g are other platforms and/or not standalone. Thanks, Lee C -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular Expression tools?

2005-05-04 Thread Lee Cullens
Tim Henderson: > I am not quite sure what you want. However if you are looking for > Python's regular expression module it is the re module. Just go to > interactive help and view the api for it. Thanks Tim, I found RegexPlor - not as full as I was thinking of, but it does th

Re: Regular Expression tools?

2005-05-04 Thread Lee Cullens
05 7:43:43 AM EDT To: python-list@python.org Subject: Re: Regular Expression tools? Lee Cullens wrote: Been here before, but can't remember what I used and anyway that was a PC platform. So, if you use a Regular Expression tool (PCRE standard) for Python programming and your development pl

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-05 Thread Xah Lee
I have now also started to rewrite the re-syntax page. At first i thought that page needs not to be rewritten, since its about regex and not really involved with Python. But after another look, that page is as incompetent as every other page of Python documentation. The rewritten page is here: htt

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-06 Thread Xah Lee
HTML Problems in Python Doc I don't know what kind of system is used to generate the Python docs, but it is quite unpleasant to work with manually, as there are egregious errors and inconsistencies. For example, on the âModule Contentsâ page ( http://python.org/doc/2.4.1/lib/node111.html ), the c

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-06 Thread Xah Lee
erratum: the correct URL is: http://xahlee.org/perl-python/python_re-write/lib/module-re.html Xah [EMAIL PROTECTED] â http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python regex Doc (was: Python documentation moronicities)

2005-05-07 Thread Xah Lee
Let me expose one another fucking incompetent part of Python doc, in illustration of the Info Tech industry's masturbation and ignorant nature. The official Python doc on regex syntax ( http://python.org/doc/2.4/lib/re-syntax.html ) says: --begin quote-- "|" A|B, where A and B can be arbitrary R

[perl-python] Range function

2005-05-12 Thread Xah Lee
Today we'll be writing a function called Range. The Perl documentation is as follows. Perl & Python & Java Solutions will be posted in 48 hours. This is Perl-Python a-day. See http://xahlee.org/web/perl-python/python.html Xah [EMAIL PROTECTED] â http://xahlee.org/ --

[perl-python] Range function

2005-05-12 Thread Xah Lee
Today we'll be writing a function called Range. The Perl documentation is as follows. Perl & Python & Java Solutions will be posted in 48 hours. This is Perl-Python a-day. See http://xahlee.org/web/perl-python/python.html Xah [EMAIL PROTECTED] â http://xahlee.org/ --

Re: New Python regex Doc

2005-05-13 Thread Xah Lee
bject: Re: New Python regex Doc Reply | Reply to Author | Forward | Print | Individual Message | Show original | Report Abuse Xah Lee wrote: > Let me expose one another fu Hello Xah, I think you will continue to have difficulty getting respect on this matter as long as you show disres

function with variable arguments

2005-05-13 Thread Xah Lee
i wanted to define a function where the number of argument matters. Example: def Range(n): return range(n+1) def Range(n,m): return range(n,m+1) def Range(n,m,step): return range(n,m+1,step) this obvious doesn't work. The default argument like Range(n=1,m,step=1) obviously isn't a s

Re: function with variable arguments

2005-05-14 Thread Xah Lee
Thanks to all for the reply. (i should've known better) on a related topic, I think it would be a improvement for the built-in range() so that step needs not be an integer. Further, it'd be better to support decreasing range. e.g. Range( 5, 7, 0.3); # returns [5, 5.3, 5.6, 5.9, 6.2, 6.5, 6.8] Ran

Re: Range function

2005-05-15 Thread Xah Lee
Here's the Perl code. -- #! perl # http://xahlee.org/tree/tree.html # Xah Lee, 2005-05 #_ Range _ _ _ _ =pod B Range($iMax) generates the list [1, 2, ... , $iMax]. Range($iMin, $iMax) generates the list [$iMin, ... , $iMax]. Range($iMin, $iMax, $iStep)

Re: Range function

2005-05-15 Thread Xah Lee
Here's the Python solution. -- # -*- coding: utf-8 -*- # Python # http://xahlee.org/tree/tree.html # Xah Lee, 2005-05 # implementation note: When iStep is a decimal, rounding error # accumulates. For example, the last item returned from # Range(0,18,0.3) is 17.7 not 18. A remedy

Re: Range function

2005-05-15 Thread Xah Lee
e not expected to be exemplary. These are exercises for all, also as a intro to functional programing to industry programers. Also, later on there will be non-trivial problems. # -*- coding: utf-8 -*- # Python # http://xahlee.org/tree/tree.html # Xah Lee, 2005-05 import math; def Range(iMin, iMax

RE: An example in point 2

2005-05-15 Thread Lee Cullens
ans it).  Funny how one perfectly innocent word can hold up a post for review, but this sort of thing gets through every timeLee C-- http://mail.python.org/mailman/listinfo/python-list

RE: Python Interest Group Query

2005-05-16 Thread Lee Cullens
n such anymore :~) Thank you, Lee C -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGame and Rotozoom (Sorry if OT)

2005-05-20 Thread Lee Harr
On 2005-05-20, J. W. McCall <[EMAIL PROTECTED]> wrote: > I'm not sure if this is off-topic, since it doesn't deal with Python > itself, but here goes: > > I'm messing around with writing a simple "game" where the player (a > crudely drawn smiley face) moves by rotating and moving back or forward

What are OOP's Jargons and Complexities?

2005-05-23 Thread Xah Lee
What are OOP's Jargons and Complexities Xah Lee, 20050128 The Rise of Classes, Methods, Objects In computer languages, often a function definition looks like this: subroutine f (x1, x2, ...) { variables ... do this or that } In advanced languages such as LISP family, it is not uncomm

What are OOP's Jargons and Complexities?

2005-05-23 Thread Xah Lee
What are OOP's Jargons and Complexities Xah Lee, 20050128 The Rise of Classes, Methods, Objects In computer languages, often a function definition looks like this: subroutine f (x1, x2, ...) { variables ... do this or that } In advanced languages such as LISP family, it is not uncomm

Re: What are OOP's Jargons and Complexities?

2005-05-24 Thread Xah Lee
of static versus instance members, is one complexity arising out of OOP. -- to be continued tomorrow. This is part of an installment of the article “What are OOP's Jargons and Complexities” by Xah Lee, 20050128. The full text is at http://xahlee.org/Periodic_dosage_dir/t2/oop.html

Re: What are OOP's Jargons and Complexities?

2005-05-26 Thread Xah Lee
Joe: lang x is strongly typed Dave: you mean statically typed? John: no no, that's weakly typed. Mike: actually, it is dynamically typed! rely on the morons of the IT industry, every mother fucking one of them, to sing and propagate jargons. See also: http://xahlee.org/UnixResource_dir/writ/jargo

Re: What are OOP's Jargons and Complexities?

2005-05-28 Thread Xah Lee
are usually treated as a special method at the language level, its concept and linguistic issues is a OOP machinery complexity, while the Accessor concept is a OOP engineering complexity. - to be continued tomorrow. This is part of an installment of the article “What are OOP's Jargons and

Re: What are OOP's Jargons and Complexities?

2005-05-31 Thread Xah Lee
ment of the article “What are OOP's Jargons and Complexities” by Xah Lee, 20050128. The full text is at http://xahlee.org/Periodic_dosage_dir/t2/oop.html © Copyright 2005 by Xah Lee. Verbatim duplication of the complete article for non-profit purposes is granted. The article is publish

Re: What's wrong with Zope 3 ?

2005-06-01 Thread Lee Harr
>> The current stable brance is Zope2.X If you want to incorporate some >> functionalty from X3 in Zope 2.X, do a search for "Five" > > No, I do not want to migrate components from a new major release > backwards, as well as I do not want to migrate applications from WinXP > to Win98. This seems to

Re: What are OOP's Jargons and Complexities?

2005-06-03 Thread Xah Lee
argons and Complexities” by Xah Lee, 20050128. The full text is at http://xahlee.org/Periodic_dosage_dir/t2/oop.html © Copyright 2005 by Xah Lee. Verbatim duplication of the complete article for non-profit purposes is granted. The article is published in the following newsgroups: comp.lang.c,c

Re: What are OOP's Jargons and Complexities?

2005-06-07 Thread Xah Lee
along with its 40 or so methods and other things. http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html (local copy) --- to be continued... This is part of an installment of the article “What are OOP's Jargons and Complexities” by Xah Lee, 20050128. The full text is at http://xahle

OO re-factoring (was Pythonese/Efficiency/Generalese critique [on Tutor])

2005-06-07 Thread Lee Cullens
lot on OOP, but seem to have a problem with the practical use of such in this utility. I'm undoubtedly creating a mountain of an ant hill in my mind, so any thoughts would be appreciated. Thanks, Lee C -- http://mail.python.org/mailman/listinfo/python-list

Re: OO re-factoring (was Pythonese/Efficiency/Generalese critique [on Tutor])

2005-06-08 Thread Lee Cullens
ThanThanks for the reply Dan,Yes, my take was flawed, and a number of individuals on the Tutor list pointed me in the right direction.  Thanks again,Lee CFrom: Dan Sommers <[EMAIL PROTECTED]>Date: June 8, 2005 8:22:39 AM EDTTo: python-list@python.orgSubject: Re: OO re-factoring (was Pyt

Re: OO re-factoring (was Pythonese/Efficiency/Generalese critique [on Tutor])

2005-06-08 Thread Lee Cullens
ltiple argument passing (globals not even considered ;') there seems little to be gained.  Even so, one learns best by doing and I'm gaining a better understanding of OOP (and where to apply such).  The oak trees are hard on this old head though :~)Thanks again,Lee COn Jun 8, 2005, at 1

tree functions daily exercise: Range

2005-06-12 Thread Xah Lee
Here's the belated Java solution. import java.util.List; import java.util.ArrayList; import java.lang.Math; class math { public static List range(double n) { return range(1,n,1); } public static List range(double n, double m) { return range(n,m,1); } public s

Re: tree functions daily exercise: Table

2005-06-12 Thread Xah Lee
Here's the next tree functions exercise in Python, Perl, Java. Other language solutions welcome. http://xahlee.org/tree/tree.html - Table('exprString', [iMax]) generates a list of iMax copies of value of eval('exprString'), and returns the refence to the list. i.e. [ev

count string replace occurances

2005-06-12 Thread Xah Lee
if i have mytext.replace(a,b) how to find out many many occurances has been replaced? Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Show current ip on Linux

2005-06-13 Thread Lee Harr
On 2005-06-13, David Van Mosselbeen <[EMAIL PROTECTED]> wrote: > Hi, > Im a newbie in Python, and also in Fedora Core 3. (Yes, Linux is fine > man :-) > > My question is : How can i rwite a script that show my current ip. If i have > more than one network card, the script must then show all used ip

Re: 1980's Home Computer-style Package.

2005-06-16 Thread Lee Harr
On 2005-06-16, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-06-16, Ralph Corderoy <[EMAIL PROTECTED]> wrote: > >>> Wild-ass guess, but you might try googling for "turtle python". >> >> OK, I've done that but it didn't help; it wasn't tied in with >> Turtle graphics, with which I'm familiar. >

Re: tree functions daily exercise: Table

2005-06-17 Thread Xah Lee
The Perl version of the Tree function is posted. It's a bit long. Please see the code here: http://xahlee.org/tree/Table.html the choice of having a string as the first argument to Table is a bit awkward in Perl. Possibly i'll have to rewrite it so that the first argument is a function instead, wh

functions with unlimeted variable arguments...

2005-06-18 Thread Xah Lee
how can i define a function with variable parameters? For example, f(a) would return [a] f(a,b) would return [a,b] f(a,b,...) would return [a,b,...] One solution is of course to make the argument as a list. i.e. f([a,b,...]) but are there other solutions? Xah [EMAIL PROTECTED] ∑ http://xahlee.

Python documentation problem

2005-06-18 Thread Xah Lee
Python documentation, http://python.org/doc/2.4.1/lib/typesfunctions.html - 2.3.10.3 Functions Function objects are created by function definitions. The only operation on a function object is to call it: func(argument-list). There are really two flavors of function objects: buil

Re: Python documentation problem

2005-06-18 Thread Xah Lee
i wanted to find out if Python supports eval. e.g. somecode='3+4' print eval(somecode) # prints 7 in the 14 hundred pages of python doc, where am i supposed to find this info? Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python documentation problem

2005-06-18 Thread Xah Lee
Apparently i tried it before posting eval '3' and got misleading errors because i forgot the parenthesis... This is a easy one to find in the doc... The unhelpful doc organization and past experiences confounded this case. Thanks. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.pyt

Re: Python documentation problem

2005-06-18 Thread Xah Lee
> what is wrong with python doc > http://python.org/doc/2.4.1/lib/typesfunctions.html the problem is that the page essentially says nothing. Nothing that is relevant to programing, and such nothingness occupies a significant portion of the python doc. (at least a quarter) It is like reading a manu

url encode

2007-06-05 Thread Lee Jones
Hello, I am trying to urlencode a string. In python the only thing I can see is the urllib.urlencode(). But this takes a dictionary, and returns "key=value", which is not what I want. I only want to url-encode a string. Does any one know how to do this in python Thanks Lee

mapping subintervals

2007-06-13 Thread Lee Sander
nown intervals. I don't like this solution because it can be really really slow as for each query I'm doing a linear search and on average I'll be searching almost half the list before I find the right interval. Is there a smarter way to do this? I've my problem is not clear ple

Re: mapping subintervals

2007-06-14 Thread Lee Sander
Dear Matteo and Nis, Thankyou very much for your help. I wasn't aware of the bisect library but it's really useful. thank you both once again Lee On 13 Jun, 23:21, Nis Jørgensen <[EMAIL PROTECTED]> wrote: > Matteo skrev: > > > OK - I'm going to assume your in

Re: Html parser

2007-06-15 Thread Lee Hinde
On Jun 15, 7:11 am, HMS Surprise <[EMAIL PROTECTED]> wrote: > Could you recommend an html parser that works with python (jython > 2.2)? HTMLParser does not seem to be in this library. To test some > of our browser based (mailnly php) code I seek for field names and > values associated with them.

The Modernization of Emacs

2007-06-17 Thread Xah Lee
[this post is a excerpt from The Modernization of Emacs, Xah Lee, 2006-04 at http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and most versatile text editor. And

Re: The Modernization of Emacs: terminology buffer and keybinding

2007-06-19 Thread Xah Lee
Here are some Frequently Asked Questions about The Modernization of Emacs. They are slightly lengthy, so i've separated each item per post. The whole article can be found at http://xahlee.org/emacs/modernization.html Q: The Terminology “buffer” and “keybinding” is good as they are.

Re: The Modernization of Emacs: not dumb down

2007-06-19 Thread Xah Lee
Here are some Frequently Asked Questions about The Modernization of Emacs. They are slightly lengthy, so i've separated each item per post. The whole article can be found at http://xahlee.org/emacs/modernization.html Q: Why should emacs want to be popular and why should emacs change

Re: The Modernization of Emacs: technically superior

2007-06-19 Thread Xah Lee
Here are some Frequently Asked Questions about The Modernization of Emacs. They are slightly lengthy, so i've separated each item per post. The whole article can be found at http://xahlee.org/emacs/modernization.html Q: Emacs's ways are technically superior. It should not change. A:

Re: The Modernization of Emacs: exists already

2007-06-19 Thread Xah Lee
Here are some Frequently Asked Questions about The Modernization of Emacs. They are slightly lengthy, so i've separated each item per post. The whole article can be found at http://xahlee.org/emacs/modernization.html Q: Aquamacs already does what you want. A: Aquamacs is a emacs var

Re: Looking for a wxPython GUI builder

2007-06-20 Thread Lee Merrill
here should be a window etc. So I find xrced quite satisfactory, it seems sometimes being unambitious is the best ambition... Lee -- http://mail.python.org/mailman/listinfo/python-list

Python and Test Director

2007-07-11 Thread Lee, Solon
ector and python) though I don't know how to do it either? Thanks again !! Solon Lee E-mail confidentiality. This e-mail contains confidential and / or privileged information belonging to Spirent Communications plc, its affiliates and / or subsidiaries.

Re: How to create new files?

2007-07-12 Thread Lee Harr
> So far, I've found that unlike with the C++ version of fopen(), the > Python 'open()' call does not create the file for you when opened > using the mode 'w'. I get an exception saying that the file doesn't > exist. Works for me... :~$ mkdir foo :~$ cd foo :foo$ ls :foo$ python Python 2.4.4 (#2

Re: Class decorators do not inherit properly

2007-07-12 Thread Lee Harr
> Traceback (most recent call last): > File "/Users/chris/Projects/CMR/closed.py", line 132, in > class M0(MetropolisHastings): > File "/Users/chris/Projects/CMR/closed.py", line 173, in M0 > @_add_to_post > NameError: name '_add_to_post' is not defined > > yet, when I look at the dict

Re: Class decorators do not inherit properly

2007-07-13 Thread Lee Harr
>> I think the term "class decorator" is going to eventually >> mean something other than what you are doing here. I'd >> avoid the term for now. >> >> >> When you decorate a class method, >> the function you use >> needs to be defined before the method definition. > > FWIW, the term "class metho

Re: newbie question on def, passing param's help

2007-07-13 Thread Lee Harr
> I have a def that I have been using but I realized that sometimes I need a > LIST with > 5 or 6 brands instead of 4 so I want to put LIST outside of the def but I > can't wrap > my head around a way to get LIST outside the def while still passing the same > 4 > parameters in the function. I'

Python with TestDirector

2007-07-17 Thread Lee, Solon
Hello Mr. Golawala, I am glad to spot this on the web search - "python and Test Director", However can you or anyone tell me more specifically how this COM objects works in between Python and "Test Director" or to where should I refer?? Thanks. Solon Lee E-

Re: The Modernization of Emacs: exists already

2007-07-18 Thread Xah Lee
About a month ago, i posted a message about modernization of emacs. I enlisted several items that i think emacs should adapt. Today I added another section to the frequestly asked questions. The new section is pasted below. The full article can be found at http://xahlee.org/emacs/modernization.htm

ANN: parley 0.3

2007-07-22 Thread Jacob Lee
. Code samples, documentation, and source code can be found at the PARLEY home page: http://osl.cs.uiuc.edu/parley/ PARLEY is licensed under the LGPL. -- Jacob Lee <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

The Hack of bitmask used as Predicate Parameters

2007-04-23 Thread Xah Lee
In this article, i explain how the use of bit masks is a hack in many imperative languages. Often, a function will need to take many True/False parameters. For example, suppose i have a function that can draw a rainbow, and each color of the rainbow can be turned on or off individually. My functio

ignorance and intolerance in computing communties

2007-05-02 Thread Xah Lee
Today, a motherfucker Christophe Rhodes (aka Xof in irc://chat.freenode.net/lisp ) kicked banned me. Here's the few relevant excerpt. (full, unedited excerpt will be published if there is a public interest) Begin excerpt: [5:31am] k, here is a simple problem but rather tedious to do it correctly

Re: ignorance and intolerance in computing communties

2007-05-03 Thread Xah Lee
Xah Lee wrote: « ... “Ignorance And Intolerance In Online Computing Communities” http://xahlee.org/Netiquette_dir/ignorance_intolerance.html ... As i have indicated in my post, it is non-trivial to implement a function that returns the positive angle of a vector » I have now coded this. I

<    2   3   4   5   6   7   8   9   10   11   >