[Tutor] web spider

2007-05-13 Thread max .
hello i am a beginner programmer and i am planning a project that will take a keyword enter that in google and start searching through links ans saving web pages if anyone can help or might know of any tutorials about: writing to websites searching links creating files and web spiders in general

[Tutor] html links

2007-05-14 Thread max .
does anyone know of a tutorial for finding links in a web site with python. or creating files and asking ware to create a file. thanks ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] python port scanner

2007-06-24 Thread max .
hello i am looking into writing a simple python port scanner but i cant find any good tutorials online if anyone can help or knows of any tutorials that could help it would be great. this would be my first program like this so i might need a little extra help thanks _

Re: [Tutor] python port scanner

2007-06-27 Thread max .
thanks evryone for your help am starting on the project :) On 6/25/07, János Juhász <[EMAIL PROTECTED]> wrote: Dear dos, >>hello i am looking into writing a simple python port scanner but i cant find >>any good tutorials online if anyone can help or knows of any tutorials that >>could help it

[Tutor] backslashes

2007-07-08 Thread max .
onary password tester" __author__="max baseman ([EMAIL PROTECTED])" __version__="0.1" __discription__="tests a password against a dictonary" # print print password=raw_input("password >") passlist=o

[Tutor] writing over text

2007-07-10 Thread max .
hello i am writing a population script and was wondering if i can just keep writing to the same line instead of printing a new line every second thanks ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] writing over text

2007-07-10 Thread max .
thank you so much :) On 7/10/07, Bob Gailer <[EMAIL PROTECTED]> wrote: max . wrote: > hello i am writing a population script and was wondering if i can > just keep writing to the same line instead of printing a new line > every second import time for i in range(5): p

[Tutor] curses

2007-07-11 Thread max .
hello all sorry but i just cant seem to get my head around curses iv read a few of the tuts out there and get what there saying but i cant write my own if any one can point me in the right direction easer is better i only need something very simple right now just writting and refreshing thanks __

[Tutor] reading files

2006-09-22 Thread max .
i cant understand the open command i tried the help command but still dont get i am trying to write twi programs one to keep track of money phone numbers... and another to randomly print a statmint from a file pleas dont just send a program i would like it if you could explain the command so that

[Tutor] opening files

2006-09-25 Thread max .
hello i cant understand how to open text files with python i have tried tutorials and evrything i just cant get pleas help ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Tkinter and python

2006-10-08 Thread max .
first off i just started looking for Tkinter tutorials but havent found much and what i have found was not very good if anyone knows og any Tkinter tutorials pleas let me know second is thair anyway to change the path that python looks for a program in ex: if i enter python hello into the comm

[Tutor] embedding python

2006-10-08 Thread max .
hello i have a myspace and a blog both of wich allow me to input html and i know a little html not much i can make a page with backround coler a title words and pictures as well as links but i cant find any tutorials on embedding python useing html i found some that use c++ and i think one that

[Tutor] winsound mac

2006-11-10 Thread max .
i am starting a small useless program i got from the show lost but cant find a module on mac to make beeping noises i know windows has winsound *never used it but heard about it* but eather way is thair anything like winsound for mac ^_^" s33 y4 _

Re: [Tutor] Python regular expression

2004-12-03 Thread Max Noel
read your file in as a dictionary. You can then do searches through lists of the keys: mydict = LoadConfig(file.ini) for key in mydict.keys(): if re.search(key,"_at"): do_something(mydict[key]) Given the size of the file, I don't think that's a good idea... -- Max m

Re: [Tutor] Accuracy of time.sleep()

2004-12-04 Thread Max Noel
x27;s probably cleaner. (and yes, there are some versions of cron for Windows -- I don't know where they can be found, but I used one called nnCron Lite at my job this summer) -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bon

Re: [Tutor] Simple RPN calculator

2004-12-04 Thread Max Noel
o implement and more intuitive (not to mention way faster to both input and compute) once you've gotten the hang of it. You can probably do a very basic RPN calculator in less than a hundred lines of code, using raw_input() and a stack (well, a list's append() and pop() methods). -- Max max

Re: [Tutor] hello.py: line 1: print: command not found

2004-12-04 Thread Max Noel
d try replacing your first line with "#!/usr/bin/env python" , and see what happens. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How

Re: [Tutor] Simple RPN calculator

2004-12-04 Thread Max Noel
lculators are concerned, you don't have a choice anymore -- HP stopped producing calculators a few years ago, having basically done nothing in 15 years to improve the design of the 48/49 series. A shame, really. I call it the "Commodore effect". P.S. Nice Shodan quote Max ;)

Re: [Tutor] Removing/Handing large blocks of text

2004-12-08 Thread Max Noel
- [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor #!/usr/bin/env python import sre reStart = sre.compile('^\s*\') reEnd = sre.compile('\\s*$') inBlock = False fileSource = open('foobar.txt') for line in fileSource: if reStart.match(line): inBlock =

Re: [Tutor] "TypeError: 'int' object is not callable"??

2004-12-08 Thread Max Noel
uot; means. Can someone help? Basically, when you try to execute your first line, the program tries to call the function 2 on the argument (a**3.0). Which of course fails, because 2 is an int, not a "callable" object (function, method, lambda or class). Hence "'int' obj

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-15 Thread Max Noel
irrelevant as I would be better off trying some other approach altogether? Can we see your code for the *GlassCost classes? -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my cor

Re: [Tutor] AttributeError: instance has no __call__ method

2004-12-15 Thread Max Noel
On Dec 16, 2004, at 04:20, Max Noel wrote: def glass_type(glasstype): if glasstype == 'Red': myglass = RedGlassCost() elif glasstype == 'Blue': myglass = BlueGlassCost() elif glasstype == 'Yellow':

Re: [Tutor] Regexp Not Matching on Numbers?

2004-12-14 Thread Max Noel
".*". So far I have tried the following regular expressions: "\d+" "\d*" "\W+" "\W*" "[1-9]+" and more... I think you have to escape the backslashes. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pat

Re: [Tutor] Printing two elements in a list

2004-12-20 Thread Max Noel
w, but I thought that maybe it would hold its own because it doesn't have to import the re module, everything's builtin, etc. HTH, Jacob A faster way to do this would be to use something like: if thing.beginswith("Name"): del a[index] -- Max -- maxnoel_fr at yahoo dot fr -

Re: [Tutor] Popen? or something else

2004-12-22 Thread Max Noel
e simplified to: for line in commands.getoutput('ls -la').split('\n'): print line Or, of course, the obvious: print commands.getoutput('ls -la') -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone,

Re: [Tutor] Am I storeing up problems ?

2005-01-02 Thread Max Noel
py of the world. We can talk about this in more detail if anyone is interested.) I am. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfe

Re: [Tutor] Lottery simulation

2005-01-05 Thread Max Noel
erson. - For each week, generate a random number (the draw) and compare it to each person's number. - If there is a match, do something. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run throu

Re: [Tutor] Re: The Game of Life

2005-01-06 Thread Max Noel
did you mean make the world a class (and thus avoid the sort of passing the world dict up and down as I did here?) Either way, a quick word or two will be great; I'm not asking for you to take the time to code it up for me :-) Probably, but I don't think that's relevant. -- Max

Re: [Tutor] Re: The Game of Life

2005-01-06 Thread Max Noel
obvious choices when you're implementing Life using a 2D matrix (the other being a finite rectangular plane). -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Max Noel
in Java). http://www.eclipse.org I'm also told people are currently developing a Python plugin for Eclipse. That'd be the Best Thing Ever(TM). -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweati

Re: [Tutor] Modifying game of life

2005-01-10 Thread Max Noel
MPTY" and "return PERSON" instead of what you have right now (have you been using Ruby recently?). Also, the function still doesn't return anything when randwal == perc. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of mea

Re: [Tutor] More and more OT - Python/Java

2005-01-10 Thread Max Noel
ore with Notepad -- it comes down to whichever language requires the least (keyboard) typing being the least unpleasant to use. And Java, unlike Python, requires a lot of typing. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic c

Fwd: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Max Noel
(*bangs head on keyboard* gah, I clicked Reply instead of Reply to All again -- sorry!) Begin forwarded message: From: Max Noel <[EMAIL PROTECTED]> Date: January 11, 2005 00:09:11 GMT To: "Alan Gauld" <[EMAIL PROTECTED]> Subject: Re: [Tutor] Slightly OT - Python/Java On

Re: [Tutor] More and more OT - Python/Java

2005-01-10 Thread Max Noel
On Jan 11, 2005, at 01:38, Kent Johnson wrote: Max Noel wrote: A good follow-up to that would be McMillan & Wiggleswrorth's "Java Programming - Advanced Topics", through which I'm currently reading. It has some really good stuff, including things about XML parsing w

Re: [Tutor] More and more OT - Python/Java

2005-01-10 Thread Max Noel
dom4j? What is it? Is it part of the standard Java distribution? If not, where can it be found? Update: Okay, looks like it's time to go to bed. The link was in bright blue and somehow I didn't see it. D'oh. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you

Re: [Tutor] atof error

2005-01-11 Thread Max Noel
the range. It's the comma that's right in the middle of the number. Yuck. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, i

Fwd: [Tutor] More and more OT - Python/Java

2005-01-11 Thread Max Noel
(yes, forgot to CC the list again -- argh!) Begin forwarded message: From: Max Noel <[EMAIL PROTECTED]> Date: January 11, 2005 23:33:44 GMT To: Liam Clarke <[EMAIL PROTECTED]> Subject: Re: [Tutor] More and more OT - Python/Java On Jan 11, 2005, at 23:15, Liam Clarke wrote: Out o

Re: [Tutor] More and more OT - Python/Java

2005-01-11 Thread Max Noel
external dependencies (as a database). You should stick to SQLite. After all, it was designed exactly for what you're doing. Well, AFAIK at least. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you

Re: [Tutor] More and more OT - Python/Java

2005-01-11 Thread Max Noel
y (doesn't build a tree out of it), it uses less memory than DOM, and scales much better (obviously). I haven't tried Python's XML parsers yet, but I understand Python supports both SAX and DOM, so it should be okay... -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Loo

Re: [Tutor] spaces in print

2005-01-12 Thread Max Noel
key + '.wav' The elegant way is to do use string formatting: print '\nsiday_q%s.wav' % (key) -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run

Re: [Tutor] List comprehensions

2005-01-12 Thread Max Noel
enjoy seeing an example. Here's an obvious one: j = [foobar(item)/0 for item in x] -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, i

Re: [Tutor] List comprehensions

2005-01-13 Thread Max Noel
en it will also raise an exception. You have a point, I hadn't thought of it that way. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a

Re: [Tutor] Faster procedure to filter two lists . Please help

2005-01-14 Thread Max Noel
l (more or less) there, but it occurs within a # 'in' operator, and is therefore executed in C -- much faster. if element.split()[0] in headers: print element Also, it's shorter -- 4 lines, comments aside. Nevertheless, as Danny suggested, an approach using dictionaries wo

Re: [Tutor] Help

2005-01-14 Thread Max Noel
to the string that's before it. I suppose you want to display the result of the expression right after the string, don't you? Then you might want to use the string concatenation operator: + It should be easy to correct, now... -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "

Re: [Tutor] Objects, persistence & getting

2005-01-16 Thread Max Noel
of foo. Can it? I had a poke around the namespace yesterday, and got lost in hordes of methods that look like __this__, which is ugly. Watch out, you seem to be confusing classes and objects, there. What are you trying to achieve there, exactly? Could you give us an example? -- Max maxnoel_fr

Re: [Tutor] Objects & Classes...

2005-01-17 Thread Max Noel
ttribute(), 'Charisma': Attribute(), 'Intelligence': Attribute(), 'Willpower': Attribute()} Ah, things would be so much easier if McMackie would release the NSRCG source code (despite this abomination being written in Visual Basic), wouldn't they? ;) -- Max maxnoel_fr at

Re: [Tutor] Objects & Classes...

2005-01-17 Thread Max Noel
te's modified Rating.""" return self._baseRating + self._augCyber + self._augMagic def getBaseRating(self): """Return the attribute's base Rating (unmodified by magic or cyber).""" return self._baseRating def se

Re: [Tutor] COP vs OOP (was: Objects, persistence & getting)

2005-01-17 Thread Max Noel
hat's what Alan means by class-oriented programming. However, all the Java programming I've done so far has been true OOP (hopefully; it was for a Uni module called Object-Oriented Software Engineering), and I fail to see what in its design does not encourage this practice. -- Max m

Re: [Tutor] COP vs OOP

2005-01-17 Thread Max Noel
is exactly the same thing as using a function from Python module. I hope that answers your question... -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors...

Re: [Tutor] Objects & Classes...

2005-01-17 Thread Max Noel
iles by hand. Hmm, I really should try to start working again on this web-based SRCG idea of mine... The whole thing just screams "database". Daaargh, so many things to do, so little time. I suppose no good mod_python tutorials have spawned since last time I asked, right? -- Max max

Re: [Tutor] Objects & Classes...

2005-01-18 Thread Max Noel
r than CGI. http://www.modpython.org/ -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?" _

Re: [Tutor] Shadowrun programs

2005-01-18 Thread Max Noel
use string formatting in the print line. But that's not really important. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal

Re: [Tutor] style question: when to "hide" variable, modules

2005-01-18 Thread Max Noel
on.org/doc/2.2.3/whatsnew/sect- rellinks.html#SECTION00034 I have to admit, this is brilliant. Thanks for the pointer, Kent. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run throu

[Tutor] A somewhat easier way to parse XML

2005-01-18 Thread Max Noel
a normal human being to write a program that uses this data. Comments, criticism, improvements, suggestions, [whatever]... Would be appreciated. Feel free to use it if you wish. Thanks for your attention. xmldict.py Description: Binary data -- Max maxnoel

Re: [Tutor] A somewhat easier way to parse XML

2005-01-19 Thread Max Noel
o create a dict from a DOM. From a Python perspective, that seems more "Pythonic" to me as well. I guess it's just a different way of looking at it. I can't help but think that from the perspective of any other language, that would feel more [language]-ic as well ;) -- Max maxnoel_

[Tutor] Importing multiple files as a single module?

2005-01-21 Thread Max Noel
organize my OOP code, especially given the absence of a "real" IDE for Python? Thanks for your attention, -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... Ho

Re: [Tutor] read line x from a file

2005-01-22 Thread Max Noel
print line # or whatever break f.close() Of course, to do that, you must know the number of lines in the file beforehand. If you're running a UNIX system (Linux, OS X, *BSD...), that's easily done by calling the command "wc -l " (use os.popen to do that). -- Max maxnoel_

Re: [Tutor] How would python messure up in performance?

2005-01-23 Thread Max Noel
abase access (especially if the DB is not on a remote server) 3) File I/O, if any Could you give us a few more specs? -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... H

Re: [Tutor] on the way to find pi

2005-01-23 Thread Max Noel
er, and use a type check to decide whether or not you're appending/adding/whatever. >>> type("abc") >>> type(123) >>> type(None) -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting a

Re: [Tutor] Print record x in a file

2005-01-23 Thread Max Noel
d programming languages (and mathematicians), counts starting from 0. Thus, the first element in a list is foo[0]. foo[len(foo)] will raise an IndexError. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as

Re: [Tutor] How would python messure up in performance?

2005-01-23 Thread Max Noel
just fine. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?" ___ Tuto

Re: [Tutor] ascii encoding

2005-01-24 Thread Max Noel
url in urllib seems to do what you want: >>> import urllib >>> urllib.pathname2url('2005-01-24 00:00:00.0') '2005-01-24%2000%3A00%3A00.0' And urllib.url2pathname does the opposite conversion. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look

Re: [Tutor] sorting a 2 gb file

2005-01-25 Thread Max Noel
each record only appears once, you'll find yourself with the whole 2GB file loaded into memory. (or do you have a "smarter" way to do this?) -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you r

Re: [Tutor] ascii encoding

2005-01-25 Thread Max Noel
ere, which makes sense :D ). -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?" _

Re: [Tutor] ascii encoding

2005-01-25 Thread Max Noel
r not it's positive or negative depends on which side of GMT/UTC you are, of course :) Note that the result in is seconds, too: Of course. What I meant was that I didn't know which "side" returns a positive offset (IOW, whether Paris (GMT+1) returns -3600 or +3600 -- it's

Re: [Tutor] ascii encoding

2005-01-25 Thread Max Noel
33 25 Jan 18:58 /etc/localtime -> /usr/share/zoneinfo/Europe/London -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a pe

Re: [Tutor] Should this be a list comprehension or something?

2005-01-25 Thread Max Noel
non-experienced; and chances are it's slower than the original version since it has to iterate through 4 lists instead of 2. In any case, when in doubt, do what you think will be easier to maintain. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic

Re: [Tutor] New to Python

2005-01-26 Thread Max Noel
so? Eeh? Peeks and pokes? Are you even allowed to do that? I mean, doesn't Windows have a protected memory mechanism, like any OS should have nowadays? -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweat

Re: [Tutor] Safely buffering user input

2005-01-27 Thread Max Noel
ual to its first 256 characters". Also, I don't think you have to worry about buffer overflows in Python, unless you're using a seriously broken implementation of it. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, pan

Re: [Tutor] carriage return on windows

2005-01-29 Thread Max Noel
r", The trailing comma is NOT a typo, it is intentional. It prevents print from appending a newline. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors

Re: [Tutor] carriage return on windows

2005-01-29 Thread Max Noel
it, I would be grateful. HTH, Jacob It *is* possible, that's exactly what my code does (well, as long as you don't run it on Mac OS 9). The carriage return (\r, as opposed to the linefeed \n) moves the cursor to the beginning of the *current* line. -- Max maxnoel_fr at yahoo dot fr -- I

Re: [Tutor] Presentation

2005-01-31 Thread Max Noel
ry useful. Oh, and make sure you mention iterators and list comprehensions at some point. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challeng

Re: [Tutor] Classes

2005-02-01 Thread Max Noel
erties. Oh, and the best classes are those you create yourself, of course :D -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors...

Re: [Tutor] how to separate hexadecimal

2005-02-02 Thread Max Noel
87BE & 0xFF) '0xbe' >>> hex((0x87BE & 0xFF00) / 0xFF) '0x87' -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-02 Thread Max Noel
d be, in an inequality test. This is consistent with UNIX redirection. ./foo > bar.txt executes the command foo, and redirects its STDOUT to the file bar.txt. ./foo >> bar.txt does the same, but appends to bar.txt instead f overwriting it. -- Max maxnoel_fr at yahoo

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-02 Thread Max Noel
Perl is still the fastest scripting language around. I value debugging time more than CPU time these days. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challe

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-02 Thread Max Noel
as if((not $d) eq "a"). Use == and !=, they work on strings as well. Or (and?) use parens. Also, don't forget that Perl, like Python, uses lazy evaluation. Once again, illumination is welcomed, as I have a finally that some subtlety of Boolean logic is eluding me, and a 'x != a

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-03 Thread Max Noel
our code to run it on a different platform. But most existing Java projects have platform-specific versions, if only to make the GUI (try to) look native. You can spot a Java app from a hundred meters away. (then again, the same critic could be made of Python's and Perl's "stan

Re: [Tutor] got it

2005-02-03 Thread Max Noel
#x27;s the most intuitive yet. C is very good for a number of things (chief among those: speed). But string manipulation is definitely not one of them. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-03 Thread Max Noel
On Feb 3, 2005, at 22:21, Smith, Jeff wrote: Perl and Python both resist the introduction of a switch statement which I (and many others) feel is the most elegant way to express what it does. I echo that. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pat

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-03 Thread Max Noel
;m using Simon Thompson's "Haskell: The Craft of Functional Programming", which I find quite good. However, it's a bit odd, in that it almost reads like a mathematics book, which is something you may or may not like. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-03 Thread Max Noel
ed it -- INTERCAL uses COME FROM instead") are already quite impressive, but the very idea of Befunge makes my brain want to explode. Especially that extension to the language that allows one to write N-dimensional programs. :D -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-03 Thread Max Noel
{ bar(); } Is not K&R style, but Allman style. K&R style (also known as One True Brace Style or 1TBS) is this: if(foo) { bar; } -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as y

Re: [Tutor] This Deletes All my Files

2005-02-04 Thread Max Noel
by breaking it up to several statements, but I would like to know. It's quite easy: evaluation starts from left to right. The program opens item for writing (thus deleting it), creating a file object, then executes its write method on the argument in the parens. However, since at that point ite

Re: [Tutor] Are you allowed to shoot camels? [kinda OT]

2005-02-04 Thread Max Noel
whether or not to use braces for single-line blocks. (the latter issue being why I think The Whitespace Thing is an instance of Best Thing Ever(TM)) -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as

Re: [Tutor] Hex to Str - still an open issue

2005-02-06 Thread Max Noel
oach we get 100. Regards, Liam Clarke Yes, it is 100. The most significant bit (i.e. the highest power of 2) is on the left, just as the most significant digit (matching the highest power of 10) is on the left when representing base-10 numbers: 415 is 4*10^2 + 1*10^1 + 5*10^0. -- Max maxnoel_fr

Re: e-mail address change (was Re: [Tutor] python's default argument value handling in functions - weird syntax? problem grappling with the concept)

2005-02-09 Thread Max Noel
alled f(5)) and call f(10): if L == [5]: # L == defVal == [5] (they are the same variable) L = [] # Re-binding the name: a new var is created. L == []; defVal == [5] L.append(a) # L == [10]; defVal == [5]. See what I mean? -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Loo

Re: [Tutor] Hex to Str - still an open issue

2005-02-10 Thread Max Noel
256. Is that clearer now? -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?"

Re: [Tutor] Perl Symbology (was: Are you allowed to shoot camels?)

2005-02-10 Thread Max Noel
oo is an instance variable @@foo is a class variable FOO is a constant (which can be modded into global, instance or class with the appropriate use of $, @ or @@) -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweat

Re: [Tutor] calling an external program

2005-02-13 Thread Max Noel
On Feb 14, 2005, at 10:37, Lobster wrote: - I am trying to call up an external program with something like a "Shell" command - can not find a way of doing this (in windows) Any hints? What about os.system('your_command_here')? -- Max maxnoel_fr at yahoo dot fr -- ICQ #8

Re: [Tutor] Problems with test cgi script on windows XP/Apache

2005-02-14 Thread Max Noel
T and Amiga emulators for pretty much any system nowadays. :-p -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immort

Re: [Tutor] newbie OSX module path question

2005-02-14 Thread Max Noel
D" in the Finder) is mounted as the root of the filesystem. IOW, it's referred to as /, not /Macintosh HD. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can

Re: [Tutor] count words

2005-02-15 Thread Max Noel
ymbol]', '')), and to remove the case of each word (foo.upper() or foo.lower() will do). -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you chall

Re: [Tutor] Basic terminology

2005-02-15 Thread Max Noel
nteger division in Python, a / b (a // b in 2.4+) gives you the quotient, and a % b gives you the remainder. See the other posts for examples of use :p -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating

Re: [Tutor] Queued threads

2005-02-15 Thread Max Noel
ectly sequential, with no element of simultaneity whatsoever... -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?" __

Re: [Tutor] Queued threads

2005-02-15 Thread Max Noel
eems that a Thread object evaluates to False once it's terminated. That's probably what you're looking for, Bernard, my "threads won't be of any use here" argument notwithstanding. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A path

Re: [Tutor] Trivia program.

2005-02-16 Thread Max Noel
line with: if not name.endswith(' '): called = ((name + ' ') * 5).strip() else: called = (name * 5).strip() -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run throu

Re: [Tutor] Problem in making calulator

2005-02-17 Thread Max Noel
user hits Enter to validate his input, the newline character is echoed to the terminal and the cursor goes down one line. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridor

Re: [Tutor] killing a thread

2005-02-22 Thread Max Noel
read. That end() method just sets a flag (say, isToTerminate) to True. Since the thread is running a loop, all you then have to do is have it check the isToTerminate flag at the beginning of each loop. If it's True, exit the loop (thus terminating the thread as it reaches the end of its run()

Fwd: [Tutor] threads

2005-02-23 Thread Max Noel
Some day I'm actually going to learn how to hit the "Reply All" button. I swear. Begin forwarded message: From: Max Noel <[EMAIL PROTECTED]> Date: February 23, 2005 18:42:37 GMT To: Shitiz Bansal <[EMAIL PROTECTED]> Subject: Re: [Tutor] threads On Feb 23, 2005, at 17:

  1   2   3   >