> ANSI is the standard for terminal control, so I usually code for
> that, but put it in a separate module so that other terminals can
> easily be accommodated.
It certainly used to be under MS DOS but I find very few windows
machines set up to use ANSI codes. Do you know any way t
I don't know if this will do anywhere near what you want...
http://swiginac.berlios.de/
is a set of Python bindings to GiNaC, which handles symbolic maths in
C/C++.
Matt
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/t
Vincent Wan wrote:
> Dear all,
>
> I have a simple program that calls a function I got off of active
> state that draws
> a tree given a description of it in standard string form.
>
> My code generates a string description and calls the function to draw
> the tree.
> Instead of drawing the tr
mike donato wrote:
> I believe in academic honesty and so I am not inclining to cheating just
> seeking support for the given language so I may develop the fundamental
> skills to work thru the excercises.
>
> Any assistance which can be provided will be greatly appreciated.
Ask questions here
Roel Schroeven wrote:
>
> You'll have to modify your code so that it creates a tuple instead of a
> string.
It seems that doing it without using a string complicates matters, or at
least increases the line count. I tried it with a list, since you can't
build a tuple on the go since tuples are imm
Hi Mike,
> Greetings, I am an Information Technology student and am seeking a mentor
> for the Python Language.
Treat this mailing list as a virtual mentor.
We will take questions either theoretical, conceptual or practical.
Tell us what you need help with, tell us what you've done to try to
so
* Kent Johnson <[EMAIL PROTECTED]> [051112 20:33]:
> Tim Johnson wrote:
> >I need to get up to speed on iterators. I learned python 1.5~ via
> >Alan G's book ...
> >For an example, I've written a subclass of dict where keys are kept in
> >a ordered fashion is a list called __keys:
> >
> >#Here is m
Tim Johnson wrote:
> Question: Can one subclass an iterator object?
> thanks for making this a little clearer.
Most *classes* can be subclassed. What do you have in mind?
--
http://www.kentsjohnson.com
___
Tutor maillist - Tutor@python.org
http:
On 14/11/05, Tim Johnson <[EMAIL PROTECTED]> wrote:
> Now if I assign a value to the iteritems method, as in
> it = s.iteritems()
> I get an object of
> and dir(it) shows that (it) has one public method - next().
Yep. The normal way to use an iterator is in a for loop.
So, if you've don
* John Fouhy <[EMAIL PROTECTED]> [051113 12:16]:
> On 14/11/05, Tim Johnson <[EMAIL PROTECTED]> wrote:
> > Now if I assign a value to the iteritems method, as in
> > it = s.iteritems()
> > I get an object of
> > and dir(it) shows that (it) has one public method - next().
>
> Yep. The nor
* Kent Johnson <[EMAIL PROTECTED]> [051113 12:04]:
> Tim Johnson wrote:
> > Question: Can one subclass an iterator object?
> > thanks for making this a little clearer.
>
> Most *classes* can be subclassed. What do you have in mind?
Oh, I'm just playing right now but what is the
iter
Someone correct me if I'm wrong, but I believe there is no specific iterator
object, but rather objects that have a method for __iter___...
Liam Clarke-Hutchinson
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim
Johnson
Sent: Monday, 14 November 2005 1
* Liam Clarke-Hutchinson <[EMAIL PROTECTED]> [051113 12:41]:
> Someone correct me if I'm wrong, but I believe there is no specific iterator
> object, but rather objects that have a method for __iter___...
Some light is slowly dawning here (I think) from
http://docs.python.org/ref/yield.
Tim Johnson wrote:
> * Liam Clarke-Hutchinson <[EMAIL PROTECTED]> [051113 12:41]:
>
>>Someone correct me if I'm wrong, but I believe there is no specific iterator
>>object, but rather objects that have a method for __iter___...
>
>
> Some light is slowly dawning here (I think) from
>
Well put. Got it.
Thanks Kent
tj
* Kent Johnson <[EMAIL PROTECTED]> [051113 14:44]:
> Tim Johnson wrote:
> > * Liam Clarke-Hutchinson <[EMAIL PROTECTED]> [051113 12:41]:
> >
> >>Someone correct me if I'm wrong, but I believe there is no specific iterator
> >>object, but rather objects that have a
I have a list of strings and wanted to output them as a single delimited
string.
Eg
('ab','cd','ef') becomes "ab:cd:ef"
My first attempt was to do it as a function:
def Addsomething(a):
y = []
for x in a:
y.append( x + ':')
return "".join(y)
I then conv
On 14/11/05, Roy Bleasdale <[EMAIL PROTECTED]> wrote:
> I have a list of strings and wanted to output them as a single delimited
> string.
>
> Eg
>
> ('ab','cd','ef') becomes "ab:cd:ef"
You almost had it ...
What about:
>>> lst = ['ab', 'cd', 'ef']
>>> ':'.join(lst)
'ab:cd:ef'
In general, foo.j
Thank you Roel Schroeven
I don't know how I missed the fact that the printDendrogram function
needs tuples not strings.
I didn't recognize that my string was a tuple so I didn't realize
that when I pasted it interactively
in IDEL I was allowing python to change the type.
eval() changes the ty
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I have written a small peg game using Pygame.
This is the first working version. I have a
request and a couple of perhaps silly questions.
To anyone willing to take the time to have a
look at the code and offer any advice or
suggestions, I would be m
Folks,
I’m one of the people new to Python who has started
going through a beginner’s book to learn the basics of the language (“Python
Programming for the Absolute Beginner”). In the second chapter the
author (Michael Dawson) illustrates the use of escape sequences with, among
other t
> eval() changes the type from string to tuple. But, to my surprise
> tuple() does not yeild the tuple that is represented by the string but a
> tuple representation of the string.
>
> If eval() does convert correctly why not use it? The string will always
> be a valid tuple.
Hi Vincent,
Altern
Could this be a OS thing?
I use Linux and it works here.
Steve Haley wrote:
Folks,
I’m one of the people new
to Python who has started
going through a beginner’s book to learn the basics of the language
(“Python
Programming for the Absolute Beginner”). In the second chapt
I use windows, it works for meHave checked your sound card, volume before trying the code?pujoOn 11/14/05, Johan Geldenhuys <
[EMAIL PROTECTED]> wrote:
Could this be a OS thing?
I use Linux and it works here.
Steve Haley wrote:
Folks,
I'm one of the people new
to
23 matches
Mail list logo