[Matthew Warren]
| Now, I started programming when I was 8 with BBC Basic.
Hey, likewise! (Except I was 12 when it came out!)
| I learned over the years to do things like the following, and I like
| doing it like this because of readability, something Python seems to
| focus on :-
|
| Print "Th
[Matthew Warren]
| Blame outlook and AutoCaps. If number were a number I would write
|
| print "There are",number,"ways to skin a "+furryanimal
You see now that strikes me as a bit mixed up. Why not simply use?
print "a", number, "c", string
| > altho' print is slated for replacement by a func
[EMAIL PROTECTED]
> Has anyone ever think about a set wich references its elements weakly ?
Yes, and there are excruciating subtleties. I only implemented as
much of one as ZODB needed at the time:
# A simple implementation of weak sets, supplying just enough of Python's
# sets.Set interface for
> Access might really be the best solution. It is pretty good
> for what it is supposed to do, and the quick prototyping and
> UI-designing are strong arguments for it, especially if there
> already is a bias towards it.
>
> I also _think_ that the whole "db on a shared volume" thing
> works compa
[David Hirschfield]
> Question from a post to pygtk list...but it probably would be better
> answered here:
>
> I encountered a nasty problem with an external module conflicting with
> my python threads recently, and right now the only fix appears to be to
> turn off garbage collection while the cr
up
command)
I'm no expert--I bet what I'm doing could be done better. I'd appreciate any
tips, caveats, etc.
Thanks in advance for looking at the code.
--Tim Arnold
Say the host names are in a global list tmpList...
# The final sorted list of cpus is called as:
cpuLi
al library has been around since roughly forever, is it just that
no one's bothered to add iteration support to it, or am I missing
something?
Thanks.
--
Tim Lesher
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 6, 4:19 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Tim Lesher wrote:
> > I'm using the marshal library to unmarshal a file containing one or
> > more objects. The canonical way seems to be:
>
> > objs = []
> > while 1:
> >
[Giovanni Bajo]
> I understand your concerns, but I have to remember you that most bug reports
> submitted by users go totally ignored for several years, or, better, forever.
> I
> do not have a correct statistic for this,
Indeed you do not.
> but I'm confident that at least 80% of the RFE or pa
>> Can these operators be overloaded?
>
> Yes.
With the caveat of the "=" mentioned in the subject-line (being
different from "==")...I haven't found any way to override
assignment in the general case. There might be some oddball way
to do it via property() but AFAIK, this only applies to
pr
>> With the caveat of the "=" mentioned in the subject-line (being
>> different from "==")...I haven't found any way to override
>> assignment in the general case.
>
> Why would you want to do that?
For the same reason one would use property() to create
getter/setter functions for a particular v
> Why does it need to be a regex? There is a very simple and well-known
> algorithm which does what you want.
>
> Start with i=0. Walk the string one character at a time, incrementing i
> each time you see a '(', and decrementing it each time you see a ')'. At
> the end of the string, the co
ks for pointing me to the path module, was
>interesting.
Umm, may I point out that you don't NEED the "os.path.exists" call, because
you are already being HANDED a list of all the filenames in that directory?
You could "dirtest" with this much faster routinee:
def di
[Martitza]
|> Hi. I work for a small company (actually in process of forming)
> interested in embedding or extending python as part of our commercial
> non-open-source product. We have legal counsel, but are interested in
> the spirit as well as the letter of the law. Not much seems to have
> be
[Martitza]
> Mr. Peters:
Na, my father's dead -- you can call me Uncle Timmy ;-)
> Thank you for so kindly taking the time to resolve my misunderstandings
> and to elaborate on the intent of the PSF.
>
> In particular, thank you for explaining in plain language how the
> licenses stack. I'm sure
[Georg Brandl]
| rick wrote:
| > In Windows, the file system is disjointed and there is now
| real 'root'
| > At least none that I can see. It looks more like this:
| >
| > | | | | | | |
| > |_|_|_|_|_|_|
| > A B C D E F G
| >
| > How do you guys handle this when working with scripts that
| n
[Rick]
| Searching for a file by name. Scanning for viruses. Etc.
| There are lots
| of legitimate reason to walk all paths from a central
| starting point, no???
Well, to get you started, I think this is the kind
of thing you'll want. Uses ctypes, which is built-in
to Python 2.5 so presumably
> There's no doubt that Python's excellent introspection mechanism allows
> an outside RAD-like tool to inspect the workings of any Python object.
> But that does not make it a component model in my original use of the
> term on this thread. A RAD tool needs to know what properties and events
>
> class A:
> name = ""
> data = []
> def __init__(self, name):
> self.name = name
> def append(self, info):
> self.data.append(info)
> def enum(self):
> for x in self.data:
> print "\t%s" % x
> How do i get:
> A:
> one
> two
>
[EMAIL PROTECTED]
| When I want to uninstall my usb disk on windows, the
| operating systems
| sometimes tells me the device is being used by other program. But I
| can't find which program is using it. Can I do this using python ?
This is really one of those questions that could better
be rep
> for l in
> open('/root/Desktop/project/chatlog_20060819_110043.xml.txt'):
>
> l=l.replace("Document", "DOC")
> fh.close()
>
> But it does not replace Document with Doc in the txt file
In addition to closing the file handle for the loop *within* the
loop, you're changing "l" (s
[EMAIL PROTECTED]
> ...
> G5-fiwihex:~ eur$ python
> Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import time
> >>> time.time()
> 1160580871.258379
> >>>
>
> M
Phoe6 wrote:
> I write a script:
> #!/usr/bin/python
> astring = "This is a String"
>
> def fun1():
> astring = "I modify it in fun1"
> def fun2():
> astring = "I modify it in fun2"
> def main():
> print astring
> fun1()
> print astring
> fun2()
>
> def leaders(sorted_list):
> held = None
> for phrase in held:
Ummm...that
for phrase in None:
doesn't do a whole lot other than give a traceback. :*)
I suspect you mean
for phrase in sorted_list:
no?
-tkc
--
http://mail.python.org/mailman/listinfo/
>> Works, but something different ?
>
> Excuse me, what do you mean?
Sounded like the OP wanted a behavior similar to "auto-globals"
that has been a long-cursed aspect of PHP. That, without
specifying it, local-variables should be global if their name
exists in the global namespace. Python s
> (OT: Try to type 'proficient' with one hand on a US keyboard. :-))
A number of nice words like that:
authenticity
proficiency
entitlement
enchantment
protozoans
proficient
antisocial
tutorials
tormentor
shanghais
shamrocks
rhapsodic
protozoan
pantheism
handiwork
flamencos
fishbowls
firmament
en
[Frederic Rentsch]
>Working with read and write operations on a file I stumbled on a
> complication when writes fail following a read to the end.
>
> >>> f = file ('T:/z', 'r+b')
> >>> f.write ('abcdefg')
> >>> f.tell ()
> 30L
> >>> f.seek (0)
> >>> f.read ()
> 'abcdefg'
> >>> f.flush ()
>> I'm wondering if anyone knows of a way to extract data from a numeric
>> array along a line. I have a gridded dataset which I would like to be
>> able to choose two points and extract a 1-d array of the data values
>> along the line between the two points. Any ideas?
>
> Are these all 45 degr
> Maybe you should say "amongst the longest"
>
> pepperwort
> perpetuity
> perruquier
> pirouetter
> proprietor
> repertoire
> typewriter
>
> But even that would be wrong.
>
> rupturewort
>
>> hey, look, it's Friday
proprietory
proterotype
rupturewort
according to my web2 list of words.
Hey,
template = 'I am %s, and he %s last %s.'
values = ('coding', "coded', 'week')
formatted = template % values
formatted
> 'I am coding, and he coded last week.'
deformat(formatted, template)
> ('coding', 'coded', 'week')
>
> expanded (for better visual):
deformat('I am
template = 'I am %s, and he %s last %s.'
values = ('coding', "coded', 'week')
formatted = template % values
formatted
> 'I am coding, and he coded last week.'
deformat(formatted, template)
> ('coding', 'coded', 'week')
>
> expanded (for better visual):
deformat('I am
[Frederic Rentsch]
> Thanks a lot for your input. I seemed to notice that everything
> works fine without setting the cursor as long as it stops before the end
> of the file. Is that also a coincidence that may not work?
"if you want to read following a write, or write following a read, on
> My template outside of the '%s' characters contains only commas and
> spaces, and within, neither commas nor spaces. Given that information,
> is there any reason it might not work properly?
Given this new (key) information along with the assumption that
you're doing straight string replacement
>>> >>> template = '%s, %s, %s'
>>> >>> values = ('Tom', 'Dick', 'Harry')
>>> >>> formatted = template % values
>>> >>> import re
>>> >>> unformat_string = template.replace('%s', '([^, ]+)')
>>> >>> unformatter = re.compile(unformat_string)
>>> >>> extracted_values = unformatter.search(forma
> I understand this point but this is just an argument for
> saying that it should throw an exception when the values don't
> match. It is not an argument for not doing the logical thing
> when they do. In fact in many situations it can be reasonably
> expected that the values will be the same. If
> for example:
> a = [1,2,3,4,5,6,7,8,9,10] #Although not necessarily in order
>
> def cmp(i,j): #to be defined in this thread.
Well, if you're willing to give up doing it in a cmp() method,
you can do it as such:
>>> a.sort()
>>> chunk_size = 3
>>> [a[i::chunk_size] for i in range(chunk_si
>>> that's trivial to do with slicing, of course. what makes you think you
>>> need to do this by calling the "sort" method ?
>>>
>>>
>> You are of course correct.. There might be a way to do this with
>> slicing
>> and i % 3
>
> Slicing will work only with a sorted list.
But modulus arithmeti
On 16/10/06, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote:
> Jia Lu wrote:
> > Hi all:
> >
> > I try to do things below:
> import sys
> for i in sys.modules.keys():
> > import i
> > Traceback (most recent call last):
> > File "", line 2, in
> > import i
> > ImportError: No m
> x = None
> result = (x is None and "" or str(x))
>
> print result, type(result)
>
> ---
> OUTPUT
> ---
> None
>
>
> y = 5
> result = (y is 5 and "it's five" or "it's not five")
>
> print result
>
> -
> OUTPUT
> -
> it's five
>
> ...what's wr
> Sometimes the user inputs characters that aren't valid
> characters for a file or directory name. Here are the
> characters that I consider to be valid characters...
>
> valid =
> ':./,^0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '
Just a caveat, as colons and slashes can gi
> l = ['a','b','c']
> for e in l:
>print l, i
>i = i + 1
>
> Is there a way to get rid of the i processing in this script?
> Sorry I'm still trying to learn python tricks here...
for i, e in enumerate(l):
print l, i
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
>> If you're doing it on a time-critical basis, it might help to
>> make "valid" a set, which should have O(1) membership testing,
>> rather than using the "in" test with a string. I don't know
>> how well the find() method of a string performs in relationship
>> to "in" testing of a set. Test an
> Is there a problem with the Python and wxPython web sites?
> I cannot seem to get them up
Sounds like someone needs some pyagra...
(grins, ducks, and runs)
the-red-or-blue-pill'ly yers,
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
> How can I add two dictionaries into one?
> E.g.
> a={'a:1}
> b={'b':2}
>
> I need
>
> the result {'a':1,'b':2}.
>>> a.update(b)
>>> a
{'a':1,'b':2}
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
> However It does not work as I would need.
> Let's suppose I have
>
> a={'c':1,'d':2}
> b={'c':2}
> but
> a.update(b)
> will make
> {'c': 2, 'd': 2}
>
> and I would need
> {'c': 3, 'd': 2}
Ah...a previously omitted detail.
There are likely a multitude of ways to do it. However, the one
th
John Salerno wrote:
> I apologize for the slightly off-topic nature, but I thought I'd just
> throw this out there for anyone working on text editors or IDEs with
> auto-completion.
Well, Vim7's autocompletion already allows this. Earlier
versions of vim also allowed similar behavior, but (AFAIK
> but I can not create Newdict to be sorted properly.
>
> Where do I make a mistake?
By assuming that dictionaries *can* be sorted.
For more reading:
http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52306
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747
They're intrinsical
> P.S. How about a string.shuffle() method that splits the string in half
> into two new strings str1 and str2, and then recompiles the string by
> alternating one character from each str1 and str2 as it goes? Like
> shuffling cards. ;)
Well, for a true shuffling of a string, there's a
random.
> Is this why the applicants I see that are fresh out of college
> with their shiny new computer science degrees can't seem to
> code their way out of a wet paper bag?
Well, there you go! Apparently, your wet paper bag has no
"detect a palendrome" exit. While you're installing such an
egress t
> I have a piece of code that I need some help with. It is
> supposed (in my mind at least) take two arguments, a start
> path and a file extension. Then when called it should return
> each of the file paths that are found matching the criteria.
> It is only returning the first file that it finds.
> result = [{'service_id' : 1, 'value': 10},
> {'service_id': 2, 'value': 5},
> {'service_id': 1, 'value': 15},
> {'service_id': 2, 'value': 15},
> ]
>
> and so on...what i need to do is some list comprehension that returns me
> somethi
hat will install all of them. This also makes it
trivially easy to install my environment on a different computer.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
line,
Are you running this on Unix or on DOS?
On Unix, you can do:
for line in open(options.filename).readlines():
print line.rstrip()
Perhaps quicker is:
sys.stdout.write( open(options.filename).read().replace('\r\n','\n') )
--
Tim Roberts, [EMAIL PROTECTED]
Pro
[ismael]
| I have some problems to get the the permissions on windows. I
| use a simple code that run perfectly in UNIX but give me wrong
| information on Windows. I found this code searching by google:
[... snip ...]
| is there a solution for this?, another library or code?
| Anything that i
[ismael]
| My objective is check if some directories exist and if the
| user that execute the perl script has access to some files
| and directories. If one of this checkpoints failed the
| execution will be aborted. If all of then finish ok
| the execution will continue. It's simply this.
I th
> import array
> a = array.array('f', [1,2,3])
> print a.mean()
> print a.std_dev()
>
> Is there a way to calculate the mean and standard deviation on array
> data?
>
> Do I need to import it into a Numeric Array to do this?
No, you don't have to...though there are likely some stats
modules flo
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On Sun, 22 Oct 2006 01:55:53 GMT, Tim Roberts <[EMAIL PROTECTED]> declaimed
>the following in comp.lang.python:
>
>> Having learned that lesson the hard way, I now keep a directory with zips
>> and tarballs for all of
>> As an example, I'm aware (through osmosis?) that I can use '/' as
>> a directory separator in filenames on both Unix and Dos. But
>> where is this documented?
>
> in the documentation for your operating system. Python doesn't do
> anything with the filenames.
Windows seems to be (occasionall
> This file has 1,000,000+ lines in it, yet when I print the counter 'cin'
> at EOF I get around 10,000 less lines. Any ideas?
>
> lineIn =
> csv.reader(file("rits_feed\\rits_feed_US.csv",'rb'),delimiter='|')
> for emp in lineIn:
> cin=cin+1
> print cin
What happens if yo
> I'm a little confused. Why doesn't s evaluate to True in the first part,
> but it does in the second? Is the first statement something different?
>
> >>> s = 'hello'
> >>> s == True
> False
> >>> if s:
> print 'hi'
The "if s" does an implicit (yeah, I know, "explicit is better
than
> So I suppose
>
> if (10 > 5)
>
> would be the same as
>
> if (10 > 5) == True
>
> because (10 > 5) does evaluate to "True".
Yes...and similarly,
if ((10 > 5) == True) == True
for the same reason...as does
if (((10 > 5) == True) == True) == True
as does... :*)
-tkc
--
http://mail.pyt
> the builtins, but not being able to do things like
> '[1,2,3]'.length drives me a little nuts.
You mean like
'[1,2,3]'.__len__()
That gets you the length of the string, which is what one would
expect, calling the __len__() method on a string. The same works
for an array:
[John Henry]
> If I have a bunch of sets:
>
> a = set((1, 2, 3))
> b = set((2, 3))
> c = set((1, 3))
>
>
> What's the cleanest way to say:
>
> 1) Give me a list of the items that are in all of the sets? (3 in the
> above example)
list(a & b & c)
> 2) Give me a list of the items that are not
t wouldn't be rocket science to extend Python's mmap to allow
that.
>There are in any case room for improving Python's mmap object.
Here we agree.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
t is rather unlikely that your low-order bit
changes will survive the compression process.
There is lots and lots of research on this subject. It's called
"steganography" and "digital watermarking". Google is your friend.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza &
ward slashes or back, and have done
so clear back to Windows 3.0. However, the Windows command shells do not.
That's what you're seeing here.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
>> Some experimentation shows that Python does seem to provide
>> *some* translation. Windows lets me use '/' as a path separator,
>> but not as the name of the root of a partition name. But perhaps
>> this a peculiarity of the commands themselves, and not of Windows
>> path names in particular.
>>
Tim Roberts wrote:
>> C:\temp\foo\bar>cd ..
>> C:\temp\foo>cd ..
>> C:\temp>cd /foo/bar
>
> This one does not work for me, but as long as the initial slash is back,
> the rest can be foreward:
>
> C:\tmp>cd /foo/bar
> The system cannot f
> Below is my attempt at it, but this code appends
> a copy of the text file within itself 4 times.
> Can someone help me out.
[snip]
> file = open("text.txt", "w")
> file.write(text.replace("Left_RefAddr", "FromLeft"))
> file.write(text.replace("Left_NonRefAddr", "ToLeft"))
> file.write(text.repla
>> What's your favorite IDE?
>
> emacs
>
>> What do you like about it?
>
> It does just about everything. It can edit just about every kind of
> code I use, read my mail, connection to irc ... everything. Well,
> except order pizza, but I think it might be possible to make that
> happen as well.
> I've a folder structure like this :
>
> "Folder A"
> |--> "1"
> |--> "2"
> ---> "3"
>
> "Folder B"
> |--> "4"
> ---> "5"
>
> And I want to obtain a structure like this :
>
> "Folder A - 1"
> "Folder A - 2"
> "Folder A - 3"
> "Folder B - 4"
> "Folder B - 5"
>
> Can someone help me ? I am pyth
[Petra Chong]
> I am using Python 2.3 and ZODB (without the rest of Zope) with the
> following pattern:
>
> * One process which writes stuff to a ZODB instance (call it test.db)
> * Another process which reads stuff from the above ZODB instance
> test.db
>
> What I find is that when the first proce
> I don't know how to make this structure immutable... Pickle
> it? Seems very inefficient to me...
Well, classes can be made mostly immutable by intercepting the
attempts to write to it...something like
class Foo(object):
def __setattr__( self, name, val ):
raise TypeError("I'm
> In the following code snippet, I attempt to assign 10 to every index in
> the list a and fail because when I try to assign number to 10, number
> is a deep copy of the ith index (is this statement correct?).
Sorta...just like with function parameters, there are mutables
and immutables.
a
>>> fullname = name[:len(name) - 1] + ext.lower()
>> are you sure you want to strip off the last character in the actual
>> filename? should "FOO.BAR" really be turned into "FO.bar" ?
>> name[:len(name) - 1] can be written name[:-1], btw.
>>> os.rename(os.path.join(path, f
>> The reason I used instances instead of just the Constants
>> class was so that I could define a little more descriptive
>> context for the constants,
>
> Sorry I don't know what you mean here, could I have an example
It helps in the recognition if you have separation between
something like
On 1 Nov 2006 16:04:59 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I recently installed Python 2.5 on Windows and also installed numpy
> 1.0. I'd like to compute an FFT on an array of numbers but I can't
> seem to access the FFT function. I'm fairly new to Python (obviously)
> and I can
>> can you post an example of a filename that misbehaves on
>> your machine?
>>
>>
>
> To Fredrik Lundh and Tim Chase:
>
> My task was read all tga file names and generate a config xml
> file, then pass this xml file to a utility, but this utillity
>
> a = (1,2,3)
> print "a = %s" %a
>
> But when I run this, I get:
>
> TypeError: not all arguments converted during string formatting
>
> Now I realize why this happens, a is actually 3 elements when the print
> statement is only expecting to print one value. I tried
>
> print "a = %s" %(a)
>
> Is there a module/method in python to convert a file from .DBF format to
> .CSV format?
Well, at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362715
there's a recipe for reading DBF files...iterating over the
returned data from the function declared there, it should be
pretty eas
;
>How do I force urllib2 to use HTTP v1.1?
Are you passing httplib.HTTPConnection as the connection handler? If you
use httplib.HTTP instead, it should create a 1.0 request.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
OT the only way of using Python to create a
web site. CGI by itself is quite practical, unless you are anticipating
100s of hits per minute. Even if it isn't, something like CherryPy used
through a proxy gives you the benefit of a long-running process with the
convenience of Apache.
--
Ti
> nah, if you've spent more than five minutes on c.l.python lately, you'd
> noticed that it's the Solution to Everything (up there with pyparsing, I
> think).
SE would be the Solution to Everything.
pyparsing Provides Your Perfect Alternative where Regexp Syntax
Is No Good.
The "re" module is
]Ernesto García García]
> it's very common that I have a list and I want to print it with commas
> in between. How do I do this in an easy manner, whithout having the
> annoying comma in the end?
>
>
>
> list = [1,2,3,4,5,6]
>
> # the easy way
> for element in list:
>print element, ',',
>
> pr
>> Have you tried adding a self.connection.commit() to the
>> code? I don't know whether sqlite is transactional, but if
>> it is then the changes will disappear without a commit.
>
> Wow, that worked! Now, I know I've done some DB work before
> (very similar to this) and never used commit(), so I
ngled newsreader". I
was evaluating it in 1999 as an alternative to Agent, and it was not new
even then.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
o documentation on the file class used with
> tkFileDialog. Does someone have a solution for that?
>
> Thank you
>
> Christian
>
How about:
print file.name
--
----
Tim Daneliuk [EMAIL PROTECTED]
PGP Ke
encoding = loc[1]
---
Change the "if 0:" to "if 1:" and see if that doesn't fix the problem.
--
Tim Daneliuk [EMAIL PROTECTED]
PGP Key: http://www.tundraware.com/PGP/
--
http://mail.python.org/mailman/listinfo/python-list
On 8 Nov 2006 15:31:27 -0800, NicolasG <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > Under outgoing mail smtp server, use smtp.gmail.com. Since it requires SMTP
> > authorization, use your Gmail account as username (e.g. [EMAIL PROTECTED])
> > and
> > your Gmail password as password. You can turn TSL
On 8 Nov 2006 15:35:31 -0800, NicolasG <[EMAIL PROTECTED]> wrote:
> How can I use python to get the real IP address of my DSL router (when
> my PC is part of the local home LAN) ?
The router will the PC's default gateway IP address, if you are on a
windows platform, you can view it by typing IPC
On 09/11/06, Nicolas G <[EMAIL PROTECTED]> wrote:
>
>
> On 11/9/06, Tim Williams <[EMAIL PROTECTED]> wrote:
> > On 8 Nov 2006 15:35:31 -0800, NicolasG <[EMAIL PROTECTED]> wrote:
> > > How can I use python to get the real IP address of my DSL router (when
On 09/11/06, Nicolas G <[EMAIL PROTECTED]> wrote:
>
>
> >
> > Usually when sending/relaying without authentication, the From is
> > irrelevant, only the To is taken into account. Maybe, GMAIL do
> > something different because they have to put the mail in the sender's
> > mailbox as well as the r
x27;s my filepath, what is not ASCII in there? è
>
> Just checked and it's 138 in ascii... Anyway, thanks a lot
>
> Christian
>
>
> Tim Daneliuk wrote:
>> Sefyroth wrote:
>>> Thanks,
>>>
>>> but I get this error when I try this.
>
On 8 Nov 2006 19:45:00 -0800, Jordan <[EMAIL PROTECTED]> wrote:
> For some reason,
> smtp for gmail seems to require that you call server.ehlo() a second
> time, after having called server.starttls(), otherwise, the server
> won't accept authorization. Thanks.
Not just GMAIL, all (RFC Complian
>> I have a sorted list for example [1,2,3,4,5] and I would like to change
>> it in a random way
>> e.g [2,5,3,1,4] or [3,4,1,5,2] or in any other way except being
>> ordered.
>> What is the best/easiest
>> way how to do it?
>
> use random.shuffel:
>
import random
x = [1,2,3,4,5]
On 9 Nov 2006 07:45:25 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> I have a string containing: "+abc_cde.fgh_jkl\n" and what I need to
> become is "abc_cde.fgh_jkl". Could anybody be so kind and write me a
> code of how to extract this text from that string?
>
for that particular str
> I am just getting into python and am trying to learn how to use the
> python.vim script. I really like the fact that it autoindents for me while
> inserting defs etc, but how do I move my cursor to back to outer block (say
> at the end of a def) to continue with writing next def while still i
>>> Anyway, the FAQ answer seems to be a weak argument to me.
>> I agree. I was expecting something more technical to justify
>> the colon, not just that it looks better.
>
> I think it is outstanding that the colon's justification is
> asthetic rather than technical (though I too had expected to
> Java is horrible, Oython is not.
Oython...the new scripting language from down under...just a wee
bit south of the island of Java...
g'day-mate'ly yers...
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
On 10/11/06, Michael B. Trausch <[EMAIL PROTECTED]> wrote:
Every programming example that I have seen thus far shows simple server code and how to bind to a socket--however, every example binds to the localhost address. What I am wondering is this: Is there a clean way to get the netw
3201 - 3300 of 7525 matches
Mail list logo