[Tutor] (no subject)

2010-06-20 Thread Edward Lang



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


Re: [Tutor] Tutor Digest, Vol 76, Issue 57

2010-06-20 Thread Edward Lang
e

tutor-requ...@python.org wrote:

>Send Tutor mailing list submissions to
>   tutor@python.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>   http://mail.python.org/mailman/listinfo/tutor
>or, via email, send a message with subject or body 'help' to
>   tutor-requ...@python.org
>
>You can reach the person managing the list at
>   tutor-ow...@python.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Tutor digest..."
>
>
>Today's Topics:
>
>   1. Re: Python glade (Lang Hurst)
>   2. Re: Question (Alan Gauld)
>   3. Re: Question (Steven D'Aprano)
>
>
>--
>
>Message: 1
>Date: Fri, 18 Jun 2010 21:50:23 -0700
>From: Lang Hurst 
>To: tutor@python.org
>Subject: Re: [Tutor] Python glade
>Message-ID: <4c1c4c8f.7080...@tharin.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>Found the problem.  If you want to do this, you have to access the 
>gtkEntry like this
>
>self.builder.get_object('student_change').set_completion(completion)
>
>
>instead of
>
>self.student_change.set_completion(completion)
>
>
>
>
>
>Lang Hurst wrote:
>> OK, I created a UI in glade which has the following:
>>
>> 
>>True
>>True
>>> name="invisible_char">●
>>25
>>>handler="student_change_activate_cb"/>
>>
>>
>>
>> basically, a text box.  I'm trying to set it up to automatically 
>> complete names as I type.  My py file has the following:
>>
>> def __init__(self):
>>  self.builder = gtk.Builder()
>>  self.builder.add_from_file('gradebook.glade')
>>  self.window = self.builder.get_object('winapp')
>>  self.builder.connect_signals(self)
>>#  self.student_change = gtk.Entry()
>>  completion = gtk.EntryCompletion()
>>  self.names = gtk.ListStore(str)
>>  query = "SELECT * from students"
>>  db = sqlite3.connect('gradebook.db')
>>  cursor = db.cursor()
>>  cursor.execute(query)
>>  students = cursor.fetchall()
>>  for student in students:
>>  self.names.append([student[1]])
>>  print student[1]
>>  cursor.close()
>>  completion.set_model(self.names)
>>  self.student_change.set_completion(completion)
>>  completion.set_text_column(0)
>>
>>
>> When I try to run this, I get
>>
>>AttributeError: 'appGUI' object has no attribute 'student_change'
>>
>>
>> But if I uncomment the self.student_change line from up above, it runs 
>> but doesn't do completion.
>>
>> I modeled this after
>>
>> http://www.koders.com/python/fid755022E2A82A54C79A7CF86C00438E6F825676C3.aspx?s=gtk#L4
>>  
>>
>>
>> I'm pretty sure the problem is somewhere in the gtk.Builder part of 
>> what I'm doing, but I can't for the life of me figure this out.
>>
>
>
>-- 
>There are no stupid questions, just stupid people.
>
>
>
>--
>
>Message: 2
>Date: Sat, 19 Jun 2010 09:19:09 +0100
>From: "Alan Gauld" 
>To: tutor@python.org
>Subject: Re: [Tutor] Question
>Message-ID: 
>Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>   reply-type=original
>
>"Independent Learner"  wrote 
>
>> ~I was wondering if I should try to learn 2 programming languages 
>> at once, Python and C++. 
>
>No, no no! If it had been a different pair I might have said try it. 
>But C++ is one of the most difficult, complex and difficult 
>programming lamnguages out there. It is full of subtle things 
>that can trip you up and cause very weird and subtle bugs 
>that are diffficult to find. And it has similar concepts to Python 
>but implemented so entirely differently that studying the two 
>together will be an exercise in frustration.
>
>Part of the reason why C++ is so difficult is because it is 
>so powerful. You have full access to the machine through 
>the C language elements, plus a full OOP environment, 
>plus a powerful generic type system. Plus it combines 
>static and dynamic variables with a reference model all with 
>slightly different syntax and semantic behaviours.
>
>At work I hardly ever recommend that people go on language 
>training courses, C++ is the exception! You can learn C++ 
>by yourself but you will need a good book and a lot of 
>time and patience.
>
>> Obviously I am working on learning python right now, 
>> I have gotten up to Classes
>
>Stick with Python and get comfortable with that.
>
>Then move onto C++ as a separate and significant project
>if you really feel you have a need to know it.
>
>> there are still a lot of things I am not really fully 
>> comprehending, but like I said I have a pretty good idea. 
>
>Ask questions here. That's what the tutor list is for.
>
>> ~So is it better to learn 1 programming language 
>> first, then learn another. Or better to pretty much 
>> learn 

Re: [Tutor] Tutor Digest, Vol 77, Issue 25

2010-07-09 Thread Edward Lang


tutor-requ...@python.org wrote:

>Send Tutor mailing list submissions to
>   tutor@python.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>   http://mail.python.org/mailman/listinfo/tutor
>or, via email, send a message with subject or body 'help' to
>   tutor-requ...@python.org
>
>You can reach the person managing the list at
>   tutor-ow...@python.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Tutor digest..."
>
>
>Today's Topics:
>
>   1. Re: Having a return when subprocess.Popen finishes (Nick Raptis)
>   2. Re: Having a return when subprocess.Popen finishes (Payal)
>   3. Re: Django Read (Huy Ton That)
>   4. Re: differences between mmap and StringIO (Christopher King)
>   5. Re: Tkinter mainloop() (Francesco Loffredo)
>
>
>--
>
>Message: 1
>Date: Thu, 08 Jul 2010 16:33:02 +0300
>From: Nick Raptis 
>To: tutor@python.org
>Subject: Re: [Tutor] Having a return when subprocess.Popen finishes
>Message-ID: <4c35d38e.4090...@otenet.gr>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>subprocess.Popen is a class, and as such it returns an object which can 
>do a lot of stuff besides just reading the output.
>
>What you want to do here is using it's communicate() method as such:
>
>output, errors = ping.communicate()
>
>
>Also, there is a quicker way, I think from version 2.7 forward: use  the 
>shortcut
>output = subprocess.check_output("your command here")
>
>Always check latest documentation for your python version too
>http://docs.python.org/library/subprocess.html
>
>Nick
>
>On 07/08/2010 04:04 PM, Paul VanGundy wrote:
>> Hi All,
>>
>> I'm trying to get data from subprocess.Popen. To be specific, I am
>> trying to read a ping echo and take the output and assign it to a
>> variable like below:
>>
>> ping = subprocess.Popen("ping -c 5 %s" % (server),
>> stdout=subprocess.PIPE, shell=True)
>>
>> However, when I run the command the output that gets assigned to my ping
>> variable is something along the lines of '> 0x9524bec>' and am not returned to>>>  prompt. I know that is the proper
>> output but I need to be able to capture the ping replies and assign
>> those to a variable. I tried adding a \r and \n at the end of my cmd.
>> Any help would be greatly appreciated. I'm open to improvements,
>> different ways of doing it and corrections. :) If more info is needed
>> let me know. Thanks.
>>
>> /paul
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>>
>
>
>--
>
>Message: 2
>Date: Thu, 8 Jul 2010 06:39:51 -0700
>From: Payal 
>To: tutor@python.org
>Subject: Re: [Tutor] Having a return when subprocess.Popen finishes
>Message-ID: <20100708133951.ga4...@scriptkitchen.com>
>Content-Type: text/plain; charset=us-ascii
>
>On Thu, Jul 08, 2010 at 09:04:54AM -0400, Paul VanGundy wrote:
>> Hi All,
>> 
>> I'm trying to get data from subprocess.Popen. To be specific, I am
>> trying to read a ping echo and take the output and assign it to a
>> variable like below:
>> 
>> ping = subprocess.Popen("ping -c 5 %s" % (server),
>> stdout=subprocess.PIPE, shell=True)
>
 import subprocess
 server = 'localhost'
 ping = subprocess.Popen("ping -c 5 %s" %
 (server),stdout=subprocess.PIPE, shell=True)
 ping.communicate()
>('PING localhost (127.0.0.1) 56(84) bytes of data.\n64 bytes from
>localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.044 ms\n64 bytes from
>localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.046 ms\n64 bytes from
>localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.052 ms\n64 bytes from
>localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.046 ms\n64 bytes from
>localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.049 ms\n\n--- localhost
>ping statistics ---\n5 packets transmitted, 5 received, 0% packet loss,
>time 3997ms\nrtt min/avg/max/mdev = 0.044/0.047/0.052/0.006 ms\n', None)

>
>hth,
>With warm regards,
>-Payal
>-- 
>
>
>
>--
>
>Message: 3
>Date: Thu, 8 Jul 2010 10:19:38 -0400
>From: Huy Ton That 
>To: Jeff Johnson 
>Cc: tutor@python.org
>Subject: Re: [Tutor] Django Read
>Message-ID:
>   
>Content-Type: text/plain; charset="iso-8859-1"
>
>I've went through the djangobook myself, and found it quite readable. This
>would be my recommendation as well.
>
>Be sure to read the sidebar comments; if you ever feel stuck, someone else
>may have addressed the question/answer for you!
>
>-Lee
>
>On Thu, Jul 8, 2010 at 9:31 AM, Jeff Johnson  wrote:
>
>> On 07/08/2010 06:06 AM, Nick Raptis wrote:
>>
>>> There actually aren't that many books on django around yet which is a
>>> pity.
>>> You should definitely read "The django book":
>>> http://www.djangobook.com/en/2.0/
>>> either on the online version on that link, or it's printed counterpart
>>> (yes,

Re: [Tutor] Tutor Digest, Vol 77, Issue 25

2010-07-09 Thread Edward Lang


tutor-requ...@python.org wrote:

>Send Tutor mailing list submissions to
>   tutor@python.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>   http://mail.python.org/mailman/listinfo/tutor
>or, via email, send a message with subject or body 'help' to
>   tutor-requ...@python.org
>
>You can reach the person managing the list at
>   tutor-ow...@python.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Tutor digest..."
>
>
>Today's Topics:
>
>   1. Re: Having a return when subprocess.Popen finishes (Nick Raptis)
>   2. Re: Having a return when subprocess.Popen finishes (Payal)
>   3. Re: Django Read (Huy Ton That)
>   4. Re: differences between mmap and StringIO (Christopher King)
>   5. Re: Tkinter mainloop() (Francesco Loffredo)
>
>
>--
>
>Message: 1
>Date: Thu, 08 Jul 2010 16:33:02 +0300
>From: Nick Raptis 
>To: tutor@python.org
>Subject: Re: [Tutor] Having a return when subprocess.Popen finishes
>Message-ID: <4c35d38e.4090...@otenet.gr>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>subprocess.Popen is a class, and as such it returns an object which can 
>do a lot of stuff besides just reading the output.
>
>What you want to do here is using it's communicate() method as such:
>
>output, errors = ping.communicate()
>
>
>Also, there is a quicker way, I think from version 2.7 forward: use  the 
>shortcut
>output = subprocess.check_output("your command here")
>
>Always check latest documentation for your python version too
>http://docs.python.org/library/subprocess.html
>
>Nick
>
>On 07/08/2010 04:04 PM, Paul VanGundy wrote:
>> Hi All,
>>
>> I'm trying to get data from subprocess.Popen. To be specific, I am
>> trying to read a ping echo and take the output and assign it to a
>> variable like below:
>>
>> ping = subprocess.Popen("ping -c 5 %s" % (server),
>> stdout=subprocess.PIPE, shell=True)
>>
>> However, when I run the command the output that gets assigned to my ping
>> variable is something along the lines of '> 0x9524bec>' and am not returned to>>>  prompt. I know that is the proper
>> output but I need to be able to capture the ping replies and assign
>> those to a variable. I tried adding a \r and \n at the end of my cmd.
>> Any help would be greatly appreciated. I'm open to improvements,
>> different ways of doing it and corrections. :) If more info is needed
>> let me know. Thanks.
>>
>> /paul
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>>
>
>
>--
>
>Message: 2
>Date: Thu, 8 Jul 2010 06:39:51 -0700
>From: Payal 
>To: tutor@python.org
>Subject: Re: [Tutor] Having a return when subprocess.Popen finishes
>Message-ID: <20100708133951.ga4...@scriptkitchen.com>
>Content-Type: text/plain; charset=us-ascii
>
>On Thu, Jul 08, 2010 at 09:04:54AM -0400, Paul VanGundy wrote:
>> Hi All,
>> 
>> I'm trying to get data from subprocess.Popen. To be specific, I am
>> trying to read a ping echo and take the output and assign it to a
>> variable like below:
>> 
>> ping = subprocess.Popen("ping -c 5 %s" % (server),
>> stdout=subprocess.PIPE, shell=True)
>
 import subprocess
 server = 'localhost'
 ping = subprocess.Popen("ping -c 5 %s" %
 (server),stdout=subprocess.PIPE, shell=True)
 ping.communicate()
>('PING localhost (127.0.0.1) 56(84) bytes of data.\n64 bytes from
>localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.044 ms\n64 bytes from
>localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.046 ms\n64 bytes from
>localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.052 ms\n64 bytes from
>localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.046 ms\n64 bytes from
>localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.049 ms\n\n--- localhost
>ping statistics ---\n5 packets transmitted, 5 received, 0% packet loss,
>time 3997ms\nrtt min/avg/max/mdev = 0.044/0.047/0.052/0.006 ms\n', None)

>
>hth,
>With warm regards,
>-Payal
>-- 
>
>
>
>--
>
>Message: 3
>Date: Thu, 8 Jul 2010 10:19:38 -0400
>From: Huy Ton That 
>To: Jeff Johnson 
>Cc: tutor@python.org
>Subject: Re: [Tutor] Django Read
>Message-ID:
>   
>Content-Type: text/plain; charset="iso-8859-1"
>
>I've went through the djangobook myself, and found it quite readable. This
>would be my recommendation as well.
>
>Be sure to read the sidebar comments; if you ever feel stuck, someone else
>may have addressed the question/answer for you!
>
>-Lee
>
>On Thu, Jul 8, 2010 at 9:31 AM, Jeff Johnson  wrote:
>
>> On 07/08/2010 06:06 AM, Nick Raptis wrote:
>>
>>> There actually aren't that many books on django around yet which is a
>>> pity.
>>> You should definitely read "The django book":
>>> http://www.djangobook.com/en/2.0/
>>> either on the online version on that link, or it's printed counterpart
>>> (yes,

Re: [Tutor] Tutor Digest, Vol 80, Issue 11

2010-10-02 Thread Edward Lang


tutor-requ...@python.org wrote:

>Send Tutor mailing list submissions to
>   tutor@python.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>   http://mail.python.org/mailman/listinfo/tutor
>or, via email, send a message with subject or body 'help' to
>   tutor-requ...@python.org
>
>You can reach the person managing the list at
>   tutor-ow...@python.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Tutor digest..."
>
>
>Today's Topics:
>
>   1. Re: Connecting my users (Timo)
>   2. Re: data question (Alan Gauld)
>   3. Re: data question (Roelof Wobben)
>   4. Re: data question (Roelof Wobben)
>   5. Re: data question (Roelof Wobben)
>   6. Re: data question (Robert Berman)
>   7. Re: Coin Toss Problems (bob gailer)
>
>
>--
>
>Message: 1
>Date: Sat, 02 Oct 2010 12:06:14 +0200
>From: Timo 
>To: Nitin Pawar 
>Cc: tutor@python.org
>Subject: Re: [Tutor] Connecting my users
>Message-ID: <4ca70416.2050...@gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>On 01-10-10 11:25, Nitin Pawar wrote:
>> have a look at this
>>
>> http://bytes.com/topic/python/answers/826973-peer-peer-chat-program
>
>Thanks, but that still uses a server. And even one that I can't control! 
>If it has to be with server interaction, than as little as possible is 
>preferred and option to put it on my own.
>
>Cheers,
>Timo
>
>>
>> On Fri, Oct 1, 2010 at 2:49 PM, Timo > > wrote:
>>
>> Hello,
>>
>> I have the following idea, but no clue how to implement this.
>> I want my users to be able to connect to other users (with the
>> same program) and chat with them and exchange files. Ideally
>> without server interaction. Now I heard about peer-to-peer and
>> bittorrent protocol etc. But don't know where to start or that I'm
>> even at the right path.
>> So if anyone can point me into the right direction of a framework
>> or protocol I should use for this, it would be appreciated.
>>
>> Cheers,
>> Timo
>>
>> ___
>> Tutor maillist  - Tutor@python.org 
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>>
>>
>> -- 
>> Nitin Pawar
>>
>
>
>
>--
>
>Message: 2
>Date: Sat, 2 Oct 2010 14:10:25 +0100
>From: "Alan Gauld" 
>To: tutor@python.org
>Subject: Re: [Tutor] data question
>Message-ID: 
>Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>   reply-type=original
>
>
>"Roelof Wobben"  wrote
>
>> As a test I would write a programm where a user can input game-data
>> like home-team, away-team, home-score, away-score) and makes a
>> ranking of it.
>
>> In which datatype can I put this data in.
>>
>> I thought myself of a dictonary of tuples.
>
>A dictionary would be good for the basic data but I assume there
>are more than one of these data items? If so what do they represent?
>How would they be used?
>
>We need a bit more information, even some sample datya might help.
>
>It could be a list of dictionaries or even a dictionary of 
>dictionaries.
>
>Alan G.
>
>
>
>
>--
>
>Message: 3
>Date: Sat, 2 Oct 2010 13:10:03 +
>From: Roelof Wobben 
>To: 
>Subject: Re: [Tutor] data question
>Message-ID: 
>Content-Type: text/plain; charset="iso-8859-1"
>
>
>
>
>
>> From: rwob...@hotmail.com
>> To: berma...@cfl.rr.com
>> Subject: RE: [Tutor] data question
>> Date: Sat, 2 Oct 2010 13:09:23 +
>>
>>
>>
>>
>> 
>>> From: berma...@cfl.rr.com
>>> To: rwob...@hotmail.com; tutor@python.org
>>> Subject: RE: [Tutor] data question
>>> Date: Sat, 2 Oct 2010 09:02:41 -0400
>>>
>>>
>>>
 -Original Message-
 From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-
 bounces+bermanrl=cfl.rr@python.org] On Behalf Of Roelof Wobben
 Sent: Saturday, October 02, 2010 4:35 AM
 To: tutor@python.org
 Subject: [Tutor] data question



 Hello,
>>>
 Now my question is :

 In which datatype can I put this data in.

>>> Perhaps a simple SQLlite database?
>>> http://zetcode.com/databases/sqlitetutorial/
>>>
>>> Hope this helps,
>>>
>>> Robert
>>>
>>>
>>>
 Regards,

 Roelof

 ___
 Tutor maillist - Tutor@python.org
 To unsubscribe or change subscription options:
 http://mail.python.org/mailman/listinfo/tutor
>>>
>
>Oke,
>
>Oke, there I can save the input data.
>But I have also need a data model for team, played_games, game_points, 
>made_points and againts_points.
>So I think it cannot be done without using a class for games and one for 
>ranking.
>And figuring out how I can store the game-data in a text or database file

Re: [Tutor] Tutor Digest, Vol 80, Issue 11

2010-10-02 Thread Edward Lang


tutor-requ...@python.org wrote:

>Send Tutor mailing list submissions to
>   tutor@python.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>   http://mail.python.org/mailman/listinfo/tutor
>or, via email, send a message with subject or body 'help' to
>   tutor-requ...@python.org
>
>You can reach the person managing the list at
>   tutor-ow...@python.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Tutor digest..."
>
>
>Today's Topics:
>
>   1. Re: Connecting my users (Timo)
>   2. Re: data question (Alan Gauld)
>   3. Re: data question (Roelof Wobben)
>   4. Re: data question (Roelof Wobben)
>   5. Re: data question (Roelof Wobben)
>   6. Re: data question (Robert Berman)
>   7. Re: Coin Toss Problems (bob gailer)
>
>
>--
>
>Message: 1
>Date: Sat, 02 Oct 2010 12:06:14 +0200
>From: Timo 
>To: Nitin Pawar 
>Cc: tutor@python.org
>Subject: Re: [Tutor] Connecting my users
>Message-ID: <4ca70416.2050...@gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>On 01-10-10 11:25, Nitin Pawar wrote:
>> have a look at this
>>
>> http://bytes.com/topic/python/answers/826973-peer-peer-chat-program
>
>Thanks, but that still uses a server. And even one that I can't control! 
>If it has to be with server interaction, than as little as possible is 
>preferred and option to put it on my own.
>
>Cheers,
>Timo
>
>>
>> On Fri, Oct 1, 2010 at 2:49 PM, Timo > > wrote:
>>
>> Hello,
>>
>> I have the following idea, but no clue how to implement this.
>> I want my users to be able to connect to other users (with the
>> same program) and chat with them and exchange files. Ideally
>> without server interaction. Now I heard about peer-to-peer and
>> bittorrent protocol etc. But don't know where to start or that I'm
>> even at the right path.
>> So if anyone can point me into the right direction of a framework
>> or protocol I should use for this, it would be appreciated.
>>
>> Cheers,
>> Timo
>>
>> ___
>> Tutor maillist  - Tutor@python.org 
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>>
>>
>> -- 
>> Nitin Pawar
>>
>
>
>
>--
>
>Message: 2
>Date: Sat, 2 Oct 2010 14:10:25 +0100
>From: "Alan Gauld" 
>To: tutor@python.org
>Subject: Re: [Tutor] data question
>Message-ID: 
>Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>   reply-type=original
>
>
>"Roelof Wobben"  wrote
>
>> As a test I would write a programm where a user can input game-data
>> like home-team, away-team, home-score, away-score) and makes a
>> ranking of it.
>
>> In which datatype can I put this data in.
>>
>> I thought myself of a dictonary of tuples.
>
>A dictionary would be good for the basic data but I assume there
>are more than one of these data items? If so what do they represent?
>How would they be used?
>
>We need a bit more information, even some sample datya might help.
>
>It could be a list of dictionaries or even a dictionary of 
>dictionaries.
>
>Alan G.
>
>
>
>
>--
>
>Message: 3
>Date: Sat, 2 Oct 2010 13:10:03 +
>From: Roelof Wobben 
>To: 
>Subject: Re: [Tutor] data question
>Message-ID: 
>Content-Type: text/plain; charset="iso-8859-1"
>
>
>
>
>
>> From: rwob...@hotmail.com
>> To: berma...@cfl.rr.com
>> Subject: RE: [Tutor] data question
>> Date: Sat, 2 Oct 2010 13:09:23 +
>>
>>
>>
>>
>> 
>>> From: berma...@cfl.rr.com
>>> To: rwob...@hotmail.com; tutor@python.org
>>> Subject: RE: [Tutor] data question
>>> Date: Sat, 2 Oct 2010 09:02:41 -0400
>>>
>>>
>>>
 -Original Message-
 From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-
 bounces+bermanrl=cfl.rr@python.org] On Behalf Of Roelof Wobben
 Sent: Saturday, October 02, 2010 4:35 AM
 To: tutor@python.org
 Subject: [Tutor] data question



 Hello,
>>>
 Now my question is :

 In which datatype can I put this data in.

>>> Perhaps a simple SQLlite database?
>>> http://zetcode.com/databases/sqlitetutorial/
>>>
>>> Hope this helps,
>>>
>>> Robert
>>>
>>>
>>>
 Regards,

 Roelof

 ___
 Tutor maillist - Tutor@python.org
 To unsubscribe or change subscription options:
 http://mail.python.org/mailman/listinfo/tutor
>>>
>
>Oke,
>
>Oke, there I can save the input data.
>But I have also need a data model for team, played_games, game_points, 
>made_points and againts_points.
>So I think it cannot be done without using a class for games and one for 
>ranking.
>And figuring out how I can store the game-data in a text or database file

Re: [Tutor] Tutor Digest, Vol 80, Issue 11

2010-10-02 Thread Edward Lang


tutor-requ...@python.org wrote:

>Send Tutor mailing list submissions to
>   tutor@python.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>   http://mail.python.org/mailman/listinfo/tutor
>or, via email, send a message with subject or body 'help' to
>   tutor-requ...@python.org
>
>You can reach the person managing the list at
>   tutor-ow...@python.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Tutor digest..."
>
>
>Today's Topics:
>
>   1. Re: Connecting my users (Timo)
>   2. Re: data question (Alan Gauld)
>   3. Re: data question (Roelof Wobben)
>   4. Re: data question (Roelof Wobben)
>   5. Re: data question (Roelof Wobben)
>   6. Re: data question (Robert Berman)
>   7. Re: Coin Toss Problems (bob gailer)
>
>
>--
>
>Message: 1
>Date: Sat, 02 Oct 2010 12:06:14 +0200
>From: Timo 
>To: Nitin Pawar 
>Cc: tutor@python.org
>Subject: Re: [Tutor] Connecting my users
>Message-ID: <4ca70416.2050...@gmail.com>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>On 01-10-10 11:25, Nitin Pawar wrote:
>> have a look at this
>>
>> http://bytes.com/topic/python/answers/826973-peer-peer-chat-program
>
>Thanks, but that still uses a server. And even one that I can't control! 
>If it has to be with server interaction, than as little as possible is 
>preferred and option to put it on my own.
>
>Cheers,
>Timo
>
>>
>> On Fri, Oct 1, 2010 at 2:49 PM, Timo > > wrote:
>>
>> Hello,
>>
>> I have the following idea, but no clue how to implement this.
>> I want my users to be able to connect to other users (with the
>> same program) and chat with them and exchange files. Ideally
>> without server interaction. Now I heard about peer-to-peer and
>> bittorrent protocol etc. But don't know where to start or that I'm
>> even at the right path.
>> So if anyone can point me into the right direction of a framework
>> or protocol I should use for this, it would be appreciated.
>>
>> Cheers,
>> Timo
>>
>> ___
>> Tutor maillist  - Tutor@python.org 
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>>
>>
>> -- 
>> Nitin Pawar
>>
>
>
>
>--
>
>Message: 2
>Date: Sat, 2 Oct 2010 14:10:25 +0100
>From: "Alan Gauld" 
>To: tutor@python.org
>Subject: Re: [Tutor] data question
>Message-ID: 
>Content-Type: text/plain; format=flowed; charset="iso-8859-1";
>   reply-type=original
>
>
>"Roelof Wobben"  wrote
>
>> As a test I would write a programm where a user can input game-data
>> like home-team, away-team, home-score, away-score) and makes a
>> ranking of it.
>
>> In which datatype can I put this data in.
>>
>> I thought myself of a dictonary of tuples.
>
>A dictionary would be good for the basic data but I assume there
>are more than one of these data items? If so what do they represent?
>How would they be used?
>
>We need a bit more information, even some sample datya might help.
>
>It could be a list of dictionaries or even a dictionary of 
>dictionaries.
>
>Alan G.
>
>
>
>
>--
>
>Message: 3
>Date: Sat, 2 Oct 2010 13:10:03 +
>From: Roelof Wobben 
>To: 
>Subject: Re: [Tutor] data question
>Message-ID: 
>Content-Type: text/plain; charset="iso-8859-1"
>
>
>
>
>
>> From: rwob...@hotmail.com
>> To: berma...@cfl.rr.com
>> Subject: RE: [Tutor] data question
>> Date: Sat, 2 Oct 2010 13:09:23 +
>>
>>
>>
>>
>> 
>>> From: berma...@cfl.rr.com
>>> To: rwob...@hotmail.com; tutor@python.org
>>> Subject: RE: [Tutor] data question
>>> Date: Sat, 2 Oct 2010 09:02:41 -0400
>>>
>>>
>>>
 -Original Message-
 From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor-
 bounces+bermanrl=cfl.rr@python.org] On Behalf Of Roelof Wobben
 Sent: Saturday, October 02, 2010 4:35 AM
 To: tutor@python.org
 Subject: [Tutor] data question



 Hello,
>>>
 Now my question is :

 In which datatype can I put this data in.

>>> Perhaps a simple SQLlite database?
>>> http://zetcode.com/databases/sqlitetutorial/
>>>
>>> Hope this helps,
>>>
>>> Robert
>>>
>>>
>>>
 Regards,

 Roelof

 ___
 Tutor maillist - Tutor@python.org
 To unsubscribe or change subscription options:
 http://mail.python.org/mailman/listinfo/tutor
>>>
>
>Oke,
>
>Oke, there I can save the input data.
>But I have also need a data model for team, played_games, game_points, 
>made_points and againts_points.
>So I think it cannot be done without using a class for games and one for 
>ranking.
>And figuring out how I can store the game-data in a text or database file