[Tutor] There's a Programmer in Me

2013-02-26 Thread Khalid Al-Ghamdi
Hi All,

I'm not a programmer by profession, but I want to learn python. I've got
lots of Ideas that want to realize, but I always run into these
stupid hiccups where I follow the tutorials and something stupid
(known/unkown) is causing things not to work ... frustration ensues...

After more than 2 years (on and off) I've got the basics down and
have written some scripts, but I want some place online where a live person
can tutor me to the next level. Any good suggestions?

As always, many thanks for your great advice.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Mark Lawrence

On 26/02/2013 13:02, Khalid Al-Ghamdi wrote:

Hi All,

I'm not a programmer by profession, but I want to learn python. I've got
lots of Ideas that want to realize, but I always run into these
stupid hiccups where I follow the tutorials and something stupid
(known/unkown) is causing things not to work ... frustration ensues...

After more than 2 years (on and off) I've got the basics down and
have written some scripts, but I want some place online where a live
person can tutor me to the next level. Any good suggestions?

As always, many thanks for your great advice.



http://pythonmentors.com/

--
Cheers.

Mark Lawrence

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


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Tim Golden
On 26/02/2013 13:54, Mark Lawrence wrote:
> On 26/02/2013 13:02, Khalid Al-Ghamdi wrote:
>> Hi All,
>>
>> I'm not a programmer by profession, but I want to learn python. I've got
>> lots of Ideas that want to realize, but I always run into these
>> stupid hiccups where I follow the tutorials and something stupid
>> (known/unkown) is causing things not to work ... frustration ensues...
>>
>> After more than 2 years (on and off) I've got the basics down and
>> have written some scripts, but I want some place online where a live
>> person can tutor me to the next level. Any good suggestions?
>>
>> As always, many thanks for your great advice.
>>
> 
> http://pythonmentors.com/
> 

Umm. No. Sorry, Mark, but that site and the core-mentorship list it
advertises are intended for progammers who want to be helped in the
development *of* Python, not development *in* Python. Ie, otherwise
experienced programmers who are unfamiliar with the Python codebase.

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


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Albert-Jan Roskam
>After more than 2 years (on and off) I've got the basics down and have written 
>some scripts, but I want some place online where a live person can tutor me to 
>the next level. Any good suggestions?

I'd say Python Tutor is what you're looking for! And there are many other 
awesome sources of info, for example StackOverflow. It also helps to invest in 
a few really good books. I like the one by Mark Summerfield, and the next one 
on my list is the one by Dough Helmann.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Mark Lawrence

On 26/02/2013 13:57, Tim Golden wrote:

On 26/02/2013 13:54, Mark Lawrence wrote:

On 26/02/2013 13:02, Khalid Al-Ghamdi wrote:

Hi All,

I'm not a programmer by profession, but I want to learn python. I've got
lots of Ideas that want to realize, but I always run into these
stupid hiccups where I follow the tutorials and something stupid
(known/unkown) is causing things not to work ... frustration ensues...

After more than 2 years (on and off) I've got the basics down and
have written some scripts, but I want some place online where a live
person can tutor me to the next level. Any good suggestions?

As always, many thanks for your great advice.



http://pythonmentors.com/



Umm. No. Sorry, Mark, but that site and the core-mentorship list it
advertises are intended for progammers who want to be helped in the
development *of* Python, not development *in* Python. Ie, otherwise
experienced programmers who are unfamiliar with the Python codebase.

TJG



Umm.  No.  Sorry, Tim, but nowhere does the OP state that he wants to 
develop in Python, hence "The mission of the Python Core Mentor Program 
is to provide an open and welcoming place to connect students, 
programmers – and anyone interested in contributing to the Python Core 
development." seems to me an excellent fit for "some place online where 
a live person can tutor me to the next level".


--
Cheers.

Mark Lawrence

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


[Tutor] Second follow up

2013-02-26 Thread Jack Little
How would I go from one def statement to another? I am developing a text based 
rpg.

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


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Khalid Al-Ghamdi
Hi all and thanks for your suggestions,

I was thinking of something like a virtual classroom where I can get live
mentoring and answers to my inquiries in a one on one or small group
setting.

Thanks

On Tuesday, February 26, 2013, Mark Lawrence wrote:

> On 26/02/2013 13:57, Tim Golden wrote:
>
>> On 26/02/2013 13:54, Mark Lawrence wrote:
>>
>>> On 26/02/2013 13:02, Khalid Al-Ghamdi wrote:
>>>
 Hi All,

 I'm not a programmer by profession, but I want to learn python. I've got
 lots of Ideas that want to realize, but I always run into these
 stupid hiccups where I follow the tutorials and something stupid
 (known/unkown) is causing things not to work ... frustration ensues...

 After more than 2 years (on and off) I've got the basics down and
 have written some scripts, but I want some place online where a live
 person can tutor me to the next level. Any good suggestions?

 As always, many thanks for your great advice.


>>> http://pythonmentors.com/
>>>
>>>
>> Umm. No. Sorry, Mark, but that site and the core-mentorship list it
>> advertises are intended for progammers who want to be helped in the
>> development *of* Python, not development *in* Python. Ie, otherwise
>> experienced programmers who are unfamiliar with the Python codebase.
>>
>> TJG
>>
>>
> Umm.  No.  Sorry, Tim, but nowhere does the OP state that he wants to
> develop in Python, hence "The mission of the Python Core Mentor Program is
> to provide an open and welcoming place to connect students, programmers –
> and anyone interested in contributing to the Python Core development."
> seems to me an excellent fit for "some place online where a live person can
> tutor me to the next level".
>
> --
> Cheers.
>
> Mark Lawrence
>
> __**_
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor
>
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Robert Sjoblom
>> Umm. No. Sorry, Mark, but that site and the core-mentorship list it
>> advertises are intended for progammers who want to be helped in the
>> development *of* Python, not development *in* Python. Ie, otherwise
>> experienced programmers who are unfamiliar with the Python codebase.
>>
>> TJG
>>
>
> Umm.  No.  Sorry, Tim, but nowhere does the OP state that he wants to
develop in Python,
I'll just quote the OP then:
" I'm not a programmer by profession, but I want to learn python". That
seems pretty clear-cut to me. In addition, the Python Core development is
definitely not a place for beginners.

Sorry if this reply is all messed up, responding on my phone.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Alan Gauld

On 26/02/13 13:02, Khalid Al-Ghamdi wrote:


have written some scripts, but I want some place online where a live
person can tutor me to the next level. Any good suggestions?


Well so far as I know there are no dead people on this mailing list

It's what we are here for.

--
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


Re: [Tutor] Second follow up

2013-02-26 Thread Dave Angel

On 02/26/2013 09:23 AM, Jack Little wrote:

How would I go from one def statement to another? I am developing a text based 
rpg.

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




For your next thread, please try to pick a subject line that has 
something to do with what you're asking, or what you're trying to learn 
about.


A def statement defines a function (or method).  Once it's defined, the 
compiler goes on to the next line, and if that's a def statement, it 
defines that function.


So all you need is a text editor.  Just understand that code that will 
call those functions from the top-level needs to be *after* the 
definition is complete.  Code that calls functions from inside a 
function does not need to be in any particular order.


If this isn't what you want, then try composing a ten-line sample, tell 
us what environment you're running it in, and what you hoped for, and 
what it did instead.



On the other hand, perhaps you're asking how to make indirect calls to 
functions.  A function object can be stored in a 'variable', simply by 
assigning it without using parentheses.  You can then later call that 
function by naming the object, and following the object with the 
parentheses.  Simple example follows;


def func1(name):
print "function1, running with", name

def func2(name):
print "function2, running with", name

funclist = []
funclist.append(func1)
funclist.append(func2)
funclist.append(func1)

funclist[1]("Sam")
will call func2, and pass it "Sam" as an argument.

Normally, if you're doing this type of thing, you'd be using methods, 
not functions, but I'm not going to introduce classes unless you're 
already familiar with them.


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


Re: [Tutor] Second follow up

2013-02-26 Thread Alan Gauld

On 26/02/13 14:23, Jack Little wrote:

How would I go from one def statement to another?


Type it in.

Based on your message that's all I can suggest.
Can you explain what you mean?

What do you have in mind by a def statement?

def foo():
   print 'foo'

def bar():
   print 'bar'

Those are two "def statements". You can add as many
more as you like? But I suspect that's not really
what you mean?


I am developing a text based rpg.


I don't see whether/how that makes any difference to anything.

Telling us which OS and Python version you are using and what 
programming tools might help though.


--
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


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Vytas D.
Hi,

Have you considered O'Reilly Python courses. You have to pay (and it's
quite expensive), but you have a tutor to answer questions. The courses are
good (tried myself :) ).

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


Re: [Tutor] Second follow up

2013-02-26 Thread Mark Lawrence

On 26/02/2013 14:23, Jack Little wrote:

How would I go from one def statement to another? I am developing a text based 
rpg.

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



I'd like to see your project when it's finished as a text based rocket 
propelled grenade seems very interesting, or are we talking cross 
purposes owing to a major lack of data?


--
Cheers.

Mark Lawrence

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


Re: [Tutor] Second follow up

2013-02-26 Thread Steven D'Aprano

On 27/02/13 01:23, Jack Little wrote:

How would I go from one def statement to another? I am developing a text based 
rpg.



def first_function():
# write your code here, indented by FOUR spaces or ONE tab


def second_function():  # NO INDENT
# write your code here, indented by FOUR spaces or ONE tab


Does that help?


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


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Steven D'Aprano

On 27/02/13 01:19, Mark Lawrence wrote:

On 26/02/2013 13:57, Tim Golden wrote:

On 26/02/2013 13:54, Mark Lawrence wrote:

On 26/02/2013 13:02, Khalid Al-Ghamdi wrote:

Hi All,

I'm not a programmer by profession, but I want to LEARN PYTHON.

[emphasis added]

[...]

http://pythonmentors.com/


Umm. No. Sorry, Mark, but that site and the core-mentorship list it
advertises are intended for progammers who want to be helped in the
development *of* Python, not development *in* Python. Ie, otherwise
experienced programmers who are unfamiliar with the Python codebase.

TJG



Umm.  No.  Sorry, Tim, but nowhere does the OP state that he wants to develop in Python, hence 
"The mission of the Python Core Mentor Program is to provide an open and welcoming place to 
connect students, programmers – and anyone interested in contributing to the Python Core 
development." seems to me an excellent fit for "some place online where a live person can 
tutor me to the next level".


Mark, the OP states explicitly that he wants to learn Python. I suppose that he 
*might* intend to learn the language without actually writing any code, but 
when people say that they want to learn a programming language, it's normally 
because they intend to, you know, program. As in develop code. Using the 
language he intends to learn. Which is Python. The programming language, not 
the snake. For the avoidance of doubt.

:-P


Python-mentors is completely inappropriate for a beginner who doesn't know the 
language. The core developers are too busy to be hand-holding a newbie who 
doesn't know any Python, and somebody who doesn't know any Python can't triage 
bugs, write documentation or tests, or write Python code for the standard 
library.



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


Re: [Tutor] Second follow up

2013-02-26 Thread Steven D'Aprano

On 27/02/13 02:12, Mark Lawrence wrote:

On 26/02/2013 14:23, Jack Little wrote:

How would I go from one def statement to another? I am developing a text based 
rpg.


I'd like to see your project when it's finished as a text based rocket 
propelled grenade seems very interesting, or are we talking cross purposes 
owing to a major lack of data?



RPG: Role Playing Game.



--
Steven



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


Re: [Tutor] Second follow up

2013-02-26 Thread Mark Lawrence

On 26/02/2013 16:01, Steven D'Aprano wrote:

On 27/02/13 01:23, Jack Little wrote:

How would I go from one def statement to another? I am developing a
text based rpg.



def first_function():
 # write your code here, indented by FOUR spaces or ONE tab


def second_function():  # NO INDENT
 # write your code here, indented by FOUR spaces or ONE tab


Does that help?




Get thee behind me Satan/Steven, tabs indeed :)

--
Cheers.

Mark Lawrence

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


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Albert-Jan Roskam
 
> The core developers are too busy to be hand-holding a newbie who 
> doesn't know any Python, 

Well, in a way they *can*: I find it very inspiring to read the source code of 
Python (the .py files), though I don't do this as often as I should.

What I like about R: if I do 'print(func)' (or fix(func)), it prints the source 
code of the function. It would be cool if Python had something similar. Instead 
Python prints the not-so-informative 

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


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread Hugo Arts
On Tue, Feb 26, 2013 at 9:00 PM, Albert-Jan Roskam  wrote:

>
> > The core developers are too busy to be hand-holding a newbie who
> > doesn't know any Python,
>
> Well, in a way they *can*: I find it very inspiring to read the source
> code of Python (the .py files), though I don't do this as often as I should.
>
> What I like about R: if I do 'print(func)' (or fix(func)), it prints the
> source code of the function. It would be cool if Python had something
> similar. Instead Python prints the not-so-informative  0xa82fae4>
>
>
I don't think you'd want the generic 'print' to do this (though repr()
might be a good candidate). In any case, IPython can do it with %psource:
http://ipython.org/ipython-doc/rel-0.10.2/html/interactive/tutorial.html#explore-your-objects
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread eryksun
On Tue, Feb 26, 2013 at 4:00 PM, Albert-Jan Roskam  wrote:
>
> What I like about R: if I do 'print(func)' (or fix(func)), it prints the
> source code of the function. It would be cool if Python had something
> similar. Instead Python prints the not-so-informative
> 

You can use inspect.getsource(obj) if obj is a module, class, method,
function, traceback, frame, or code that has a source file (e.g.
__file__, co_filename) and is defined normally (e.g. class, def):

>>> import inspect
>>> def printsrc(obj): print inspect.getsource(obj)

>>> import antigravity
>>> printsrc(antigravity)

import webbrowser

webbrowser.open("http://xkcd.com/353/";)
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] There's a Programmer in Me

2013-02-26 Thread eryksun
On Tue, Feb 26, 2013 at 7:49 PM, eryksun  wrote:
>
> You can use inspect.getsource(obj) if obj is a module, class, method,
> function, traceback, frame, or code that has a source file (e.g.
> __file__, co_filename) and is defined normally (e.g. class, def):
>
> >>> import inspect
> >>> def printsrc(obj): print inspect.getsource(obj)

You ca also use a pager (uses "less" if available; "more" on Windows):

>>> import inspect, pydoc
>>> def showsrc(obj): pydoc.getpager()(inspect.getsource(obj))
...
>>> showsrc(inspect)
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor