On 12/02/12 07:24, Yony Torres wrote:
"Once you’ve saved this text file, you can ask Python to run it
> by listing its full filename as the first argument to a
> python command, typed at the system shell prompt:"
% python script1.py
Lets break down what this line is saying. It comprises thre
Hi,
Tip: use a meaningful subject line; attracts more/better attention and makes it
easier to trace your email in the archives.
Continued at the bottom.
> import numpy as np
> import matplotlib.pyplot as plt
> E=[81.97400737666324, 322.0939978589591, 694.5766491226185]
> V0=1000
> a=0.1
> def
Michael Lewis wrote:
> I am trying to repeat a certain sequence in a range if a certain even
> occurs. Forgive me for not pasting my code; but I am not at the machine
> where it's saved.
>
> Basically, I want to get user input and append that input to a list only
> if the input is not already in
On 2/12/2012 2:21 AM, Yony Torres wrote:
Hello buddies
I'm trying to learn Python from a well known book, and i'm stuck with
something that i know that might seem surprisingly easy for you and i
would like to humbly request your help:
i created a script in a file named script1.py and i save
actually a i ran a progam in python which is sufficiently large . so i
want to stop the execution of the program now . how can i do this?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman
On 12 Feb 2012, at 11:54, Debashish Saha wrote:
> actually a i ran a progam in python which is sufficiently large . so i
> want to stop the execution of the program now . how can i do this?
This will depend on your operating system.
On a Mac you press alt + command + esc and the choose the prog
suppose i want to print 'hello world' in color blue.so what to do?
i tried
print 'hello world','blue'
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
>> actually a i ran a progam in python which is sufficiently large . so i
>> want to stop the execution of the program now . how can i do this?
>
> This will depend on your operating system.
>
> On a Mac you press alt + command + esc and the choose the program you want to
> Force Quit. I have no
On Sun, Feb 12, 2012 at 6:47 AM, Debashish Saha wrote:
> suppose i want to print 'hello world' in color blue.so what to do?
>
>
There was a similar thread awhile ago. Unfortunately the answer isn't an
easy one. It depends on what operating system you use. Here's a link to
the old thread: http:
I am trying to get 2 string variables and 2 integer variables to be able to be
multiplied
can anyone tell me what I did wrong
str1 = raw_input("Type in a String: ")
str2 = raw_input("Type in a String: ")
int1 = raw_input("Type in a integer variable: ")
int2 = raw_input("Type in a integer variabl
Please always tell us which OS you are using, which version of Python.
When something you try does not give you the result you want, please
tell us what you got.
In a case like this also tell us where you want the colored text to
appear. It may be obvious to you but it is not to us.
Given h
On Sun, Feb 12, 2012 at 2:25 PM, William Stewart wrote:
> I am trying to get 2 string variables and 2 integer variables to be able
> to be multiplied
> can anyone tell me what I did wrong
>
> str1 = raw_input("Type in a String: ")
> str2 = raw_input("Type in a String: ")
> int1 = raw_input("Type
On 12 Feb 2012 15:28, "William Stewart" wrote:
>
> I am trying to get 2 string variables and 2 integer variables to be able
to be multiplied
> can anyone tell me what I did wrong
>
> str1 = raw_input("Type in a String: ")
> str2 = raw_input("Type in a String: ")
> int1 = raw_input("Type in a integ
On Sun, Feb 12, 2012 at 8:02 AM, Scott Nelson wrote:
> On Sun, Feb 12, 2012 at 6:47 AM, Debashish Saha wrote:
>>
>> suppose i want to print 'hello world' in color blue.so what to do?
>>
>
> There was a similar thread awhile ago. Unfortunately the answer isn't an
> easy one. It depends on what o
The code is:
from nntplib import NNTP
s = NNTP('news.gmane.org')
resp, count, first, last, name = s.group('gmane.comp.python.committers')
print 'Group', name, 'has', count, 'articles, range', first, 'to', last
resp, subs = s.xhdr('subject', first + '-' + last)
for id, sub in subs[-10:]:
print i
On 12 Feb 2012 05:23, "Tonu Mikk" wrote:
>
> I am learning Python using the "Learn Python the Hard Way" book by Zed
Shaw. I reached exercise 42 where we learn about Python classes. The
exercise shows a game with one class that includes all the definitions for
playing the game. For extra credit
On 02/12/2012 08:25 AM, William Stewart wrote:
I am trying to get 2 string variables and 2 integer variables to be able to be
multiplied
can anyone tell me what I did wrong
str1 = raw_input("Type in a String: ")
str2 = raw_input("Type in a String: ")
int1 = raw_input("Type in a integer varia
On Sun, 12 Feb 2012 21:31:57 +0800
daedae11 wrote:
> The code is:
> from nntplib import NNTP
> s = NNTP('news.gmane.org')
> resp, count, first, last, name = s.group
> ('gmane.comp.python.committers') print 'Group', name, 'has', count,
> 'articles, range', first, 'to', last resp, subs = s.xhdr('su
On 12/02/2012 14:51, Dave Angel wrote:
On 02/12/2012 08:25 AM, William Stewart wrote:
[snipped]
My usual advice when seeing a beginner with a complex line that gives a
syntax error is to see if you can replace it by a few simpler lines.
Then the error might be more obvious. So use several pri
hello there :) ima try it one more time, ima pasting the previous email content
i sent previously so here it goes ;P
I'm working in a windows vista home premium system
i installed python 3.2.2
I'm trying to learn Python from a well known book, and i'm stuck with
> something that i know that migh
On 12/02/12 15:50, Yony Torres wrote:
I'm trying to learn Python from a well known book,
Do0n;t make us guess, tell us the name of the book, well known or not.
There is just a chance somebody else may have read it too!
while i was working with the windows CMD
c:\Python32>python
This is
1. i tried this morning and it worked in the CMD check it out:
copied and pasted from the CMD
C:\Users\myusername>cd documents
C:\Users\myusername\Documents>cd varios2
C:\Users\myusername\Documents\varios2>cd pythonjourney
C:\Users\myusername\Documents\varios2\pythonjourney>script.py <---
[You've forgot to include the list in your reply]
On Mon, 13 Feb 2012 00:04:54 +0800 daedae11 wrote:
> Sorry, I'm not sure I know your viewpoint. Could you give me a
> detailed explanation about "you need more than about 6-7 seconds (on
> my computer) to type the third line."? Thank you very muc
oh i forgot this:
The book i bought and which im reading from is Learning Python - Mark Lutz -
O'reilly
> From: talmi...@live.com
> To: alan.ga...@btinternet.com; tutor@python.org
> Date: Sun, 12 Feb 2012 11:57:57 -0500
> Subject: Re: [Tutor] Running Fil
On 02/12/2012 12:02 PM, Andreas Perstinger wrote:
[You've forgot to include the list in your reply]
On Mon, 13 Feb 2012 00:04:54 +0800 daedae11 wrote:
Sorry, I'm not sure I know your viewpoint. Could you give me a
detailed explanation about "you need more than about 6-7 seconds (on
my compute
On 02/12/2012 11:57 AM, Yony Torres wrote:
1. i tried this morning and it worked in the CMD check it out:
copied and pasted from the CMD
C:\Users\myusername>cd documents
C:\Users\myusername\Documents>cd varios2
C:\Users\myusername\Documents\varios2>cd pythonjourney
C:\Users\myusername\Documents\
Thanks for all the help, Peter's and Hugo's methods worked well in
concatenating multiple lines into a single data structure!
S
On Fri, Feb 10, 2012 at 5:30 PM, Mark Lawrence wrote:
> On 10/02/2012 17:08, Peter Otten wrote:
>
>> Spyros Charonis wrote:
>>
>> Dear python community,
>>>
>>> I have
Debashish Saha wrote:
actually a i ran a progam in python which is sufficiently large . so i
want to stop the execution of the program now . how can i do this?
Control-C should work on every operating system. Obviously you have send the
Ctrl-C to the Python process, not some other application.
On 12 February 2012 21:27, William Stewart wrote:
>
> thanks i tried the code and it doesnt make anydiffference what I need is it
> to multiply now I fixed the error message but how do I get the 2 numbers that
> the person enters to multiply
>
> --- On Sun, 2/12/12, Brian van den Broek
> wrote
this is the code I have
str1 = raw_input("Type in a String: ")
str2 = raw_input("Type in a String: ")
int1 = raw_input("Type in a integer variable: ")
int2 = raw_input("Type in a integer variable: ")
print str1 + str2 + int1 + int2
import math
int1 = int(raw_input(""))
print str1,
print str2,
pri
William Stewart wrote:
this is the code I have
str1 = raw_input("Type in a String: ")
str2 = raw_input("Type in a String: ")
int1 = raw_input("Type in a integer variable: ")
int2 = raw_input("Type in a integer variable: ")
print str1 + str2 + int1 + int2
import math
int1 = int(raw_input(""))
p
Hello William and welcome to the Python list. I'm a beginner but I'll
give it a shot.
Problem is, you use raw_input and it returns a string, not an int.
Try this code:
str1 = raw_input("Type in a String: ")
str2 = raw_input("Type in a String: ")
int1 = int(raw_input("Type in a integer variable:
On 13 February 2012 01:34, William Stewart wrote:
>
> this is the code I have
>
> str1 = raw_input("Type in a String: ")
> str2 = raw_input("Type in a String: ")
> int1 = raw_input("Type in a integer variable: ")
> int2 = raw_input("Type in a integer variable: ")
> print str1 + str2 + int1 + int2
Thank you for the reply It worked fine !
--- On Sun, 2/12/12, Steven D'Aprano wrote:
From: Steven D'Aprano
Subject: Re: [Tutor] string integers?
To: tutor@python.org
Date: Sunday, February 12, 2012, 6:50 PM
William Stewart wrote:
> this is the code I have
> str1 = raw_input("Type in a Strin
I am having a weird issue. I have a print statement that will give me
multiple outputs separated by a tab; however, sometimes there is a tab
between the output and sometimes there is not. It seems sort of sporadic.
My code is below and two sample outputs are below that (one that works how
I expect,
On 12/02/2012 22:19, Steven D'Aprano wrote:
Debashish Saha wrote:
actually a i ran a progam in python which is sufficiently large . so i
want to stop the execution of the program now . how can i do this?
Control-C should work on every operating system. Obviously you have send
the Ctrl-C to the
On Mon, Feb 13, 2012 at 1:52 AM, Michael Lewis wrote:
> I am having a weird issue. I have a print statement that will give me
> multiple outputs separated by a tab; however, sometimes there is a tab
> between the output and sometimes there is not. It seems sort of sporadic. My
> code is below and
On 2/12/12, Michael Lewis wrote:
> I am having a weird issue. I have a print statement that will give me
> multiple outputs separated by a tab; however, sometimes there is a tab
> between the output and sometimes there is not. It seems sort of sporadic.
> My code is below and two sample outputs ar
38 matches
Mail list logo