[Tutor] Using Modules

Sri Kavi gvmcmt at gmail.com
Sat Apr 15 09:03:38 EDT 2017


Hi,

Start with the tutorial at https://docs.python.org/3/tutorial/

It includes Brief Tour of the Standard Library:

https://docs.python.org/3/tutorial/stdlib.html
https://docs.python.org/3/tutorial/stdlib2.html

Hope that helps.


Sri

On Sat, Apr 15, 2017 at 2:03 PM, Aero Maxx D <aero.maxx.d at gmail.com> wrote:

> Hi everyone,
>
> I'm very very new to Python, and trying to learn and I'm struggling with
> the import statements.
>
> I understand they are importing modules that I can then use in my code,
> what I'm struggling with though is how do I find out which modules I need
> to use to do any given task?
>
> I do have a programming background in that I know PHP however this is a
> scripting language, and one that doesn't require me to import modules or
> anything, can easily just look at the functions available on the php.net
> website and carry on as normal.
>
> With Python I'm not finding which modules I need if any as easy as that,
> mainly due to the vast number of modules available.
>
> I'd like to start with something that in my mind is relatively simple in
> php, so I thought I'd connect to a MySQL database read what was in a table
> and insert some data into the table.
>
> I've done some googling and read some books, the book mentioned using
> import dbm, however I understand this isn't for MySQL but my problem is the
> book glosses over the import statement and just says use this, but gives no
> explanation as to why I'm using that and/or how to find out that's what I
> should use.  Googling found some forum posts saying to use MySQLdb.
>
> I'm wanting to learn Python properly and find things out myself, without
> relying on someone to of posted on a blog or a forum who may have done
> something similar to what I may be trying to do at that particular time,
> and then just blindly follow their example and use the same modules without
> an understanding why I'm using those modules, or using modules that I'm
> actually not using in the code.
>
> Sorry for the long email, I didn't initially intend or expect it to be
> this long.
>
> Thanks,
> Daniel
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list