[Tutor] Help

2016-06-28 Thread Aaron Johnson
I have a program that is telling my i need your digital snake, but i dont
want a snake. Help
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Alan Gauld via Tutor
On 28/06/16 03:52, boB Stepp wrote:

Steven has already repolied and my immediate responbse was almost word
for word what he said, sop I'll start again and you can consider this an
addendum to Steve's message :-)

> 1)  I am not ready at this time to take on the challenge of *really*
> getting into understanding *nix by installing something like Arch
> Linux and having to configure almost *everything* myself from scratch.

Debian and Slackware are the nearest I've gotten to that.
Now I use Mint because I don't want to do that...

> However, I do like Arch's install once and enjoy very frequent OS and
> package updates, huge package repository, etc.

Other distros do that too. For example Mint has a variant that
continuously updates. Personally I prefer to keep some control
and only update when I want to. It improves stability too.

> quite functional.  Currently XFCE looks attractive.  I first ran into
> this while looking at (2), but it is popping up quite frequently in
> other Linux distros.

I use Mint on both my desktop and netbook. The desktop uses Cinnamon
while the netbook uses XFCE. I hardly notice the difference.

> 4)  It would be nice if the most recent development tools were part of
> the most recent OS version, such as the latest stable Python 3, gVim,
> Git, etc.  

You usually get the latest but one version when a distro release
first comes out. Distros tend to favour reliability over novelty. That's
where the rolling updates tend to be better, if you want
to be on the bleeding edge. I've just checked my Mint 17 package manager
and 3.4 is still the latest available.

> and make two (or more) Python versions work together without getting
> confused as to which I'm using, etc.  

I'll let Steve answer this in more detail, my approach is very
conservative and I have no plans to upgrade to 3.5 until it appears
courtesy of Mint. If I did have such a need I'd wait till a deb package
appeared somewhere and download that rather than build from scratch.
But these days I'm lazy like that...

> upgrade to the current release without wreaking havoc with OS uses of
> Python.

That should not be a problem.

> 6)  Good documentation available would be a solid plus as well as a
> dedicated, helpful (to newbies like myself) community (Like Tutor!)

The bigger (better known) the distro the better the support.
This is especially true when dealing with commercial software(yes it
doees exist for Linux!). For example I use Corel Openshot for photo
processing and their support is limited to a couple of distros - and
in my experience not great even there! But the forums will
generally make up for any "official" ignorance!

> 7)  It should be easy to install existing software packages without
> having to compile everything from source.  

Compiling is not necessarily a problem When I used Slackware it tended
to download source and build it but the package manager did all of that
for me, I very rarely had to type 'make' myself.

> 8)  How troublesome is malware for Linux?  

I've been running Linux since 1994 and using it as my main OS since
2008 and I've never experienced any malware. (The same is true on my Mac
which I bought in 2000) On Windows I've had 3 instances to deal
with (since 1991). If you take sensible precautions Malware should
not be an issue. (I do have Clam anti-virus and run a scan once
a week or so, but it has never found anything)

> loads.  I *really* would like to have a snappy OS where everything
> *stays* snappy with minimal effort on my part.

I'm running Mint 17 on my main desktop (4 cores, 3GHz, 8GB RAM,
1.5TB disk space) and on my ancient(2008) eeePC Netbook (1 Atom CPU @
1GHz, !GB RAM, 20GB "disk" - actually flash memory). That's the exact
same OS, apart from desktop, and performance is fine on both.

> 10)  I have a hard drive that has mostly text-based stuff, like Python
> programs, which is formatted NTFS.  Can I share this with both Win7
> and Linux?  

Yes, I do that with several disks and I had to check the disk tool
to see which was which.

> What about the differences in line endings?  Am I going to
> have to be constantly converting back and forth?

Not unless you work on files across OS. If you work on Windows files
on Windows and Linux on Linux it's not an issue. But if you work
across OS it's worth finding tools (like VIM) that can handle
it transparently. But there is no doubt it does occasionally bite
you with less intelligent tools - especially command-line filters
and the like, and even more so if they use regex. (But it's not
an NTFS issue since FAT disks will be the same)

I run Virtual Box for XP which I only use when testing new
software that needs to run on it.

I do have two dedicated PCs for running Windows, one runs
Windows 10 which I use mainly to keep abreast of what's
what in Windows land and the other runs Windows 7 for when
I really need Photoshop/Lightroom/DxPro (increasingly rare).
They both use the Linux box (over hardwired Gigabit LAN) for
the bulk of thei

Re: [Tutor] Help

2016-06-28 Thread Alan Gauld via Tutor
On 28/06/16 06:54, Aaron Johnson wrote:
> I have a program that is telling my i need your digital snake, but i dont
> want a snake. Help

I'm not sure what you expect us to do based on the information
you've given.

Can you be more specific?
What OS are you running?
On what platform (phone, tablet,laptop, desktop?)
What program says you need a snake (I assume you mean python?)


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Help

2016-06-28 Thread David Palao
2016-06-28 7:54 GMT+02:00 Aaron Johnson :
> I have a program that is telling my i need your digital snake, but i dont
> want a snake. Help
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

I think you have to decide. I see two options:
1) keep obeying your program. That sounds a bit hazardous to me.
Consider that the 3 laws of robotics apply to machines not to humans!
2) Ignore your program.
You ask for help. My suggestion is: take 2).

Best
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Alex Kleider



On 2016-06-27 20:48, Steven D'Aprano wrote:


Also Debian. Not Ubuntu.


Can you elaborate why you specifically exclude Ubuntu?

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Steven D'Aprano
Following up from my earlier post...

On Mon, Jun 27, 2016 at 09:52:50PM -0500, boB Stepp wrote:

> 4)  It would be nice if the most recent development tools were part of
> the most recent OS version, such as the latest stable Python 3, gVim,
> Git, etc.

Generally, the major distros have something very close to the most 
recent version of the various tools, applications, OS, etc.

For those who like to live on the bleeding edge, you can install 
something like Debian unstable, and what fun that is, but generally it's 
better to use the stable versions instead.


> One of the commonly recurring questions I see on this list
> (and the main one)is that the pre-installed Python from the OS is a
> few iterations behind the current release, how can I get the latest
> and make two (or more) Python versions work together without getting
> confused as to which I'm using, etc.

My usual advice is:

- Don't touch the system Python. Consider it a black box and leave it 
alone. To be more precise, it's okay to *use it* to run software, it's 
even okay to use your system's package management tools to install new 
libraries for it (but they're unlikely to be the latest version), but 
anything that requires you to manually touch it, don't do it!

- Instead, install a second (or as many as you want) seperate Pythons 
and use them. I always install from source, so if I can do it, anyone 
can :-)

The instructions in the README file are pretty good, but if you need 
help, feel free to ask. That will be on-topic :-)

Basically, I download whichever versions I want. Really old versions, 
like Python 1.5 and older, may be hard to compile. Moderately old ones, 
like 2.1 or 2.2, are hard to get support for readline and other goodies. 
But unless you're a geek like me, why are you worried about ancient 
versions of Python? So if you concentrate on Python 3, they should be 
more-or-less easy to compile.

Now you have the system Python, which you run using "python", and the 
one you installed, which you run using "python3". Easy.

If you have multiple versions of Python, say 3.5 and 3.6, you can just 
specify the version: "python3.5". Or you can provide the full path. Or 
you can set up a shell alias, for interactive use. In my .bashrc file I 
have a bunch of aliases and commands for making Python easier to use:

# my system Python is Python 2.4
alias python='python2.7'
# set some extra directories to look for Python modules
export PYTHONPATH="..."
# run the Python startup file on interactive startup
export PYTHONSTARTUP=/home/steve/python/utilities/startup.py
# but not in Python 1.5, because that's too old
alias python1.5='env -u PYTHONSTARTUP python1.5'

Because these commands only apply to me, when I type "python" at the 
shell prompt, I get Python 2.7, but when a vendor script runs "python", 
it gets the version it expects, namely 2.4.


[...]
> 7)  It should be easy to install existing software packages without
> having to compile everything from source.  It would be nice if (to me)
> hidden dependencies are made clear, though I realize that part of the
> *nix learning curve is figuring out how to handle these sorts of
> issues.

As I mentioned before, that's the whole point of the package management 
system. Coming from Windows, you really don't know what you're missing.

> 8)  How troublesome is malware for Linux?  I realize that it is not
> the normal target of crackers, but is it common enough that I need to
> install whatever the Linux equivalent is of anti-malware/virus
> software?

Technically, there is malware for Linux. The company I work for was once 
even hired to remove a Linux virus from a system. Back in 1998 or 
thereabouts.

"Drive by downloads", viruses, spyware etc. that you're familiar with 
from Windows is practically non-existent in the Linux world. There's 
probably some malware that might attack your browser, but I've never 
heard of it, and if you run NoScript in Firefox, and block untrusted 
sites, you should be fine.

However, if your Linux machine is visible from the Internet, you 
should expect to be constantly under attack from remote bots trying to 
log in. I have two firewalls between me and the Internet:

- my router runs a firewall;
- my Linux server runs a firewall.

Make sure your Linux system is running a firewall. iptables or ipchains 
are the standard firewalls for Linux, although I daresay by now Ubuntu 
has invented its own...

If you allow remote access to your Linux machine via ssh, make sure you 
disable root logins over ssh. I also prefer to run Fail2Ban, which bans 
(temporarily, or permanently) logins from IP addresses if they have too 
many failed attempts.


> 9)  Despite having an i7 quad-core 3.6 GHz CPU with 32 GB RAM, it
> seems that Windows with all of the constant security updating, etc.,
> tends to make my PC sluggish and I am tired of sifting through
> everything periodically to clear out the cruft and startup junk that
> loads.  I *really* would like to have a snappy OS 

Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Steven D'Aprano
On Tue, Jun 28, 2016 at 07:58:22AM -0700, Alex Kleider wrote:
> 
> 
> On 2016-06-27 20:48, Steven D'Aprano wrote:
> 
> >Also Debian. Not Ubuntu.
> 
> Can you elaborate why you specifically exclude Ubuntu?

I've been bitten by an Ubuntu install where half of the GUI apps were 
unstable and simply didn't work. They either wouldn't launch at all, or 
they'd launch and as soon as you tried to do something they'd crash. And 
no, it wasn't using the unstable repo.

And then Ubuntu went to Unity, and a few other annoyances which 
individually wouldn't matter much, but the overall feel is just ... 
wrong. For instance, Mark Shuttleworth is now suggesting that Ubuntu is 
going to lead the way to a brave new world of package management "snap":

http://kmkeen.com/maintainers-matter/

No thank you, I don't want to get my software directly from the vendor, 
at least not exclusively. 

I just get the feeling that Ubuntu is keen to disrupt working systems 
just for the sake of disruption, and that the community is filled with 
the Cascade of Attention-Deficit Teenagers that Jamie Zawinski 
thinks so highly of .

And then I noticed that they have a *tutorial* to teach people how to 
sign their Code Of Conduct, said tutorial starting with "First, create a 
Launchpad account":

https://wiki.ubuntu.com/Forums/CoCSA_Tutorial

at which point I decided they've lost the plot.

I think at this point probably the only thing which would get me to go 
back to Ubuntu is if they said "You know what, systemd actually is a 
terrible idea" and didn't replace it with something worse.



-- 
Steve
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread boB Stepp
On Mon, Jun 27, 2016 at 9:52 PM, boB Stepp  wrote:

[...]
> 10)  ...

I forgot one concern last night:

11)  My current graphics adapter is made by NVIDIA.  Their drivers are
proprietary.  Is this going to be a deal breaker for Linux?

12)  And what about wireless networking?  My ASUS motherboard has
builtin wireless, but the software used to manage its settings may be
(I cannot remember for certain.) Windows-only.  Will this be an issue?


-- 
boB
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread David Rock
Here’s my take on a lot of this (it’s similar to what’s been said already, so 
this is more of a general philosophy of distros).

There are basically three types of distros (you can subdivide 100 ways, but 
these are the primary categories)

1. slower-moving, very stable, binary installs
2. fast-moving, stable-ish, binary installs
3. fast-moving, stable-ish, source installs

In a relative sense, linux stability is good regardless.  I only point out 
“very stable” because they are typically bulletproof on purpose, at the expense 
of some flexibility.  

#1 examples:
Debian stable (codename jessie)
Red Hat Enterprise Linux (RHEL)
CentOS (a free RHEL repackaging)

The primary issue with these slow-moving binary distros is they are stable by 
not introducing new things quickly, so the versions of software available in 
their software repositories are sometimes ancient.  That’s not to say you can’t 
install something newer, but it won’t be “standard.”  If you are looking for 
latest and greatest, these might not be for you, but they are good for what 
they do.  I support RHEL servers as my day job, but use debian at home.
Since debian recently changed it’s stable branch, it does contain many 
“reasonably new” versions of most software compared to RHEL, but you won’t see 
fast adoption of new stuff moving forward (besides security updates).

 #2 examples:
debian testing (codename stretch)
Fedora (this is where things get tested before they go into RHEL)
Ubuntu (based on debian)

Pros with #2: "latest and greatest” available in the official repositories
Cons: "latest and greatest” available in the official repositories

It’s a double-edged sword.  The closer you get to the bleeding edge, the higher 
the risk of something being “not quite right” but you are much more likely to 
find newer versions of software.  It’s also worth noting; don’t let the 
“testing” in debian testing scare you, it’s still a very stable distro.

#3 examples:
gentoo
linux from scratch (LFS)

These are interesting in that all code is built from source, rather than 
installed as binary packages.  In the case of gentoo, that’s not really a 
problem, though.  The package management tools take care of the work for you, 
it just means it takes longer to install a given package if your system is 
slower at compiling.  LFS is not one I would recommend unless you really want 
to learn how to build a linux system _literally_ from scratch.  I have also run 
gentoo at home for years, with very few issues, but it’s an example of getting 
closer to the bleeding edge.


Another class of linux distribution you may want to consider is anything with a 
“LiveCD.” These are full distributions designed to run off a bootable 
CD/DVD/UBS stick.  There are LiveCD versions for several of the distributions 
out there and they may give you a better feel for what user experience you want 
before taking the plunge.   They don’t install to your hard drive at all 
(although some have an option to if you wish later) and give you an easy look 
at how they work.  I know you didn’t want to run linux in a VM, but I highly 
suggest that you _do_ for a while first.  Again, that is an easy way to try out 
several distros and decide what you like _before_ committing to a dual-boot.  
It’s a lot easier to handle the dual-boot once you know which one you want to 
try.  Going back later and switching to a different distro gets sticky.  
 

Based on what you’ve listed as requirements, debian is probably a solid choice 
(either stable; or testing if stable doesn’t have what you need).  Since this 
is a Python mailing list, the current pythons available in stable are 2.7.9 and 
3.4.2, which should give you a good indicator if that will suit your needs 
(i.e., if they are “new enough” for you).  testing is 2.7.11 and 3.5.1.  It’s 
also worth noting that debian does allow you to run stable, and cherry-pick 
packages from testing; that’s a little advanced (but something to keep in mind).


— 
David Rock
da...@graniteweb.com




___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread David Rock

> On Jun 28, 2016, at 12:49, boB Stepp  wrote:
> 
> I forgot one concern last night:
> 
> 11)  My current graphics adapter is made by NVIDIA.  Their drivers are
> proprietary.  Is this going to be a deal breaker for Linux?

Typically, no.  At a minimum, you will still have native support for basic GUI 
display.  There are also nvidia-supplied drivers available that can be used, 
but they are typically needed only for advanced 3D acceleration (if at all).  
My 15-year old laptop had an Nvidia Geforce 2 Go card and it was fine.


> 12)  And what about wireless networking?  My ASUS motherboard has
> builtin wireless, but the software used to manage its settings may be
> (I cannot remember for certain.) Windows-only.  Will this be an issue?

Again, not likely a problem.  Most hardware nowadays is reasonably well 
supported, although some advanced features may not be.  The easiest thing to do 
is google for your distro name and the brand of device and see if there are any 
issues.

If you follow my earlier advice on trying a liveCD of your chosen distro first, 
that will give you a really good idea if your hardware will work.


— 
David Rock
da...@graniteweb.com




___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Most efficient way to read large csv files with properly converted mixed data types.

2016-06-28 Thread Alan Gauld via Tutor
On 26/06/16 07:21, Ek Esawi wrote:
> The first step of my plan is to do basic statistical analysis. The 2nd step
> is to chose a sample from each file and do more advanced statistical
> analysis for which i plan to use  R.

If you are just extracting data and repackaging it for R then the format
doesn't matter too much. You certainly won;t need a named tuple. Either
use the dictionary reader if you want to access fields by name
(especially good if the incoming CSV file format is likely to change) or
use the standard reader and use indexes to get the fields you need.

Writing it out you can again use the csv writers. Which writer will
depend on the format your stats package wants/prefers.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Wolfgang Maier

On 28.06.2016 18:58, Steven D'Aprano wrote:

On Tue, Jun 28, 2016 at 07:58:22AM -0700, Alex Kleider wrote:



On 2016-06-27 20:48, Steven D'Aprano wrote:


Also Debian. Not Ubuntu.


Can you elaborate why you specifically exclude Ubuntu?


I've been bitten by an Ubuntu install where half of the GUI apps were
unstable and simply didn't work. They either wouldn't launch at all, or
they'd launch and as soon as you tried to do something they'd crash. And
no, it wasn't using the unstable repo.

And then Ubuntu went to Unity, and a few other annoyances which
individually wouldn't matter much, but the overall feel is just ...
wrong. For instance, Mark Shuttleworth is now suggesting that Ubuntu is
going to lead the way to a brave new world of package management "snap":

http://kmkeen.com/maintainers-matter/

No thank you, I don't want to get my software directly from the vendor,
at least not exclusively.

I just get the feeling that Ubuntu is keen to disrupt working systems
just for the sake of disruption, and that the community is filled with
the Cascade of Attention-Deficit Teenagers that Jamie Zawinski
thinks so highly of .

And then I noticed that they have a *tutorial* to teach people how to
sign their Code Of Conduct, said tutorial starting with "First, create a
Launchpad account":

https://wiki.ubuntu.com/Forums/CoCSA_Tutorial

at which point I decided they've lost the plot.



ok, this *very* subjective Ubuntu-bashing by Steven, begs a contrary 
opinion:


I'm running Ubuntu (currently 14.04, going to switch to 16.04 soon) on 
my laptop in a dual-boot configuration since several years now - without 
any problem worth mentioning here. The Windows was Windows 7 first, now 
since half a year is Windows 10 (which by itself has lots of issues 
still, but none related to dual booting).


Not everybody likes Unity, but if you want a more traditional look and 
feel and you're worried about performance, you can always go for Ubuntu 
Mate, which I'm using on another system and have nothing to complain about.


Regarding snap packages, the thing that concerns me about them is that 
canonical, once more, tries to develop something separately from the 
rest of the Linux world. The concept itself, however, is not a diabolic 
invention by them (as Steven likes to put it). Look at FlatPak, which is 
the cross-Linux equivalent of snap packages and sees now better support 
by the latest Fedora release 
(https://fedoramagazine.org/introducing-flatpak/).


Ubuntu has an extremely large (for a Linux distribution) user base and 
as pointed out by others that's a clear advantage when you try to solve 
problems with it.


Regarding file system access, I never bothered to set up a dedicated 
shared partition just for data exchange. Ubuntu reads and writes the 
NTFS-formatted regular Windows partition without any problem (since 
years as I said already). Of course, the other way around does not work 
so you have to remember to copy things over to the Windows partition if 
you want to have them available in Windows.


As you can maybe guess from my rather moderate tone here, I am not very 
much into Linux distro wars. I'm using a Fedora machine at work (on a 
triple(!) boot machine (with Windows 7 and OS X)), which also works very 
well and if you go for *any* major distribution you will probably be 
fine. Just don't be afraid of Ubuntu because certain people have strong 
feelings about it.


Best,
Wolfgang

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread boB Stepp
On Mon, Jun 27, 2016 at 10:48 PM, Steven D'Aprano  wrote:
> On Mon, Jun 27, 2016 at 09:52:50PM -0500, boB Stepp wrote:
>> My eyes are glazing over from hours and hours of Googling on this.  I
>> cannot come to a rational conclusion.  Perhaps someone can help me to
>> do so.  I currently have a 64-bit desktop PC that I built myself.  It
>> is running Win7 Pro 64-bit.  I need to keep this OS as I need to run
>> various chess software which can be quite CPU and RAM hogging.  So an
>> emulation layer like Wine would not be desirable.  I don't want to run
>> Linux in a virtual environment; I'd rather have a dual-boot setup.
>
> What about running Win7 in a virtual machine?

What type of performance hit will I take when running CPU intensive
processes?  I don't yet have any real experiences with running virtual
machines.  If this is acceptable, I am willing to forget the dual-boot
idea and just jump in the deep end with Linux.  The only thing I would
hate is reinstalling Win7 into the virtual environment and the endless
sequence of updating ...

>
> Otherwise, I like:
>
> Linux Mint. Good software repositories, more conservative than Ubuntu,
> not as stick-in-the-mud as Debian. Based on Debian/Ubuntu so the quality
> is good, mostly aimed at non-hard core Linux geeks.

Alan obviously likes this distro.  And my teacher wife at the
beginning of this summer break switched several of her class PCs to
Mint.  Be nice to be writing software for the same environment, so
this might be a positive here.

-- 
boB
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Wolfgang Maier

On 29.06.2016 01:16, boB Stepp wrote:

On Mon, Jun 27, 2016 at 10:48 PM, Steven D'Aprano  wrote:

What about running Win7 in a virtual machine?


What type of performance hit will I take when running CPU intensive
processes?  I don't yet have any real experiences with running virtual
machines.  If this is acceptable, I am willing to forget the dual-boot
idea and just jump in the deep end with Linux.  The only thing I would
hate is reinstalling Win7 into the virtual environment and the endless
sequence of updating ...




Of course, there is a performance hit when using a virtual machine. 
After all, you have a running Windows or Linux, whichever way round you 
do things, from which you start it.
How much that matters, depends strongly on what you want to do though. 
After all, you could do performance-critical stuff in your real OS 
instead of inside the VW.
I still like dual-boot better for home use. If you have multiple users 
or even just guests they might not all be used to having to start a VM 
to use Windows.





Otherwise, I like:

Linux Mint. Good software repositories, more conservative than Ubuntu,
not as stick-in-the-mud as Debian. Based on Debian/Ubuntu so the quality
is good, mostly aimed at non-hard core Linux geeks.


Alan obviously likes this distro.  And my teacher wife at the
beginning of this summer break switched several of her class PCs to
Mint.  Be nice to be writing software for the same environment, so
this might be a positive here.



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread David Rock

> On Jun 28, 2016, at 18:16, boB Stepp  wrote:
> 
> On Mon, Jun 27, 2016 at 10:48 PM, Steven D'Aprano  wrote:
>> 
>> 
>> What about running Win7 in a virtual machine?
> 
> What type of performance hit will I take when running CPU intensive
> processes?  I don't yet have any real experiences with running virtual
> machines.  

Ultimately, not likely to be all that much.  The bigger constraint with running 
VMs is often available ram.  

>> 
>> Otherwise, I like:
>> 
>> Linux Mint. Good software repositories, more conservative than Ubuntu,
>> not as stick-in-the-mud as Debian. Based on Debian/Ubuntu so the quality
>> is good, mostly aimed at non-hard core Linux geeks.
> 
> Alan obviously likes this distro.  And my teacher wife at the
> beginning of this summer break switched several of her class PCs to
> Mint.  Be nice to be writing software for the same environment, so
> this might be a positive here.

That’s as good a reason as any. :-)

As I’m sure you have gathered by now, picking a distro is a lot like picking a 
brand of car.  *Linux* underneath is largely similar across all the distros, 
what you are picking is the wrapper around it.  It’s more about the package 
manager used, and the philosophy of the maintainers than anything.  The only 
logical option is throw a dart and just try one.  If you don’t like how they do 
things, throw another dart until you find what you like.  This is the blessing 
and the curse of linux; endless variety. 

Regarding the package management, there are basically two models: RPM-based and 
dpkg-based (yes, there are others, but these are the two big players).  
RPM-based (often referred to as yum) is anything similar to Red Hat (fedora, 
CentOS, etc), dpkg-based (sometimes referred to as apt) is anything based on 
debian (ubuntu, mint, etc).  How they work is fundamentally different, but any 
distro that uses the same package management will largely “feel” like any other.

If you value Alan’s opinion (and arguably, your wife’s is more important), try 
out Mint. You may or may not like it, but you won’t know until you try.  I 
still say a dry run in a VM to get a feel for it would do wonders for you 
regardless.


— 
David Rock
da...@graniteweb.com




___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Coding help 1D diffusion equation

2016-06-28 Thread Oscar Benjamin
On 26 Jun 2016 13:39, "Severin Langberg"  wrote:
>
> Hello!
>
> I have a problem with solving the 1D diffusion equation for Gaussian
> initial using odeint. Anyone care to help?

Odeint is for ordinary differential equations (ODEs). The diffusion
equation is a partial differential equation (PDE).

It is possible to use odeint this way but it would help if you could give
more information about the equation you want to solve and the boundary
conditions you have.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Alan Gauld via Tutor
On 29/06/16 00:34, David Rock wrote:

> If you value Alan’s opinion

Just to be clear, I run mint because it works but I've used many
distros in the past, starting with Slackware then Red Hat then
Mandrake and Ubuntu with equally good results. I don't like
Ubuntu's Unity UI so switched to Mint but it's a subjective
rather than political/idealogical/technical decision.

> I still say a dry run in a VM to get a feel for it would do wonders 

I totally agree. I regularly spin up new distros just to take a
look (Vector, TinyLinux, Gentoo, CentOS, have all been on a VM
near me :-)

As for performance hit of a VM - I only really notice it on graphics
intensive stuff.

Let me put it another way: many commercial data centers now only
run servers under VMs. The extra maintainability, security and
safety outweighs the small performance hit. When you buy a
"server" from a data center these days you are most likely
buying a VM image running on a much bigger box.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] For-else... Any other handy constructs hiding in Python?

2016-06-28 Thread Fred Stluka

(Re-sending to list instead of just to Alex.)

Alex,

Are you aware of these?
- try ... finally
- try ... except ... else
- continue
- break
- with
- @decorator
- x = a if b else c
   -- Like the ternary operator a?b:c in other languages
- x = a or b
  -- Assigns a, defaulting to b if a is false, unlike other
   languages that might assign True or False
  -- Short than the equivalent: x = a if a else b

Any other cool tricks out there, anyone?
--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.


On 6/24/16 9:07 AM, Alex Hall wrote:

Hey all,
I was looking at how to make my different jobs retry themselves, and found
the for-else construct. I know loops, comprehensions, ifs, and the like,
but I never knew for-else was available. Are there other constructs that I
may have missed--shortcuts or seemingly odd pairings of control statements
like this? Python has a lot of really cool shortcuts and features, like
get/hasattr, the yield keyword, or comprehensions. I always like finding
more to add to the toolbox.



___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Alex Kleider



On 2016-06-28 11:46, David Rock wrote:

Here’s my take on a lot of this (it’s similar to what’s been said
already, so this is more of a general philosophy of distros).


Very interesting reading for which I thank you.
I'd be interested in knowing if you'd make a distinction between 'the 
latest

Ubuntu' and their LTS releases?
My approach has been to use LTS releases only and not bother with the 
ones

in between.

Comments?
a
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] OT: Recommendations for a Linux distribution to dual-boot with Win7-64 bit

2016-06-28 Thread Wolfgang Maier

On 29.06.2016 04:16, Alex Kleider wrote:



On 2016-06-28 11:46, David Rock wrote:

Here’s my take on a lot of this (it’s similar to what’s been said
already, so this is more of a general philosophy of distros).


Very interesting reading for which I thank you.
I'd be interested in knowing if you'd make a distinction between 'the
latest
Ubuntu' and their LTS releases?
My approach has been to use LTS releases only and not bother with the ones
in between.

Comments?
a


David kind of discussed the difference between them in an earlier post 
when he grouped distros into three categories, quoting him:


1. slower-moving, very stable, binary installs
2. fast-moving, stable-ish, binary installs
3. fast-moving, stable-ish, source installs

In a relative sense, linux stability is good regardless.  I only point 
out “very stable” because they are typically bulletproof on purpose, at 
the expense of some flexibility.


#1 examples:
Debian stable (codename jessie)
Red Hat Enterprise Linux (RHEL)
CentOS (a free RHEL repackaging)


Just add Ubuntu LTS releases here, while other Ubuntu releases fall in 
category #2. An LTS release never sees major version upgrades over its 
lifetime for its Linux kernel nor for other software package-managed by 
canonical so near the end of it things may be pretty outdated. That's 
not necessarily a big deal though. If your system works for you, why 
change it. I've sometimes upgraded to new releases just out of interest, 
but never because I felt I really had to.


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor