Re: Getting started with python

2017-10-30 Thread Bill

subhendu.pand...@gmail.com wrote:

Hi,

Could you please help me with the below if possible:


Possible and reasonable are two different things.  Why don't you try 
some web searches and try to answer some of your own questions.  I offer 
this advice as a Python newbe myself.


Bill




1. Best site to go ahead for python.
2. How python is different from other languages and future scope of it.
3. Tasks that are getting done using python in present.
4. Link where I can be able to get python videos, ebooks from basics to expert 
level free.

Thanks
Subhendu


--
https://mail.python.org/mailman/listinfo/python-list


Getting started with python

2017-10-30 Thread subhendu . panda93
Hi,

Could you please help me with the below if possible:

1. Best site to go ahead for python.
2. How python is different from other languages and future scope of it.
3. Tasks that are getting done using python in present.
4. Link where I can be able to get python videos, ebooks from basics to expert 
level free.

Thanks
Subhendu
-- 
https://mail.python.org/mailman/listinfo/python-list


Getting started with Python: The ultimate list with Tips, Tools and Resources

2013-03-13 Thread Manish
Getting started with Python: The ultimate list with Tips, Tools and Resources
http://lurnq.com/lesson/Getting-started-with-Python-Tips-Tools-and-Resources/

Here is a lesson which includes a great set of resources including Books, 
MOOCs, Video Tutorials, Interactive tutorials, exercises which can get you 
started with Python. I have included my review along with some resources, which 
I have used while teaching Python myself. 

If I missed out some good book or resources, do leave the link as a comment so 
that I can update the list. 

Thanks
-- 
http://mail.python.org/mailman/listinfo/python-list


Getting started with Python: The ultimate guide with Tips, Tools and Resources

2013-03-06 Thread Manish
Getting started with Python: Tips, Tools and Resources
http://lurnq.com/lesson/getting-started-with-python-tips-tools-and-resources/

This is a lesson I published on LurnQ which acts like a beginners guide. I have 
included various Books, MOOCs, Video Tutorials, Interactive tutorials, 
exercises which can get you started with Python. I have included my review 
along with some resources, which I have used while teaching Python myself. 

Any form of feedback is most welcome. Also, if I missed out on any good 
learning resource, do leave it as a comment. I will update the list. 

Thanks
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python on macintosh snow leopard with mysql - need help

2010-07-14 Thread Ned Deily
In article 
,
 Benjamin Kaplan  wrote:

> On Sun, Jul 11, 2010 at 1:18 PM, dk  wrote:
[...]
> > when i try to compile mysql-python-1.2.3 i get the following error
> > returned from python setup.py build -
> >
> > building '_mysql' extension
> > gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing
> > -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -
> > D__version__=1.2.3 -I/usr/local/mysql/include -I/Library/Frameworks/
> > Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/
> > temp.macosx-10.3-fat-2.6/_mysql.o -g -Os -arch x86_64 -fno-common -
> > D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -
> > DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
> > In file included from /Library/Frameworks/Python.framework/Versions/
> > 2.6/include/python2.6/unicodeobject.h:4,
> >                 from /Library/Frameworks/Python.framework/Versions/
> > 2.6/include/python2.6/Python.h:85,
> >                 from pymemcompat.h:10,
> >                 from _mysql.c:29:
> > /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error:
> > stdarg.h: No such file or directory
> > In file included from _mysql.c:36:
> > /usr/local/mysql/include/my_config.h:1053:1: warning: "HAVE_WCSCOLL"
> > redefined
> > In file included from /Library/Frameworks/Python.framework/Versions/
> > 2.6/include/python2.6/Python.h:8,
> >                 from pymemcompat.h:10,
> >                 from _mysql.c:29:
> > /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/
> > pyconfig.h:808:1: warning: this is the location of the previous
> > definition
> > error: command 'gcc-4.0' failed with exit status 1
> > --
> 
> Strange. Seems that the package is trying to use gcc-4.0 and the
> MacOSX10.4 SDK. The default version of gcc on Snow Leopard is 4.2, and
> XCode only comes with the SDKs for the previous two versions of OS X.

Not strange at all.  The python.org Python 2.6 (which is installed to 
/Library/Frameworks/Python.framework) is deliberately built to be 
compatible with OS X 10.3.9 through 10.6 and, as such, requires gcc-4.0 
and the 10.4u SDK.  The latter is included in the 10.6 Xcode 
distribution as a separate package but is not installed by default; to 
build a Python C extension module for that Python, you need to go back 
to the Xcode installer for Snow Leopard (or download a new one from 
Apple) and do a custom installation of that SDK.

-- 
 Ned Deily,
 n...@acm.org

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python on macintosh snow leopard with mysql - need help

2010-07-11 Thread Benjamin Kaplan
On Sun, Jul 11, 2010 at 1:18 PM, dk  wrote:
> I have been going round and round trying to configure python 2.6
> running on osx 10.6.x to work with mySQL 5.1.44.
> Python seems to work ... i have an installation of mysql 5.1.44
> running and have used it in conjunction for other php/apache projects.
>
> I want to learn python and think i need a better database then mysql
> lite that installs with the web2py frame work, so my quest to connect
> to mysql or postgres began.
>
> I seem to be stuck stuck getting mySQLdb drivers installed.  I down
> loaded python 2.6.5 from the python site and MySQL-python-1.2.3 from
> the my sql site.
> I have worked past numerous errors by i now get the errors below when
> i try to compile.
>
> -- some background that might help anyone kind enough to have read
> this far and who might be inclined to take pitty --
> I have (tried) to use macports to install setuptools (which MySQL-
> python-1.2.3 says it needs).
> MacPorts has put tons of stuff in /opt/local ... so i am not sure i am
> using this tool the way its intended.
> this could all be as simple as adding some path declarations in the
> right place but where?
>

That could be part of your problem. Macports basically ignores the
rest of the system. Setuptools depends on python, so Macports compiles
and installs its own version of Python in /opt/local. So you now have
3 different versions of Python 2.6 on your computer: /usr/bin/python
(the System python), /usr/local/bin/python (the Python.org python) and
/opt/local/Library/Frameworks/Python.Framework/Versions/2.6/bin/python.
You can use Macport's python-select package to choose which one is the
default (it symlinks one of them to /opt/local/bin/python which should
be first on your path).

Anyway, as long as you're using Macports :

sudo port install py26-mysql

that should solve most of your problems :)

> lots of the post i have seen on the subject talk about 32/64
> installation ... it makes sense that you might need to be consistent
> in getting your components to work together, but i am not sure how i
> tell of the various parts i have install which and how they were
> compiled.
>
> whereis python  display  /usr/bin/python
> python -v spits out lots ... but here is a sample:
>
> # /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
> encodings/utf_8.pyc matches /Library/Frameworks/Python.framework/
> Versions/2.6/lib/python2.6/encodings/utf_8.py
> import encodings.utf_8 # precompiled from /Library/Frameworks/
> Python.framework/Versions/2.6/lib/python2.6/encodings/utf_8.pyc
> Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55)
> [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
>
>
>
>
>
> when i try to compile mysql-python-1.2.3 i get the following error
> returned from python setup.py build -
>
> building '_mysql' extension
> gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing
> -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -
> D__version__=1.2.3 -I/usr/local/mysql/include -I/Library/Frameworks/
> Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/
> temp.macosx-10.3-fat-2.6/_mysql.o -g -Os -arch x86_64 -fno-common -
> D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -
> DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
> In file included from /Library/Frameworks/Python.framework/Versions/
> 2.6/include/python2.6/unicodeobject.h:4,
>                 from /Library/Frameworks/Python.framework/Versions/
> 2.6/include/python2.6/Python.h:85,
>                 from pymemcompat.h:10,
>                 from _mysql.c:29:
> /Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error:
> stdarg.h: No such file or directory
> In file included from _mysql.c:36:
> /usr/local/mysql/include/my_config.h:1053:1: warning: "HAVE_WCSCOLL"
> redefined
> In file included from /Library/Frameworks/Python.framework/Versions/
> 2.6/include/python2.6/Python.h:8,
>                 from pymemcompat.h:10,
>                 from _mysql.c:29:
> /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/
> pyconfig.h:808:1: warning: this is the location of the previous
> definition
> error: command 'gcc-4.0' failed with exit status 1
> --

Strange. Seems that the package is trying to use gcc-4.0 and the
MacOSX10.4 SDK. The default version of gcc on Snow Leopard is 4.2, and
XCode only comes with the SDKs for the previous two versions of OS X.
-- 
http://mail.python.org/mailman/listinfo/python-list


Getting started with python on macintosh snow leopard with mysql - need help

2010-07-11 Thread dk
I have been going round and round trying to configure python 2.6
running on osx 10.6.x to work with mySQL 5.1.44.
Python seems to work ... i have an installation of mysql 5.1.44
running and have used it in conjunction for other php/apache projects.

I want to learn python and think i need a better database then mysql
lite that installs with the web2py frame work, so my quest to connect
to mysql or postgres began.

I seem to be stuck stuck getting mySQLdb drivers installed.  I down
loaded python 2.6.5 from the python site and MySQL-python-1.2.3 from
the my sql site.
I have worked past numerous errors by i now get the errors below when
i try to compile.

-- some background that might help anyone kind enough to have read
this far and who might be inclined to take pitty --
I have (tried) to use macports to install setuptools (which MySQL-
python-1.2.3 says it needs).
MacPorts has put tons of stuff in /opt/local ... so i am not sure i am
using this tool the way its intended.
this could all be as simple as adding some path declarations in the
right place but where?

lots of the post i have seen on the subject talk about 32/64
installation ... it makes sense that you might need to be consistent
in getting your components to work together, but i am not sure how i
tell of the various parts i have install which and how they were
compiled.

whereis python  display  /usr/bin/python
python -v spits out lots ... but here is a sample:

# /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
encodings/utf_8.pyc matches /Library/Frameworks/Python.framework/
Versions/2.6/lib/python2.6/encodings/utf_8.py
import encodings.utf_8 # precompiled from /Library/Frameworks/
Python.framework/Versions/2.6/lib/python2.6/encodings/utf_8.pyc
Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin





when i try to compile mysql-python-1.2.3 i get the following error
returned from python setup.py build -

building '_mysql' extension
gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing
-fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -
D__version__=1.2.3 -I/usr/local/mysql/include -I/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/
temp.macosx-10.3-fat-2.6/_mysql.o -g -Os -arch x86_64 -fno-common -
D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -
DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL
In file included from /Library/Frameworks/Python.framework/Versions/
2.6/include/python2.6/unicodeobject.h:4,
 from /Library/Frameworks/Python.framework/Versions/
2.6/include/python2.6/Python.h:85,
 from pymemcompat.h:10,
 from _mysql.c:29:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error:
stdarg.h: No such file or directory
In file included from _mysql.c:36:
/usr/local/mysql/include/my_config.h:1053:1: warning: "HAVE_WCSCOLL"
redefined
In file included from /Library/Frameworks/Python.framework/Versions/
2.6/include/python2.6/Python.h:8,
 from pymemcompat.h:10,
 from _mysql.c:29:
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/
pyconfig.h:808:1: warning: this is the location of the previous
definition
error: command 'gcc-4.0' failed with exit status 1
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-18 Thread [EMAIL PROTECTED]
On Apr 17, 11:00 pm, Basilisk96 <[EMAIL PROTECTED]> wrote:
> On Apr 14, 8:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
>
> > Hello, after reading some of the book Programming Python it seems that
> > python is something I would like to delve deeper into. The only thing
> > is, I have no idea what I should try and write. So I was hoping that
> > someone here could help point me to a group/project that would be a
> > good starting place for a person with limited python knowledge, but
> > that is willing to learn whatever is necessary. I'm hoping that with a
> > goal I can start to learn python instead of just playing around with
> > it. Thanks.
>
> Eric,
>
> You will certainly appreciate how concise and easy Python is.
> I am also relatively new to Python (started about a year ago), and I'd
> rather not go back to any other language! Why would I want to torment
> my not-so-quick typing fingers?? :)  I'm a self-learner. I learn by
> reading, by example, and by doing.
>
> Here is a list of suggestions. Start with simple things, grow
> confident, and move on to more interesting stuff as you progress:
>
> At the Python command line, type "import this" to see the basic ideas
> behind Python development. It begins with "Beautiful is better than
> ugly." - a nice thought.
>
> 1. First of all, read the publication "How to Think Like a Computer
> Scientist: Learning with Python" by Allen B. Downey et al.  I have
> found this little gem to be very, very useful when I first got
> interested in Python and thought to myself, "how do I go about
> learning this, where do I start??".  Highly recommended. I read it
> from start to finish in a couple of days and started making useful
> scripts right after that.  The author actually implements a simple
> card game toward the end of the book, using all the knowledge from the
> previous chapters.  The text is available 
> at:http://www.ibiblio.org/obp/thinkCSpy/
>
> 2. Play with Python from the command line first, using PyShell,
> PyCrust, or any of its other siblings that come with the wxPython
> package (a GUI toolkit - see #8 below).  You will find the code
> completion feature and the syntax helper quite useful.
>
> 3. Tinker around with the builtin modules.  There's a lot of built-in
> functionality in Python right out of the box. Try the "os" and "sys"
> modules to experiment with filesystem handling. Try reading and
> writing text files, as this is quite a common task with a variety of
> applications. Try the "struct" module for binary file processing.  Try
> the "urllib" and "urllib2" modules for loading and processing Web
> pages... I could go on, but you get the idea.
>
> 4. If you have a text processing background, dip your hand in regular
> expressions with the "re" module. Maybe you have a need for extracting
> some statistical data from a financial report, and this might be one
> way to do it.
>
> 5. If you have a mathematical background, download and install the
> NumPy or SciPy package and do some wild matrix math!
>
> 6. I have recently tinkered with the Pymedia package, perhaps you want
> to try it later on.  It is a nice tool for dealing with audio - for
> recording, encoding, decoding, spectrum analysis, etc.  In just a few
> hours, I came up with a nice voice-activated MP3 sound recorder
> application.
>
> 7. If you feel brave and want to work with Windows COM client/server
> stuff (assuming Windows is your platform), get the PythonWin package,
> also known as "win32com" and try to read/write Excel, Word files,
> etc., or whatever
>
> 8. Last but certainly not least, once you feel comfortable with basic
> Python, try GUI development.  Several gui toolkits are out there.
> wxPython is a good one to start with, though you may find some others
> to your liking.
>
> 9. If you have previous programming experience, try taking an
> application you've developed before and port it to Python.  See how
> much your code base shrinks compared to its C++ or Java counterpart :)
> But really, do it just to understand Python on a deeper level. Instead
> of thinking in the old way, try to think in the Pythonic way.  A nice
> example of this is iteration.  Where an iteration counter variable is
> required in most other languages, Python inherently supports iteration
> in sequence objects like lists, strings, and dictionary keys; so the
> syntax is simpler in most cases.
>
> -Basilisk96

 I choose python with a goal in mind the language was not
important..  Python is fantastic for input and output..  Once in a
while I get stuck and to be honest if I had a little more cash I would
be putting a small project on rent a coder that said tracker software
where the notes are defined in collums are great for practicing input
output, I can always do that myself but if there is a interest (or if
a intresting idea presents itself because small projects can be
linked) then I am game...  good luck to all of you and happy learning

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-17 Thread Basilisk96
On Apr 14, 8:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
> Hello, after reading some of the book Programming Python it seems that
> python is something I would like to delve deeper into. The only thing
> is, I have no idea what I should try and write. So I was hoping that
> someone here could help point me to a group/project that would be a
> good starting place for a person with limited python knowledge, but
> that is willing to learn whatever is necessary. I'm hoping that with a
> goal I can start to learn python instead of just playing around with
> it. Thanks.

Eric,

You will certainly appreciate how concise and easy Python is.
I am also relatively new to Python (started about a year ago), and I'd
rather not go back to any other language! Why would I want to torment
my not-so-quick typing fingers?? :)  I'm a self-learner. I learn by
reading, by example, and by doing.

Here is a list of suggestions. Start with simple things, grow
confident, and move on to more interesting stuff as you progress:

At the Python command line, type "import this" to see the basic ideas
behind Python development. It begins with "Beautiful is better than
ugly." - a nice thought.

1. First of all, read the publication "How to Think Like a Computer
Scientist: Learning with Python" by Allen B. Downey et al.  I have
found this little gem to be very, very useful when I first got
interested in Python and thought to myself, "how do I go about
learning this, where do I start??".  Highly recommended. I read it
from start to finish in a couple of days and started making useful
scripts right after that.  The author actually implements a simple
card game toward the end of the book, using all the knowledge from the
previous chapters.  The text is available at:
http://www.ibiblio.org/obp/thinkCSpy/

2. Play with Python from the command line first, using PyShell,
PyCrust, or any of its other siblings that come with the wxPython
package (a GUI toolkit - see #8 below).  You will find the code
completion feature and the syntax helper quite useful.

3. Tinker around with the builtin modules.  There's a lot of built-in
functionality in Python right out of the box. Try the "os" and "sys"
modules to experiment with filesystem handling. Try reading and
writing text files, as this is quite a common task with a variety of
applications. Try the "struct" module for binary file processing.  Try
the "urllib" and "urllib2" modules for loading and processing Web
pages... I could go on, but you get the idea.

4. If you have a text processing background, dip your hand in regular
expressions with the "re" module. Maybe you have a need for extracting
some statistical data from a financial report, and this might be one
way to do it.

5. If you have a mathematical background, download and install the
NumPy or SciPy package and do some wild matrix math!

6. I have recently tinkered with the Pymedia package, perhaps you want
to try it later on.  It is a nice tool for dealing with audio - for
recording, encoding, decoding, spectrum analysis, etc.  In just a few
hours, I came up with a nice voice-activated MP3 sound recorder
application.

7. If you feel brave and want to work with Windows COM client/server
stuff (assuming Windows is your platform), get the PythonWin package,
also known as "win32com" and try to read/write Excel, Word files,
etc., or whatever

8. Last but certainly not least, once you feel comfortable with basic
Python, try GUI development.  Several gui toolkits are out there.
wxPython is a good one to start with, though you may find some others
to your liking.

9. If you have previous programming experience, try taking an
application you've developed before and port it to Python.  See how
much your code base shrinks compared to its C++ or Java counterpart :)
But really, do it just to understand Python on a deeper level. Instead
of thinking in the old way, try to think in the Pythonic way.  A nice
example of this is iteration.  Where an iteration counter variable is
required in most other languages, Python inherently supports iteration
in sequence objects like lists, strings, and dictionary keys; so the
syntax is simpler in most cases.

-Basilisk96

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-17 Thread Ross Ridge
James Stroud <[EMAIL PROTECTED]> wrote:
>py> t = timeit.Timer(stmt=s)
>py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
>40.88 usec/pass

7stud <[EMAIL PROTECTED]> wrote:
>What does this accomplish:
>
>100 * t.timeit(number=10)/10
>
>that the following doesn't accomplish:
>
>10 * t.timeit(number=10)

The first example converts from seconds per 10 passes to microseconds
per pass in two steps, while the second example does it one.  The first
example is more easily understood and maintainable than the second
example.

Ross Ridge

-- 
 l/  //   Ross Ridge -- The Great HTMU
[oo][oo]  [EMAIL PROTECTED]
-()-/()/  http://www.csclub.uwaterloo.ca/~rridge/ 
 db  //   
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-17 Thread James Stroud
Steve Holden wrote:
> James Stroud wrote:
>> Steve Holden wrote:
>>> You'd be worth more if you'd used elif and omitted the continue 
>>> statements, but for a first solution it's acceptable.
>>
>> Depends on what you are after.
>>
>> py> s = """
>> ... for i in xrange(1,101):
>> ...   if not i % 15:
>> ... continue
>> ...   if not i % 5:
>> ... continue
>> ...   if not i % 3:
>> ... continue
>> ...   else:
>> ... pass
>> ... """
>> py> t = timeit.Timer(stmt=s)
>> py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
>> 40.49 usec/pass
>> py> s = """
>> ... for i in xrange(1,101):
>> ...   if not i % 15:
>> ... pass
>> ...   elif not i % 5:
>> ... pass
>> ...   elif not i % 3:
>> ... pass
>> ...   else:
>> ... pass
>> ... """
>> py> t = timeit.Timer(stmt=s)
>> py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
>> 40.88 usec/pass
>>
> 
> To be strictly comparable you should have pass statements before the 
> continue statements as well.  Ignoring that, clearly it's well worth 
> saving that extra 390 nanoseconds each time round the loop.
> 
> Repeat after me "premature optimization is the root of all evil".
> 
>   http://en.wikipedia.org/wiki/Optimization_(computer_science)
> 
> regards
>  Steve

The point is that both work equally as well unless (1) you are biased by 
a particular style or (2) you split little bitty hairs to even finer hairs.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-17 Thread James Stroud
7stud wrote:
> On Apr 15, 9:49 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>> py> t = timeit.Timer(stmt=s)
>> py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
>> 40.88 usec/pass
>>
> 
> What does this accomplish:
> 
> 100 * t.timeit(number=10)/10
> 
> that the following doesn't accomplish:
> 
> 10 * t.timeit(number=10)
> 

I have no idea--copy and pasted from timeit documentation.

James
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-16 Thread Steve Holden
James Stroud wrote:
> Steve Holden wrote:
>> You'd be worth more if you'd used elif and omitted the continue 
>> statements, but for a first solution it's acceptable.
> 
> Depends on what you are after.
> 
> py> s = """
> ... for i in xrange(1,101):
> ...   if not i % 15:
> ... continue
> ...   if not i % 5:
> ... continue
> ...   if not i % 3:
> ... continue
> ...   else:
> ... pass
> ... """
> py> t = timeit.Timer(stmt=s)
> py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
> 40.49 usec/pass
> py> s = """
> ... for i in xrange(1,101):
> ...   if not i % 15:
> ... pass
> ...   elif not i % 5:
> ... pass
> ...   elif not i % 3:
> ... pass
> ...   else:
> ... pass
> ... """
> py> t = timeit.Timer(stmt=s)
> py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
> 40.88 usec/pass
> 

To be strictly comparable you should have pass statements before the 
continue statements as well.  Ignoring that, clearly it's well worth 
saving that extra 390 nanoseconds each time round the loop.

Repeat after me "premature optimization is the root of all evil".

   http://en.wikipedia.org/wiki/Optimization_(computer_science)

regards
  Steve
-- 
Steve Holden   +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd  http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings   http://holdenweb.blogspot.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-16 Thread 7stud
On Apr 15, 9:49 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> py> t = timeit.Timer(stmt=s)
> py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
> 40.88 usec/pass
>

What does this accomplish:

100 * t.timeit(number=10)/10

that the following doesn't accomplish:

10 * t.timeit(number=10)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread [EMAIL PROTECTED]
The Python Papers (http://pythonpapers.org) is another resource for
Python developers, especially those interested in keeping tabs on the
various projects and articles out there in the community.

Cheers,
-T (Editor-In-Chief, The Python Papers)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread [EMAIL PROTECTED]
On Apr 15, 8:05 pm, [EMAIL PROTECTED] wrote:
> On Apr 15, 9:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Apr 14, 7:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
>
> > > Hello, after reading some of the book Programming Python it seems that
> > > python is something I would like to delve deeper into. The only thing
> > > is, I have no idea what I should try and write. So I was hoping that
> > > someone here could help point me to a group/project that would be a
> > > good starting place for a person with limited python knowledge, but
> > > that is willing to learn whatever is necessary. I'm hoping that with a
> > > goal I can start to learn python instead of just playing around with
> > > it. Thanks.
>
> > I have a little sub-project where I generate random numbers to a music
> > file (a simpe ascii format that works in a 
> > grid)http://www.stormpages.com/edexter/csound.htmlorif you see some other
> > part of it you would like to work on or 
> > expand..https://sourceforge.net/projects/dex-trackerIhaven't added the sub-
> > project yet but I can upload it to some google space if you are
> > intrested..  (uses wxwindows and python 2.5)
>
> I just installed Python 2.5 a few days ago.  I like to play with
> csound.
> However,  I am a window user knowing Java and C#.  I do not have any
> experience with unix system and c.  I appreciate if you would send me
> some instructions and examples to get me started so that In the
> future, I can use midi input and get ourput from csound with a final
> objective to generate some music not representable by midi.
>
> Chin- Hide quoted text -
>
> - Show quoted text -

Csound is based on c but as a csound user you don't realy need to
know...  just take the instruments that are already available for
free..  Dex Tracker is just an interface to make it easier and provide
other tools..  more info on csound including manuals exc can be found
at http://www.csounds.com


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread James Stroud
Steve Holden wrote:
> You'd be worth more if you'd used elif and omitted the continue 
> statements, but for a first solution it's acceptable.

Depends on what you are after.

py> s = """
... for i in xrange(1,101):
...   if not i % 15:
... continue
...   if not i % 5:
... continue
...   if not i % 3:
... continue
...   else:
... pass
... """
py> t = timeit.Timer(stmt=s)
py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
40.49 usec/pass
py> s = """
... for i in xrange(1,101):
...   if not i % 15:
... pass
...   elif not i % 5:
... pass
...   elif not i % 3:
... pass
...   else:
... pass
... """
py> t = timeit.Timer(stmt=s)
py> print "%.2f usec/pass" % (100 * t.timeit(number=10)/10)
40.88 usec/pass

James
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread Paul Rubin
James Stroud <[EMAIL PROTECTED]> writes:
> 1. This doesn't act according to the specification if you add, for
> example, (2, 'Zonk'). Now 30 gives 'ZonkFizzBuzz' and not 'FizzBuzz'
> according to the specification.

Correct, the original specification only had 3 and 5.  I gave a longer
example to illustrate how the specification might be modified.  Obviously
it is not the same specification any more.  The i%15 approach gets messy
once there are more than two numbers to check.

> So, I would keep my original explicit testing:
> def fizzbuzz(n):
>words = ((30, 'Whammo'), (15, 'FizzBuzz'),
> (5, 'Fizz'), (3, 'Buzz'), (2, 'Zonk'))
>for k,v in words:
>  if not k % n:
>return v
>return n

I don't think that's in the spirit of the original, which
would be to print 'BuzzZonk' for n=6.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread James Stroud
Paul Rubin wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>> You'd be worth more if you'd used elif and omitted the continue
>> statements, but for a first solution it's acceptable.
>>
>> For better readability I'd have used
>>  if i % 5 == 0
> 
> I think I'd be more concerned about getting rid of the i%15 test.
> What if a few more words get added?
> 
> def fizzbuzz(n):
> words = ((3, 'Fizz'), (5, 'Buzz'), (7, 'Jazz'), (11, 'Pizzazz'))
> r = ''.join(b for a,b in words if n%a == 0)
> return r or str(n)
> 
> for i in xrange(1,101):
> print fizzbuzz(i)

I think that this is somewhat of an over-interpretation of the 
specification.

1. This doesn't act according to the specification if you add, for 
example, (2, 'Zonk'). Now 30 gives 'ZonkFizzBuzz' and not 'FizzBuzz' 
according to the specification.

2. What if additional words don't necessarily follow the pattern you 
infer? Nothing in the specification disallows adding (30, 'Whammo').

So, I would keep my original explicit testing:

def fizzbuzz(n):
   words = ((30, 'Whammo'), (15, 'FizzBuzz'),
(5, 'Fizz'), (3, 'Buzz'), (2, 'Zonk'))
   for k,v in words:
 if not k % n:
   return v
   return n

for i in xrange(1,101):
   print fizzbuzz(i)




James
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread Paul Rubin
Steve Holden <[EMAIL PROTECTED]> writes:
> You'd be worth more if you'd used elif and omitted the continue
> statements, but for a first solution it's acceptable.
> 
> For better readability I'd have used
>  if i % 5 == 0

I think I'd be more concerned about getting rid of the i%15 test.
What if a few more words get added?

def fizzbuzz(n):
words = ((3, 'Fizz'), (5, 'Buzz'), (7, 'Jazz'), (11, 'Pizzazz'))
r = ''.join(b for a,b in words if n%a == 0)
return r or str(n)

for i in xrange(1,101):
print fizzbuzz(i)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread chengzhiannahuang
On Apr 15, 9:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Apr 14, 7:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
>
> > Hello, after reading some of the book Programming Python it seems that
> > python is something I would like to delve deeper into. The only thing
> > is, I have no idea what I should try and write. So I was hoping that
> > someone here could help point me to a group/project that would be a
> > good starting place for a person with limited python knowledge, but
> > that is willing to learn whatever is necessary. I'm hoping that with a
> > goal I can start to learn python instead of just playing around with
> > it. Thanks.
>
> I have a little sub-project where I generate random numbers to a music
> file (a simpe ascii format that works in a 
> grid)http://www.stormpages.com/edexter/csound.htmlor if you see some other
> part of it you would like to work on or 
> expand..https://sourceforge.net/projects/dex-trackerI haven't added the sub-
> project yet but I can upload it to some google space if you are
> intrested..  (uses wxwindows and python 2.5)

I just installed Python 2.5 a few days ago.  I like to play with
csound.
However,  I am a window user knowing Java and C#.  I do not have any
experience with unix system and c.  I appreciate if you would send me
some instructions and examples to get me started so that In the
future, I can use midi input and get ourput from csound with a final
objective to generate some music not representable by midi.

Chin

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread Steve Holden
James Stroud wrote:
> Gabriel Genellina wrote:
>> En Sun, 15 Apr 2007 10:46:54 -0300, Army1987 <[EMAIL PROTECTED]> escribió:
>>
>>> "Paddy" <[EMAIL PROTECTED]> ha scritto nel messaggio
>>> news:[EMAIL PROTECTED]
>>>
 On a different tack, from:
 http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/
  

 It seems you need to learn how to write a Fizz-Buzz
 program to get a job now-a-days :-)
>>> Something less idiotic? I took longer to type a program to do that 
>>> than to
>>> figure out how to do that.
>> We've used it as part of a test a few weeks ago. You'd be surprised on 
>> how many guys couldn't write anything remotely sensible.
>>
>> --Gabriel Genellina
> 
> py> for i in xrange(1,101):
> ...   if not i % 15:
> ... print 'fizzbuzz'
> ... continue
> ...   if not i % 5:
> ... print 'buzz'
> ... continue
> ...   if not i % 3:
> ... print 'fizz'
> ...   else:
> ... print i
> ...
> 
> I typed this without so much as hitting delete. Didn't time it but I'm 
> guessing less than 2 minutes. How much am I worth a year? (Hopefully 
> capitalization is not important for this exercise.)
> 
You'd be worth more if you'd used elif and omitted the continue 
statements, but for a first solution it's acceptable.

For better readability I'd have used

 if i % 5 == 0

rather than

 if not i % 5

but that's mostly a stylistic matter.

regards
  Steve
regards
  Steve
-- 
Steve Holden   +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd  http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Recent Ramblings   http://holdenweb.blogspot.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread James Stroud
Gabriel Genellina wrote:
> En Sun, 15 Apr 2007 10:46:54 -0300, Army1987 <[EMAIL PROTECTED]> escribió:
> 
>> "Paddy" <[EMAIL PROTECTED]> ha scritto nel messaggio
>> news:[EMAIL PROTECTED]
>>
>>> On a different tack, from:
>>> http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/
>>>  
>>>
>>> It seems you need to learn how to write a Fizz-Buzz
>>> program to get a job now-a-days :-)
>>
>> Something less idiotic? I took longer to type a program to do that 
>> than to
>> figure out how to do that.
> 
> We've used it as part of a test a few weeks ago. You'd be surprised on 
> how many guys couldn't write anything remotely sensible.
> 
> --Gabriel Genellina

py> for i in xrange(1,101):
...   if not i % 15:
... print 'fizzbuzz'
... continue
...   if not i % 5:
... print 'buzz'
... continue
...   if not i % 3:
... print 'fizz'
...   else:
... print i
...

I typed this without so much as hitting delete. Didn't time it but I'm 
guessing less than 2 minutes. How much am I worth a year? (Hopefully 
capitalization is not important for this exercise.)

James
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread Gabriel Genellina
En Sun, 15 Apr 2007 10:46:54 -0300, Army1987 <[EMAIL PROTECTED]> escribió:

> "Paddy" <[EMAIL PROTECTED]> ha scritto nel messaggio
> news:[EMAIL PROTECTED]
>
>> On a different tack, from:
>> http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/
>> It seems you need to learn how to write a Fizz-Buzz
>> program to get a job now-a-days :-)
>
> Something less idiotic? I took longer to type a program to do that than  
> to
> figure out how to do that.

We've used it as part of a test a few weeks ago. You'd be surprised on how  
many guys couldn't write anything remotely sensible.

-- 
Gabriel Genellina
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread Dorai
On Apr 15, 3:35 am, James Stroud <[EMAIL PROTECTED]> wrote:
> Eric wrote:
> > Hello, after reading some of the book Programming Python it seems that
> > python is something I would like to delve deeper into. The only thing
> > is, I have no idea what I should try and write. So I was hoping that
> > someone here could help point me to a group/project that would be a
> > good starting place for a person with limited python knowledge, but
> > that is willing to learn whatever is necessary. I'm hoping that with a
> > goal I can start to learn python instead of just playing around with
> > it. Thanks.
>
> Here is a protocol I have used in the past:
>
> 1. Realize there is a program you really wish you had.
> 2. Find out that, upon relentless googling, no
>such program exists that meets your needs exactly.
> 3. If 2 fails and a program exist s, go back to 1.
> 4. Proceed to write this program no matter what it takes--you
>may even face some "sitdowns" with your friends, family,
>and/or employers.
> 5. (Very important)
>A. Refer to this list periodically for help but making
>   sure to properly phrase you questions.
>B. Try not to rewrite any libraries by first ascertaining
>   whether a library doesn't already exist for the
>   sub-task you are programming.
> 6. Enjoy the new program you have written and the new
>knowledge you have gained.
>
> James

Start out with something simple and go deeper. For example, here is
one progression:

1. A simple program that counts words (wc) - read from a file,
tokenize, count
2. A variation of wc that does word frequency count (counts how many
times each word occurs) - wfc - In addition to 1, this allows you to
use a data structure to store words and search for them to update the
count. You may also sort the output.
3. A variation of wfc that reads from a file a set of noise words and
stores them in memory. As you are tokenizing, drop the noise words
from counting (or count noise words)

You could do similar things with database programming (start with
something simple and gradually increase the level of complexity or any
other area.

You can also access Python cookbook, use the examples as a starting
point and build variations. This not only allows you to read some well
written code but also understand various techniques.

Another suggestion is to get hold of a book "Software Tools" and try
to code all the examples in Python.

I found the best way to learn a language is to read some code, write
some code and keep improving it. Many improvements will suggest
themselves as you keep coding.

Hope this helps.

Dorai
www.thodla.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread [EMAIL PROTECTED]
On Apr 14, 7:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
> Hello, after reading some of the book Programming Python it seems that
> python is something I would like to delve deeper into. The only thing
> is, I have no idea what I should try and write. So I was hoping that
> someone here could help point me to a group/project that would be a
> good starting place for a person with limited python knowledge, but
> that is willing to learn whatever is necessary. I'm hoping that with a
> goal I can start to learn python instead of just playing around with
> it. Thanks.

I have a little sub-project where I generate random numbers to a music
file (a simpe ascii format that works in a grid)
http://www.stormpages.com/edexter/csound.html or if you see some other
part of it you would like to work on or expand..
https://sourceforge.net/projects/dex-tracker I haven't added the sub-
project yet but I can upload it to some google space if you are
intrested..  (uses wxwindows and python 2.5)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread [EMAIL PROTECTED]
On Apr 14, 7:46 pm, "Eric" <[EMAIL PROTECTED]> wrote:
> Hello, after reading some of the book Programming Python it seems that
> python is something I would like to delve deeper into. The only thing
> is, I have no idea what I should try and write. So I was hoping that
> someone here could help point me to a group/project that would be a
> good starting place for a person with limited python knowledge, but
> that is willing to learn whatever is necessary. I'm hoping that with a
> goal I can start to learn python instead of just playing around with
> it. Thanks.

If you want to play around with simple graphics and writing simple
ascii files to disk then dex tracker may be a good project for you.  I
am currently playing around with generating random sounds to disk and
random rythoms.  (I also have a harder graphics problem that when I
solve will break the music program wide open).  
https://sourceforge.net/projects/dex-tracker
You would go to the (project homepage) website for dependencies
http://www.stormpages.com/edexter/csound.html (not all are required
for all sub-programs but you do want wxwindows).  It would probily be
cool to expand the idea into non-random series of numbers and I have
just started to code this particular tool.  I can upload it to my
google groups if you are intrested

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread Army1987
"Paddy" <[EMAIL PROTECTED]> ha scritto nel messaggio 
news:[EMAIL PROTECTED]

> On a different tack, from:
> http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/
> It seems you need to learn how to write a Fizz-Buzz
> program to get a job now-a-days :-)

Something less idiotic? I took longer to type a program to do that than to 
figure out how to do that. 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-15 Thread James Stroud
Eric wrote:
> Hello, after reading some of the book Programming Python it seems that
> python is something I would like to delve deeper into. The only thing
> is, I have no idea what I should try and write. So I was hoping that
> someone here could help point me to a group/project that would be a
> good starting place for a person with limited python knowledge, but
> that is willing to learn whatever is necessary. I'm hoping that with a
> goal I can start to learn python instead of just playing around with
> it. Thanks.
> 

Here is a protocol I have used in the past:

1. Realize there is a program you really wish you had.
2. Find out that, upon relentless googling, no
   such program exists that meets your needs exactly.
3. If 2 fails and a program exists, go back to 1.
4. Proceed to write this program no matter what it takes--you
   may even face some "sitdowns" with your friends, family,
   and/or employers.
5. (Very important)
   A. Refer to this list periodically for help but making
  sure to properly phrase you questions.
   B. Try not to rewrite any libraries by first ascertaining
  whether a library doesn't already exist for the
  sub-task you are programming.
6. Enjoy the new program you have written and the new
   knowledge you have gained.

James
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-14 Thread Paddy
On Apr 15, 1:46 am, "Eric" <[EMAIL PROTECTED]> wrote:
> Hello, after reading some of the book Programming Python it seems that
> python is something I would like to delve deeper into. The only thing
> is, I have no idea what I should try and write. So I was hoping that
> someone here could help point me to a group/project that would be a
> good starting place for a person with limited python knowledge, but
> that is willing to learn whatever is necessary. I'm hoping that with a
> goal I can start to learn python instead of just playing around with
> it. Thanks.

Hi Eric, Somas1.
Try:
http://www.google.co.uk/search?source=ig&hl=en&q=beginners+programming-problems&btnG=Google+Search&meta=

Some of the sites have beginners problems meant for
another language, but in a lot of cases that doesn't
matter.

You might need to be a fair way through the Python
tutorial though before you attempt thhem so you
know the basics of Python first.

On a different tack, from:
http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/
It seems you need to learn how to write a Fizz-Buzz
program to get a job now-a-days :-)

- Paddy.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with python

2007-04-14 Thread [EMAIL PROTECTED]
I'd like to second this request or at least find out if there are any
type of Python mentorship programs I could join.


-- 
http://mail.python.org/mailman/listinfo/python-list


Getting started with python

2007-04-14 Thread Eric
Hello, after reading some of the book Programming Python it seems that
python is something I would like to delve deeper into. The only thing
is, I have no idea what I should try and write. So I was hoping that
someone here could help point me to a group/project that would be a
good starting place for a person with limited python knowledge, but
that is willing to learn whatever is necessary. I'm hoping that with a
goal I can start to learn python instead of just playing around with
it. Thanks.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-08 Thread Jussi Salmela
W. Watson kirjoitti:
> Gabriel Genellina wrote:
>> On 7 ene, 16:20, "W. Watson" <[EMAIL PROTECTED]> wrote:
>>
>>> We seem to be looping. I have the Python interpreter. I would like the
>>> pythonwin editor. The download link doesn't work on SourceForge. 
>>> Where can I
>>> get it? If not there, where? If it can't be obtained, then I'll go to 
>>> the
>>> default editor built into python-2.5.msi.
>>
>> It *does* work for me. Try
>> https://sourceforge.net/project/showfiles.php?group_id=78018&package_id=79063
>>  
>>
>>
> I can easily see the page you refer to, but where's the pythonwin editor?
> 
> 
>  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
>  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
>   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
> 
> A road sign along many highways reads, "$1000
> fine for littering" I have yet to find any
> $1000 bills. WTW

The editor is only a part of pywin32, which is a handy package to do all 
kinds of Windows only stuff with Python. So download and install pywin32 
to get the editor and all that other nice stuff.

HTH,
Jussi
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread W. Watson
Gabriel Genellina wrote:
> On 7 ene, 16:20, "W. Watson" <[EMAIL PROTECTED]> wrote:
> 
>> We seem to be looping. I have the Python interpreter. I would like the
>> pythonwin editor. The download link doesn't work on SourceForge. Where can I
>> get it? If not there, where? If it can't be obtained, then I'll go to the
>> default editor built into python-2.5.msi.
> 
> It *does* work for me. Try
> https://sourceforge.net/project/showfiles.php?group_id=78018&package_id=79063
> 
I can easily see the page you refer to, but where's the pythonwin editor?


  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

 A road sign along many highways reads, "$1000
 fine for littering" I have yet to find any
 $1000 bills. WTW
-- 
 Web Page: 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread Jussi Salmela
W. Watson kirjoitti:
> Gabriel Genellina wrote:
>> On 7 ene, 13:22, "W. Watson" <[EMAIL PROTECTED]> wrote:
>>
>> https://sourceforge.net/projects/pywin32/
>>
>>> As I understand it, there are two files I'm after: 1. python 
>>> interpreter,
>>> and 2. a python editor. It's #2 that I'm having trouble downloading. The
>>> link is broken.
>>
>> The above link should work. Follow the instructions in a previous post.
>> Note that in the last step, you have to choose a mirror for
>> downloading; that mirrow might be down or out-of-sync so you might get
>> an error there. Choose another mirrorr...
>>
>> Note that you dont *need* PythonWin in order to use Python on Windows.
>> The standard Python distribution works fine. Even includes a Python
>> editor (IDLE) but you can use whichever editor you like to write your
>> code (even Notepad...)
>>
> We seem to be looping. I have the Python interpreter. I would like the 
> pythonwin editor. The download link doesn't work on SourceForge. Where 
> can I get it? If not there, where? If it can't be obtained, then I'll go 
> to the default editor built into python-2.5.msi.
> 
> 
>  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
>  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
>   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
> 
>  ""I do not fear death. I had been dead for billions
>and billions of years before I was born, and had
>not suffered the slightest inconvenience from it."
>-- Mark Twain (a nod to evolution)

Trying to break the loop:

The above link works for me. I've tried it numerous times during this 
looping. Clicking the link pops up a security warning informing that the 
browser is going to enter "https mode". Do you get that pop-up?

When I accept the pop-up, I get a page containing a green rectangle 
"button". When I click it, I get another page in which I have to click 
download to go to the actual download page.

If this doesn't work for you there must be something wrong with your 
configuration.

HTH,
Jussi
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread Gabriel Genellina
On 7 ene, 16:20, "W. Watson" <[EMAIL PROTECTED]> wrote:

> We seem to be looping. I have the Python interpreter. I would like the
> pythonwin editor. The download link doesn't work on SourceForge. Where can I
> get it? If not there, where? If it can't be obtained, then I'll go to the
> default editor built into python-2.5.msi.

It *does* work for me. Try
https://sourceforge.net/project/showfiles.php?group_id=78018&package_id=79063

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread W. Watson
Gabriel Genellina wrote:
> On 7 ene, 13:22, "W. Watson" <[EMAIL PROTECTED]> wrote:
> 
> https://sourceforge.net/projects/pywin32/
> 
>> As I understand it, there are two files I'm after: 1. python interpreter,
>> and 2. a python editor. It's #2 that I'm having trouble downloading. The
>> link is broken.
> 
> The above link should work. Follow the instructions in a previous post.
> Note that in the last step, you have to choose a mirror for
> downloading; that mirrow might be down or out-of-sync so you might get
> an error there. Choose another mirrorr...
> 
> Note that you dont *need* PythonWin in order to use Python on Windows.
> The standard Python distribution works fine. Even includes a Python
> editor (IDLE) but you can use whichever editor you like to write your
> code (even Notepad...)
> 
We seem to be looping. I have the Python interpreter. I would like the 
pythonwin editor. The download link doesn't work on SourceForge. Where can I 
get it? If not there, where? If it can't be obtained, then I'll go to the 
default editor built into python-2.5.msi.


  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

  ""I do not fear death. I had been dead for billions
and billions of years before I was born, and had
not suffered the slightest inconvenience from it."
-- Mark Twain (a nod to evolution)
-- 
 Web Page: 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread Gabriel Genellina
On 7 ene, 13:22, "W. Watson" <[EMAIL PROTECTED]> wrote:

> >>>https://sourceforge.net/projects/pywin32/

> As I understand it, there are two files I'm after: 1. python interpreter,
> and 2. a python editor. It's #2 that I'm having trouble downloading. The
> link is broken.

The above link should work. Follow the instructions in a previous post.
Note that in the last step, you have to choose a mirror for
downloading; that mirrow might be down or out-of-sync so you might get
an error there. Choose another mirrorr...

Note that you dont *need* PythonWin in order to use Python on Windows.
The standard Python distribution works fine. Even includes a Python
editor (IDLE) but you can use whichever editor you like to write your
code (even Notepad...)

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread Thomas Ploch
W. Watson schrieb:
> As I understand it, there are two files I'm after: 1. python interpreter, 
> and 2. a python editor. It's #2 that I'm having trouble downloading. The 
> link is broken.

This is the python interpreter for windows:

http://www.python.org/ftp/python/2.5/python-2.5.msi


Here you can check for editors:

http://wiki.python.org/moin/PythonEditors


Here you will get the pywin32 package (also including the Win32 API, COM
support, and Pythonwin):

http://sourceforge.net/projects/pywin32/

I am not sure if you actually read any of our posts, because there is no
404 whatsoever. On none of the posted links in the whole thread.

Thomas
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread W. Watson
Jussi Salmela wrote:
> W. Watson kirjoitti:
>> Thomas Ploch wrote:
> 
> 
>>> https://sourceforge.net/projects/pywin32/
>>>
>>> I think this is the place to go
>>>
>>> Thomas
>>>
>>>
>> That gets me the python program (pywin), which I got from a URL in a 
>> post above (python-win.msi). I guess these are the same or at least 
>> just the interpreter, and do not provide the IDE-debugger. I can't get 
>> pythonwin, the debugger and IDE. The link was broken last night when I 
>> tried it. Well, let me try now. Nope, it still reports "Error 404: 
>> File Not Found"
> 
> 
> I don't understand your difficulties. If you've got Python installed and 
> want to install the "Python for Windows extensions" aka pywin32, the 
> above link is the way to go.
> 
> Clicking it gets you to a Sourceforge page, where you can click 
> "download" which gets you to ap page where you can choose which version 
> of pywin32 build 210 you want. Choose the exe that was built for the 
> Python version (e.g. 2.5) you are using, download and run it to install 
> pywin32.
> 
> HTH,
> Jussi
As I understand it, there are two files I'm after: 1. python interpreter, 
and 2. a python editor. It's #2 that I'm having trouble downloading. The 
link is broken.


  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

  ""I do not fear death. I had been dead for billions
and billions of years before I was born, and had
not suffered the slightest inconvenience from it."
-- Mark Twain (a nod to evolution)
-- 
 Web Page: 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-07 Thread Jussi Salmela
W. Watson kirjoitti:
> Thomas Ploch wrote:


>> https://sourceforge.net/projects/pywin32/
>>
>> I think this is the place to go
>>
>> Thomas
>>
>>
> That gets me the python program (pywin), which I got from a URL in a 
> post above (python-win.msi). I guess these are the same or at least just 
> the interpreter, and do not provide the IDE-debugger. I can't get 
> pythonwin, the debugger and IDE. The link was broken last night when I 
> tried it. Well, let me try now. Nope, it still reports "Error 404: File 
> Not Found"


I don't understand your difficulties. If you've got Python installed and 
want to install the "Python for Windows extensions" aka pywin32, the 
above link is the way to go.

Clicking it gets you to a Sourceforge page, where you can click 
"download" which gets you to ap page where you can choose which version 
of pywin32 build 210 you want. Choose the exe that was built for the 
Python version (e.g. 2.5) you are using, download and run it to install 
pywin32.

HTH,
Jussi
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-06 Thread W. Watson
Thomas Ploch wrote:
> W. Watson schrieb:
>> The wiki site lead to a link to download pythonwin, but the download is 
>> broken. Googling invariably leads back to that link. I found 
>> , which has 
>> two files listed: oadist.exe and win32dbg.exe. Do I need both or is just the 
>> latter one?
> 
> 
> A google query 'pythonwin' directly brings me here:
> 
> https://sourceforge.net/projects/pywin32/
> 
> I think this is the place to go
> 
> Thomas
> 
> 
That gets me the python program (pywin), which I got from a URL in a post 
above (python-win.msi). I guess these are the same or at least just the 
interpreter, and do not provide the IDE-debugger. I can't get pythonwin, the 
debugger and IDE. The link was broken last night when I tried it. Well, let 
me try now. Nope, it still reports "Error 404: File Not Found"




  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

  ""I do not fear death. I had been dead for billions
and billions of years before I was born, and had
not suffered the slightest inconvenience from it."
-- Mark Twain (a nod to evolution)
-- 
 Web Page: 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-06 Thread rzed
[EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]: 

> Wise choice + welcome to the club.

Seconded.

> The only real XP drawback is that Python is not bundled on
> Windows, while it is included with OS X and most (all?) Linux
> distros. 
> 

My computer does, in fact, include a Python 2.2.1 installation, 
which the manufacturer uses internally.

> 2.  use any ol' text editor that _you_ are familiar with, save
> to file, and python  under DOS.  later on you can always
> pick an editor. i prefer eclipse + pydev, yes, even on windows.
> 
> personally, i find pythonwin _great_ to test out code
> interactively, mediocre to write lots of code with and
> occasionally handy to debug code in.
> 
> if you hate typing python  under DOS, then I guess you
> will have to run programs from pythonwin.
> 

Not so, but it takes a little setup. If I want to run a Python 
program named, say, "fixthis.py", I can invoke it by typing 
"fixthis.py" at the command-line prompt (if I'm running cmd.exe), 
or by clicking the icon in Windows Explorer. To make the command-
line option work, I have to have file associations set so that .py 
files open with python (and .pyw files open with pythonw, for that 
matter). I *think* this is done at install time, though I may have 
done that separately.

There is also an environment variable called "pathext", which is 
just a list of extensions the system recognizes as being 
executable in some way. if you add .py and .pyw to that list, then 
all you have to type at the command line is "fixthis" to get that 
Python program to run.

I note that I have had my Python root and Python/Scripts directory 
on my path at times. There may be some packages that require these 
things, but what I talked about in the previous two paragraphs 
doesn't require pythonpath to be set specially.

(Fiddling around) Ah! If you want to invoke the interactive python 
shell, you will probably want to add the root location to your 
path, so you can type
> python
... to invoke it, rather than
> c:\python25\python
... and something similar may be true for the Scripts 
subdirectory.

-- 
rzed
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-06 Thread Thomas Ploch
W. Watson schrieb:
> The wiki site lead to a link to download pythonwin, but the download is 
> broken. Googling invariably leads back to that link. I found 
> , which has 
> two files listed: oadist.exe and win32dbg.exe. Do I need both or is just the 
> latter one?


A google query 'pythonwin' directly brings me here:

https://sourceforge.net/projects/pywin32/

I think this is the place to go

Thomas


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-06 Thread W. Watson
The wiki site lead to a link to download pythonwin, but the download is 
broken. Googling invariably leads back to that link. I found 
, which has 
two files listed: oadist.exe and win32dbg.exe. Do I need both or is just the 
latter one?


  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

  ""I do not fear death. I had been dead for billions
and billions of years before I was born, and had
not suffered the slightest inconvenience from it."
-- Mark Twain (a nod to evolution)
-- 
 Web Page: 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-06 Thread W. Watson
Ah, I misread wiki as wikpedia. Nevertheless, wikipedia surprises me, as 
well as just wiki sites.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-06 Thread W. Watson
Laszlo Nagy wrote:
> W. Watson wrote:
>> What do I download to use Python with MX XP Pro on an ASUS 4 year old 
>> motherboard? I would guess a good book source for starters would be 
>> the O'Reilly book.
>>   
> You mean Microsoft XP Pro?
> 
> For a beginner, the motherboard does not really matter. First of all, 
> you should download Python itself:
> 
> http://www.python.org/download/
> 
> or more probably:
> 
> http://www.python.org/ftp/python/2.5/python-2.5.msi
> 
> Then you should download a good editor. There are many, listed here: 
> http://wiki.python.org/moin/PythonEditors
> Under Windows, for a beginner, I would recommend pythonwin, but you can 
> decide.
> 
> Finally, you can start practicing. A book is always good. You can read 
> online tutorials too:
> 
> http://docs.python.org/tut/
> http://www.awaretek.com/tutorials.html
> 
> 
> Regards,
> 
>  Laszlo
> 
Many thanks. I've been impressed lately what one finds in Wikipedia. The 
first such occurrence was when I find all the release dates for a photo 
software package that I use. Not even the mfger had that!


  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

  ""I do not fear death. I had been dead for billions
and billions of years before I was born, and had
not suffered the slightest inconvenience from it."
-- Mark Twain (a nod to evolution)
-- 
 Web Page: 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-05 Thread Grant Edwards
On 2007-01-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> The only real XP drawback is that Python is not bundled on
> Windows, while it is included with OS X and most (all?) Linux
> distros.

While it's true that Microsoft doesn't bundle Python with
Windows, a _lot_ of XP computers do come with Python installed.
My IBM ThinkPad came out of the box with Python installed. I've
read that a few other large PC vendors (HP/Compaq?) also ship
Python pre-installed on their machines.

However, it's not usually installed in a manner that makes it
conveniently usable by the end-user...

-- 
Grant Edwards   grante Yow!  NOW, I'm supposed
  at   to SCRAMBLE two, and HOLD
   visi.comth' MAYO!!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-05 Thread DouhetSukd
Wise choice + welcome to the club.

Though Python is open source and well appreciated on Linux, I think you
will find that most people in this newsgroup will be fairly courteous
about _your_ choice of platform.  Some will not know about the weird
process forking stuff on windows and helpfully suggest that 'if you
were to use a real OS...'.  But in reality Python is just as happy on
XP as on Linux and the lack of scripting/shell alternatives on XP makes
it all the more useful there.

The only real XP drawback is that Python is not bundled on Windows,
while it is included with OS X and most (all?) Linux distros.

So, giving a *.py program to another XP user means little by itself, it
needs to be either packaged in an exe (see py2exe) or you need to get
your buddy to install python on their machine.


In descending order of cheapness/usefullness.

1.  download python + work through the tutorial.  well, maybe not all
of it, but with pythonwin around, you can try out significant snippets
quickly.


2.  use any ol' text editor that _you_ are familiar with, save to file,
and python  under DOS.  later on you can always pick an editor.
i prefer eclipse + pydev, yes, even on windows.

personally, i find pythonwin _great_ to test out code interactively,
mediocre to write lots of code with and occasionally handy to debug
code in.

if you hate typing python  under DOS, then I guess you will have
to run programs from pythonwin.


3.  internet

this newsgroup is very informative.

dive into python, pretty good net resource

www.diveintopython.org



4.  books:

Learning Python, isbn 0596002815, is pretty good.

Python Programming on Win32, isbn 1565926218, is good, if a bit dated
(2000, covers COM but no .Net)

In depth Python - Python in a Nutshell, isbn 0596100469


5.  GUI stuff.

wxPython.  If, like me, you hate handcoding everything and want a VB
drag&drop clone you will have to look around for someone else's advice
- there are several such editors that do wxPython but I have never
found anything entirely to my liking.  I am sure others will chime in
with their recommendations.


6.  Database stuff.

Personally, working on MS SQL, I vouch for mxODBC - shareware, which I
used for years without paying, until I decided the guy had definitely
earned my $75.

http://www.egenix.com/files/python/eGenix-mx-Extensions.html


7.  Prepping *.py programs for distribution to users w.o. Python

py2exe - www.py2exe.org/

Best o' luck.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Just Getting Started with Python on MS XP Pro

2007-01-05 Thread Laszlo Nagy
W. Watson wrote:
> What do I download to use Python with MX XP Pro on an ASUS 4 year old 
> motherboard? I would guess a good book source for starters would be the 
> O'Reilly book.
>   
You mean Microsoft XP Pro?

For a beginner, the motherboard does not really matter. First of all, 
you should download Python itself:

http://www.python.org/download/

or more probably:

http://www.python.org/ftp/python/2.5/python-2.5.msi

Then you should download a good editor. There are many, listed here: 
http://wiki.python.org/moin/PythonEditors
Under Windows, for a beginner, I would recommend pythonwin, but you can 
decide.

Finally, you can start practicing. A book is always good. You can read 
online tutorials too:

http://docs.python.org/tut/
http://www.awaretek.com/tutorials.html


Regards,

  Laszlo

-- 
http://mail.python.org/mailman/listinfo/python-list


Just Getting Started with Python on MS XP Pro

2007-01-05 Thread W. Watson
What do I download to use Python with MX XP Pro on an ASUS 4 year old 
motherboard? I would guess a good book source for starters would be the 
O'Reilly book.

  Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

  ""I do not fear death. I had been dead for billions
and billions of years before I was born, and had
not suffered the slightest inconvenience from it."
-- Mark Twain (a nod to evolution)
-- 
 Web Page: 
-- 
http://mail.python.org/mailman/listinfo/python-list