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


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

Simple Question regarding running .py program

Started byCaroline Hou <joyhou2010@gmail.com>
First post2012-11-12 18:02 -0800
Last post2012-11-12 18:45 -0800
Articles 7 on this page of 27 — 11 participants

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


Contents

  Simple Question regarding running .py program Caroline Hou <joyhou2010@gmail.com> - 2012-11-12 18:02 -0800
    Re: Simple Question regarding running .py program Dave Angel <d@davea.name> - 2012-11-12 21:24 -0500
      Re: Simple Question regarding running .py program Caroline Hou <joyhou2010@gmail.com> - 2012-11-12 18:45 -0800
        Re: Simple Question regarding running .py program Terry Reedy <tjreedy@udel.edu> - 2012-11-13 01:21 -0500
        Re: Simple Question regarding running .py program Dave Angel <d@davea.name> - 2012-11-13 04:25 -0500
        Re: Simple Question regarding running .py program Ramchandra Apte <maniandram01@gmail.com> - 2012-11-13 04:35 -0800
          Re: Simple Question regarding running .py program Caroline Hou <joyhou2010@gmail.com> - 2012-11-13 19:31 -0800
            Re: Simple Question regarding running .py program Chris Angelico <rosuav@gmail.com> - 2012-11-14 15:10 +1100
              Re: Simple Question regarding running .py program rurpy@yahoo.com - 2012-11-13 21:08 -0800
                Re: Simple Question regarding running .py program Chris Angelico <rosuav@gmail.com> - 2012-11-14 17:02 +1100
                  Re: Simple Question regarding running .py program rurpy@yahoo.com - 2012-11-13 23:02 -0800
                    Re: Simple Question regarding running .py program rusi <rustompmody@gmail.com> - 2012-11-13 23:52 -0800
                    Re: Simple Question regarding running .py program Chris Angelico <rosuav@gmail.com> - 2012-11-15 00:35 +1100
                      Re: Simple Question regarding running .py program rurpy@yahoo.com - 2012-11-14 10:20 -0800
                        Re: Simple Question regarding running .py program Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-14 23:07 +0000
                          Re: Simple Question regarding running .py program rurpy@yahoo.com - 2012-11-14 15:57 -0800
                          Re: Simple Question regarding running .py program Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-15 00:30 +0000
                          Re: Simple Question regarding running .py program rurpy@yahoo.com - 2012-11-15 13:29 -0800
                            Re: Simple Question regarding running .py program Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-15 22:15 +0000
                              Re: Simple Question regarding running .py program Grant Edwards <invalid@invalid.invalid> - 2012-11-16 02:55 +0000
                                Re: Simple Question regarding running .py program Duncan Booth <duncan.booth@invalid.invalid> - 2012-11-22 11:35 +0000
                            Re: Simple Question regarding running .py program rusi <rustompmody@gmail.com> - 2012-11-15 20:10 -0800
                              Re: Simple Question regarding running .py program Chris Angelico <rosuav@gmail.com> - 2012-11-16 17:37 +1100
                              Re: Simple Question regarding running .py program Chris Angelico <rosuav@gmail.com> - 2012-11-16 17:38 +1100
                    Re: Simple Question regarding running .py program Terry Reedy <tjreedy@udel.edu> - 2012-11-14 20:18 -0500
            Re: Simple Question regarding running .py program Terry Reedy <tjreedy@udel.edu> - 2012-11-14 20:08 -0500
      Re: Simple Question regarding running .py program Caroline Hou <joyhou2010@gmail.com> - 2012-11-12 18:45 -0800

Page 2 of 2 — ← Prev page 1 [2]


#33797

FromDuncan Booth <duncan.booth@invalid.invalid>
Date2012-11-22 11:35 +0000
Message-ID<XnsA11375D8B220Dduncanbooth@127.0.0.1>
In reply to#33409
Grant Edwards <invalid@invalid.invalid> wrote:

> [1] OK, so I'm am annoyed with them after my Google phone updated to
>     Android 4.2 this afternoon and the lock-screen clock is now
>     _physically_painful_ to look at.  However, I'm convinced that's
>     not evil -- just a complete and utter lack of visual design
>     ability.

You can select any other lock screen widget as the default, so why not 
download some more widgets from Play and choose something different. e.g. 
"Beautiful Clock Widgets" or "HD Widgets" but there are probably others.

To change the default lockscreen widget swipe left from the lockscreen 
until you get to a page with only a '+', add the new widget there, then 
long press that widget and drag it to be the rightmost page.

Then you should be sorted just so long as you don't have any friends with 
December birthdays.

-- 
Duncan Booth http://kupuguy.blogspot.com

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


#33410

Fromrusi <rustompmody@gmail.com>
Date2012-11-15 20:10 -0800
Message-ID<a728ce13-49f2-4cf8-b38d-afbb0f199cc9@qi10g2000pbb.googlegroups.com>
In reply to#33399
On Nov 16, 2:29 am, ru...@yahoo.com wrote:
> But of course, our genius doesn't keep any records
> and the cases where he is wrong don't make as much
> impression on his memory.  Further, he doesn't bother
> to check the headers on the non-crap posts.  Even a
> junior-high science student could see the problems
> with this methodology.

Reminds of the difference between pop and educated statistics:
http://www.johndcook.com/blog/2008/10/20/nearly-everyone-is-above-average/

On the whole I agree with rurpy.
One small addition: GG allows spam posts to be marked as spam.

This feature costs a few seconds and can help everyone (if a few more
GG users would use it)

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


#33412

FromChris Angelico <rosuav@gmail.com>
Date2012-11-16 17:37 +1100
Message-ID<mailman.3732.1353047831.27098.python-list@python.org>
In reply to#33410
On Fri, Nov 16, 2012 at 3:10 PM, rusi <rustompmody@gmail.com> wrote:
> One small addition: GG allows spam posts to be marked as spam.
>
> This feature costs a few seconds and can help everyone (if a few more
> GG users would use it)

And Gmail lets you do the exact same thing, but I almost never need to
do it, because the filter is already pretty good. Though every once in
a while I go check the spambox and there's usually something that
technically shouldn't have been called spam (but even then, I've never
regretted missing it). And I'm sure you can get it with a newsreader
too, though I've not looked.

Spam filtering is nothing unique.

ChrisA

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


#33413

FromChris Angelico <rosuav@gmail.com>
Date2012-11-16 17:38 +1100
Message-ID<mailman.3733.1353047922.27098.python-list@python.org>
In reply to#33410
On Fri, Nov 16, 2012 at 5:37 PM, Chris Angelico <rosuav@gmail.com> wrote:
> Spam filtering is nothing unique.
>

(Don't get me wrong though, that doesn't stop it from being a good
thing. It's just not a reason to use GG above all else.)

ChrisA

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


#33362

FromTerry Reedy <tjreedy@udel.edu>
Date2012-11-14 20:18 -0500
Message-ID<mailman.3705.1352942359.27098.python-list@python.org>
In reply to#33308
On 11/14/2012 2:02 AM, rurpy@yahoo.com wrote:

> On the other hand finding and configuring a newsreader
> for someone whose never done it before, as you recommend,
> is a major time consumer.

Use a mail/news program such as Thunderbird and the newsreader comes for 
free. Setting up a gmane account with Thunderbird was, as I remember 
rather easy, easier than setting up a mail account.

-- 
Terry Jan Reedy

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


#33361

FromTerry Reedy <tjreedy@udel.edu>
Date2012-11-14 20:08 -0500
Message-ID<mailman.3704.1352941714.27098.python-list@python.org>
In reply to#33292
On 11/13/2012 11:10 PM, Chris Angelico wrote:
> On Wed, Nov 14, 2012 at 2:31 PM, Caroline Hou <joyhou2010@gmail.com> wrote:
>> Thank you Dave and everybody here for your helpful comments!This place is awesome! I found this group when I googled python-list. Seems like this is not the usual way you guys access the list?
>
> There are several ways to communicate with this list.
>
> * The comp.lang.python newsgroup - get a newsreader (there are plenty
> around), and either connect to your ISP's news server (if they have
> one that carries c.l.p) or to a public server, some of which cost
> money.
> * Use a news-to-web gateway such as Google Groups. That specific one
> is deprecated on this list, as there's more noise than signal from
> Google Groups.
> * The mailing list python-list, delivered directly to your inbox many
> times a day. This is what I personally use.

news.gmane.org group gmane.comp.python.general
many 'mail' programs such as Outlook Express or Thunderbird also handle news

-- 
Terry Jan Reedy

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


#33216

FromCaroline Hou <joyhou2010@gmail.com>
Date2012-11-12 18:45 -0800
Message-ID<mailman.3606.1352774755.27098.python-list@python.org>
In reply to#33214
On Monday, 12 November 2012 21:25:08 UTC-5, Dave Angel  wrote:
> On 11/12/2012 09:02 PM, Caroline Hou wrote:
> 
> > Hi all!
> 
> >
> 
> > I just started learning Python by myself and I have an extremely simple question now!
> 
> > I am in my Python interpreter now and I want to open/edit a program called nobel.py. But when I typed >>> python nobel.py, it gave me a "SyntaxError:invalid syntax”( I've changed to the correct directory)what should I do?
> 
> > I also want to run the program, but as I double-clicked the program, a command window pops up and closes immediately. How can I see the result of the program run?
> 
> > Could anyone help me please? I am pretty confused here...Thank you!
> 
> 
> 
> It'd be nice to specify that you're running Windows, and also what
> 
> version of the interpreter, although in this case the latter doesn't matter.
> 
> 
> 
> 
> 
> Go to a shell (cmd.exe), change to the directory containing that script,
> 
> and type the command as you did.
> 
> 
> 
> On linux:  davea@think:~$ python nobel.py
> 
> On Windows:   c:\mydir\myscript > python nobel.py
> 
> 
> 
> If you're already in the python interpreter, then running python is
> 
> useless -- it's already running.  In that case, you might want to use
> 
> import.  However, I recommend against it at first, as it opens up some
> 
> other problems you haven't experience with yet.
> 
> 
> 
> When you say you "double clicked the program', we have to guess you
> 
> might have meant in MS Explorer.  If you do that, it launches a cmd, it
> 
> runs the python system, and it closes the cmd.  Blame Windows for not
> 
> reading your mind.  If you want the cmd window to stick around, you
> 
> COULD end your program with an raw_input function call, but frequently
> 
> that won't work.  The right answer is the first one above...   Open a
> 
> shell (perhaps with a menu like  DOS BOX), change...
> 
> 
> 
> That way, when the program finishes, you can see what happened, or
> 
> didn't happen, and you can run it again using the uparrow key.
> 
> 
> 
> BTW, you don't need to send email to both the python-list and to the
> 
> newsgroup.  The newsgroup is automatically fed from the list.  But since
> 
> you're posting from google groups, that's just one of the bugs.  Many
> 
> folks here simply filter out everything from google groups, so your post
> 
> is invisible to them.
> 
>    
> 
> 
> 
> -- 
> 
> 
> 
> DaveA

Hi Dave!

thank you very much for your quick reply! I did manage to get the program run from cmd.exe. 
So does it mean that if I want to use python interactively,I should use the interpreter,while if I just want to run a python program, I should use DOS shell instead?
Also, how could I edit my script? I have sth called "IDLE" installed along with python. Is it the right place to write/edit my script?
Sorry about these semi-idiot questions but it is really hard to find an article or book that covers such basic stuffs! 
Thank you!

Caroline Hou

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

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


csiph-web