Re: Removal of tkinter from python 3.0? [was: Fate of the repr module in Py3.0]

2008-03-20 Thread dave_mikesell
On Mar 20, 2:39 am, "Daniel Fetchinson" <[EMAIL PROTECTED]>
wrote:

> Is it just me or others also think that it would be a major loss to
> remove tkinter from the python core? PEP 3108 starts off with:

I really like Python since I started using it a couple years ago, but
this is a huge turnoff and the kind of thing that keeps me using C++.
Stability is important.   And I don't have any real code base.  Can't
imagine those that have made a big investment in Python being all too
happy about the rug being pulled out from under them.


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


Re: SOAP Server in Python

2008-03-19 Thread dave_mikesell
On Mar 19, 9:19 am, Eric <[EMAIL PROTECTED]> wrote:

> I am basically looking to do the same thing in Python as easily.
>
> Any help or pointers would be appreciated.

Googling for "python soap" turned up a few hits that may help you.


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


Re: Python and 3D

2008-03-16 Thread dave_mikesell
On Mar 15, 3:09 pm, Eric von Horst <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am looking for Python modules that allow you to manipulate 3D
> objects, more specifically Alias Wavefront .OBJ objects.
> Also, a module that would allow you to vizualize these models and
> rotate them etc..
>
> The goal is not to build a new renderer or something; just a small
> program that I need to do some manipulations in bulk on a set of OBJs

This is more of a question about Alias than Python.  I googled it and
found Autodesk's AliasStudio (which apparently used to be Alias
Wavefront) - is this what you're talking about?  There is a C++ API,
which could be wrapped in Python using something like SWIG.

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


Re: Distributed App - C++ with Python for Portability?

2008-03-11 Thread dave_mikesell
On Mar 11, 3:03 am, Bob Martin <[EMAIL PROTECTED]> wrote:
> in 337600 20080310 222850 [EMAIL PROTECTED] wrote:
>
> >On Mar 10, 2:21 pm, Bob Martin <[EMAIL PROTECTED]> wrote:
>
> >> Java is more portable than most other languages, especially if your app 
> >> needs a gui.
>
> >The promise of Java portability was one of the biggest scams ever
> >perpetrated on the software industry.  There are issues going from OS
> >to OS, VM to VM, DB to DB, app server to app server, etc.  Certainly
> >no easier than porting C++ and the appropriate libraries, IMHO.
>
> Quite untrue - I have a stack of large java apps which run without change on
> Linux, OS/2 and Windows.  Not many, if any, other languages can match that,
> and definitely not C++.

I'm happy that it's worked for you, but I haven't seen it in my
experience.  My current client has code that works in 1.4.0, but not
higher versions of the JDK without code changes.  And other that won't
run in later versions of the app server (JBoss) than the one for which
it was developed.   And upgrading our SQL Server version required an
upgrade of DB drivers.   Another headache.   They have their own JVM
requirements as well, as do other packages and libraries.   Getting
them all to play together hasn't been seamless or easy by any stretch.



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


Re: Distributed App - C++ with Python for Portability?

2008-03-10 Thread dave_mikesell
On Mar 10, 2:21 pm, Bob Martin <[EMAIL PROTECTED]> wrote:

>
> Java is more portable than most other languages, especially if your app needs 
> a gui.

The promise of Java portability was one of the biggest scams ever
perpetrated on the software industry.  There are issues going from OS
to OS, VM to VM, DB to DB, app server to app server, etc.  Certainly
no easier than porting C++ and the appropriate libraries, IMHO.

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


Re: Regarding coding style

2008-03-08 Thread dave_mikesell
On Mar 8, 5:14 pm, "K Viltersten" <[EMAIL PROTECTED]> wrote:

> /** Projects an object from 3D to 2D using
> the method of Alexander The Great.
> \param 3D structure to be projected
> \returns 2D projection
> */
> public Proj2D get2Dfrom3D(Proj3D param);
>
> The above is, to me, very clear and
> consistent. Not to mention, easily
> handled with e.g. Doxygen to create a
> readable documentation.
>
> I don't see how this is dislikeable. Please
> explain.

When get2Dfrom3D changes its signature but the comment is not
changed.  That's where I have a problem, and it's only a matter of
time before it happens.

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


Re: Regarding coding style

2008-03-08 Thread dave_mikesell
On Mar 8, 2:27 pm, [EMAIL PROTECTED] wrote:

> Good comments are better than bad names.
> Good names are better than bad comments.

If you're taking the time to write good comments, why not just fix the
bad names?  The compiler/interpreter can never, ever catch bad
comments.

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


Re: Regarding coding style

2008-03-08 Thread dave_mikesell
On Mar 8, 1:31 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:



LOL.  Thanks for the laughs.  I share your frustration.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Regarding coding style

2008-03-08 Thread dave_mikesell
On Mar 8, 2:38 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Fri, 07 Mar 2008 20:57:32 -0800, dave_mikesell wrote:
> >> x = get_stuff(store)  # Get the stuff what was brought at the store.
>
> > Perfect example of an unnecessary comment.  The variable and function
> > names are commentary enough.
>
> "x" is a terrible name. What does it mean? Nothing.

Right, that's a problem with the code.  A comment only masks the bad
smell.  'x' should be renamed to something meaningful, obviating the
need for comments to follow it around.

> There's only three places x is an appropriate name:

> (1) A meta-syntactic variable like foo, bar, spam, ham, parrot.
>
> (2) Library functions, where x stands for a generic argument, usually a
> number, e.g. def sin(x).
>
> (3) Throw-away code you don't need to maintain.

I use single letter variables where their scope is very small.  e.g.,
tight loops, small functions,  etc.  I even use them as class members
where they make sense in the domain.  x, y, z for 3d vectors, r, g, b,
a for colors, etc.

> The function name also doesn't explain anything. How was the stuff got?
> Was it paid for, or stolen, or picked up on consignment, or what? Compare
> the above line with:
>
> x = get_stuff(store)  # Steal stuff from the store.
>
> or
>
> x = get_stuff(store)  # Pickup the stuff from the store for disposal.
> # The amount paid by the store is stored in global variable "pay_received"
> # and the name of the employee authorizing the pickup is stored in the
> # global "authorized_by".

Shouldn't get_stuff's comment be with its definition?   And just
rename the function to something more meaningful, like
purchase_goods(store), or whatever.

>
> But even if you were right that the comment was unnecessary, you have
> missed my point that even single sentences can be grammatically bogus and
> the writer could learn a lot from Strunk and White or equivalent.

I do agree with that 100%.  It's a chore reading design and
requirements docs where I work.

My problem is with excessive comments.  Comments are pathological
liars.  They almost invariably fall out of date with the code.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Regarding coding style

2008-03-07 Thread dave_mikesell
On Mar 7, 10:38 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Fri, 07 Mar 2008 20:04:47 -0800, dave_mikesell wrote:
> > On Mar 7, 10:31 am, "K Viltersten" <[EMAIL PROTECTED]> wrote:
> >> I've been recommended reading
> >> of:http://www.python.org/dev/peps/pep-0008/and in there i saw two
> >> things that i
> >> need to get elaborated.
>
> >> 1. When writing English, Strunk and
> >> White apply.
>
> > If your code needs so much descriptive prose that you have to consult
> > Strunk and White, refactor it to be more clear.   Excessive comments are
> > the hobgoblin of overly complex and/or sloppy code.
>
> Nonsense. Poor English is poor English whether you're writing short one-
> line comments or three hundred page manuals.
>
> store = make_store()
> x = get_stuff(store)  # Get the stuff what was brought at the store.

Perfect example of an unnecessary comment.  The variable and function
names are commentary enough.

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


Re: Regarding coding style

2008-03-07 Thread dave_mikesell
On Mar 7, 10:31 am, "K Viltersten" <[EMAIL PROTECTED]> wrote:
> I've been recommended reading of:http://www.python.org/dev/peps/pep-0008/
> and in there i saw two things that i
> need to get elaborated.
>
> 1. When writing English, Strunk and
> White apply.

If your code needs so much descriptive prose that you have to consult
Strunk and White, refactor it to be more clear.   Excessive comments
are the hobgoblin of overly complex and/or sloppy code.
-- 
http://mail.python.org/mailman/listinfo/python-list



Re: RELEASED Python 2.6a1 and 3.0a3

2008-03-03 Thread dave_mikesell
On Mar 1, 10:53 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> On 1 Mrz., 19:51, Barry Warsaw <[EMAIL PROTECTED]> wrote:
>
> > Python 2.6 is not only the next advancement in the Python 2 series, it
> > is also a transitionary release, helping developers begin to prepare
> > their code for Python 3.0.
>
> Isn't this a silly idea? People have to migrate from 2.5 or lower
> releases to Python 2.6 first just to migrate to Python 3.0? What are
> the inherent / technical reasons that prevent migration directly from
> 2.5 to 3.0?

Not only that, you have to wait for your library providers to migrate
first (PyOpenGL, PyGame, PIL, etc for me).   Hopefully this is the
last quantum shift for a while.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: RELEASED Python 2.6a1 and 3.0a3

2008-03-03 Thread dave_mikesell
On Mar 1, 10:53 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> On 1 Mrz., 19:51, Barry Warsaw <[EMAIL PROTECTED]> wrote:
>
> > Python 2.6 is not only the next advancement in the Python 2 series, it
> > is also a transitionary release, helping developers begin to prepare
> > their code for Python 3.0.
>
> Isn't this a silly idea? People have to migrate from 2.5 or lower
> releases to Python 2.6 first just to migrate to Python 3.0? What are
> the inherent / technical reasons that prevent migration directly from
> 2.5 to 3.0?

Not only that, you have to wait for your library providers to migrate
first (PyOpenGL, PyGame, PIL, etc for me).   Hopefully this is the
last quantum shift for a while.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Run Python app at startup

2008-03-02 Thread dave_mikesell
On Mar 2, 3:37 pm, "SMALLp" <[EMAIL PROTECTED]> wrote:
> Hy.
> I create simple application. Yust an windows and "compile" it with
> py2exe. I add registry  value
> reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v
> MyApp /t REG_SZ /d C:\myapp.exe /f'
>
> And it wont start. When i use console instead od window in py2exe i get
> console opend but it closes.
>
> Program:
> 
> import os
> import wx
>
> app = wx.App()
> frame = wx.Frame(None, -1, "MyFrame")
> frame.Show()
>
> app.MainLoop()
> 
>
> Then in commang prompt:
>
> python.exe setup.py py2exe
>
> 
> from distutils.core import setup
> import py2exe
>
> setup(console=['prog.py'])
> 

Don't you have to include the wxPython code somehow, perhaps on the
command line when building the exe?

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


Re: Python app at startup!

2008-02-29 Thread dave_mikesell
On Feb 29, 7:21 am, SMALLp <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:

>
> > Does it do the same thing when you run it with the Python interpreter?
>
> No. The programm works fine! In interupter and when i "compile" it.

My guess is that you're not including something in the .exe that you
need.  What does your py2exe command line and setup.py look like?

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


Re: Python app at startup!

2008-02-29 Thread dave_mikesell
On Feb 28, 5:07 pm, "SMALLp" <[EMAIL PROTECTED]> wrote:
> Hy. I create simple application. Yust an windows and "compile" it with
> py2exe. I add registry  value
> reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v
> MyApp /t REG_SZ /d C:\myapp.exe /f'
>
> And it wont start. When i use console instead od window in py2exe i get
> console opend but it closes.

Does it do the same thing when you run it with the Python interpreter?

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


Re: Article of interest: Python pros/cons for the enterprise

2008-02-28 Thread dave_mikesell
Good article.  Re: the comparisons with C++, most of my experience is
with C++ and I like it because it's powerful, flexible, portable, and
keeps me employable.  However, I can't think of any application or
system I've written in C++ (or Java or Perl) that could not have been
written in Python.

In my hobbyist work, I've used Python quite a bit and will some more.
It's a joy to program with.  Love to get a Python gig someday, but
there's just not much of a market, and with Ruby on Rails emerging as
the next Silver Bullet, I don't see one emerging soon.

No worries.  C++ and Python will both enjoy long futures.  Longer than
I will be employed.
-- 
http://mail.python.org/mailman/listinfo/python-list