Re: [Tutor] Python books

2012-11-09 Thread wesley chun
there is no one single book that has all you're seeking, however you can
probably find one or two that may suit your fancy in these Python reading
lists that i made earlier this year: http://goo.gl/i4u0R

note that the 3rd set of books are some of the references that you're
seeking.

best of luck!
--wesley


On Fri, Nov 9, 2012 at 5:18 PM, Ed Owens  wrote:

> I've been trying to learn Python, writing a Blackjack program. Seems
> that's a common problem for learning.  I'm not in a class or school, just
> working on my own.  I've been working in Python 2.7, and considering moving
> up to 3.x.  My programming background is ancient, having done most of my
> programming in FORTRAN. I have been using free internet resources to learn,
> mostly Google searches on syntax, and their free courses.
>
> I have the basic game done: dealing from a shoe of multiple decks, splits,
> betting, etc.  and started to work on the harder parts such as graphics of
> the table with cards, managing record keeping, and so on.  There seem to be
> a plethora of packages and options, many of them outside of the "standard"
> Python installation.  Plus, I'm still discovering how to do things with the
> standard library.  I need more structure and organization!
>
> I have one book, "Python Programming for the Absolute Beginner" by Dawson,
> which is too plodding. Can you experts recommend a Python library?  I would
> like to have:
>
> A command reference for the basic library.
> A comprehensive "How to" course for the basic library.
> Graphics in Python
> Data Management in Python
> Using the internet with Python
> (maybe Real Time(ish) Python)
> A comprehensive "Learn Python" course that puts all this together
>
> I realize that this is outside of the "help with this code" request, but I
> would value your advice.
>
> Ed O
>
>
> __**_
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor
>



-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
+wesley chun : wescpy at gmail : @wescpy
Python training & consulting : http://CyberwebConsulting.com
"Core Python" books : http://CorePython.com
Python blog: http://wescpy.blogspot.com
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] encrypt a file in Python3

2012-11-09 Thread Mark Lawrence

On 10/11/2012 05:54, ke...@kendy.org wrote:

Hello!

I want to encrypt a file, then decrypt it. I prefer to do it without adding any
packages. I found

http://eli.thegreenplace.net/2010/06/25/aes-encryption-of-files-in-python-with-pycrypto/

which seems like a good approach. How can I get the import to work for python 3?


You install pycrypto on Python 3, which contradicts your stated preference.


Here's what I get:

$ uname -a
Linux laptop 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012
i686 i686 i386 GNU/Linux
$ python3.2
Python 3.2.3 (default, Sep 10 2012, 18:17:42)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import os, random, struct
from Crypto.Cipher import AES

Traceback (most recent call last):
   File "", line 1, in 
ImportError: No module named Crypto.Cipher

dir()

['__builtins__', '__doc__', '__name__', '__package__', 'os', 'random', 'struct']

import Crypto.Cipher

Traceback (most recent call last):
   File "", line 1, in 
ImportError: No module named Crypto.Cipher




Has Crypto.Cipher been renamed in Python 3? Is it supported yet? Python2.7 works
fine.


Somebody (you?) has already installed pycrypto on 2.7.



I saw so many "crypto" packages at http://pypi.python.org/pypi/ that I wouldn't
know where to start. I want something simple. Do you have a suggestion?

$ python2.7
Python 2.7.3 (default, Aug  1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import os, random, struct
from Crypto.Cipher import AES
dir()

['AES', '__builtins__', '__doc__', '__name__', '__package__', 'os', 'random',
'struct']




$ python2.7
Python 2.7.3 (default, Aug  1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import Crypto.Cipher
dir()

['Crypto', '__builtins__', '__doc__', '__name__', '__package__']




Thanks so much! I learn a lot from you guys!


You haven't seen my bill yet :)



Ken
ke...@kendy.org



--
Cheers.

Mark Lawrence.

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


[Tutor] encrypt a file in Python3

2012-11-09 Thread kendy
Hello!

I want to encrypt a file, then decrypt it. I prefer to do it without adding any
packages. I found 

http://eli.thegreenplace.net/2010/06/25/aes-encryption-of-files-in-python-with-pycrypto/

which seems like a good approach. How can I get the import to work for python 3?
Here's what I get:

$ uname -a
Linux laptop 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012
i686 i686 i386 GNU/Linux
$ python3.2
Python 3.2.3 (default, Sep 10 2012, 18:17:42) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, random, struct
>>> from Crypto.Cipher import AES
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named Crypto.Cipher
>>> dir()
['__builtins__', '__doc__', '__name__', '__package__', 'os', 'random', 'struct']
>>> import Crypto.Cipher
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named Crypto.Cipher
>>> 

Has Crypto.Cipher been renamed in Python 3? Is it supported yet? Python2.7 works
fine.

I saw so many "crypto" packages at http://pypi.python.org/pypi/ that I wouldn't
know where to start. I want something simple. Do you have a suggestion?

$ python2.7
Python 2.7.3 (default, Aug  1 2012, 05:16:07) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, random, struct
>>> from Crypto.Cipher import AES
>>> dir()
['AES', '__builtins__', '__doc__', '__name__', '__package__', 'os', 'random',
'struct']
>>> 

$ python2.7
Python 2.7.3 (default, Aug  1 2012, 05:16:07) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Crypto.Cipher
>>> dir()
['Crypto', '__builtins__', '__doc__', '__name__', '__package__']
>>> 

Thanks so much! I learn a lot from you guys!

Ken
ke...@kendy.org

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


[Tutor] Python books

2012-11-09 Thread Ed Owens
I've been trying to learn Python, writing a Blackjack program. Seems 
that's a common problem for learning.  I'm not in a class or school, 
just working on my own.  I've been working in Python 2.7, and 
considering moving up to 3.x.  My programming background is ancient, 
having done most of my programming in FORTRAN. I have been using free 
internet resources to learn, mostly Google searches on syntax, and their 
free courses.


I have the basic game done: dealing from a shoe of multiple decks, 
splits, betting, etc.  and started to work on the harder parts such as 
graphics of the table with cards, managing record keeping, and so on.  
There seem to be a plethora of packages and options, many of them 
outside of the "standard" Python installation.  Plus, I'm still 
discovering how to do things with the standard library.  I need more 
structure and organization!


I have one book, "Python Programming for the Absolute Beginner" by 
Dawson, which is too plodding. Can you experts recommend a Python 
library?  I would like to have:


A command reference for the basic library.
A comprehensive "How to" course for the basic library.
Graphics in Python
Data Management in Python
Using the internet with Python
(maybe Real Time(ish) Python)
A comprehensive "Learn Python" course that puts all this together

I realize that this is outside of the "help with this code" request, but 
I would value your advice.


Ed O


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


Re: [Tutor] Get data through url.

2012-11-09 Thread Alan Gauld

On 09/11/12 18:57, Mohammed hisamuddin wrote:


For instance i want to call http://http://yourserver.com/>>/expand.py?mobile=992828282®ion=India

and i get the "mobile" and "region" values inside my program which i can
then save into my db.



lots of options but you could start with the standard library cgi module...



--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

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


[Tutor] Get data through url.

2012-11-09 Thread Mohammed hisamuddin
I want to pass data onto my python program through an url and then store
the information in a mysql db.

For instance i want to call http:///expand.py?mobile=992828282®ion=India

and i get the "mobile" and "region" values inside my program which i can
then save into my db.

In php i could use $_get and do this. I'm new to python, how can i do it
here.

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