Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76171 > unrolled thread

newbee

Started byFrank Scafidi <fpscafidi@gmail.com>
First post2014-08-12 19:57 -0400
Last post2014-08-13 19:00 -0700
Articles 9 — 7 participants

Back to article view | Back to comp.lang.python


Contents

  newbee Frank Scafidi <fpscafidi@gmail.com> - 2014-08-12 19:57 -0400
    Re: newbee alister <alister.nospam.ware@ntlworld.com> - 2014-08-13 11:55 +0000
      Re: newbee Mok-Kong Shen <mok-kong.shen@t-online.de> - 2014-08-13 15:13 +0200
        Re: newbee alister <alister.nospam.ware@ntlworld.com> - 2014-08-13 13:57 +0000
          Re: newbee William Ray Wing <wrw@mac.com> - 2014-08-13 11:44 -0400
      Re: newbee Terry Reedy <tjreedy@udel.edu> - 2014-08-13 15:31 -0400
        Re: newbee alister <alister.nospam.ware@ntlworld.com> - 2014-08-14 11:59 +0000
      Re: newbee Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-08-14 08:42 +0200
    Re: newbee Larry Hudson <orgnut@yahoo.com> - 2014-08-13 19:00 -0700

#76171 — newbee

FromFrank Scafidi <fpscafidi@gmail.com>
Date2014-08-12 19:57 -0400
Subjectnewbee
Message-ID<mailman.12909.1407911525.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

I just acquired a Raspberry Pi and want to program in Python. I was a PL/1
programmer back in the 60's & 70's and Python is similar. I am struggling
with some very fundamental things that I am not finding in the
documentation. Can someone help me with the basics like how do I save a
program I've written, reload it in Python, list the program once it's
loaded? How do I edit a program? Are these command line functions?

Thanks
Frank

[toc] | [next] | [standalone]


#76189

Fromalister <alister.nospam.ware@ntlworld.com>
Date2014-08-13 11:55 +0000
Message-ID<FmIGv.164202$DL2.12687@fx02.am4>
In reply to#76171
On Tue, 12 Aug 2014 19:57:14 -0400, Frank Scafidi wrote:

> I just acquired a Raspberry Pi and want to program in Python. I was a
> PL/1 programmer back in the 60's & 70's and Python is similar. I am
> struggling with some very fundamental things that I am not finding in
> the documentation. Can someone help me with the basics like how do I
> save a program I've written, reload it in Python, list the program once
> it's loaded? How do I edit a program? Are these command line functions?
> 
> Thanks Frank <div dir="ltr"><div class="gmail_default"
> style="font-family:georgia,serif;font-size:small;color:#3366ff">I just
> acquired a Raspberry Pi and want to program in Python. I was a PL/1
> programmer back in the 60&#39;s &amp; 70&#39;s and Python is similar. I
> am struggling with some very fundamental things that I am not finding in
> the documentation. Can someone help me with the basics like how do I
> save a program I&#39;ve written, reload it in Python, list the program
> once it&#39;s loaded? How do I edit a program? Are these command line
> functions? </div>
> <div class="gmail_default"
> style="font-family:georgia,serif;font-size:small;color:#3366ff"><br></
div><div
> class="gmail_default"
> style="font-family:georgia,serif;font-size:small;color:#3366ff">Thanks</
div><div
> class="gmail_default"
> style="font-family:georgia,serif;font-size:small;color:#3366ff">
> Frank</div><div class="gmail_default"
> style="font-family:georgia,serif;font-size:small;color:#3366ff"><br></
div></div>


I am not in the same league as many of the posters here when it comes to 
Python but fortunately i do have two Raspberry Pi's :-)

if you are running the Pi connected to a TV/Monitor with the Gui enabled 
then you should have access to Idle as well as a number of text editors 
(Geany works well if installed)

if you are using it from the commands line then as previously stated you 
need to use a text editor to write the code (Nano is part of the basic 
Raspian Distro and easier to use than VI/Vim)

once you have created your code file type python <file Name> at the 
command prompt

remember if you are connecting to the Pi remotely Via SSH it is useful to 
have multiple connections open, one for the text editor & 1 to enable you 
to run the code or execute other Linux commands.

If you have any more questions post them back &I hope I can help
(Maybe I can become useful to this group as the R-Pi expert, hopefully 
more productively than some of the groups other 'Experts')



-- 
Expect the worst, it's the least you can do.

[toc] | [prev] | [next] | [standalone]


#76193

FromMok-Kong Shen <mok-kong.shen@t-online.de>
Date2014-08-13 15:13 +0200
Message-ID<lsfo9n$qcg$1@news.albasani.net>
In reply to#76189
Am 13.08.2014 13:55, schrieb alister:
[snip]

A related question: How could one write a Python program and
have it run on a mobile phone in general (independent of a PC)?

M. K. Shen

[toc] | [prev] | [next] | [standalone]


#76199

Fromalister <alister.nospam.ware@ntlworld.com>
Date2014-08-13 13:57 +0000
Message-ID<B9KGv.291853$iD.105391@fx22.am4>
In reply to#76193
On Wed, 13 Aug 2014 15:13:34 +0200, Mok-Kong Shen wrote:

> Am 13.08.2014 13:55, schrieb alister:
> [snip]
> 
> A related question: How could one write a Python program and have it run
> on a mobile phone in general (independent of a PC)?
> 
> M. K. Shen

you would need a python interpreter for that device, IIRC there is one 
available for android, I do not know about IOS



-- 
It's not hard to admit errors that are [only] cosmetically wrong.
		-- J.K. Galbraith

[toc] | [prev] | [next] | [standalone]


#76216

FromWilliam Ray Wing <wrw@mac.com>
Date2014-08-13 11:44 -0400
Message-ID<mailman.12931.1407948317.18130.python-list@python.org>
In reply to#76199
On Aug 13, 2014, at 9:57 AM, alister <alister.nospam.ware@ntlworld.com> wrote:

> On Wed, 13 Aug 2014 15:13:34 +0200, Mok-Kong Shen wrote:
> 
>> Am 13.08.2014 13:55, schrieb alister:
>> [snip]
>> 
>> A related question: How could one write a Python program and have it run
>> on a mobile phone in general (independent of a PC)?
>> 
>> M. K. Shen
> 
> you would need a python interpreter for that device, IIRC there is one 
> available for android, I do not know about IOS
> 

There are several for iOS, but because of Apple’s sandboxing they don’t have as much reach as you might want.

-Bill

[toc] | [prev] | [next] | [standalone]


#76230

FromTerry Reedy <tjreedy@udel.edu>
Date2014-08-13 15:31 -0400
Message-ID<mailman.12941.1407958342.18130.python-list@python.org>
In reply to#76189
On 8/13/2014 7:55 AM, alister wrote:
>
> I am not in the same league as many of the posters here when it comes to
> Python but fortunately i do have two Raspberry Pi's :-)

Great! We really someone with hands-on experience.

> if you are running the Pi connected to a TV/Monitor with the Gui enabled
> then you should have access to Idle

Have you verified that Idle *does* (not just *should*) run on RPi? 
(That would mean having tcl/tk running, with whatever *it* requires on 
linux.) I am working on Idle and the idea of people (especially 
hobbyists, students, and other amateurs) running it on microsystems 
would really please me.

> If you have any more questions post them back &I hope I can help
> (Maybe I can become useful to this group as the R-Pi expert,

Answering questions, sometimes after experiment and research, is a great 
way to learn.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#76296

Fromalister <alister.nospam.ware@ntlworld.com>
Date2014-08-14 11:59 +0000
Message-ID<nw1Hv.312276$iD.112121@fx22.am4>
In reply to#76230
On Wed, 13 Aug 2014 15:31:37 -0400, Terry Reedy wrote:

> On 8/13/2014 7:55 AM, alister wrote:
>>
>> I am not in the same league as many of the posters here when it comes
>> to Python but fortunately i do have two Raspberry Pi's :-)
> 
> Great! We really someone with hands-on experience.

I Hope the missing word there is welcome :-)
> 
>> if you are running the Pi connected to a TV/Monitor with the Gui
>> enabled then you should have access to Idle
> 
> Have you verified that Idle *does* (not just *should*) run on RPi? (That
> would mean having tcl/tk running, with whatever *it* requires on linux.)
> I am working on Idle and the idea of people (especially hobbyists,
> students, and other amateurs) running it on microsystems would really
> please me.
> 
Yes it does, but i tend to run mine headless (X forwarding is still an 
option though) but I prefer Geany, which i do run on the pi (with x 
forwarding) with no issues, just remember the Pi is not a particularly 
fast device.
 
>> If you have any more questions post them back &I hope I can help (Maybe
>> I can become useful to this group as the R-Pi expert,
> 
> Answering questions, sometimes after experiment and research, is a great
> way to learn.

I would say it is the ONLY way to really learn, you never really 
understand something until you have broken it and then fixed it or tried 
to teach it to someone.




-- 
Dungeons and Dragons is just a lot of Saxon Violence.

[toc] | [prev] | [next] | [standalone]


#76268

FromChris “Kwpolska” Warrick <kwpolska@gmail.com>
Date2014-08-14 08:42 +0200
Message-ID<mailman.12971.1407998555.18130.python-list@python.org>
In reply to#76189

[Multipart message — attachments visible in raw view] — view raw

On Aug 13, 2014 9:34 PM, "Terry Reedy" <tjreedy@udel.edu> wrote:
> Have you verified that Idle *does* (not just *should*) run on RPi? (That
would mean having tcl/tk running, with whatever *it* requires on linux.) I
am working on Idle and the idea of people (especially hobbyists, students,
and other amateurs) running it on microsystems would really please me.

I don't have a RPi, but I know it is just a glorified ARM computer with
terrible specs. But it is enough to run LXDE or other lightweight graphical
environments, which means tcl/tk is VERY likely to work. You could also
look up packages for Raspbian or other RPi-friendly distros and see
python-tk there, or various Python tutorials for the device:

http://davidbriddock.blogspot.com/2013/04/learn-python-installing-tkinter.html

-- 
Chris “Kwpolska” Warrick <http://chriswarrick.com/>
Sent from my SGS3.

[toc] | [prev] | [next] | [standalone]


#76243

FromLarry Hudson <orgnut@yahoo.com>
Date2014-08-13 19:00 -0700
Message-ID<SumdnfdFNorRhXHOnZ2dnUU7-T2dnZ2d@giganews.com>
In reply to#76171
On 08/12/2014 04:57 PM, Frank Scafidi wrote:
> I just acquired a Raspberry Pi and want to program in Python. I was a PL/1 programmer back in
> the 60's & 70's and Python is similar. I am struggling with some very fundamental things that I
> am not finding in the documentation. Can someone help me with the basics like how do I save a
> program I've written, reload it in Python, list the program once it's loaded? How do I edit a
> program? Are these command line functions?
>
> Thanks
> Frank
>
You've already received a lot of suggestions, but I'll add one more...

If you don't mind shelling out for some dead-tree documentation, there is a book in the "Sam's 
Teach Yourself in 24 Hours" series -- Python Programming for Raspberry Pi.

It is a pretty good basic tutorial for Python in general, and specifically written for the RPi. 
  You might check it out.  (Current Amazon price -- $25.81)

      -=- Larry -=-

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web