tried the FIFO thing, but I think I'm getting caught by
its blocking behaviour on open so as soon as I try to open the named
pipe (whether for reading or writing) my script just hangs.
Any help would be appreciated.
Cheers
Iain
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 7, 4:42 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> In message
> <[EMAIL PROTECTED]>, Iain
> wrote:
>
> > Can someone give me some pointers as to how I might create some sort
> > of blocking device file or named pi
On Nov 8, 10:00 am, Iain <[EMAIL PROTECTED]> wrote:
> On Nov 7, 4:42 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
>
> central.gen.new_zealand> wrote:
> > In message
> > <[EMAIL PROTECTED]>, Iain
> > wrote:
>
> > > Can someone give me some
> Perhaps the parent should open the pipe for reading, before calling
> TroublesomeFunction. If the parent then dies, the child will get a "broken
> pipe" signal, which by default should kill it.
Yeah, that seems to work well, I think. Thanks for the help! I also
realised the child process was co
Hi All,
I'm writing a system tray application for windows, and the app needs
to poll a remote site at a pre-defined interval, and then process any
data returned.
The GUI needs to remain responsive as this goes on, so the polling
needs to be done in the background. I've been looking into Twisted a
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
nge(n):
> print >>f, random.randint(0, sys.maxint)
> f.close()
>
> What's using so much memory?
> What would be a better way to do this? (aside from checking arg
> values and types, I know...)
Ran OK for me, python 2.4.1 on Windows 7
Iain
--
http://mail.python.org/mailman/listinfo/python-list
makes for easier maintenance, especially when you append
> array/list elements.
>
> Chris Angelico
I did not know this. Very useful!
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
will limit the window to be at least 300x300, and set it straight away
to 500x500.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
ven't had to use backreferences yet, so I don't know offhand how to
go about it. What I do know is that this online book is very useful:
http://gnosis.cx/TPiP/
Chapter 3 covers REs:
http://gnosis.cx/TPiP/chap3.txt
>From what I remember, in python you can use numbered backrefere
e would be a gradient ranging from black (completely dark) to
red.
So on the HSV scale, grey is represented by a saturation of 0 - meaning
none of H is present in the color; the color in question being
determined purely by it's brightness (V). So when you pick your HSV
triplet for a grey color, you have to set S to 0. You can set H to
anything at all - because S is 0, no tint of H will appear in the color
at all.
Iain http://www.snakebomb.com
--
http://mail.python.org/mailman/listinfo/python-list
ging hymns about the beauty
> > of Scheme...
>
> +1 QOTW
>
> > I love this place.
>
> Someone should really try posting a similar question on c.l.perl and
> seeing how they react ...
>
> tom
SSsh! Xah Lee might be listening!
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
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
666
>
>
>
> Once executed, the program will create a single file (named Rome.txt)
> and it would not create files NYC.txt and Lima.txt as I would expect it
> to do.
>
> I'd appreciate if you can pinpoint my error.
>
> Best,
>
> Vasa
Did you try indenting the last five lines?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
Bush, you'll love Bill Gates," could
> go a long ways in educating the public.
>
Or, you know, just code your website to be W3C compliant, which IE will
invariably choke on.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
ml = re.sub('<([/]*)i>', r'<\1em>', html)
Would this be a quicker/better way of doing it?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
I've heard
top-posting and bottom-posting before (lots). But regardless of
however many people use top-quoting and bottom-quoting, surely you're
using them the wrong way around? If I top-post, then that means that
the quote is at the bottom, no?
To quote someone's sig block:
"To top-post is human, to bottom-post and snip is sublime."
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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:
> >
> >
ted the advantages of
> competing products. (Just as Burger King corporate will not you sell Big
> Macs in the same store in which you sell Whoppers.)
>
> DS
Don't you see how your metaphor doesn't work? It would only be fitting
if Microsoft OWNED the outle
that's better and
> cheaper".
Oh right. You're actually just a troll. Oh well.
*plonk*
Iain
--
http://mail.python.org/mailman/listinfo/python-list
depend on
how many times you're searching compared to the overhead of setting up
an re.
start = textfile.find("foo(") + 4 # 4 being how long 'foo(' is
end = textfile.find(")", start)
value = textfile[start:end]
Iain
--
http://mail.python.org/mailman/listinfo/python-list
t;)
start = textfile.find("(", keywordPos)
end = textfile.find(")", start)
value = textfile[start:end]
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
However, you will need to replace any ampersands with & ( <, >, and
& are characters with intrinsic qualities in html). You need to
replace & before you replace anything else: if you do it after
repalcing < and > you'll catch your < and >, ending up with
< and > which is not what you want.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
ly what I want.
I would like a minor change to it though - stop words starting with a
given letter rolling over to another column (for example, os.path is at
the foot of one column, while ossaudiodev is at the head of the next),
and provide links to each initial letter at the top of the page.
[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
> >> hel
[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 (bec
t some users want an expression like '(100/x)+ 3'
> > where x=0 to return 3. So that dividing a number by zero results in 0.
>
> You have silly users.
You mean you don't? Damn. Can I have some of yours?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
er way to
do this, but you could:
dict3 = {}
for k,i in dict1.iteritems():
dict3[k] = i
for k,i in dict2.iteritems():
dict3[k] = i
Think this should work. Obviously, if the same key appears in both
dict1 and dict2 then dict2's value will overwrite dict1's.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
to do it, based on speed or
aesthetics?
(1)
c=a.copy()
c.update(b)
or
(2)
c={}
c.update(a)
c.update(b)
Iain
--
http://mail.python.org/mailman/listinfo/python-list
y (as I imagine it is supposed to). Any
tips?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
uess TKinter would be next).
List comprehensions replace map and filter, so...
I wouldn't put it as explosively as he has, but I find a lambda less
clear than a def too.
Iain
> regards
> Steve
> --
> Steve Holden +44 150 684 7255 +1 800 494 3119
> Holden We
if c.upstream != self:
c.setUpstream(self)
class Supply(Component):
pass
etc.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
[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.
>
://groups.google.com/group/comp.lang.python/browse_thread/thread/766f4dcc92ff6545?tvc=2&q=shuffle
Iain
--
http://mail.python.org/mailman/listinfo/python-list
txt" using the str function. Meaning that the FOR
> LOOP is not working correctly.
After your 'file_path =' line, try adding a 'print file_path', and see
if it's creating it correctly. Your for loop looks fine, assuming that
file_path is a list of filenames.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
.org/Periodic_dosage_dir/_p/software_phil.html
>
> • What Languages to Hate, Xah Lee, 2002
> http://xahlee.org/UnixResource_dir/writ/language_to_hate.html
>
> Xah
> [EMAIL PROTECTED]
> ∑ http://xahlee.org/
I'm confused - I thought Xah Lee loved Perl? Now he's
e
> end of things, so any kind suggestions would be most welcome.
>
> By the way, I believe the offending string contains a German umlaut, at least
> in one
> of the cases.
>
>
To get the MP3's name, use os.path.basename (I'm guessing that's what
your split() is for?)
Looking at the mutagen tutorial, most of the tags are lists of unicode
strings, so you might want to try audio["title"] = [unicode(name)],
instead of audio["title"] = unicode(name). This might be your problem
when reading the tags, too.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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.or
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
t still when you're mysitified by map and lambda
(like me):
def shuffle(data):
decorated = [(random(), x) for x in data]
decorated.sort()
return [x[1] for x in decorated]
or shorter but possible less readable (and only in 2.4+):
def shuffle(data):
return [y[1] for y in sorted([(random(), x) for x in data])]
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
> But isn't that how a reasonable sorting algorithm should behave? Less
> work to do if the data is already sorted?
An already sorted list can be pathological for Quicksort, depending on
how you code it.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
7;three']]
>>> [x for x in y for y in beta]
['C', 'C', 'C']
>>> [y for y in beta]
[['one', 'two', 'three'], ['one', 'two', 'three'], ['one', 'two',
'three']]
>>> [x for x in y for y in beta]
['one', 'one', 'one', 'two', 'two', 'two', 'three', 'three', 'three']
Shoudn't both lines '[x for x in y for y in beta]' produce the same
list?
I'm guessing I'm the one confused here... but I'm confused! What's
going on?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
e, I changed mine
to:
"C:\Python\python.exe" -i "%1" %*
The exact line will depend on where your python.exe is.
OK all the dialogs you've opened, then double click a .py file to test
it.
*I'm using WinXP, so the exact name of some of the buttons may be
different for you.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
> > read manual for more details...
>
> Ok, I'd like to. But which one?
> I was reading http://www.wxpython.org/docs/api/wx.ComboBox-class.html
> and didn't even find the above mentioned append method :-(
>
> TIA,
> Roland R.
wxComboBox inherits from wxControlWi
> s.sendto('\xff'*6 + 'mac_string'*16, ('192.168.1.255', 80))
>
> Thiis also didnt work.
>
>
> Since the MAC adddress are hexadecimal, how should I go about it here.
>
> Please help, every help is appreciated. Thanks
See http://docs.python.org/li
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
ets with Ms Access are not void).
> Some help is welcome,
> Thanks in advance
> Luis
I don't know if it's the problem your asking about, but your
rs.MoveNext() should be inside the while loop, no?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
>
of course the empty list),
which is then appended to, but is not stored anywhere. If you want to
insert str(col) then use p.insert
Iain
--
http://mail.python.org/mailman/listinfo/python-list
lement inside p. It gives
> you a new sublist containing one element from p. You then append a
> column to that sublist. Then, since you do nothing more with that
> sublist, YOU THROW IT AWAY.
>
> Try doing:
>
> p[j] = p[j].append(col)
>
No, this doesn't work. append is an in-place operation, and you'll end
up setting p[j] to it's return, which is None.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
s.path.split (so it should be fairly
compatible):
def split(path):
h,t = os.path.split(path)
if h == path:
return [h]
else:
return split(h) + [t]
You could throw in os.path.splitdrive and os.path.splitunc, if you
wanted to be really complete.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
open image with wxPython
except:
fail
Right now my program to compile multipage tiffs no longer does any of
the image work itself - it processes the index file, and then generates
a batch file. The batch file is a lot of calls to irfanview /append.
I've yet to find a tiff irfanview can't open.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
f wake_up_key_pressed:
paused = False
or with a gui:
paused = False
def pause():
global paused
paused = True
while paused:
time.sleep(1)
def onWakeUpButton(): #bind this to button
global paused
paused = False
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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.or
ary sorted in this order.
> new_d = dict(zip(keys, vals))
>
> How can I use the two lists, keys and vals to create a dictionary such
> that the items keep their order?
>
> Thanks.
Short answer - you can't. Dictionaries aren't sequential structures,
so they have no
again, but which is also not neatly rolled up into a function,
> such as combining the return statements with a printing of ?
I think I've answered this too?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
s = ""
for c1,c2 in [x for x in zip(s1,s2)]:
s += lowerChar(c1,c2)
return s
but it's hardly any more elegant than using a loop counter, and I'm
guessing it's performance is a lot worse - I assume that the zip
operation is extra work?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
here a redirect command somewhere within Python CGI that can
> get this done instead as I would actually prefer to have the CGI code
> execute this rather than depend on the HTML to do it.
>
> Thanks,
>
> Harlin Seritt
this snippet works (from code I wrote to implement a shoutbox):
print '''
Please wait...
'''
I assume your version doesn't work because of the uppercase 'R'.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
r more info, see the string method docs:
> > http://docs.python.org/lib/string-methods.html
> > To do what you're trying to do, try this:
> >
> > >>> prefix = 'hello '
> > >>> bar = 'hello world!'
> > >>> if bar.startswith(prefix): bar = bar[:len(prefix)]
> > ...
> > >>> bar
> > 'world!'
>
>
> Apologies, that should be:
>>>> prefix = 'hello '
>>>> bar = 'hello world!'
>>>> if bar.startswith(prefix): bar = bar[len(prefix):]
>...
>>>> bar
>'world!'
>
or instead of:
a.strip('')
use:
a.replace('','')
Iain
--
http://mail.python.org/mailman/listinfo/python-list
, one of us is being really really dense today :) I hope it's not
me...
what's wrong with:
i = 0
for object in list:
objectIndex = i
print objectIndex
i += 1
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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.
and set a status bar to the total found, or whatever else you
want to do.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
imeStamp, "%Y-%m-%d_
%H:%M"))
return (runTimeStamp - lastUpdate) / ONEDAY >= OLDNESS_THRESHOLD
if not isOld(auctionDate, currentTime):
checkForBid()
Iain
--
http://mail.python.org/mailman/listinfo/python-list
the
> KHz.
>
> There are probably other more Pythonic ways...
>
I always use:
state = 1 - state
for toggles. I doubt it's much more pythonic though :)
Iain
--
http://mail.python.org/mailman/listinfo/python-list
rgs, **kwargs)
for varname in delete:
del(g[varname])
return t
class Test(object):
x = 1
@noself
def test(self):
print x
>>> foo = Test()
>>> foo.test()
1
--
FTR, I won't be using this :) I do like this syntax though:
class Vector:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
def abs(self):
using self:
return math.sqrt(.x*.x + .y*.y + .z*.z)
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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 =
ction (in this case
Process) finishes. The ugly (None,) tuple in the start_new_thread /
dummy=None Process parameter are because the start_new_thread function
demands a tuple of arguments, even when none are required.
see http://www.python.org/doc/current/lib/module-thread.html for more
info.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
r
I find slice notation consistent and elegant - did it come form another
language?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
ort re
def countMatches(names, namePattern):
count = 0
for name in names:
if namePattern.match(name):
count += 1
return count
susie = re.compile("Su(s|z)(i|ie|y)")
print countMatches(["John", "Suzy", "Peter", "Steven", "Susie
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 *
ff.
Anyone know?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
ly exactly what I did. (well, I converted to jpg, because
they're going to end up as jpg anyway).
bah
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
on into iterative code. I'm wondering if the python compiler
does the same?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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. The
not actually allow a mix of tabs and spaces for
> indentation there would be no problem - the compiler could throw out an
> exception for mixed characters.
python -tt
> In reality, neither of these are likely
> to be implemented any time soon!
um
Iain
--
http://mail.python.org/mailman/listinfo/python-list
error on the line
s1 = Student("Brian", "Smith", "N")
This is because when you use 'import Student', it loads the file
Student.py into a namespace called Student (unlike the 'from'
statement, which loads it into the main namespace). to access anythin
In article <[EMAIL PROTECTED]>,
Tim X <[EMAIL PROTECTED]> wrote:
> I also seem to remember a page on his website from a couple of years
> back in which he admits enjoying trolling and starting flame wars -
> but I can't find it now, so maybe I'm mistaken.
http://web.archive.org/web/200502041726
d not be found
I put a 'print self._name' in the ctypes __init__ file, just before
line 296 - it's printing out the 'find' just before the error.
So, in what specific way have I screwed up the install?
Iain
--
http://mail.python.org/mailman/listinfo/python-list
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
(they seem to be
strong on polynomial fitting, but not, apparently, on trig functions) and I
wondered if any one here had recommendations?
Something that implemented IEEE 1057 , or similar, would be perfect.
TIA
Iain
--
http://mail.python.org/mailman/listinfo/python-list
Thanks folks - I'll have a think about both of these options.
--
http://mail.python.org/mailman/listinfo/python-list
', ')]
This will fall over if xyz or abc include any of the characters your
stripping/splitting on (e.g if xyz is actually "To be or not to be,
that is the question"). Unless you can guarantee they won't, you'll
need to write (or rather use) a parser that understands the syntax.
Iain
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 174 matches
Mail list logo