[Tutor] Timsort on short lists

2019-07-02 Thread Jordan Baltes
I've been researching python's sorting algorithm, Timsort, and know that it's a hybrid between insertion sort (best case time complexity O(n)) and merge sort (O(n log(n))), and has an overall time complexity of O(n log(n)). What I'm trying to figure out is, when the list is very short, let's say 2

[Tutor] Python Script

2016-11-09 Thread Jordan Trudell
Hello, I need help running a script, as I am getting an error. Is it possible if I could get help with it? Please reply if so. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo

[Tutor] Help With Code

2014-05-04 Thread jordan smallwood
Hey there, I have this code below (in to cm conversion) and I want to have the user try again if they enter in a non integer. What am I missing: ConversionConstant = 2.54 def CalculateCentimeters(inches):     return ConversionConstant * inches def CalculateInches(centimeters):     return centi

Re: [Tutor] New to Python

2014-05-04 Thread Jordan Smallwood
I never got a response. Should I check my spam? Sent from my iPhone > On Apr 28, 2014, at 1:57 AM, Mark Lawrence wrote: > >> On 26/04/2014 23:53, jordan smallwood wrote: >> Hello, >> >> I am new to Python. I mean completely new and we're working on this >

[Tutor] New to Python

2014-04-28 Thread jordan smallwood
Hello, I am new to Python. I mean completely new and we're working on this problem set in class where they give us specs and we have to build something based off these specs. I have no idea what they're asking. Could someone help get me started on the path to figuring this out? Below is the qu

[Tutor] Help With an Assignment

2014-04-25 Thread jordan smallwood
Hello, I am new to Python. I mean completely new and we're working on this problem set where they give us specs and we have to build something based off these specs. I have no idea what they're asking. Could someone help get me started on the path to figuring this out? Below is the question:

Re: [Tutor] object size in python is in what units?

2013-07-23 Thread Jordan
Speaking of brain dead, I was taking a break from Python by looking at a video on finite state machines and the very first example was tennis scoring. I think the $#@! insane tennis scoring was harder to understand than the subject. That got me laughing pretty good, since I too was recently

Re: [Tutor] new to threading, Queues

2013-04-18 Thread Jordan
On 04/18/2013 02:16 AM, Chuck Mayers wrote: Hi! I was having a bit of nostalgia today, and thought I'd try to write a simple, old school BBS. I found the 'paramiko' library, and I've got something I can SSH into that would have impressed my 1990's self. I found some example code of the "th

Re: [Tutor] Impossible Else as Exception

2013-04-09 Thread Jordan
Thank you all for the feedback and suggestions. I have never used an assertion, before so I will read up on the concept. But this last email about the optimizations makes me want to go with an AssertionError exception, since assert is skipped if the compiler is told to optimize. Alan you are r

[Tutor] Impossible Else as Exception

2013-04-09 Thread Jordan
I want to know what exception should be raised if there is a bug in my code that allows an else statement to be triggered, because the else condition in my code should be impossible, unless there is an error in my code. What exception should I raise so that if my code is wrong it will raise an

Re: [Tutor] better tools

2012-08-26 Thread Jordan
On 08/22/2012 06:51 PM, Don Jennings wrote: [slightly OT] After watching Bret Victor's talk[1], I want **much** better tools for programming (and all of the other stuff I do on the computer). John Resig, creator of jQuery, claims[2] that Victor's presentation inspired the new platform for

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
On 07/19/2012 10:48 PM, Prasad, Ramit wrote: OK. I am using one time pads to XOR data, but the one time pads (keys) are very large numbers, converting them to binary increases their size exponentially, which allows me to get more XORing done out of a single >>> You want

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
Sorry, I am not sure why Thunderbird is stripping the spaces, may have something to do with a plug-in that I have installed, I will have to look into it. On 07/19/2012 10:41 PM, Prasad, Ramit wrote: > Sure, this makes perfect sense to me :) (adding indent) > > for char in data: > bin_data += b

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
On 07/19/2012 10:04 PM, eryksun wrote: > On Thu, Jul 19, 2012 at 3:08 PM, Jordan wrote: > I'm not an expert with cryptography, but here's a simple XOR example: >>>> from itertools import cycle >>>> text = b'Mary had a little lamb.' >>>

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
On 07/19/2012 09:53 PM, Dave Angel wrote: > On 07/19/2012 03:19 PM, Jordan wrote: >> >> >> OK. I am using one time pads to XOR data, but the one time pads (keys) >> are very large numbers, converting them to binary increases their size >> exponentially, which

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
On 07/19/2012 09:23 PM, Prasad, Ramit wrote: >> A question I have for the group before I respond is a option that I saw >> that I had earlier was to ord() each element of a string and then bin() >> that number. But since bin() produces a string I could not figure out >> the correct way to attach

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
On 07/19/2012 08:53 PM, Prasad, Ramit wrote: >>> I think your basic problem is too much conversion because you do not >>> understand the types. A string is represented by a series of bytes >>> which are binary numbers. Do you understand the concept behind ASCII? >>> Each letter has a numeric repr

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
A question I have for the group before I respond is a option that I saw that I had earlier was to ord() each element of a string and then bin() that number. But since bin() produces a string I could not figure out the correct way to attach two bin() outputs back together again due to the leading 'b

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
I'll see if I can explain it in a way that makes sense. > > On Wed, 18 Jul 2012, Jordan wrote: > >> OK so I have been trying for a couple days now and I am throwing in the >> towel, Python 3 wins this one. >> I want to convert a string to binary and back again like in

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
On 07/19/2012 12:46 PM, Dave Angel wrote: > On 07/19/2012 01:41 AM, wolfrage8...@gmail.com wrote: >> On Thu, Jul 19, 2012 at 12:16 AM, Dave Angel wrote: > That was just the first line that was not indented. If I thought you > had a one-line while loop, I certainly would have just indented it.

Re: [Tutor] Fwd: string to binary and back... Python 3

2012-07-19 Thread Jordan
thon file I was working on. I guess Thunderbird edited the email on me, even though I had put it into plain text mode. Next time perhaps I will just attach the file if that is acceptable rather than getting attacked for what my mail editor did. > > Regards > > Walter > > >

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
On 07/19/2012 08:14 AM, Mark Lawrence wrote: > On 19/07/2012 06:41, wolfrage8...@gmail.com wrote: >> On Thu, Jul 19, 2012 at 12:16 AM, Dave Angel wrote: >> > > Really? Are you using a forked version of Python that doesn't need > indentation after a while loop, or are you speaking with a forked

Re: [Tutor] string to binary and back... Python 3

2012-07-19 Thread Jordan
On 07/19/2012 12:15 AM, Prasad, Ramit wrote: > I think your basic problem is too much conversion because you do not > understand the types. A string is represented by a series of bytes > which are binary numbers. Do you understand the concept behind ASCII? > Each letter has a numeric representat

[Tutor] string to binary and back... Python 3

2012-07-18 Thread Jordan
OK so I have been trying for a couple days now and I am throwing in the towel, Python 3 wins this one. I want to convert a string to binary and back again like in this question: Stack Overflow: Convert Binary to ASCII and vice versa (Python)

Re: [Tutor] newbie Questions

2012-07-16 Thread Jordan
I would just like to add that I am a web developer and I left PHP for Python. I left PHP because it was not as powerful server side (Cron Jobs and Such) and I wanted to possibly create desktop applications, more recently Android Apps via SL4A and IPhone Apps via pyjamas. PHP is a limited language a

Re: [Tutor] Joining all strings in stringList into one string

2012-06-02 Thread Jordan
#String_Concatenation On 06/02/2012 04:29 PM, Steven D'Aprano wrote: > Jordan wrote: > >> #Another version might look like this: >> >> def join_strings2(string_list): >> final_string = '' >> for string in string_list: >> final_

Re: [Tutor] Octal confusion, please explain why. Python 3.2

2012-06-02 Thread Jordan
Thank you for the detailed answer, now I understand and I understand that each number format is an integer just with a different base and cosmetic appearance. On 06/02/2012 01:51 PM, Steven D'Aprano wrote: > Jordan wrote: >> Hello, first off I am using Python 3.2 on Linux Mint 12 6

Re: [Tutor] Joining all strings in stringList into one string

2012-06-02 Thread Jordan
On 05/30/2012 06:21 PM, Akeria Timothy wrote: > Hello all, > > I am working on learning Python(on my own) and ran into an exercise > that I figured out but I wanted to know if there was a different way > to write the code? I know he wanted a different answer for the body > because we haven't gott

[Tutor] Octal confusion, please explain why. Python 3.2

2012-06-02 Thread Jordan
Hello, first off I am using Python 3.2 on Linux Mint 12 64-bit. I am confused as to why I can not successfully compare a variable that was created as an octal to a variable that is converted to an octal in a if statement yet print yields that they are the same octal value. I think it is because the

Re: [Tutor] Fwd: Is this possible and should it be done?

2012-05-21 Thread Jordan
On 05/21/2012 07:24 PM, Alan Gauld wrote: > On 21/05/12 15:23, wolfrage8...@gmail.com wrote: > >> if any of these formats offer file locking with in them, ;et me say >> that better. Can I open a, as example, tar file and lock a file with >> in it, with out locking the entire tar archive? > > No a

Re: [Tutor] What's the keyword for the Python creed?

2011-09-15 Thread Jordan
I think you mean the Zen of Python: http://www.python.org/dev/peps/pep-0020/ The command is >>> import this -- Jordan On 09/15/2011 11:19 AM, Richard D. Moores wrote: > You know, at the interactive prompt you enter some Monty Python word > that I can't remember, and you get a

Re: [Tutor] how to sort the file out

2011-09-06 Thread Jordan
the file if I make field 2 of file 2 equal "01"? -- Jordan On 09/06/2011 09:46 PM, lina wrote: > HI, I have two files, one is reference file, another is waiting for adjust > one, > > File 1: > > 1 C1 > 2 O1 > 3 C2 > 4 C3 > 5 H3 > 6 C7 > 7 O2 > 8 H2

[Tutor] Moveable and Animated Sprites

2011-08-14 Thread Jordan
height=0, width=0): MoveableSprite.__init__(self, imageName, startx, starty, targetx, targety, speed) AnimatedSheetSprite.__init__(self, imageName, startx, starty, height, width) def update(self): MoveableSprite.update(self) AnimatedSheetSprite.update(self) --

[Tutor] About the Mailing List

2011-07-28 Thread Jordan
assume the mailing list are posted some wheres on-line. But I can only find the sign up page. Thanks in advance for the link. -- Jordan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman

[Tutor] number distribution

2010-04-22 Thread Bill Jordan
Hey everbody, If we have 100 apples, for example, and we need to distrubte the 100 apples randomly in 10 boxes, how can we do this in python? Cheers ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://

Re: [Tutor] Alter print action for objects

2008-07-23 Thread Jordan Greenberg
Shrutarshi Basu wrote: I'm working on a graph class to become more familiar with graphs in general. I'd like to be able to do something like 'print gr' and get something intelligible like a list of vertices. But using print on a Graph class instance simply returns Is there someway I can change

Re: [Tutor] dollarize.py

2008-06-21 Thread Jordan Greenberg
Martin Walsh wrote: > def addcommas(f): > """ > This amounts to reversing everything left > of the decimal, grouping by 3s, joining > with commas, reversing and reassembling. > """ > # assumes type(f) == float > left, right = ('%0.2f' % f).split('.') > rleft = [left[::-1][i:i+3] fo

Re: [Tutor] IDE

2008-06-10 Thread jordan halsey
Any one here using cutter... http://www.fundza.com Free Java based ide with many built in functions and bindings. This is an especially useful tool if you are doing 3d or any kind of shader writing. Jordan Reece Halsey maya | mental ray | renderman | nuke | houdini | ae www.jordanhalsey.com

Re: [Tutor] Why not to use include?

2008-06-09 Thread Jordan Kanter
sorry about the spelling. that second sentence should be "the work out to be similar to php in the browser". On Mon, Jun 9, 2008 at 9:57 AM, Jordan Kanter <[EMAIL PROTECTED]> wrote: > Another thing you can do is use django templates. they "work" to be > similarly

Re: [Tutor] Why not to use include?

2008-06-09 Thread Jordan Kanter
piler), so it is not as straight forward as "preprocessing" html, but it amounts to the same. Let me know if that helps, Jordan On Mon, Jun 9, 2008 at 7:21 AM, W W <[EMAIL PROTECTED]> wrote: > Python can *too* import from a txt file (even if it contains HTML): > > f = open

Re: [Tutor] Python Programming Tools

2008-04-14 Thread Jordan Greenberg
complete IDE solution goes, PyDev for the Eclipse platform is pretty popular. If you're willing to spend some $$$, then PyDev Extensions (also for Eclipse) are good, or ActiveState's Komodo IDE. They seem to be the gold standard. -Jordan Greenberg _

Re: [Tutor] shelves behaving badly

2007-08-02 Thread Luke Jordan
time edits/reruns are made. thanks for the tip on checking things with os. On 8/2/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > > Luke Jordan wrote: > > i've implemented a database as a shelve of record class instances. some > > of the fields in each record are dictionaries

[Tutor] shelves behaving badly

2007-07-27 Thread Luke Jordan
i've implemented a database as a shelve of record class instances. some of the fields in each record are dictionaries. i needed to parse info from 3 different reports into the dictionary fields in each record instance. i wrote the code to do this and tinkered it to fit the different reports (i.e.

[Tutor] database question

2007-06-29 Thread Luke Jordan
I've created a database as a shelve, where each value in the shelve file is a record class instance that has attributes representing fields. Let's say I enter 300 records in the shelve, then I decide to add a field to future records, or remove a field from future records. How can I update the exis

Re: [Tutor] Addressing a variable whose name is the value of a string

2007-04-09 Thread Jordan Greenberg
ged. So I see no other way than resolving the string > in some instance - or is there? Sure, you do something like: mydict={'x':1, 'y':2} var='x' mydict[var]=5 and then you just access it like mydict['x'] instead of just x. Jordan -- I prefer encrypted mail. My key is available at: http://myweb.wit.edu/greenbergj/publickey.txt ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Yet another list comprehension question

2007-03-02 Thread Jordan Greenberg
Smith, Jeff wrote: > I find a common thing to do is > > l = list() > for i in some-iterator: > if somefum(i) != list: > l.append(somefun(i)) How about using the same condition you do in the if? Like: l=[somefun(i) for i in some-iterator if not type(somefun(i)) is

Re: [Tutor] Getting the directory the program is in

2006-12-11 Thread Jordan Greenberg
est.py test.py [EMAIL PROTECTED]:~$ cd / [EMAIL PROTECTED]:/$ python test.py /home/jordan/test.py [EMAIL PROTECTED]:/$ So, if you _ALWAYS_ need an absolute path, just using sys.argv[0] might not work. Jordan Greenberg ___ Tutor maillist - Tutor@python.or

Re: [Tutor] Getting the directory the program is in

2006-12-11 Thread Jordan Greenberg
Toon Pieton wrote: > Hey friedly users! > > I was wondering: how can I get the directory the program is in? For example > "C:\Python Programs\Calculator\". > > Thanks in advance for reading, > Toon Pieton > Slightly hackish and nasty, but seems to do the trick. Someone'll probably suggest a bet

Re: [Tutor] Best Known Method for Filtering redundant list items.

2006-11-30 Thread Jordan Greenberg
Chris Hengge wrote: > Anyone point me to something more efficient then > > for item in list1: > if item not in list2: > list2.append() > > This just seems to take a bit a time when there are thousands or dozens of > thousands of records just to filter out the dozen or so copies.. >

[Tutor] Test

2006-11-28 Thread Jordan Greenberg
ROTECTED]) so my messages will come from there from now on. Sorry again for the test, Jordan Greenberg ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] hardware specs from python on OSX

2006-11-08 Thread Jordan Greenberg
ipe/303063 which should help. Looking into the sysctl command might also be useful. HTH, keep in mind that I'm *NOT* a Mac guy, at all. Jordan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Trying to extract the last line of a text file

2006-10-19 Thread Jordan Greenberg
le object as a parameter, but theres no object left to pass it. HTH. -Jordan Greenberg ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Overloading the assignment operator in a class

2006-09-20 Thread Jordan Greenberg
return self.val, other In [2]: test=coerceTest(5) In [3]: test Out[3]: <__main__.coerceTest instance at 0x00E29620> In [4]: result=test+10 In [5]: result Out[5]: 15 In [6]: test=5 In [7]: test Out[7]: 5 (I could've written a test to show that __coerce__ is only called when n

Re: [Tutor] Overloading the assignment operator in a class

2006-09-20 Thread Jordan Greenberg
bles as containers. That thinking isn't valid in Python. In Python, what you'd think of as 'variables' are just names for objects. (If you know C++, think pointers, sort of. myDie isn't the Die Object, its just a reference as to where the object is. Assigning to a pointer do

Re: [Tutor] foreach loops

2006-09-11 Thread Jordan Greenberg
Christopher Spears wrote: > Hmmm...Perl is probably a bad example. My apologies. > I was thinking more along the lines of this: > > A C++ for loop: > > #include > > using std::cout; > > int main() { > > for (int i = 0; i < 10; i++) { > cout << i << "\n"; > }

Re: [Tutor] Rock, Paper, Scissors

2006-08-07 Thread Jordan Greenberg
issors That'll take care of the basics for ya. Later you could try and keep frequency counts over a bunch of trials, see if the human has a preference, and then weight your response appropriately to try and beat them ;) -Jordan Greenberg ___ Tuto

Re: [Tutor] quick OO pointer

2006-08-07 Thread Jordan Greenberg
something_to_log() just like it was defined in that file. Example: #file: test1.py def spam(): print "Spam, eggs, and toast" #file: myscript.py from test1 import spam spam() #prints "Spam, eggs, and toast" Hope this helps! -Jordan Greenberg ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Python for basic web-testing

2006-08-06 Thread Jordan Greenberg
Hans Dushanthakumar wrote: > Hi, >How do I use python for basic web-tasks like inputting data or > clicking buttons on web-pages. For eg, how do I enter my username and > password and click on the "OK" button on the yahoo mail page? > I had a look at the webbrowser module documentation > (http:

Re: [Tutor] (*args, **kwargs)

2006-08-04 Thread Jordan Greenberg
to a dictionary, like so: In [15]: def foo(**kwargs): ....:print kwargs : In [16]: foo(name="Jordan", email="[EMAIL PROTECTED]") {'name': 'Jordan', 'email': '[EMAIL PROTECTED]'} Your functions can then use the list/di

Re: [Tutor] When am I ever going to use this?

2006-08-01 Thread Jordan Greenberg
r you. Why implement a linked list, when we already have lists? Then Queues and Stacks are trivial to implement once you've got lists. If you're interested in learning more about data structures and their uses, this looks like a good reference: ht

Re: [Tutor] define vars by iteration

2005-10-24 Thread Luke Jordan
Thanks for this insight into classes. It often takes me a few days to absorb and respond because my job limits the time I can give to programming. But thanks again for taking the time to respond in a meaningful way.   I guess I could say that you changed my world when it comes to programming (sorr

Re: [Tutor] define vars by iteration

2005-10-20 Thread Luke Jordan
t;> classDictionary["Yard"]   the thing is I would like to be able to get at Yard's attributes by typing   >>> Yard.anAttribute garbage cans   at the prompt rather than   >>> Yard = classDictionary["Yard"] >>> Yard.anAttribute garbage cansIt

[Tutor] define vars by iteration

2005-10-19 Thread Luke Jordan
I've got a bunch of pickled class instances with self.name attributes, and I would like to assign the instances themselves to variables named whatever is stored in self.name using a function. "Can't assign to literal", right? Is there a way to do this?   Thanks,   Luke

[Tutor] Please excuse the previous message sent in error

2005-10-17 Thread Luke Jordan
Sincerely, Luke ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Assign to vars by iteration

2005-10-17 Thread Luke Jordan
I've got a bunch of pickled class instances, and I'm trying to load them as variables using a function. The class has a self.name attribute, and I've got a list of self.name for all the instances pickled separately. When I would like to attach the names of each instance to the corresponding class

[Tutor] dictionaries in classes

2005-10-14 Thread Luke Jordan
Hi,   Another stumped beginner here.   I'm trying to have functions to create, edit and store dictionaries within a class. What I can't figure out is how to retain the edits after making them. I think it has something to do with namespace. Ideally I'd like to pickle class instances and be able to a

Re: [Tutor] Sum of List Elements

2005-09-24 Thread Luke Jordan
Thanks for the help everyone, for answering a simple question and pointing me toward more resources.On 9/24/05, bob < [EMAIL PROTECTED]> wrote:At 08:11 AM 9/24/2005, Luke Jordan wrote:>Hi All, >>I have spent an embarrassingly large amount of time trying to solve what>on its

[Tutor] Sum of List Elements

2005-09-24 Thread Luke Jordan
Hi All, I have spent an embarrassingly large amount of time trying to solve what on its face seems like a simple problem. I have a list of intergers, and I want to assign the sum of the intergers in the list to a variable. There are only intergers in the list. The best I have been able to do so

[Tutor] Filtering Spreadsheet Data

2005-05-23 Thread Luke Jordan
Hi All, I have several frighteningly cumbersome reports to review at my new job. I would like to write a python program to help me with my analysis. The goal of the program is to filter out information that doesn't meet certain requirements and print relevant results back to a legible report that

[Tutor] "Dispatching" functions with args

2005-04-13 Thread Luke Jordan
Hi! I am using a suggestion from this list to handle calling different functions conditionallly based on user input. What I'm trying to do is have functions that are 'configurable' in the sense that a choice from the user affects the way it performs. This works: def aFunc(): print "a

Re: [Tutor] Associate functinos with Dictionary/Class Usage

2005-04-08 Thread Luke Jordan
Yes, Danny - that makes sense. I was getting hung up how to handle the parens in this part dict['some'](thing) all clear now. :-) On Apr 7, 2005 4:40 PM, Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Thu, 7 Apr 2005, Luke Jordan wrote: > > > I am looking

[Tutor] Associate functinos with Dictionary/Class Usage

2005-04-07 Thread Luke Jordan
Hi! My questions arose from reading the "Help with Classes" email that's been on this list for the past couple of days. I'm also writing a text game, but mine is puzzle not adventure. Anyway, someone mentioned that you can key words to a dictionary to have user input run functions. I am looking

[Tutor] Functions Calling Functions

2005-02-25 Thread Luke Jordan
Hi - I'm working on a command-line game. Is there anything wrong with having each 'chapter' of the game be a function that links to other chapters by calling them? I only ask because when a recent traceback returned about 40 lines worth of error message, I realized that the functions are all bein

Re: [Tutor] Print text position problems when using triple quotes

2005-02-24 Thread Luke Jordan
Execllent. Many Thanks, Luke On Thu, 24 Feb 2005 13:15:41 -0500, Bill Mill <[EMAIL PROTECTED]> wrote: > On Thu, 24 Feb 2005 13:14:13 -0500, Bill Mill <[EMAIL PROTECTED]> wrote: > > On Thu, 24 Feb 2005 10:02:44 -0800, Luke Jordan <[EMAIL PROTECT

[Tutor] Print text position problems when using triple quotes

2005-02-24 Thread Luke Jordan
Hi all, I've tried a lot of experimenting and searching through various tutorials, and I haven't been able to come up with a solution to this, ostensibly simple, problem. I'm writing a simple game (run in command line) in which narrative text is printed in response to a user's decisions. The prob

[Tutor] Case acceptance using raw_input

2005-02-15 Thread Luke Jordan
Hi all, thanks to all for running such a great list. Is there a better way for raw_input to accept both caps and lower case letters than: def aFunction(): action = raw_input("Perform an action?(y,n): ") if action == 'y' or action == 'Y': anotherFunction() elif action == 'n' or act