Re: [Tutor] Need some clarification on this

2011-03-19 Thread xDog Walker
On Saturday 2011 March 19 08:35, Emmanuel Ruellan wrote: > 2011/3/19 Yaşar Arabacı > > > >>>a=5 > > >>>b=5 > > >>>a == b > > > > True > > > > >>>a is b > > > > True > > > > My question is, why "a is b" is true. What I expected it to be is that, a > > and b are different things with same value. > >

Re: [Tutor] Invisible Characters in Fortran/Python

2011-04-09 Thread xDog Walker
On Saturday 2011 April 09 15:12, Tyler Glembo wrote: > Hi All, > So I have a ~3000 line fortran code that needs to be updated to run new > files by simply updating a few lines in the code (~10 lines). I thought > python would be a great way to do so since I know a little python but not > fortran.

Re: [Tutor] Hello World in Python without space

2011-07-15 Thread xDog Walker
On Friday 2011 July 15 15:58, Richard D. Moores wrote: > On Fri, Jul 15, 2011 at 14:47, Stefan Behnel wrote: > > Richard D. Moores, 15.07.2011 23:21: > >> What do I do to test.txt to make it "an object with a write(string) > >> method"? > > > > Oh, there are countless ways to do that, e.g. > > > >

Re: [Tutor] Is the Python 3.2.1 documentation available as a .chm file?

2011-07-20 Thread xDog Walker
On Wednesday 2011 July 20 06:41, Richard D. Moores wrote: > Is the Python 3.2.1 documentation available as a .chm file from Python.org? > http://www.python.org/ftp/python/3.2.1/python321.chm HTH -- I have seen the future and I am not in it. ___ Tutor

Re: [Tutor] python 2.3.4, how to use os.system and collect it's output to a file.

2011-08-02 Thread xDog Walker
On Tuesday 2011 August 02 08:40, Thirupathaiah Gande (tgande) wrote: > Hi, > > > > I have Python 2.3.4. > > I want to use os.system command and collect a command's output to a > file. But it is not collecting all the output. It is truncating.. > > > > Code is as below. > > > > cmd = "%s rl -comp %

Re: [Tutor] Where is sys.py?

2011-08-21 Thread xDog Walker
On Sunday 2011 August 21 04:57, Lisi wrote: > If sys.py is a file, it must be somewhere; but I can't find it. Where is > it? I would like to look at it. > > The modules within it must surely be somewhere too. But since I can't find > sys, I obviously can't find the modules. Again, I'd like to lo

Re: [Tutor] Coin Flipping Program

2011-08-21 Thread xDog Walker
On Sunday 2011 August 21 09:14, Joel Preston wrote: > Hello Programmers, > > I am trying to learn Python on my own through a book called "Python > Programming for the Absolute Beginner". I am stuck on a challenge at the > end of a chapter and I am hoping for a little help. > > The challenge is to

Re: [Tutor] Help!

2011-09-22 Thread xDog Walker
Move the following two lines to immediately follow the while. player=raw_input("Please pick your throw: (r,s,p):") computer= random.choice(['r','s','p']) -- I have seen the future and I am not in it. ___ Tutor maillist - Tutor@python.org To unsub

Re: [Tutor] Infinite Loop

2011-09-24 Thread xDog Walker
On Saturday 2011 September 24 07:43, Cameron Macleod wrote: > Hi, > > I've been trying to code a simple guess my number game as a starter > programming project but I've generated an infinite loop accidentally. Since > I'm new to programming in general, I can't really figure out what's causing > it.

Re: [Tutor] Method to create small and simple database

2011-10-29 Thread xDog Walker
On Saturday 2011 October 29 11:28, Joel Montes de Oca wrote: > After looking at the Python module documentation for sqlite3 > (http://docs.python.org/library/sqlite3.html#module-sqlite3), it seems > to me it's the best way to make the small database that I am looking for. First, have a look at she

Re: [Tutor] best book for OOP

2011-12-11 Thread xDog Walker
On Sunday 2011 December 11 08:45, Alan Gauld wrote: > On 11/12/11 14:49, surya k wrote: > > Finally there is Bruce Eckel's ever popular pair: "Thinking In Java/C++" > But frankly these are more likely to lead to bad habits for the Python > programmerr because C++ and Java share a very narrow view o

Re: [Tutor] PyQT GUI Threading example

2012-02-09 Thread xDog Walker
On Wednesday 2012 February 08 06:46, R.S. wrote: > I can't find any full example of threading with many threads working and > updating GUI (precisely i need QTreeWidget). I can only find: not updating > GUI examples, updating GUI examples with one thread. But i just can't find > what i need. Could

Re: [Tutor] Error in apparently correct code

2012-08-20 Thread xDog Walker
On Monday 2012 August 20 14:27, Mark Lawrence wrote: > Give a man a fish, and you feed him for a day; show him how to catch > fish, and you feed him for a lifetime. > > -- > Cheers. > > Mark Lawrence. Teach a man to steal fish and he will live until he dies. -- Yonder nor sorghum stenches shut l

Re: [Tutor] hasattr()

2012-10-13 Thread xDog Walker
On Saturday 2012 October 13 11:29, Matthew Ngaha wrote: > >>> hasattr(e, e.att) > > False >>> hasattr(e, "att") True hasattr wants the second parameter to be a string. You gave it a string. The string you gave it was "Testing". -- Yonder nor sorghum stenches shut ladle gulls stopper torque wet

Re: [Tutor] functions and iterations

2012-11-12 Thread xDog Walker
On Monday 2012 November 12 19:56, Rufino Beniga wrote: > def IterateLogistic(x,r,n): >     for i in xrange(n): >         x = r*(1-x) >         if i = n: >             print x > > I want this function to take in x and r which can be any two real numbers > and after a certain number of iterations (n)

Re: [Tutor] functions and iterations

2012-11-12 Thread xDog Walker
On Monday 2012 November 12 21:07, you wrote: > I tried it with i == n as well and it still doesnt work :/ Check the documentation on range and xrange and you will find out why i never equals n. >>> n = 5 >>> range(n) [0, 1, 2, 3, 4] >>> for i in xrange(n): print i ... 0 1 2 3 4 >>> -- Yonder no

Re: [Tutor] Help

2013-03-20 Thread xDog Walker
On Wednesday 2013 March 20 13:39, Robert Sjoblom wrote: > A word of advice: next is a keyword in python ~/Packages/Python/Notable-0.1.5b> python Python 2.5 (r25:51908, May 25 2007, 16:14:04) [GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" f

Re: [Tutor] Beep sound

2013-03-24 Thread xDog Walker
On Friday 2013 March 22 18:48, Phil wrote: > Just out of curiosity how can a beep sound be generated? > > My interest in this came about because echo -e '\a' no longer works. > Also print '\a' doesn't work, presumably for the same reason. The > following is also mute: > > import Tkinter > Tkinter.T

Re: [Tutor] how to generate random numbers in Python

2013-10-03 Thread xDog Walker
On Thursday 2013 October 03 09:31, Joe Jacques wrote: > Problems in the link > > http://home.manhattan.edu/~ankur.agrawal/cmpt101/assgn5.txt > > Sent from my iPhone Python 2.7.2 (default, Oct 10 2011, 10:47:36) [GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "cre

Re: [Tutor] Generate list-of-transforms

2013-12-04 Thread xDog Walker
On Wednesday 2013 December 04 19:56, R. Alan Monroe wrote: > This seems like the kind of thing that probably exists, but there > isn't a simple googlable term for searching it out conveniently. Try "sorting algorithm". -- Yonder nor sorghum stenches shut ladle gulls stopper torque wet strainers