A common one used to be expecting .sort() to return, rather than mutate (as it
does). Same with .reverse() - sorted and reversed have this covered, not sure
how common a gotcha it is any more.
Iain
On Wednesday, 4 April 2012 23:34:20 UTC+1, Miki Tebeka wrote:
> Greetings,
>
> I'm going to
On Friday, 11 May 2012 22:29:39 UTC+1, gry wrote:
> sys.version --> '2.6 (r26:66714, Feb 21 2009, 02:16:04) \n[GCC 4.3.2
> [gcc-4_3-branch revision 141291]]
> I thought this script would be very lean and fast, but with a large
> value for n (like 15), it uses 26G of virtural memory, and things
On Apr 28, 2:45 am, Chris Angelico wrote:
> Incidentally, you're allowed to put the comma on the last item too:
>
> lists = [
> ['pig', 'horse', 'moose'],
> ['62327', '49123', '79115'],
> ]
>
> Often makes for easier maintenance, especially when you append
> array/list elements.
>
> Chris Ang
On May 25, 2:44 pm, ad wrote:
> On May 25, 4:06 am, Ulrich Eckhardt
> wrote:
>
>
>
> > ad wrote:
> > > Please review the code pasted below. I am wondering what other ways
> > > there are of performing the same tasks.
>
> > On a unix system, you would call "find" with according arguments and then
Tor Erik Sønvisen wrote:
> Hi
>
> I create a canvas that is to big for the default window-size, so it gets cut
> to fit...
> How can I increase the window-size to make sure the canvas fits?
>
> regards tores
root=Tk()
root.minsize(300,300)
root.geometry("500x500")
will limit the window to be at
Amy Dillavou wrote:
> Can someone help me with understanding how python uses backreferences?
> I need to remember the item that was last matched by the re engine but i
> cant seem to understand anything that I find on backreferences. if I
> want to access the last match do i use \number or is the
Andrea Gavana wrote:
> I have tried your solution, Terry:
>
> > new_hue # your 'basic color', just the hue part
> > rgb_base # color from the basic button image
> > rgb_new # the new color you want to replace rgb_base with
> >
> > rgb_new = hsv_to_rgb( (new_hue,) + rgb_to_hsv(rgb_base)[1:])
>
Tom Anderson wrote:
> On Fri, 21 Oct 2005, vdrab wrote:
>
> > You can tell everything is well in the world of dynamic languages when
> > someone posts a question with nuclear flame war potential like "python
> > vs. ruby" and after a while people go off singing hymns about the beauty
> > of Scheme
Fredrik Lundh wrote:
> Joerg Schuster wrote:
>
> > I just want to use more than 100 capturing groups.
>
> define "more" (101, 200, 1000, 10, ... ?)
>
>
The Zero-One-Infinity Rule:
http://www.catb.org/~esr/jargon/html/Z/Zero-One-Infinity-Rule.html
Iain
--
http://mail.python.org/mailman/li
Steven D'Aprano wrote:
> On Tue, 25 Oct 2005 05:17:52 -0700, Iain King wrote:
>
> >
> > Fredrik Lundh wrote:
> >> Joerg Schuster wrote:
> >>
> >> > I just want to use more than 100 capturing groups.
> >>
> >> define "mo
Steven D'Aprano wrote:
> On Tue, 25 Oct 2005 06:30:35 -0700, Iain King wrote:
>
> >
> > Steven D'Aprano wrote:
> >> On Tue, 25 Oct 2005 05:17:52 -0700, Iain King wrote:
> >>
> >> >
> >> > Fredrik Lundh wrote:
> >&
Fredrik Lundh wrote:
> Iain King wrote:
>
> > Anyway, back to the OP: in this specific case, the cap of 100 groups in
> > a RE seems random to me, so I think the rule applies.
>
> perhaps in the "indistinguishable from magic" sense.
>
> if you want to kno
[EMAIL PROTECTED] wrote:
> Hello All,
>
> I have a problem with the program that should generate x number of txt
> files (x is the number of records in the file datafile.txt).
>
> Once I execute the program (see below) only one file (instead of x
> files) is created. The file created is based on t
David Blomstrom wrote:
> A bit off topic, but it amazes me that people in the
> web design/Internet industry don't take a more active
> stance against Microsoft.
>
> Think about it: The health care industry has been
> privatized in the U.S. I spent sixteen years in
> education, another institution
I have some code that converts html into xhtml. For example, convert
all tags into . Right now I need to do to string.replace calls
for every tag:
html = html.replace('','')
html = html.replace('','')
I can change this to a single call to re.sub:
html = re.sub('<([/]*)i>', r'<\1em>', html)
W
Duncan Booth wrote:
> James Stroud wrote:
>
> > On Tuesday 25 October 2005 00:31, Duncan Booth wrote:
> >> P.S. James, *please* could you avoid top-quoting
> >
> > Were it not for Steve Holden's providing me with a link off the list,
> > I would have never known to what it is you are referring. I
Mike Meyer wrote:
> "Iain King" <[EMAIL PROTECTED]> writes:
>
> > I have some code that converts html into xhtml. For example, convert
> > all tags into . Right now I need to do to string.replace calls
> > for every tag:
> >
> >
David Schwartz wrote:
> Roedy Green wrote:
>
> > On Sun, 16 Oct 2005 16:31:41 GMT, Roedy Green
> > <[EMAIL PROTECTED]> wrote, quoted or
> > indirectly quoted someone who said :
>
> >> I used to be a retailer of custom computers. MS used a dirty trick
> >> to compete with IBM's OS/2. They said to
David Schwartz wrote:
> Roedy Green wrote:
>
> > The particular way MS threatened to put me out of business was by
> > threatening to arm twist all wholesalers to refuse to sell MS product
> > to me, which any retailer needed to survive in those days.
>
> Right, I get that. You owed your entir
[EMAIL PROTECTED] wrote:
> Hey there,
> i have a text file with a bunch of values scattered throughout it.
> i am needing to pull out a value that is in parenthesis right after a
> certain word,
> like the first time the word 'foo' is found, retrieve the values in the
> next set of parenthesis (ba
[EMAIL PROTECTED] wrote:
> this is cool, it is only going to run about 10 times a day,
>
> the text is not written out like foo(bar) its more like
> foo blah blah blah (bar)
>
then I guess you worked this out, but just for completeness:
keywordPos = textfile.find("foo")
start = textfile.find("("
My web server supports python CGI scripts, but I can't install anything
else there - I can just use what they've provided. I want to process
some PNG images - any ideas how I can do this with just the basic
modules? Is there an image processing module written purely in Python?
Iain
--
http://m
Dan Lowe wrote:
> On Nov 22, 2005, at 12:30 AM, could ildg wrote:
>
> > Thank you~
> > It works!
> > but how can paste "<" and ">", please?
> > these 2 symbols will also confuse wordpress and I can't publish
> > what I want.
>
> Replace < with <
>
> Replace > with >
>
> (where those abbreviations
> The library reference has so many modules that the table of contents
> is very large. Again, not really a problem that we can fix; splitting
> it up into separate manuals doesn't seem like it would help.
I like the Global Module Index in general - it allows quick access to
exactly what I want.
[EMAIL PROTECTED] wrote:
> >> The library reference has so many modules that the table of contents
> >> is very large. Again, not really a problem that we can fix;
> >> splitting it up into separate manuals doesn't seem like it would
> >> help.
>
> Iain> I like the Global Module I
[EMAIL PROTECTED] wrote:
> Iain> Well, the point of the GMI is to lookup whatever module you are
> Iain> currently having to use for the first time (at least it is for
> Iain> me). Giving easy access to the modules I've already had to look
> Iain> up (because they are common) doesn't
Robert Kern wrote:
> Shaun wrote:
> > Thanks for your replies, obviously this isn't a simple thing to do so
> > I'll take a different tack.
> >
> > The exact problem I am trying to solve here is to avoid the
> > ZeroDivisionError in division.
> > I have c++ code which delegates to python to calcul
DENG wrote:
> dict1={...something...}
>
> dict2={...somethind else ..}
>
> dict1 + dict2
>
>
> that's does works ..:(, it's not like List...
>
>
> anyone can tell me how to get it?
>
Uh, I'm just learning python too, so there may be a much simpler way to
do this, but you could:
dict3 = {}
for k,
Iain King wrote:
> DENG wrote:
> > dict1={...something...}
> >
> > dict2={...somethind else ..}
> >
> > dict1 + dict2
> >
> >
> > that's does works ..:(, it's not like List...
> >
> >
> > anyone can tell me how to g
[EMAIL PROTECTED] wrote:
> update works like append for lists
>
> a = {}
> a['a']='a'
> a['c']='c'
> b={}
> b['b'] = 'b'
> c={}
> c.update(a)
> c.update(b)
>
So what do you think is the better way to do it, based on speed or
aesthetics?
(1)
c=a.copy()
c.update(b)
or
(2)
c={}
c.update(a)
c.upd
I'm making a program to view log files. The main display is a multi
column listbox. I want to add combobox filters above the listbox
headers. The filters contain each unique instance in the list column
below it, and if any filter has text selected in it then the listbox
will only display rows in
Steve Holden wrote:
> tac-tics wrote:
> > [EMAIL PROTECTED] wrote:
> >
> >>Hey there,
> >>i have been learning python for the past few months, but i can seem to
> >>get what exactly a lamda is for. What would i use a lamda for that i
> >>could not or would not use a def for ? Is there a notable di
[EMAIL PROTECTED] wrote:
> I have a problem. I'm writing a simulation program with a number of
> mechanical components represented as objects. When I create instances
> of objects, I need to reference (link) each object to the objects
> upstream and downstream of it, i.e.
>
> supply = supply()
> c
[EMAIL PROTECTED] wrote:
> Iain, thanks - very helpful.
>
> Really I'm trying to write a simulation program that goes through a
> number of objects that are linked to one another and does calculations
> at each object. The calculations might be backwards or fowards (i.e.
> starting at the supply o
Dustan wrote:
> Boris Borcic wrote:
> > does
> >
> > x.sort(cmp = lambda x,y : cmp(random.random(),0.5))
> >
> > pick a random shuffle of x with uniform distribution ?
> >
> > Intuitively, assuming list.sort() does a minimal number of comparisons to
> > achieve the sort, I'd say the answer is yes.
OriginalBrownster wrote:
> I am using a class called UploadedFile.
> I want to create a for loop to itterate through the objects within file
> name
>
> class UploadedFile(SQLObject):
> filename = StringCol(alternateID=True)
> abspath = StringCol()
> uniqueid = IntCol()
>
> I'll s
Xah Lee wrote:
> Of interest:
>
> • The Semicolon Wars, by Brian Hayes. 2006.
> http://www.americanscientist.org/template/AssetDetail/assetid/51982
>
> in conjunction to this article, i recommend:
>
> • Software Needs Philosophers, by Steve Yegge, 2006
> http://xahlee.org/Periodic_dosage_dir/_p/s
Tim Daneliuk wrote:
> Iñigo Serna wrote:
> > On 8/18/06, Tim Daneliuk <[EMAIL PROTECTED]> wrote:
> >> > try mutagen.
> >> http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen
> >>
> >> This module is more-or-less exactly what I needed. However, I am running
> >> into problems when the fil
di0rz` wrote:
> hi,
> I am looking for a python script to edit .torrent files
> if anybody know one thx
Not sure exactly what you are looking for, but the original bittorrent
client is written in Python, so you could grab a copy of it and check
the code.
Iain
--
http://mail.python.org/mailman/
Michele Petrazzo wrote:
> Iain King wrote:
> > Michele Petrazzo wrote:
> >
> > I downloaded and installed 0.9.9.3, and it now works. Thanks!
> >
>
> I advice you to don't use that ctypes version... Better is to use the
> newest one and update freeima
Michele Petrazzo wrote:
> Iain King wrote:
> > Michele Petrazzo wrote:
> >> Iain King wrote:
> >>> Michele Petrazzo wrote:
> >>>
> >>> I downloaded and installed 0.9.9.3, and it now works. Thanks!
> >>>
> >> I advice y
Michele Petrazzo wrote:
> Iain King wrote:
> > However, when I'm do the
> > fipy.convertToPil(), it inverts the image?
>
> No, it not invert the image... It only return the image as is.
>
> > I've inserted a
> > fipy.invert() before the conversion as
Iain King wrote:
> Michele Petrazzo wrote:
> > Iain King wrote:
> > > However, when I'm do the
> > > fipy.convertToPil(), it inverts the image?
> >
> > No, it not invert the image... It only return the image as is.
> >
> > > I've ins
David C. Ullrich wrote:
> On 30 May 2006 21:53:32 -0700, "greenflame" <[EMAIL PROTECTED]>
> wrote:
>
> That's DSU for _sorting_ a list. I read about this, thought
> it was pretty neat. I thought that the fact that you
> could use the same trick for _shuffling_ a list was
> my idea, gonna make me r
Michele Petrazzo wrote:
> Iain King wrote:
> >> I'll try out FIPY's resizing tomorrow too. OTOH, I have functions
> >> to convert between PIL and wxPython, and functions to convert
> >> betweem PIL and FIPY, but I don't see a function to convert
Lawrence D'Oliveiro wrote:
> In article <[EMAIL PROTECTED]>,
> Scott David Daniels <[EMAIL PROTECTED]> wrote:
>
> >For example, time timsort (Python's internal sort) on pre-sorted
> >data; you'll find it is handled faster than random data.
>
> But isn't that how a reasonable sorting algorithm sho
I was playing with list comprehensions, to try and work out how doubled
up versions work (like this one from another thread: [i for i in
range(9) for j in range(i)]). I think I've figured that out, but I
found something strange along the way:
>>> alpha = ["one", "two", "three"]
>>> beta = ["A", "
David Boddie wrote:
> Summary of the usual mess made by the Google Groups web interface:
>
>
> I suspect that you really want to call w.exec_loop() instead, since
> this will only return control to the method after the user has finished
> interacting with the wizard.
>
>
> Take a look at the QWiza
Andrew Gwozdziewycz wrote:
> You'll have better results posting this to it's own thread.
>
He certainly should have, but since I've read it here anyway:
> On Jun 13, 2006, at 9:29 AM, Michael Yanowitz wrote:
>
> > Hello:
> >
> > Presently in my Windows 2000 system, when I double-click on a
>
Roland Rickborn wrote:
> Hi folks,
>
> I am relatively new to Python. Although I read a lot of howtos,
> introductions and wikis, I am still having trouble ;-)
>
> My querstion:
> As the subject says, I'd like to feed a wx.ComboBox with a
> dictionary/hash. According to the posting of Stano Paska
[EMAIL PROTECTED] wrote:
> mac_string = '001485e55503' (This is the mac address of a computer.)
>
> I am using wake on LAN python script to start computer remote.It uses
> format like this
>
> s.sendto('\xff'*6 + '\x00\x014\x85\xe5\x55\x03'*16, ('192.168.1.255',
> 80))
>
> where '\x00\x14\x8
Tim Roberts wrote:
> "Iain King" <[EMAIL PROTECTED]> wrote:
> >
> >You probably want:
> >
> >s.sendto('\xff'*6 + ('\x%s\x%s\x%s\x%s\x%s\x%s' % (str01, str02, str03,
> > sttr04, str05, str06))*16, ('192.168.1.255', 80
luis wrote:
> Hi
> I'm using activestate python 2.4 on win xp 2 ed. and Ms Access 2002
> (reading first http://starship.python.net/crew/bwilk/access.html)
> I have writed the following code
>
> def append_from_Access(self):
>try:
> import ...
> conn = win32com.client.Dispatch(r'ADO
luis wrote:
> Iain King ha escrito:
>
> > luis wrote:
> > > while not rs.EOF:
> > > id=rs.Fields(colName.Value) #colName, valid column name
> > > ...
> > > rs.MoveNext()
> > > rs.Close()
> > >
luis wrote:
> Iain King ha escrito:
>
> > luis wrote:
> > > Iain King ha escrito:
> > >
> > > > luis wrote:
> > > > > while not rs.EOF:
> > > > > id=rs.Fields(colName.Value) #colName, valid column name
>
Roman wrote:
> I would appreciate it if somebody could tell me where I went wrong in
> the following snipet:
>
> When I run I get no result
>
> cnt = 0
> p=[]
> reader = csv.reader(file("f:\webserver\inp.txt"), dialect="excel",
> quotechar="'", delimiter='\t')
> for line i
Mike Kent wrote:
> Roman wrote:
> > Thanks for your help
> >
> > My intention is to create matrix based on parsed csv file. So, I would
> > like to have a list of columns (which are also lists).
> >
> > I have made the following changes and it still doesn't work.
> >
> >
> > cnt = 0
> > p=[[], []
tac-tics wrote:
> I know about os.path.split(), but Is there any standard function for
> "fully" splitting a file's pathname? A function that is the opposite of
> the os.path.join() function? For example:
>
> >>> ret = myster_function(./foo/bar/moo/lar/myfile.txt)
> >>> print ret
> ['.', 'foo', 'b
Michele Petrazzo wrote:
> Rob Williscroft wrote:
>
> > I downloaded some test images from:
> >
> > http://www.remotesensing.org/libtiff/images.html>
> >
>
> I do the same and modified your code for try FreeImagePy and the results
> are:
>
> ok: 41 error: 20 total: 61
>
> Better
[EMAIL PROTECTED] wrote:
> Hi,
>
> I have a program which will continue to run for several days. When it is
> running, I can't do anything except waiting because it takes over most
> of the CUP time.
>
> Is it possible that the program can save all running data to a file when
> I want it to stop,
New book on wxPython: http://www.manning.com/books/rappin
Release date of this month. Does anyone know if it's out yet / has
anyone read it and has an opinion?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
Jared Russell wrote:
> To mess around with it, I decided to create a small app to check my
> Gmail. I want something that will just sit in my system tray checking
> for new emails every ten minutes or so.
How do you gain access to the system tray?
Iain
--
http://mail.python.org/mailman/listi
py wrote:
> Thanks, itertools.izip and just zip work great. However, I should have
> mentioned this, is that I need to keep the new dictionary sorted.
>
> d = {1:'first', -5 : 'negative 5', 6:'six', 99:'ninety-nine',
> 3:'three'}
> keys = d.keys()
> keys.sort()
> vals = map(d.get, keys)
>
> At th
[EMAIL PROTECTED] wrote:
> Hi, I was wondering how I may get a python function to know what its
> name is without me having to write it manually? For example:
>
> def func1():
>
> print 'func1'
> return True
>
> def func2():
>
> print 'func2'
> return True
>
> should be
When I loop over one list I use:
for item in items:
print item
but often I want to loop through two lists at once, and I've been doing
this like I would in any other language - creating an index counter and
incrementing it.
For example, (completely arbitrary), I have two strings of the same
l
Harlin Seritt wrote:
> I have this Python CGI script running:
>
> [CODE]
> print 'Content-type: text/plain\n'
>
> location = 'http://server1.com'
>
> page = '''
>
>
>
>
>
> '''
>
> print page
> [/CODE]
>
> It works fine and redirects perfectly when using Internet Explorer but
> only shows thi
Iain King wrote:
> Harlin Seritt wrote:
> > I have this Python CGI script running:
> >
> > [CODE]
> > print 'Content-type: text/plain\n'
> >
> > location = 'http://server1.com'
> >
> > page = '''
> >
&g
Ben Cartwright wrote:
> Ben Cartwright wrote:
> > orangeDinosaur wrote:
> > > I am encountering a behavior I can think of reason for. Sometimes,
> > > when I use the .strip module for strings, it takes away more than what
> > > I've specified. For example:
> > >
> > > >>> a = 'Hughes. John\r
William Meyer wrote:
> hi,
>
> I need to get the index of an object in a list. I know that no two objects
> in the list are the same, but objects might evaluate as equal. for example
>
> list = [obj1, obj2, obj3, obj4, obj5]
> for object in list:
> objectIndex = list.index(object)
> pr
Iain King wrote:
> William Meyer wrote:
> > hi,
> >
> > I need to get the index of an object in a list. I know that no two
> > objects
> > in the list are the same, but objects might evaluate as equal. for example
> >
> > list = [obj1, o
Iain King wrote:
> Iain King wrote:
> > William Meyer wrote:
> > > hi,
> > >
> > > I need to get the index of an object in a list. I know that no two
> > > objects
> > > in the list are the same, but objects might evaluate as equal.
On Jul 18, 3:41 am, Benjamin <[EMAIL PROTECTED]> wrote:
> I'm writing a search engine in Python with wxPython as the GUI. I have
> the actual searching preformed on a different thread from Gui thread.
> It sends it's results through a Queue to the results ListCtrl which
> adds a new item. This work
On Sep 12, 1:31 am, "Shawn Milochik" <[EMAIL PROTECTED]> wrote:
> > I suppose really oneDay should be a global (i.e. outside the function
> > definition). Apart from that it would be hard to improve on: obvious,
> > easy to read, in short - pythonic.
>
> > Are you concerned about daylight savings?
On Oct 18, 2:29 am, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-10-17, Debajit Adhikary <[EMAIL PROTECTED]> wrote:
>
> > # Start of Code
>
> > def evenOdd():
> > values = ["Even", "Odd"]
> > state = 0
> > while True:
> > yield values[state]
> > state = (state + 1)
On Nov 27, 9:20 am, Roy Smith <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Bruno Desthuilliers <[EMAIL PROTECTED]>
>
>
>
> wrote:
> > Steven D'Aprano a écrit :
> > > On Mon, 26 Nov 2007 21:48:36 +0100, Ton van Vliet wrote:
>
> > >> On Mon, 26 Nov 2007 20:14:50 +0100, Bruno Desth
On Nov 27, 12:03 pm, Duncan Booth <[EMAIL PROTECTED]>
wrote:
> Iain King <[EMAIL PROTECTED]> wrote:
> > FTR, I won't be using this :) I do like this syntax though:
>
> > class Vector:
> > def __init__(self, x, y, z):
> > self.x =
akrapus wrote:
> Thanks for reply.
>
> So would it be implemented as follows:
>
> Func 1
> Func 2
> Func 3
>
> Thread for Func 1
> Thread for Func 2
> Thread for Func 3
>
> Cheers
>
> Stevan
Here's how I'm doing it, using the thread module (there's a higher
level class-based module: threading, but
Wildemar Wildenburger wrote:
> Over the time I've seen lots of remarks about python that read like "a
> lot like lists in lisp" or "like the hashtable in java" or any other
> form of "like in ".
>
> Are there any concepts that python has not borrowed, concepts that were
> not even inspired by oth
hawkesed wrote:
> If I have a list, say of names. And I want to count all the people
> named, say, Susie, but I don't care exactly how they spell it (ie,
> Susy, Susi, Susie all work.) how would I do this? Set up a regular
> expression inside the count? Is there a wildcard variable I can use?
> He
John Machin wrote:
> On 25/04/2006 6:26 PM, Iain King wrote:
> > hawkesed wrote:
> >> If I have a list, say of names. And I want to count all the people
> >> named, say, Susie, but I don't care exactly how they spell it (ie,
> >> Susy, Susi, Susie all wor
Edward Elliott wrote:
> John Machin wrote:
> > On 25/04/2006 6:26 PM, Iain King wrote:
> >> iain = re.compile("(Ia(i)?n|Eoin)")
> >> steven = re.compile("Ste(v|ph|f)(e|a)n")
> >
> > IMHO, the amount of hand-crafting that goes into a *
I have a wxpython program that displays TIF images. Sometimes it will
encounter a tag the tiff loader cant handle. Rather than silently
ignoring it, it pops up a window:
Python Warning
unknown field with tag blah blah
I don't want it to do this, but I can't work out how to turn it off.
Anyone k
Michele Petrazzo wrote:
> Philippe Martin wrote:
> > I had a similar but simple problem (the file was missing) and had to
> > check by hand before calling wxPython.
> >
> > Can you check the tag by hand before calling wxPython ?
> >
> >
> > Philippe
> >
> >
>
> Hi,
> also I have the same problem w
Does anyone have a link for a compiled-for-windows version of pytiff?
(or alternatively tell me how to get PIL to save a multipage tiff).
Iain
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
>
> # Doh! Looks like recursion not necessary. Google 'eliminate tail
> recursion' :-)
>
I did, and found this:
http://www.biglist.com/lists/dssslist/archives/199907/msg00389.html
which explains that the Scheme compiler optimises (obvious) tail
recursion into iterative code. I
http://compoundthinking.com/blog/index.php/2006/03/10/framework-comparison-video/
Thought this might be interesting to y'all. (I can't watch it 'cos I'm
at work, so any comments about it would be appreciated :)
Iain
--
http://mail.python.org/mailman/listinfo/python-list
Oh God, I agree with Xah Lee. Someone take me out behind the chemical
sheds...
Iain
Xah Lee wrote:
> Tabs versus Spaces in Source Code
>
> Xah Lee, 2006-05-13
>
> In coding a computer program, there's often the choices of tabs or
> spaces for code indentation. There is a large amount of confus
Ant wrote:
> I think Duncan has hit the nail on the head here really. I totally
> agree that conceptually using tabs for indentation is better than using
> spaces. Pragmatically though, you can't tell in an editor where spaces
> are used and where tabs are used.
>
Um, I don't follow this. If you
Brian Blazer wrote:
> OK, I have a very simple class here:
>
> class Student:
> """Defines the student class"""
>
> def __init__(self, lName, fName, mi):
> self.lName = lName
> self.fName = fName
> self.mi = mi
>
> Then I have a small script that I am using as
I've installed ctypes and FreeImagePy. When I do this:
>>> import FreeImagePy
>>> f = FreeImagePy.Image()
I get:
find
Traceback (most recent call last):
File "", line 1, in ?
File "C:\Python\Lib\site-packages\FreeImagePy\FreeImagePy.py", line
1952, in _
_init__
super(Image, self).__init_
Michele Petrazzo wrote:
> Iain King wrote:
> > I've installed ctypes and FreeImagePy. When I do this:
> >
> >>>> import FreeImagePy f = FreeImagePy.Image()
> >
> > I put a 'print self._name' in the ctypes __init__ file, just before
&g
On Mar 17, 6:56 am, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Mar 17, 1:15 am, Girish <[EMAIL PROTECTED]> wrote:
>
> > I have a string a = "['xyz', 'abc']".. I would like to convert it to a
> > list with elements 'xyz' and 'abc'. Is there any simple solution for
> > this??
> > Thanks for the help.
On Mar 17, 9:27 am, Iain King <[EMAIL PROTECTED]> wrote:
> On Mar 17, 6:56 am, Dan Bishop <[EMAIL PROTECTED]> wrote:
>
> > On Mar 17, 1:15 am, Girish <[EMAIL PROTECTED]> wrote:
>
> > > I have a string a = "['xyz', 'abc']"..
On Nov 17, 7:41 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> > It doesn't matter as none of this is valid Python. In Python you have to
> > write
>
> > array[x1] = False
> > array[x2] = False
>
> Uh...not so much...
>
> >>> a = [1,2,3,4,5]
> >>> x1, x2 = 1, 3
> >>> a[x1] = a[x2] = False
> >>>
On Nov 25, 11:29 am, Iain King <[EMAIL PROTECTED]> wrote:
> On Nov 17, 7:41 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
>
>
>
> > > It doesn't matter as none of this is valid Python. In Python you have to
> > > write
>
> > > array
On Nov 25, 5:11 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi all,
>I am writing a small application which reads the contents of an
> Outlook Mail using python. I am able to read the contents, subject
> along with senders and receivers of a mail using MAPI objects. But may
> I kno
On Dec 3, 10:16 am, [EMAIL PROTECTED] wrote:
> On Dec 3, 12:53 am, Bryan Olson <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > This message is not about the meaningless computer printout called
>
> > More importantly, it's not about Python. I'm setting follow-ups to
> > talk.pol
On Dec 4, 1:51 am, Barry Warsaw <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On behalf of the Python development team and the Python community, I
> am happy to announce the release of Python 3.0 final.
>
> Python 3.0 (a.k.a. "Python 3000" or "Py3k") represents a
On Mar 10, 6:38 am, Daniel Fetchinson
wrote:
> On 3/9/09, bearophileh...@lycos.com wrote:
>
> > See here Daniel Fetchinson:
>
> >http://groups.google.com/group/comp.lang.python/browse_thread/thread/...
>
> > But be quite careful in using that stuff, it has some traps.
>
> Thanks a lot for all the
On Apr 7, 1:44 pm, Tim Chase wrote:
> > f = urllib.urlopen("http://www.google.com";)
> > s = f.read()
>
> > It is working, but it's returning the source of the page. Is there anyway I
> > can get almost a screen capture of the page?
>
> This is the job of a browser -- to render the source HTML. A
1 - 100 of 162 matches
Mail list logo