> Cygwin (http://www.cygwin.com/) It gives you a bash shell in
> Windows.
Actually it gives you a whole Unix environment including X Windows
and over 500 unix command line tools plus GNU C, sendmail, etc etc...
Alan G.
___
Tutor maillist -
> for f, x in bunch_of_files, range(z):
...
> Or maybe can I access the number of times the
> loop has run?
I think thats what enumerate does...
>>> for x,y in enumerate([1,3,5]):
... print x,y
...
0 1
1 3
2 5
>>>
Yep, looks like what you need.
Alan G
Author
untion twice if you want to
make the intent even more explicit...
Alan G.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
subtle bugs (like my untested one-liner did!)
then better to be slowly correct than rapidly wrong... :-)
Alan G.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
calls the comon function passing the
source id as an argument. The source Id is set up as a default
parameter value in the lambda definition.
HTH,
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Then it might start to run although not necessarily correctly.
Alan G.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
such lists is fine, using code
jointly developed is a legal quagmire. However given the
nature of the code Nathan is producing and the prices
he's charging I doubt if we are going to be contesting
our share of his millions! It seems pretty harmless at
this level.
Alan G
Author of the Le
trip() + "Hi!"
HTH,
There is more on this topic in the file handling
topic of my tutorial.
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
y help here.
See the Simple Sequences topic on my tutor for
examples of string formatting.
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ers, it's in the
individual's own interests to maximise their own input.
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
the new Win32 API
and the older 16 bit Win 3 API.
Why 'thunk' I do not know but the term seems to have stuck long
after everyone stopped using Win32 thunks...
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
_
ass will ensure that all the values
that should be there are indeed present.
> Is there an object structure that will let updates to one instance
> affect all instances?
A class method is the traditional way of doing that.
Get the init method to update a global (or class based)
approach is probably best IMHO (whether you
parametereise the iterations and condition is optional,
it just makes the function as geeric as possible...)
HTH,
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ested
lists rather than tuples but it should work for either)
Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
>> can't use import because then Python would try to parse the HTML
>> from the
>> imported file.
>
> I thought PHP also parsed any html rendered through an included
> file?
It does but PHP 'understands' HTML
ython tends to support vanilla CGI and to do PHP style coding you
need add-ins like PSP(the first suchj and therefore the most basic)
Either move up to a more powerful engine, like Zope, or adapt to CGI
style coding.
There are many web frameworks for Python but my needs are met
by CGI at
resents the names
to the user(as strings) in which case a mapping has to
exist somewhere already.
I'm curious as to how you are addressing those issues?
Is this something that only developers will be using?
How will the user know what names are possible?
Alan G.
_
shame since MI is where super() should
be most useful... But in my experience MI in Python is
definitely a place where explicit is better than implicit.
Alan G.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
Apologies for top posting I blame the tablet!
Malcolm, don't make us guess, show us how you put the quotes in and the
error messages (in full).
Alan g.
Sent from my Fonepad
Malcolm Boone wrote:
So you are saying the right side should be a string, how do I do
):
** ** def add_string(*args, **kwargs):** # in case f takes arguments
** ** ** ** return "decorated "+ str(f(*args,**kwargs))
** ** return add_string
Now we can apply that to a function
@prepend
def cube(n): return n*n*n
cube(3)
I'm biased beca
n possible ways to "display a picture"
depending on what you specifically want.
--
Alan G
Author of the Learn to Program web site
[2]http://www.alan-g.me.uk/
[3]http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
[4]http:
301 - 321 of 321 matches
Mail list logo