Re: [Tutor] Python and rpy

2007-01-14 Thread Geoframer

I actually had Numeric under WinXP also, manually installed it and could
import Numeric so that wasn't it imho.

On 1/11/07, Hugo González Monteverde <[EMAIL PROTECTED]> wrote:


Geoframer wrote:
>
> However i switched to Ubuntu 6.10 today (from WinXP) and to my suprise
> it does work under linux! :-)

Probably Numeric is included in Ubuntu's  Python distro.

Hugo

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Is Python the language for me?

2007-01-14 Thread Andy
Hey everyone, I'm looking to get the opinions of some people with more
experience then myself.  Currently I only have time to learn one
language and I'm torn between C++ and Python.  Eventually I would like
to make a game, nothing too extravagant, a turn based strategy game to
be exact.  I'm not planning on having crazy graphics effects, I'm
going to focus on game play.  Anyway, I'm getting a little off course
here.  I want to learn one of the two mentioned languages with the end
goal to be able to make my game.  I know it's a long way off before
I'll be able to make it so please don't assume that I'm going to jump
right in expecting to make this in a matter of months.  Besides the
game, I have all kinds of ideas for small little programs that I would
like to make.

I would honestly rather use Python then C++ but I have a few concerns.
 How hard is it to manage a large project in Python vs. C++?  If I do
decide to use Python I would be using Pygame for the graphics end of
things.  From what I can tell, Pygame does not work with the current
release of Python, that's one of the things that causes me to worry.
If I finish this game and release it, are people going to constantly
be having to upgrade Python and Pygame for it to keep working?  And
how much really changes between releases?

Python has built in access to a windowing toolkit (Tkinter), C++ can
of course use the native windows/linux/mac API but that seems like
more of a hassle to me.  Once the C++ program has been compiled it's
much easier to distribute.  C++ has a much higher learning curve and
development time then Python does.  Python has a much nicer community
built around it then C++ from what I can see though.

So as you can see I feel that each language has it's own pro's and
con's and I might end up learning them both eventually.  Do you all
think Python will work for what I want right now?  My biggest concern
with Python is the upkeep involved in trying to distribute your
applications.  Do updates to Python usually cause issues?  Why would
something like Pygame work with Python 2.4 but not 2.5?

I'm sorry if this is a horribly dumb question but I've been looking
around and I can't find the answer to these on my own.  Thank you all
for any help you can give me.

-- 
-Andy
"I have a great faith in fools; self-confidence my friends call it." –
Edgar Allen Poe
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Change the font size of the lines and rectangle on a Tkinter Canvas

2007-01-14 Thread Asrarahmed Kadri

Hi Folks,

I have a Tkinter canvas on which there are two axes: X and Y and a
horizontal bar chart.

I want to provide with a functionality of changing the font size, in this
case the width of the lines.

Is it possible to do it dynamically; I mean the graph is already drawn, now
with a Menu, suppose I want to provide the user with options of 50%, 100%
and 200% font size.

Can you tell me how to do it.?

Thanks in anticipation.

Best Regards,
Asrarahmed


--
To HIM you shall return.
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Is Python the language for me?

2007-01-14 Thread Luke Paireepinart
Andy wrote:
> Hey everyone, I'm looking to get the opinions of some people with more
> experience then myself.  Currently I only have time to learn one
> language and I'm torn between C++ and Python.  Eventually I would like
> to make a game, nothing too extravagant, a turn based strategy game to
> be exact.  I'm not planning on having crazy graphics effects, I'm
> going to focus on game play.  Anyway, I'm getting a little off course
> here.  I want to learn one of the two mentioned languages with the end
> goal to be able to make my game.  I know it's a long way off before
> I'll be able to make it so please don't assume that I'm going to jump
> right in expecting to make this in a matter of months.  Besides the
> game, I have all kinds of ideas for small little programs that I would
> like to make.
>   
Sound like reasonable goals to me :)
> I would honestly rather use Python then C++ but I have a few concerns.
>  How hard is it to manage a large project in Python vs. C++?
I have found things that would be a 'large project' in C++ often aren't 
nearly as large in Python.
I think if you have a large project in Python, the equivalent project in 
C++ would be much harder to manage.
you can use packages and such to keep your code manageable.  It's 
probably a good idea to keep your code separated
from the get-go when you reach the time to make your game, because it'll 
eventually get to the point where you'll need to break it apart,
so you'd be doing yourself a favor.
>   If I do decide to use Python I would be using Pygame for the graphics end of
> things.  From what I can tell, Pygame does not work with the current
> release of Python, that's one of the things that causes me to worry.
> If I finish this game and release it, are people going to constantly
> be having to upgrade Python and Pygame for it to keep working?  And
> how much really changes between releases?
>
> Python has built in access to a windowing toolkit (Tkinter), C++ can
> of course use the native windows/linux/mac API but that seems like
> more of a hassle to me.  Once the C++ program has been compiled it's
> much easier to distribute.  C++ has a much higher learning curve and
> development time then Python does.  Python has a much nicer community
> built around it then C++ from what I can see though.
>   
Okay, first thing to note:  a lot of Python developers prefer wxPython 
to Tkinter.
There is an equivalent library in C++, since wxPython is really just a 
light wrapper around wxWindows.
There's a big community around that project, and I doubt it would be too 
much harder to learn wxWindows vs wxPython.
(Trying not to sound too biased toward Python :) )

Now to address your concern about Python and Pygame:
If your program works with a certain version of Python and Pygame,
say  Python 2.4.4 and pygame 1.7,
it will continue to work for Python 2.x.  Python versions maintain 
backward compatibility very well,
but in Python 3000, they're going to break backward compatibility.
I believe the same is the case in Pygame versions (unless they make the 
1.8 release use NumPy instead of Numeric,
which would require a few changes to some people's code, likely only a 
line or two.)
So once you write your game, people will be able to upgrade and it will 
continue working.
But there's no reason for them to upgrade unless they need the new 
features of the new versions.

Also, something that should really ease your concerns:
You can create .exes with Python that will contain a static instance of 
whatever modules you had installed
at the point when you run py2exe (or some other packaging program) that 
are used in your game.
So if you use Numeric version 2.55 and Python 2.4.3 and Pygame 1.7, then 
those versions of the packages
will be included in a file you can distribute.  Well, it's not a single 
file, but a zipped collection of files.
In that case, people don't even need Python installed on their computer 
to run your game!
It also doesn't interfere with any Python versions they may have 
installed on their computer.

So in that case you don't have to worry at all about people upgrading 
libraries, just like you wouldn't if you were to make
a binary in C++.
> So as you can see I feel that each language has it's own pro's and
> con's and I might end up learning them both eventually.  Do you all
> think Python will work for what I want right now?  My biggest concern
> with Python is the upkeep involved in trying to distribute your
> applications.  Do updates to Python usually cause issues?  Why would
> something like Pygame work with Python 2.4 but not 2.5?
>   
As an introductory language to Computer Science I'd recommend Python.
You spend less time trying to understand the language itself and more 
time learning abstract concepts like
how a merge sort works, inheritance, classes, 'self', and things like that.
Once you understand all of these things, C++ will be greatly easier to 
pick up, as should most Object-Oriented languages be.
I think if you