Re: extracting a substring

2006-04-19 Thread rx
and I want to extract the numbers 531, 2285, ...,359. One thing for sure is that these numbers are the ONLY part that is changing; all the other characters are always fixed. I'm not sure about what you mean by always fixed but I guess it means that you have n files with a fixed start and a

Re: accessing a classes code

2006-04-19 Thread rx
Ryan Krauss [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a way for a Python instance to access its own code (especially the __init__ method)? And if there is, is there a clean way to write the modified code back to a file? I assume that if I can get the code as a list

Re: multiline comments

2006-04-19 Thread rx
Edward Elliott [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Ben Finney wrote: Indeed. Using revision control means never needing to comment out blocks of code. Typing (* and *) on a few line will always be quicker, easier, and less confusing than any rcs diffs/restores. Once

Re: multiline comments

2006-04-19 Thread rx
Jorge Godoy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Edward Elliott wrote: You can use either or '''. I don't keep changing them in my code, so I can always use the other type (usually I use so for commenting things out I'd use ') to do that. Try that on this

Re: multiline comments

2006-04-19 Thread rx
Also, if you remove the start of the block first, then your editor might not be highlighting anymore... With nested comments things get even worse because you might miss the end of the outer block or something like that. -- Jorge Godoy [EMAIL PROTECTED] I have commented out a

Re: multiline comments

2006-04-19 Thread rx
Jorge Godoy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] rx wrote: I have commented out a lot of C++ code and miss the block feature in python more than I missed the nested comments in C++. Besides nothing really strange happened. Sometimes you just need to dissable some

Re: multiline comments

2006-04-19 Thread rx
Of course! You should have used since you already used ''' in your triple-quoted text. But I'm just repeating what I already said (and kept above so that you can see it again). -- Jorge Godoy [EMAIL PROTECTED] Sorry - I should have read more carefully. I like the idea and will

Re: multiline comments

2006-04-19 Thread rx
Jorge Godoy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] rx wrote: I don't understand the problem - why should comments (and I hope you believe there should be a one line comment at least) be restricted to one line. It doesn't work that way for if, while

Re: Official Python logo

2006-04-19 Thread rx
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Where do I find one? Is it the banner by Just van Rossum or the Picasso snake on python.org? Thanks. They talk about logos - I don't know the site. http://www.pythonology.com/logos google python official logo link 6 --

urllib2.ProxyHandler

2006-04-18 Thread rx
I'm trying to hide my IP with the following code: import urllib2 proxy=[urllib2.ProxyHandler({'http':'24.232.167.22:80'})] opener=urllib2.build_opener(proxy) f=opener.open('http://www.whatismyipaddress.com') print f.read() But that didn't work - my real IP showed up. Then I made the following