Re: Need Help w. PIP!

2015-09-05 Thread Thomas 'PointedEars' Lahn
Cody Piersall wrote:

> Please respond to the list as well as the person you're actually talking
> to.  It works out better for everyone that way.   (You should just have to
> "reply all" instead of "reply").

“Better” as in “getting/reading/downloading the same message *twice*”?

The rule of thumb is: write here, read here.

Please see my sig and reconsider.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Need Help w. PIP!

2015-09-05 Thread Steve Burrus
*Boy "eryksun" I can certsainly  tell that you are quite a technically -
minded person! All that matters to me is that I can simply type "pip" at
the command prompt without any problems. Well another [lesser] concern is
that I can't use the regular Windows 10 instead of this Build 10074 of it.*

*
Steve Burrus *


*On Sat, Sep 5, 2015 at 1:30 AM, eryksun > wrote:*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *On Fri, Sep 4, 2015 at 10:07 PM, Steve Burrus  > wrote: > well everyone there must be sometjhing
> about upgrading Python up to version 3.5 rc > because everything works just
> fine now, beyond my wildest dreams! I am even able > now to type in "pip"
> and get the usual info. on it and I have connected to the Django > server
> and configured the admin so thanx for eveyone who tried to help me. I just
> tested running pip.exe on a VM with Windows 10, build 10074. It surprised
> me that it worked, so I checked the source code of Vinay's [simple
> launcher][1]. Apparently the simpler launcher merely asserts that creating
> the job object succeeds, so it will only fail in a debug build. (See
> run_child in launcher.c). Depending on the nature of the script it could be
> confusing if there's no job object and the launcher gets killed. This
> leaves python.exe and the shell competing for console input. That said, it
> shouldn't really matter for a simple program such as pip. But the full
> py.exe launcher used by Python always fails if creating the job object
> doesn't succeed. (Oddly, it doesn't fail if *assigning* the child to the
> job fails; I guess because Windows 7 lacks support for job hierarchies, but
> still, it makes no sense to care about creating something that you don't
> care about using.) So for build 10074 of Windows 10, ensure the filetypes
> for .py and .pyw scripts (installed as Python.File and Python.NoConFile)
> run python.exe and pythonw.exe instead of py.exe and pyw.exe. Otherwise you
> won't be able to run scripts directly at the command prompt or by double
> clicking them in Explorer. [1]:
> https://bitbucket.org/vinay.sajip/simple_launcher/src
>  *
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: .py to .html generation

2015-09-05 Thread injectnique
On Thursday, September 3, 2015 at 1:04:45 AM UTC-4, [email protected] wrote:
> Hi friends!
> 
> Can some one help me with the best module and/or its tutorial, to generate 
> html reports for python scripts?
> 
> I tried pyreport and sphc; but, i am getting errors.

https://github.com/dddomodossola/gui
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Program in or into (was Python handles globals badly)

2015-09-05 Thread Steven D'Aprano
On Sat, 5 Sep 2015 01:18 pm, Rustom Mody wrote:

> Here's mergesort written in various languages
> http://rosettacode.org/wiki/Sorting_algorithms/Merge_sort
> 
> You could look at the java if you like but I think C# takes the cake.
> And of course also there's the python
> 
> Now the thought experiment:
> 
> For some reason you need to code in C#
> [You need to do this part of the experiment honestly!!]
> 
> Would you write the C# code?
> Or would you write the python-ish code in C# ?


That depends. Is the example C# code idiomatic for the language? Or was it
written by somebody ignorant of C#, and consequently is a poor example of
badly-written and unidiomatic "Java in C#"?

If the first, then I expect I would write the C# code, because it is
idiomatic and works. What would you do?

It is certainly true that C# appears to be a more verbose language than
Python. Based on this example, it prefers to use classes with methods
rather than stand-alone functions, it requires static declarations, there's
a lot of boilerplate needed to get things to work. It seems to lack some
nice semantic features of Python, such as list slices and the ability to
treat lists/arrays as first class values, that make Python so easy to work
with. If C# lacks those features, how do you expect to use them?

Lacking some of those features (or at least having significant downsides to
the use of them) is why idiomatic C# or Java code looks the way it does. 



-- 
Steven

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


Re: Program in or into (was Python handles globals badly)

2015-09-05 Thread MRAB

On 2015-09-06 03:35, Steven D'Aprano wrote:

On Sat, 5 Sep 2015 01:18 pm, Rustom Mody wrote:


Here's mergesort written in various languages
http://rosettacode.org/wiki/Sorting_algorithms/Merge_sort

You could look at the java if you like but I think C# takes the cake.
And of course also there's the python

Now the thought experiment:

For some reason you need to code in C#
[You need to do this part of the experiment honestly!!]

Would you write the C# code?
Or would you write the python-ish code in C# ?



That depends. Is the example C# code idiomatic for the language? Or was it
written by somebody ignorant of C#, and consequently is a poor example of
badly-written and unidiomatic "Java in C#"?

If the first, then I expect I would write the C# code, because it is
idiomatic and works. What would you do?

It is certainly true that C# appears to be a more verbose language than
Python. Based on this example, it prefers to use classes with methods
rather than stand-alone functions, it requires static declarations, there's
a lot of boilerplate needed to get things to work. It seems to lack some
nice semantic features of Python, such as list slices and the ability to
treat lists/arrays as first class values, that make Python so easy to work
with. If C# lacks those features, how do you expect to use them?

Lacking some of those features (or at least having significant downsides to
the use of them) is why idiomatic C# or Java code looks the way it does.


C# and Java don't have functions. The closest you can get is static
(class) methods.

Note:

C programs start with the "main" function. Java tries to follow that
pattern, except that it doesn't have functions, so a static method
"main" is used instead, which means that it also requires a class to
hold it.

Similarly, C has "sin" and "cos" functions. Java tries to follow that
pattern, except that it doesn't have functions, so a static methods are
used instead, which means that it also requires a class to hold them.

And C# follows what Java does.

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


Re: Program in or into (was Python handles globals badly)

2015-09-05 Thread Rustom Mody
On Sunday, September 6, 2015 at 8:05:28 AM UTC+5:30, Steven D'Aprano wrote:
> On Sat, 5 Sep 2015 01:18 pm, Rustom Mody wrote:
> 
> > Here's mergesort written in various languages
> > http://rosettacode.org/wiki/Sorting_algorithms/Merge_sort
> > 
> > You could look at the java if you like but I think C# takes the cake.
> > And of course also there's the python
> > 
> > Now the thought experiment:
> > 
> > For some reason you need to code in C#
> > [You need to do this part of the experiment honestly!!]
> > 
> > Would you write the C# code?
> > Or would you write the python-ish code in C# ?
> 
> 
> That depends. Is the example C# code idiomatic for the language? Or was it
> written by somebody ignorant of C#, and consequently is a poor example of
> badly-written and unidiomatic "Java in C#"?
> 
> If the first, then I expect I would write the C# code, because it is
> idiomatic and works. What would you do?

I'd cringe
And suspect malefide intent on the part of those who wrote that code to show
C# in bad light :-)

Thats partly joke because the java looks somewhat better and C# and Java are
not very different

My main point of course was that between the two extremes:
1. What the language mandates eg python mandates a ':' after the if condition
C mandates that it be parenthesized
2. Matters of free personal taste

there is a large in-between grey area where the language's 'keepers' 
recommend best (and not) practices which may not exactly be the best for a
programmer.

eg Consider perl and python.
As for regex support they are mostly the same
Yet a typical pythonista takes pride that he wrote a 10 line re-free function
where a 2-line re would have sufficed
A typical perl guy will take pleasure in exactly the opposite achievement

A programmer wanting to get his job done need not believe any of these 
fads&fancies
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Program in or into (was Python handles globals badly)

2015-09-05 Thread random832
Steven D'Aprano  writes:

> That depends. Is the example C# code idiomatic for the language?

Not in the least. My first clue was Int32 - nobody actually uses those
names.

> Or was it
> written by somebody ignorant of C#, and consequently is a poor example of
> badly-written and unidiomatic "Java in C#"?
>
> If the first, then I expect I would write the C# code, because it is
> idiomatic and works. What would you do?
>
> It is certainly true that C# appears to be a more verbose language than
> Python. Based on this example, it prefers to use classes with methods
> rather than stand-alone functions,

You certainly need to put methods in a class, but it's absurd that they
made it an actual instantiable class with instance properties for the
variables they required for sorting, rather than there being a class
that's just there as a container for the functions. I wouldn't do that
in Java, either.

They also gave it features a lot of the shorter versions on the page
don't have; the ability to fall back to insertion sort for short lists,
and the ability to tune exactly how it does that, and how many
subsequences to sort and merge.
-- 
https://mail.python.org/mailman/listinfo/python-list