Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread eryksun
On Wed, Sep 25, 2013 at 6:24 PM, Dino Bektešević  wrote:
>
> Where did you find that In-Reply-To: field? In example Alan's response
> header

Gmail has a "Show original" link in the message drop-down menu. But in
this case I just searched the September text archive:

https://mail.python.org/pipermail/tutor/2013-September.txt

I replied to you using Gmail's "Reply to all" in the webmail
interface, which added "In-Reply-To" and "References" to the header.

RFC 2822:
http://www.ietf.org/rfc/rfc2822.txt

   The "In-Reply-To:" and "References:" fields are used when creating a
   reply to a message.  They hold the message identifier of the original
   message and the message identifiers of other messages (for example,
   in the case of a reply to a message which was itself a reply).  The
   "In-Reply-To:" field may be used to identify the message (or
   messages) to which the new message is a reply, while the
   "References:" field may be used to identify a "thread" of
   conversation.

   When creating a reply to a message, the "In-Reply-To:" and
   "References:" fields of the resultant message are constructed as
   follows:

   The "In-Reply-To:" field will contain the contents of the "Message-
   ID:" field of the message to which this one is a reply (the "parent
   message").  If there is more than one parent message, then the "In-
   Reply-To:" field will contain the contents of all of the parents'
   "Message-ID:" fields.  If there is no "Message-ID:" field in any of
   the parent messages, then the new message will have no "In-Reply-To:"
   field.

   The "References:" field will contain the contents of the parent's
   "References:" field (if any) followed by the contents of the parent's
   "Message-ID:" field (if any).  If the parent message does not contain
   a "References:" field but does have an "In-Reply-To:" field
   containing a single message identifier, then the "References:" field
   will contain the contents of the parent's "In-Reply-To:" field
   followed by the contents of the parent's "Message-ID:" field (if
   any).  If the parent has none of the "References:", "In-Reply-To:",
   or "Message-ID:" fields, then the new message will have no
   "References:" field.

   Note: Some implementations parse the "References:" field to display
   the "thread of the discussion".  These implementations assume that
   each new message is a reply to a single parent and hence that they
   can walk backwards through the "References:" field to find the parent
   of each message listed there.  Therefore, trying to form a
   "References:" field for a reply that has multiple parents is
   discouraged and how to do so is not defined in this document.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread Dave Angel
On 25/9/2013 18:24, Dino Bektešević wrote:

>
> Where did you find that In-Reply-To: field? In example Alan's response
> header, including the quoted section is shown to me as:
>
> Message: 4
> Date: Mon, 23 Sep 2013 18:21:03 +0100
> From: Alan Gauld 
> To: tutor@python.org
> Subject: Re: [Tutor] HELP Please!!!How Do I Make a Graph Chart
> Generate in Python Based on my Code
> Message-ID: 
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>

Clearly gmail isn't showing you all the headers.  I looked for Alan's
message in one of these threads with the same subject, and see about 60
lines of header information.  Does gmail have a View->Source menu item?

Here's a small excerpt:

User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20130804 Thunderbird/17.0.8
In-Reply-To: <1379734001.35687.yahoomail...@web184701.mail.ne1.yahoo.com>
X-BeenThere: tutor@python.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Discussion for learning programming with Python 
List-Unsubscribe: ,


-- 
DaveA


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


Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread Dino Bektešević
> Message: 1
> Date: Wed, 25 Sep 2013 06:29:30 -0400
> From: eryksun 
> To: Dino Bekte?evi? 
> Cc: tutor@python.org
> Subject: Re: [Tutor] HELP Please!!!How Do I Make a Graph Chart
> Generate in Python Based on my Code
> Message-ID:
> 
> Content-Type: text/plain; charset=UTF-8
>
> On Tue, Sep 24, 2013 at 9:15 PM, Dino Bekte?evi?  wrote:
>>
>> original question: http://code.activestate.com/lists/python-tutor/96889/
>> my response: http://code.activestate.com/lists/python-tutor/96897/
>>
>> For someone browsing through Tutor in archive form I can see how this
>> is a tad confusing, is it fixable? I'm guessing that my mail wasn't
>> put in the response list because of different titles?
>
> Alan's reply, for example, has an In-Reply-To field:
>
> In-Reply-To: <1379734001.35687.yahoomail...@web184701.mail.ne1.yahoo.com>
>
> Your message's header doesn't have this field:
>
> From ljetibo at gmail.com  Mon Sep 23 23:17:00 2013
> From: ljetibo at gmail.com (=?ISO-8859-2?Q?Dino_Bekte=B9evi=E6?=)
> Date: Mon, 23 Sep 2013 23:17:00 +0200
> Subject: [Tutor] HELP Please!!!How Do I Make a Graph Chart Generate
>  in Python Based on my Code (znx...@yahoo.com)
> Message-ID:
> 
>
> Source:
>
> http://mail.python.org/pipermail/tutor
>

Where did you find that In-Reply-To: field? In example Alan's response
header, including the quoted section is shown to me as:

Message: 4
Date: Mon, 23 Sep 2013 18:21:03 +0100
From: Alan Gauld 
To: tutor@python.org
Subject: Re: [Tutor] HELP Please!!!How Do I Make a Graph Chart
Generate in Python Based on my Code
Message-ID: 
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 21/09/13 04:26, znx...@yahoo.com wrote:
> Can anyone please help me figure out what I am NOT doing to make this
> program work properly.PLEASE !!

Which is the same for any response header I see. It doesn't seem to be
something I edit at all.

> Message: 2
> Date: Wed, 25 Sep 2013 10:45:57 + (UTC)
> From: Dave Angel 
> To: tutor@python.org
> Subject: Re: [Tutor] HELP Please!!!How Do I Make a Graph Chart
> Generatein Python Based on my Code
> Message-ID: 
> Content-Type: text/plain; charset=ISO-8859-2
>
> On 24/9/2013 21:15, Dino Bekte?evi? wrote:
>
> I can't answer for some third-party archive of the list.  But your
> message on the current mailing list doesn't seem to be a reply to any
> existing one.  I'm viewing the list through the news.gmane.org feed, and
> it is happy to thread messages and their responses nicely, regardless of
> subject line.
>
> How did you respond to the earlier message?  Did you just compose a new
> one and address it to the mailing list?
>
>
> --
> DaveA

I use gmail and just use the "funny" looking arrow at the top that
says "reply" and I can see that in the news.gmane.org feed my mail is
sorted nicely in the response section but it isn't on either
code.activestate or on mail.python.org as eryksun stated as well.
I just want to be able to make my responses easily visible in most of
the online archives since otherwise they don't make sense for anyone
not subscribed to the daily mailing list.

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


Re: [Tutor] Writing program: To Do List in Python 3.0

2013-09-25 Thread Alan Gauld

On 25/09/13 18:42, Rafael Knuth wrote:


I want to write a simple program (To Do List) that stores the input
data (action items on To Do List). Currently I can only input items
but the program I wrote doesn't store them.


You need to write the data to a file or database when the program closes 
and then, when you start the program, read the data from

that file or database.


Here's the code I wrote so far:


OK, This is very basic and can be improved in lots of ways so I'm 
guessing you are a new programmer and studying via some kind of

course or tutorial?

At some stage it will cover reading and writing to files as well as data 
structures that will help store your data more effectively and looping 
constructs that will help you process it more effectively.


You can read up on reading and writing to files if you want but
it may be better not to run before you can walk...


print("This is my to do list")

Monday = input("Monday ")
Tuesday = input("Tuesday ")
Wednesday = input("Wednesday ")
Thursday = input("Thursday ")
Friday = input("Friday ")
Saturday = input("Saturday ")
Sunday = input("Sunday ")

print("So, here are your plans for:" +
"\nMonday " + Monday +
"\nTuesday " + Tuesday +
"\nWednesday " + Wednesday +
"\nThursday " + Thursday +
"\nFriday " + Friday +
"\nSaturday " + Saturday +
"\nSunday " + Sunday)



--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

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


[Tutor] OT: docopt

2013-09-25 Thread Albert-Jan Roskam

Hi,

Docopt is an alternative to optparse and argparse. Incredibly cool, and fun 
(check out the youtube movie!): http://docopt.org/


Just in case you missed it (like me).

Regards,
Albert-Jan
 ps: sorry if I posted this twice. 



~~
All right, but apart from the sanitation, the medicine, education, wine, public 
order, irrigation, roads, a 
fresh water system, and public health, what have the Romans ever done for us?
~~ 
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Writing program: To Do List in Python 3.0

2013-09-25 Thread Dave Angel
On 25/9/2013 13:42, Rafael Knuth wrote:

> Hej there,
>
> I want to write a simple program (To Do List) that stores the input
> data (action items on To Do List). Currently I can only input items
> but the program I wrote doesn't store them.
>
> Can you help?
>
> Thanks,
>
> Rafael
>
> Here's the code I wrote so far:
>
> print("This is my to do list")
>
> Monday = input("Monday ")
> Tuesday = input("Tuesday ")
> Wednesday = input("Wednesday ")
> Thursday = input("Thursday ")
> Friday = input("Friday ")
> Saturday = input("Saturday ")
> Sunday = input("Sunday ")
>
> print("So, here are your plans for:" +
> "\nMonday " + Monday +
> "\nTuesday " + Tuesday +
> "\nWednesday " + Wednesday +
> "\nThursday " + Thursday +
> "\nFriday " + Friday +
> "\nSaturday " + Saturday +
> "\nSunday " + Sunday)
>

To have data still available next time you run the program, you need to
write it to a file.

outfile = open("statefile.txt", "w")
outfile.write("Monday")
outfile.close()

Naturally, if you store non-trivial data, you'll have to organize it
somehow, so you can parse it when you read it back in.

Alternatively, you can use a module like configparser:

http://docs.python.org/3.3/library/configparser.html#module-configparser

or several other alternatives.

-- 
DaveA


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


Re: [Tutor] ImportError: No module named '_sysconfigdata_m'

2013-09-25 Thread Albert-Jan Roskam


- Original Message -

> From: Oscar Benjamin 
> To: Steven D'Aprano 
> Cc: "Tutor@python.org" 
> Sent: Wednesday, September 25, 2013 11:58 AM
> Subject: Re: [Tutor] ImportError: No module named '_sysconfigdata_m'
> 
> On 25 September 2013 00:25, Steven D'Aprano  
> wrote:
>>  On Tue, Sep 24, 2013 at 01:33:23PM +0100, Oscar Benjamin wrote:
>> 
>>>  If you want to mess with your system 'sudo rm -rf' is 
> definitely the
>>>  way to go. Don't bother reporting this as a bug since you've
>>>  *definitely* voided the warranty (that your free software didn't 
> come
>>>  with).
>> 
>>  I first read that as "sudo rm -rf ." and thought "That's 
> a bit harsh,
>>  isn't it?"
> 
> I guess it does seem harsh but it's definitely true. Albert-Jan still
> hasn't explained what he was trying to achieve with that command but I
> stand by my claim that whatever it was can be achieved in a better and
> safer way.

I just wanted to get rid of Python 3.2 as I thought it had no purpose.
Maybe I also could have done apt-get install --only-upgrade python3.
apt-get update does not update python 3.2 to 3.3.
 
> If you try 'sudo apt-get remove python3'  then apt will check the
> database of installed packages to see if anything depends on the
> python3 package. 

Thanks. I will use that from now on. Much better indeed. But isn't it safer to 
also specify the minor python version?

If nothing depends on it then it will be safely
> removed and the apt database will be updated to reflect the fact that
> it is no longer installed. Otherwise it will report the full list of
> packages that would also need to be removed because they depend on
> python3 and ask if you want to remove all of them. At this point
> you'll probably think "What on earth are all those packages? Maybe I
> need them." and then answer no.
> 
> On the other hand 'sudo rm -rf /some/system/dir' will check nothing
> and will simply remove the files. The combination of sudo and the -f
> flag means "I know what I'm doing so shut up and do what I say". I
> rarely feel confident enough to do that and I can't think of the last
> time I had a reason to do it.
> 
> I regularly use 'rm -rf' because that's needed to delete e.g. a git
> repository which contains a whole load of files marked as read-only.
> Without the -f you'll have to answer 'y' thousands of times. But I
> don't usually have git repositories that are owned by root so I don't
> need the sudo part (I have sometimes used git to manage system files
> like fstab, grub etc.).
> 
> 
> Oscar
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
> 
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Writing program: To Do List in Python 3.0

2013-09-25 Thread Rafael Knuth
Hej there,

I want to write a simple program (To Do List) that stores the input
data (action items on To Do List). Currently I can only input items
but the program I wrote doesn't store them.

Can you help?

Thanks,

Rafael

Here's the code I wrote so far:

print("This is my to do list")

Monday = input("Monday ")
Tuesday = input("Tuesday ")
Wednesday = input("Wednesday ")
Thursday = input("Thursday ")
Friday = input("Friday ")
Saturday = input("Saturday ")
Sunday = input("Sunday ")

print("So, here are your plans for:" +
"\nMonday " + Monday +
"\nTuesday " + Tuesday +
"\nWednesday " + Wednesday +
"\nThursday " + Thursday +
"\nFriday " + Friday +
"\nSaturday " + Saturday +
"\nSunday " + Sunday)
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How to create dictionaries loadable with import

2013-09-25 Thread Albert-Jan Roskam


- Original Message -

> From: "Treder, Robert" 
> To: "tutor@python.org" 
> Cc: 
> Sent: Wednesday, September 25, 2013 6:09 PM
> Subject: Re: [Tutor] How to create dictionaries loadable with import
> 
>T hanks for the suggestions and sorry about the errors when I tried to 
>anonymize 
> my code. 

Talking about anonymizing, this is legal:

#!/usr/bin/python
# -*- coding: rot13 -*-qrs fbzrShap(*netf, **xjnetf):
   cnff


...because:

>>> print """qrs fbzrShap(*netf, **xjnetf):
    cnff""".decode("rot13")
def someFunc(*args, **kwargs):
    pass

fun, isn't it?

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


Re: [Tutor] How to create dictionaries loadable with import

2013-09-25 Thread Treder, Robert
Thanks for the suggestions and sorry about the errors when I tried to anonymize 
my code. It's turns out when I ran the code through setup, I had an __init__.py 
file incorrectly defined which generated the error. The error from the 
traceback was at the line where I was importing the module. I have it working 
now. 

Bob

   
-Original Message-
From: Prasad, Ramit [mailto:ramit.pra...@jpmorgan.com] 
Sent: Tuesday, September 24, 2013 6:23 PM
To: Treder, Robert (Research); tutor@python.org
Subject: RE: How to create dictionaries loadable with import

Treder, Robert wrote:
> Hi Python tutors,
> 
> I'm fairly new to Python.  I'm working with Python v2.7.4 and the nltk 
> package on a couple of text
> mining projects.  I create several dictionaries that are pretty static. Will 
> probably only be updated
> every or month or every couple of months.  I want to turn those dictionaries 
> into loadable data sets
> prior to running a module which uses them.  If I define several dictionaries, 
> dict1, dict2 and dict3,
> in a single module named myDict, I'd like to do
> 
>from myDict import *
> 
> I've tried defining the dictionaries in a the myDict module as follows:
> 
> Dict1 = {}
> with open('file1, 'rb') as infile:

Without the closing quote for file1, this is a SyntaxError.

>     reader = csv.reader(infile, delimiter = ',')
>     for row in reader:
>     try:
>     Dict1[ row[1] ].append(row[0])
>     except:
>     Dict1[ row[1] ] = [ row[0], ]
> 
> Dict2 = {}
> with open('file2, 'rb') as infile:

Without the closing quote for file2, this is a SyntaxError.

>     reader = csv.reader(infile, delimiter = ',')
>     for row in reader:
>     try:
>     Dict2[ row[1] ].append(row[0])
>     except:
>     Dict2[ row[1] ] = [ row[0], ]
> 
> These are simple dictionary structures with no additional structure, i.e., 
> not embedded in classes or
> functions.
> The try/except sequence is because some of the keys may be duplicated in the 
> files and I want to
> append the values rather than overwrite.

Hmm, I think you are incorrect. The try/except logic is used
when there is not row[1] in the dictionary (i.e. every first
entry of a key). I guess that handles multiple keys, but it 
would be clearer if you used the setdefault method on the 
dictionary.

Dict1.setdefault( row[1], [] ).append( row[0] )

> Now when I build the module with setup tools
> 
>python setup.py install -prefix=C:\PY_MODULES

Unless you have a non-standard environment (at least not 
one I am familiar with), you do not need setup tools as long
as the script is somewhere on the PYTHONPATH. Also, the
dictionaries are not created except on first import of the 
module (at run-time not compile-time). 

If they are static or mostly so, you may want to just hard code 
them in the myDict module (lowercase for module names is 
the community standard) for easier modification. In addition,
that means you can get rid of the source files file1 and file2.

You can use `print repr(Dict1)` to copy paste the 
dictionaries into the code.

> 
> it builds without error but I can't find the dictionaries when I load the 
> module
>     from myDict import *
> AttributeError: 'module' object has no attribute 'Dict1'
> 
> How can I make the dictionaries loadable using import?

The import and the error do not seem to match. Can you
please copy/paste (do not paraphrase or try to retype)
the FULL error? 

> 
> Thanks,
> Bob


~Ramit



This email is confidential and subject to important disclaimers and conditions 
including on offers for the purchase or sale of securities, accuracy and 
completeness of information, viruses, confidentiality, legal privilege, and 
legal entity disclaimers, available at 
http://www.jpmorgan.com/pages/disclosures/email.  




NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or 
views contained herein are not intended to be, and do not constitute, advice 
within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and 
Consumer Protection Act. If you have received this communication in error, 
please destroy all electronic and paper copies and notify the sender 
immediately. Mistransmission is not intended to waive confidentiality or 
privilege. Morgan Stanley reserves the right, to the extent permitted under 
applicable law, to monitor electronic communications. This message is subject 
to terms available at the following link: 
http://www.morganstanley.com/disclaimers. If you cannot access these links, 
please notify us by reply message and we will send the contents to you. By 
messaging with Morgan Stanley you consent to the foregoing.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread znxm0i

Thanks Brian for replying but I already figured out what I was not doing 
correctlyalso the link you supplied was not what I needed.I had to make 
the user input statements appear as graphical input boxes and not just text and 
I figured out how to do it, so it now works like a charm

--
On Tue, Sep 24, 2013 8:14 PM CDT brian arb wrote:

>http://mcsp.wartburg.edu/zelle/python/ppics1/code/chapter05/futval_graph2.py
>
>
>On Tue, Sep 24, 2013 at 4:36 PM, School  wrote:
>
>> What is the error you received? What lines does it say are causing the
>> error?
>>
>> Also, this smells like classwork.
>>
>> On Sep 20, 2013, at 21:26, znx...@yahoo.com wrote:
>>
>> Can anyone please help me figure out what I am NOT doing to make this
>> program work properly.PLEASE !!
>>
>> I need to be able to take the user input that is entered in the two
>> graphical boxes of the first window and evaluate it to generate a graph
>> chart which is suppose to display in the second window.  I am totally at a
>> loss for what I am NOT doing, and I know it is something so simple that I
>> am overlooking because I am making this harder that what it most likely
>> really is.
>>
>> But I just cannot get it to work properly.  Please HELP !!!  Help me
>> understand what I am doing wrong and how to fix it.  I believe I am on the
>> right path but I'm becoming frustrated and discouraged.
>>
>> I have attached a copy of the code I've compiled so far.
>>
>> 
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>>
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> https://mail.python.org/mailman/listinfo/tutor
>>
>>

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


Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread Dave Angel
On 24/9/2013 21:15, Dino Bektešević wrote:

> Hello,
>
> I wrote a response on the subject in the title about creating a graph
> in Python using the Graphics module presented in the standard python
> tutorial on 23rd detailing full explanations but I still saw repeated
> responses asking more of the same question (lines causing the error,
> which graphics module are you referring to etc...) which is ok because
> I don't mind multiple answers to the question, not everything usually
> gets covered in only one and it's a check up if I answered something
> wrong.
>
> But it still kind of bothered me that so many of same questions got
> repeated so I googled to see the archives and it seems my response was
> not placed in the same archive "thread" as it should have been, and
> doesn't appear in the response list of the question.
>
> original question: http://code.activestate.com/lists/python-tutor/96889/
> my response: http://code.activestate.com/lists/python-tutor/96897/
>
> For someone browsing through Tutor in archive form I can see how this
> is a tad confusing, is it fixable? I'm guessing that my mail wasn't
> put in the response list because of different titles?
>

I can't answer for some third-party archive of the list.  But your
message on the current mailing list doesn't seem to be a reply to any
existing one.  I'm viewing the list through the news.gmane.org feed, and
it is happy to thread messages and their responses nicely, regardless of
subject line.

How did you respond to the earlier message?  Did you just compose a new
one and address it to the mailing list?


-- 
DaveA


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


Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread eryksun
On Tue, Sep 24, 2013 at 9:15 PM, Dino Bektešević  wrote:
>
> original question: http://code.activestate.com/lists/python-tutor/96889/
> my response: http://code.activestate.com/lists/python-tutor/96897/
>
> For someone browsing through Tutor in archive form I can see how this
> is a tad confusing, is it fixable? I'm guessing that my mail wasn't
> put in the response list because of different titles?

Alan's reply, for example, has an In-Reply-To field:

In-Reply-To: <1379734001.35687.yahoomail...@web184701.mail.ne1.yahoo.com>

Your message's header doesn't have this field:

From ljetibo at gmail.com  Mon Sep 23 23:17:00 2013
From: ljetibo at gmail.com (=?ISO-8859-2?Q?Dino_Bekte=B9evi=E6?=)
Date: Mon, 23 Sep 2013 23:17:00 +0200
Subject: [Tutor] HELP Please!!!How Do I Make a Graph Chart Generate
 in Python Based on my Code (znx...@yahoo.com)
Message-ID:


Source:

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


Re: [Tutor] ImportError: No module named '_sysconfigdata_m'

2013-09-25 Thread Oscar Benjamin
On 25 September 2013 00:25, Steven D'Aprano  wrote:
> On Tue, Sep 24, 2013 at 01:33:23PM +0100, Oscar Benjamin wrote:
>
>> If you want to mess with your system 'sudo rm -rf' is definitely the
>> way to go. Don't bother reporting this as a bug since you've
>> *definitely* voided the warranty (that your free software didn't come
>> with).
>
> I first read that as "sudo rm -rf ." and thought "That's a bit harsh,
> isn't it?"

I guess it does seem harsh but it's definitely true. Albert-Jan still
hasn't explained what he was trying to achieve with that command but I
stand by my claim that whatever it was can be achieved in a better and
safer way.

If you try 'sudo apt-get remove python3'  then apt will check the
database of installed packages to see if anything depends on the
python3 package. If nothing depends on it then it will be safely
removed and the apt database will be updated to reflect the fact that
it is no longer installed. Otherwise it will report the full list of
packages that would also need to be removed because they depend on
python3 and ask if you want to remove all of them. At this point
you'll probably think "What on earth are all those packages? Maybe I
need them." and then answer no.

On the other hand 'sudo rm -rf /some/system/dir' will check nothing
and will simply remove the files. The combination of sudo and the -f
flag means "I know what I'm doing so shut up and do what I say". I
rarely feel confident enough to do that and I can't think of the last
time I had a reason to do it.

I regularly use 'rm -rf' because that's needed to delete e.g. a git
repository which contains a whole load of files marked as read-only.
Without the -f you'll have to answer 'y' thousands of times. But I
don't usually have git repositories that are owned by root so I don't
need the sudo part (I have sometimes used git to manage system files
like fstab, grub etc.).


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


Re: [Tutor] HELP Please!!!....How Do I Make a Graph Chart Generate in Python Based on my Code

2013-09-25 Thread Dino Bektešević
Hello,

I wrote a response on the subject in the title about creating a graph
in Python using the Graphics module presented in the standard python
tutorial on 23rd detailing full explanations but I still saw repeated
responses asking more of the same question (lines causing the error,
which graphics module are you referring to etc...) which is ok because
I don't mind multiple answers to the question, not everything usually
gets covered in only one and it's a check up if I answered something
wrong.

But it still kind of bothered me that so many of same questions got
repeated so I googled to see the archives and it seems my response was
not placed in the same archive "thread" as it should have been, and
doesn't appear in the response list of the question.

original question: http://code.activestate.com/lists/python-tutor/96889/
my response: http://code.activestate.com/lists/python-tutor/96897/

For someone browsing through Tutor in archive form I can see how this
is a tad confusing, is it fixable? I'm guessing that my mail wasn't
put in the response list because of different titles?

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