[Tutor] Python Desktop Application for a Case Study

2008-07-29 Thread Michael Perscheid
have a notion that a date management, cookbook application or something else are very appropriate. Thanks in advance! Kind regards, Michael ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] newbee needs direction

2008-10-01 Thread Michael yaV
Here is my problem and my coding knowledge consists of html. I have all the time in the world to play with this so I thought I would at least ask how to get started. I want to create a web base program that would output team standings. The only given will be the names of each team and their d

Re: [Tutor] newbee needs direction

2008-10-01 Thread Michael Waltemeyer
Thanks Alan. On Oct 1, 2008, at 8:37 PM, Alan Gauld wrote: "Michael yaV" <[EMAIL PROTECTED]> wrote Here is my problem and my coding knowledge consists of html. OK, The first step is to pause your project long enough to learn the basics of programming - with Python since you

Re: [Tutor] Question

2008-11-10 Thread Michael Connors
this to be the reason it is popular in tutorials, and if all the tutorials you use, use nano, you will probably use it too. -- Michael Connors ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Opening a window to fit an image

2009-01-07 Thread Michael Lam
t;)) window = pygame.display.set_mode((640, 480 pygame.display.set_caption('Caption') Something wrong with using Surface.convert() as I originally used a load_image() function that did that. Michael ___ Tutor maillist

Re: [Tutor] Suggestions for more efficient and optimized coding technique,

2009-01-08 Thread Michael Langford
ly should start at "a" and move to "z", and cache the results in a list like they ask you too. At the very least, you should be saving these combinations you are generating randomly in a list (as it asks you to) and not testing the password if the generated string was alre

Re: [Tutor] Suggestions for more efficient and optimized coding technique,

2009-01-08 Thread Michael Langford
ve shorted then password length to 3 to make it run faster as well. Enough procrastination, back to google app engine stuff. --Michael #!/usr/bin/env python import string import random # test code to simulate a computer system under #attack, no need to understand now class Com

[Tutor] [tutor] list order change

2010-11-26 Thread Michael Sprayberry
You can also sort a list so that is ordered in reverse or alphabetically     Cheers, Michael ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Exercise suggestions

2011-01-22 Thread michael scott
I am new to programming, I intend to get an entry level job programming next year (or a little bit longer). I am switching fields and not going to college, but kinda "self teaching" myself through various methods. I currently understand concepts in programming in python up to classes (like I un

Re: [Tutor] print "Hello, World!"

2011-02-02 Thread michael scott
Hey doug please don't be discouraged..., and be glad you didn't start in C++ like me... talk about being discouraged... But anyways, I just started as well. I've only been programming like 5 months. So I understand you very much :) Here are some of the better (more clear) tutorials I ran across

Re: [Tutor] textbook question

2011-02-27 Thread michael scott
Hi, Justin, how are you? Most of the nice people here like to see that you try before you ask for help. So next time post some code that you have tried (and failed on) so they can see WHERE you are going wrong or WHAT is throwing you off. I'm a beginner too, also I am using How to Think Like a

Re: [Tutor] Help! (solution)

2011-03-04 Thread michael scott
I know that the question has long been answered (and probably due today), but I solved it and it was great exercise for me (as I'm not in college at the moment and I need assignments like these to gauge my skills). I'll probably build a gui for it tomorrow, just so I can practice at that. I wis

Re: [Tutor] Print/Loop Question

2011-03-17 Thread michael scott
Hi Jeff how are you today? Well about your question... I copy and pasted your code and it worked fine for me. Well except for in the code bit you posted you forgot to give a guess a value before it was referred to. So under number = 44 I just wrote guess = 0 and it worked fine. But perhaps

[Tutor] Saving information for my program

2011-03-21 Thread michael scott
I apologize now but I'm going to be spamming the tutor list as I have just decided to create an extremely ambitious project for someone of my level. Anyhow, I will start with my first question. How do I save user created information in python? In my progam I will have users input various "attr

Re: [Tutor] Checksum program

2011-03-23 Thread michael scott
Hi Lezlie, Well first off, let me admit I have no idea what checksums are (I be a noobz) and I can not help you with that part of your program at all, but there are lots of people here who can. But since you are new to python, let me comment on some of the general things I noticed in your cod

[Tutor] User Made Dictionaries

2011-03-28 Thread michael scott
Hello, I'm trying to find out the best course of action for the next stage of my program. I want to hold information on various idols. I first thought to do this with classes, but realised that I could represent the data the same way with a dictionary. So I am now just concentrating on diction

Re: [Tutor] Recommendations required

2011-04-04 Thread michael scott
Hello Ankur, Well as a beginner myself I suggest that you check out these games and modify them or create new versions of them (with additional functionality). There are lots of stock answers, but in general old arcade games from the 70's are great places to start. They are simple enough and yo

[Tutor] (sqlite3) Testing if a table has been created.

2011-04-05 Thread michael scott
Hello guys, Since sqlite gives an error if you try to create a table that's already there, how do I test if a table is already present? for example in def database(info): import sqlite3 connection = sqlite3.connect("test.db") cursor = connection.cursor() if table not in test.d

Re: [Tutor] (sqlite3) Testing if a table has been created.

2011-04-06 Thread michael scott
From: Joel Goldstick To: michael scott Cc: tutor@python.org Sent: Wed, April 6, 2011 8:30:17 AM Subject: Re: [Tutor] (sqlite3) Testing if a table has been created. On Tue, Apr 5, 2011 at 9:59 PM, michael scott wrote: Hello guys, > >Since sqlite gi

Re: [Tutor] (sqlite3) Testing if a table has been created.

2011-04-06 Thread michael scott
From: Andre Engels To: michael scott Cc: tutor@python.org Sent: Wed, April 6, 2011 10:19:53 AM Subject: Re: [Tutor] (sqlite3) Testing if a table has been created. On Wed, Apr 6, 2011 at 4:06 PM, michael scott wrote: Is this really a python tutor question

Re: [Tutor] Help - accumulator not working (Lea)

2011-04-15 Thread michael scott
Hi Lea, how are you today? Well please keep in mind that nothing is "wrong" with your code, its doing exactly what you asked it to do. But I would call your attention to your while loop, you want to accumulate things, but may I ask exactly what are you accumulating in your loop? Also quite b

[Tutor] python timers

2011-04-20 Thread michael scott
Hello how do you do. Today's question has to do with the time module. I want to add a timer to my gui. As I was messing around with it I found a way to measure time... but I'm positive there is a more elegant way to deal with this than what I've thrown together. def thing(): start =

[Tutor] after(), how do I use it?

2011-04-25 Thread michael scott
Hello, I asked for help in another location and it solved my problem, but the only problem is I don't fully understand the after function. Here is part of the code that was given to me. def print_label_slowly(self, message): '''Print a label one character at a time using the event

Re: [Tutor] after(), how do I use it?

2011-04-25 Thread michael scott
Bark To: tutor@python.org Sent: Mon, April 25, 2011 8:50:16 PM Subject: Re: [Tutor] after(), how do I use it? On 26/04/11 01:36, michael scott wrote: > Hello, I asked for help in another location and it solved my problem, but the >only problem is I don't fully understand the a

Re: [Tutor] after(), how do I use it?

2011-04-25 Thread michael scott
is it about you... that intrigues me so? From: Wayne Werner To: michael scott Cc: tutor@python.org Sent: Mon, April 25, 2011 9:15:10 PM Subject: Re: [Tutor] after(), how do I use it? On Mon, Apr 25, 2011 at 8:02 PM, michael scott wrote: Here is the code i

[Tutor] Making a script part of the terminal

2011-05-20 Thread michael scott
Okay, my title might be undescriptive, let me try to explain it better. I want to take a script I've written and make it usable by typing its name in the terminal. Perfect example is the python interpreter. You just type in the word python to the terminal and then the interpreter runs. I know ot

Re: [Tutor] Making a script part of the terminal

2011-05-20 Thread michael scott
u... that intrigues me so? From: James Reynolds To: michael scott Cc: tutor@python.org Sent: Fri, May 20, 2011 1:57:57 PM Subject: Re: [Tutor] Making a script part of the terminal We just had a similar question yesterday. Just make sure Python is on your PATH. CD to the dir

Re: [Tutor] Making a script part of the terminal

2011-05-20 Thread michael scott
Thank you gentlemen so much, I believe I have all that I need to do what I wish. What is it about you... that intrigues me so?___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/list

[Tutor] Python and the web

2011-05-22 Thread michael scott
I want to start getting into web site development. I already know basic html and css, which will create a basic webpage. But my question is what exactly does python bring to the web? Are forums, blogs, flash sites, etc the results of web programming or can they all be achieved with standard ht

[Tutor] how are you?

2011-05-23 Thread michael . miesner
hello its insane how different my life is now http://careersindemand.com/redirect.php?to=aHR0cDovL3d3dy5jbmJjNy5jb20vP3BpZD0yOTcwODY= ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/l

Re: [Tutor] Non programmer wanting to become programmer

2011-05-26 Thread michael scott
I am a beginner so I can relate with you, although python is my first programming language, it sounds as if you are coming from another language. Either way, here are some sites I'll collected that have tutorials and are free. Alan's tutorial (alan is a very active member here) http://www.freene

[Tutor] Making a simple web server in Python

2011-05-30 Thread Michael bridges
when running code from http://fragments.turtlemeat.com/pythonwebserver.php: [putting http://localhost:81/index.html in broswer] this error happens: >>> Traceback (most recent call last): File "C:\Users\MySelf\Program\game_stuff\Python_Server_code_and_test\pythonweb\webserver.py", line 65, in

[Tutor] No module named player_data

2011-06-05 Thread Michael bridges
why does this happen? server [folder] player_data [folder] server.py Traceback (most recent call last): File "C:\Users\MySelf\Program\game_stuff\Game_28_02_11\Servers\server_client_begining\server.py", line 3, in from player_data import PlayerArmy ImportError: No module nam

Re: [Tutor] No module named player_data

2011-06-05 Thread Michael bridges
> Subject: Re: [Tutor] No module named player_data > To: "Michael bridges" > Cc: Tutor@python.org > Date: Sunday, June 5, 2011, 7:11 PM > 2011/6/5 Michael bridges : > > why does this happen? > > > > server [folder] > >       player_data [folder]

Re: [Tutor] No module named player_data

2011-06-05 Thread Michael bridges
ables] [no classes, no functions, just variables] --- On Sun, 6/5/11, Alexandre Conrad wrote: > From: Alexandre Conrad > Subject: Re: [Tutor] No module named player_data > To: "Michael bridges" > Cc: Tutor@python.org > Date: Sunday, June 5, 2011, 7:11 PM > 2011/6/5 Mich

Re: [Tutor] No module named player_data

2011-06-05 Thread Michael bridges
om: Alexandre Conrad > Subject: Re: [Tutor] No module named player_data > To: "Michael bridges" > Cc: Tutor@python.org > Date: Sunday, June 5, 2011, 7:58 PM > 2011/6/5 Michael bridges : > > one of the things i deleted was __init__.py & > __init__.pyc [thought i

Re: [Tutor] No module named player_data

2011-06-05 Thread Michael bridges
simple file was named __ init __.py not __init__.py restored from recycle bin showed the error thanks for your help --- On Sun, 6/5/11, Alexandre Conrad wrote: > From: Alexandre Conrad > Subject: Re: [Tutor] No module named player_data > To: "Michael bridges" > Cc: T

[Tutor] floats

2011-06-06 Thread Michael bridges
i saw it somewhere, but where? i want to 10 / 1000 and get 0.01 not 0 if 1000 is made 1000.00 then 0.01 is printed but that gives 500 / 1000.00 is 0.5 not 0.50 i might be thinking C# not python. can someone till me how to get a two decimal precision every time? _

Re: [Tutor] floats

2011-06-07 Thread Michael bridges
sday, June 7, 2011, 1:16 AM > > "Michael bridges" > wrote > > > i want to 10 / 1000 and get 0.01 not 0 > > if 1000 is made 1000.00 then 0.01 is printed > > but that gives 500 / 1000.00 is 0.5 not 0.50 > > > > can someone till me how to get

[Tutor] using python to write web page

2011-06-15 Thread Michael bridges
i would like to use python to write a web page like writing an html file that is displayed in a browser without having to run a server. found a few options, but need to have server running. https://skulpt.googlecode.com/hg/skulpt gives 404 error ___

Re: [Tutor] Class methods

2011-06-22 Thread michael scott
Just to add a little to Alexandre's answer.  You can keep most of the code the same just add in        farmlet[0].eat()     farmlet[1].eat() and it will be okay... kinda. Or you could rewrite it and  do it another way...  I'm guessing that you are using python 3 by your print sta

[Tutor] Where to direct non-language questions?

2011-08-12 Thread Michael Scharf
Hi List, I'm am not quite at the point of needing this, but where would I go to ask a question like "Why is the OpenCalais Python API not returning all fields when I do x or y" or "Has anyone built their own Python API for OpenCalais"? Stack Overflow? Or is there something Python-specific? Than

Re: [Tutor] Where to direct non-language questions?

2011-08-12 Thread Michael Scharf
Sent: Friday, August 12, 2011 3:54 PM Hi List, I'm am not quite at the point of needing this, but where would I go to ask a question like "Why is the OpenCalais Python API not returning all fields when I do x or y"  or "Has anyone built their own Python API for OpenCalais"?  Stack Overflow? Or is

Re: [Tutor] Where to direct non-language questions?

2011-08-22 Thread Michael Scharf
On Sat, Aug 13, 2011 at 3:58 AM, Steven D'Aprano wrote: > Michael Scharf wrote: >> >> Sent: Friday, August 12, 2011 3:54 PM >> >> Hi List, >> >> I'm am not quite at the point of needing this, but where would I go to >> ask a question like

[Tutor] Need help adding a funcation

2011-12-01 Thread Michael Hall
Here is the code I have written. # Create main function. def main(): a = input('Please Enter a Number: ') # Ask user for input. number = int(a) x = 1 sum_of = 0 while number > x: if number % x == 0: sum_of = sum_of + x x += 1 if sum_of == number:

Re: [Tutor] Need help adding a funcation

2011-12-01 Thread Michael Hall
> privately to me. Please use Reply-All, or whatever the equivalent is on > your email app) > > > On 12/01/2011 11:49 AM, Michael Hall wrote: > >> On Thu, Dec 1, 2011 at 7:51 AM, Dave Angel wrote: >> >> On 12/01/2011 10:33 AM, Michael Hall wrote: >>> >

Re: [Tutor] Need help adding a funcation

2011-12-01 Thread Michael Hall
Can anyone else help with this question? On Thu, Dec 1, 2011 at 12:17 PM, Dave Angel wrote: > (You top-posted, so I'm deleting all the out-of-order stuff. in these > forums, you should put your response after whatever you quote.) > > > On 12/01/2011 02:55 PM, Michael Hal

Re: [Tutor] Need help adding a funcation

2011-12-01 Thread Michael Hall
perfect!) I am asking for help writing it. I am new to programming. Lost alot of brain matter. On Thu, Dec 1, 2011 at 3:22 PM, Alan Gauld wrote: > On 01/12/11 21:17, Michael Hall wrote: > >> Can anyone else help with this question? >> > > Sure lots of us could help. But Dave&

Re: [Tutor] possibly a version error

2011-12-23 Thread Michael Harleman
> Date: Fri, 23 Dec 2011 14:04:17 +0100 > From: jugurtha.had...@gmail.com > To: tutor@python.org > Subject: Re: [Tutor] possibly a version error > > On 22/12/2011 18:13, Cranky Frankie wrote: > > I got it to work: > > > > Use this for the import - import urllib.request > > > > the use this: dom

[Tutor] Error Checking/Defensive Programming

2012-01-25 Thread Michael Lewis
Hi everyone, I am new to python and have a noob question. Is it generally better to use try/except/else statements or if/elif/else? Or, is there a time and place for each? For a simple example, assume I want a user to enter a number 1) try: number = float(input('enter a number: ') exc

[Tutor] Rounding Error

2012-01-27 Thread Michael Lewis
I am trying to round a float to two decimals, but I am getting the following error: Traceback (most recent call last): File "", line 1, in PaintingProject() File "C:/Python27/Homework/Labs/Lab 03_5.py", line 42, in PaintingProject print 'That will cost you $%f.' %(round(5.6523),2) Typ

Re: [Tutor] Rounding Error

2012-01-27 Thread Michael Lewis
Update I am trying to round a float to two decimals. > > Basically, I am writing a program to ask a user how many square feet they > need to paint. I then calculate how many cans of paint they need and will > also show the total purchase price. I've tried this two ways, and both ways > I am semi-s

[Tutor] ASCII Conversion

2012-01-30 Thread Michael Lewis
pass -- Michael J. Lewis mjole...@gmail.com 415.815.7257 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Importing libraries

2012-02-03 Thread Michael Lewis
Why don't I have to import str or list to access their attributes like I do with the math or random or any other library? -- Michael J. Lewis mjole...@gmail.com 415.815.7257 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscri

[Tutor] Lists/raw_input

2012-02-06 Thread Michael Lewis
I want to prompt the user only once to enter 5 numbers. I then want to create a list out of those five numbers. How can I do that? I know how to do it if I prompt the user 5 different times, but I only want to prompt the user once. Thanks. -- Michael

Re: [Tutor] Tutor Digest, Vol 96, Issue 26

2012-02-07 Thread Michael Lewis
On Tue, Feb 7, 2012 at 10:57 AM, 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 >t

[Tutor] Character Buffer Object Error

2012-02-07 Thread Michael Lewis
I want to find all digits in a string and then increment those digits by 1 and then return the same string with the incremented digits. I've tried the following code, but I am getting the following error. How do I do this properly? def AlterInput(user_input): print user_input new_output =

Re: [Tutor] Character Buffer Object Error

2012-02-09 Thread Michael Lewis
On Thu, Feb 9, 2012 at 2:43 PM, bob gailer wrote: > Always reply-all so a copy goes to the tutor list. > > On 2/8/2012 11:04 PM, Michael Lewis wrote: > > Thanks Bob, > > Thanks for what if you did not follow my suggestions? > I partially followed your suggestions by ge

[Tutor] repeat a sequence in range

2012-02-11 Thread Michael Lewis
n for Name 3 instead of continuing to Name 4. How can I do this? -- Michael J. Lewis mjole...@gmail.com 415.815.7257 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] tabbed output

2012-02-12 Thread Michael Lewis
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,

[Tutor] __name__=='__main__'

2012-02-20 Thread Michael Lewis
Traceback (most recent call last): File "C:/Python27/Homework/Homework5_1.py", line 24, in if __name == '__main__': NameError: name '__name' is not defined -- Michael J. Lewis ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Tutor Digest, Vol 96, Issue 83

2012-02-20 Thread Michael Lewis
> On Mon, Feb 20, 2012 at 6:46 PM, Michael Lewis wrote: > > I at first put it outside and after all my functions but got the error > below > > That's the right place for it, you just spelled it wrong. > > > and then put it inside my last function and the progr

Re: [Tutor] __name__=='__main__'

2012-02-20 Thread Michael Lewis
20/2012 6:46 PM, Michael Lewis wrote: > >> Hi everyone, >> >> I am having some trouble understanding how to use __name__== '__main__'. >> Can you please give me some insight? Also, to use this, it needs to be >> within a function? Do you typically just thro

Re: [Tutor] __name__=='__main__'

2012-02-20 Thread Michael Lewis
Now that I am better understanding '__name__'=='__main__', I need to get advice on one last part. Since you put this in the file as an if statement, some instruction must come after. What do you suggest putting after this statement/is that piece of code ever put into action? In my example below, I'

[Tutor] '__name__' == '__main__'

2012-02-20 Thread Michael Lewis
xt(text.split(), multiplier) if "__name__" == '__main__': GetUserInput() What I did in IDLE: >>> >>> GetUserInput() Enter some text: 4 times Enter a multiplier: 2 '8 times' >>> -- Michael J. Lewis mjole...@gmail.com 415.815.7257 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Recognizing real numbers

2012-02-21 Thread Michael Lewis
to open? ')) if '__name__' == '__main__': print main() Output that is written to my file: Peanut Butter Bars Ingredients .5 lb. butter 1.75 Cups Graham Cracker Crumbs 4.0 Cups Powder Sugar 2.0 Cups Peanut Butter 4.0 Cups Semi-sweet Chocolate Chips Melt butter. A

Re: [Tutor] Recognizing real numbers (bob gailer)

2012-02-22 Thread Michael Lewis
e.close() > > def main(): > DoubleDigits(raw_input('What file do you want to open? ')) > > > if '__name__' == '__main__': > print main() > > Output that is written to my file: > > Peanut Butter Bars

Re: [Tutor] Recognizing real numbers

2012-02-22 Thread Michael Lewis
On Wed, Feb 22, 2012 at 2:52 PM, Dave Angel wrote: > On 02/21/2012 10:00 PM, Michael Lewis wrote: > >> Hi everyone, >> >> I have some code where I import a file to use a module. That module that I >> import takes text and a multiplier, checks for any numbers in

[Tutor] Compiled Python File

2012-02-22 Thread Michael Lewis
every file that I execute though. Why is that? Thanks! -- Michael J. Lewis ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Writing to a file/changing the file name

2012-02-22 Thread Michael Lewis
directory is still named recipe; however, the file type is now TXT2 File. How do I make it so I am updating the file name to recipe2 instead of the file type? -- Michael J. Lewis ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] question on self

2012-03-11 Thread Michael Lewis
t print 'Player', player + 1 self.scores.append(self.TakeTurns()) I have another method called take turns (not shown for brevity purposes). When I want to call it, why can't I just call it like a function and use TakeTurns() instead of self.TakeTurns()? -- Michael J. Lewi

[Tutor] Error handling

2012-03-24 Thread Michael Lewis
Hi everyone, I am having a bit of trouble understanding what is going on below. What does the "e" in "except OSError, e:" do? Any other help you can provide regarding errno would be extremely appreciated. I've done help() and dir() on it, but I am not really understanding what's going on with "e.e

Re: [Tutor] Error handling

2012-03-24 Thread Michael Lewis
e error was "File Exists", it is raising that exception > again, to be either caught by an encapsulating try block, or which will > bring the program to a halt with an exception shown by the interpreter. > > Is that the behavior you are going for? A

[Tutor] Error Handling

2012-03-25 Thread Michael Lewis
In the below block, why is the if statement e.errno != errno.EEXIST? Why can the errno be both before and after the "."? import os, errno try: os.makedirs('a/b/c') except OSError, e: if e.errno != errno.EEXIST: raise -- Michael J. Lewis mjole...@gm

[Tutor] Permissions Error

2012-03-25 Thread Michael Lewis
Hi everyone, If I've created a folder, why would I receive a permissions error when trying to copy the file. My source code is here: http://pastebin.com/1iX7pGDw When I check the properties/security of the file in question, the system says I have full control. Thanks. -- Michael

[Tutor] Permissions Error

2012-03-26 Thread Michael Lewis
> > Message: 1 > Date: Mon, 26 Mar 2012 10:52:19 +1100 > From: Steven D'Aprano > To: tutor@python.org > Subject: Re: [Tutor] Permissions Error > Message-ID: <4f6fafb3.4060...@pearwood.info> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed >

[Tutor] Running scripts at login

2012-04-04 Thread Michael Lewis
login. I found the piece by Alan G.; however, it deals with linux and I can't seem to find a good source for Windows machine: http://mail.python.org/pipermail/tutor/2010-July/077319.html Thanks for the help. -- Michael J. Lewis ___ Tutor mai

Re: [Tutor] Running scripts at login

2012-04-05 Thread Michael Lewis
> > > On 05/04/12 05:59, Michael Lewis wrote: > > Hi everyone, > > > > I am researching how to automatically run some of my scripts after I log > > into my Windows machine. I don't want to have to manually run the script > > or setup a windows task. >

Re: [Tutor] Running scripts at login

2012-04-05 Thread Michael Lewis
> > > >>> Hi everyone, > >>> > >>> I am researching how to automatically run some of my scripts after I > log > >>> into my Windows machine. I don't want to have to manually run the > script > >>> or setup a windows task. > >> The same way you run any Windows program on startup: > >> Add the script

Re: [Tutor] Re.findall()

2012-04-12 Thread Michael Lewis
> > mjole...@gmail.com wrote: > > Hi everyone, > > > > I am having trouble understanding re.findall(). I've read through the > > documentation and looked at at some examples online, but I still don't > have > > a clear picture. > > > > I am going through pythonchallenge.com and I am on challenge 3.

[Tutor] re.search() help

2012-04-15 Thread Michael Lewis
matches the pattern; note that this is different from finding a zero-length match at some point in the string. -- Michael J. Lewis mjole...@gmail.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python

Re: [Tutor] re.search() help

2012-04-15 Thread Michael Lewis
> > Message: 6 > Date: Sun, 15 Apr 2012 08:48:10 +0100 > From: Alan Gauld > To: tutor@python.org > Subject: Re: [Tutor] re.search() help > Message-ID: > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 15/04/12 08:10, Michael Lewis wrote: >

Re: [Tutor] measuring the start up time of an event-driven program

2012-07-24 Thread Michael Janßen
n't use up cpu anymore. Both ways, I'd except a fair amount of overhead and for the cpu-usage way bogus results also. Both problems could perhaps be addressed by enough timing runs. cu, Michael ___ Tutor maillist - Tutor@python.org To unsubscrib

Re: [Tutor] where is my MySQL database

2012-07-24 Thread Michael Janßen
tried 'grep datadir /etc/my.cnf' but found out my.cnf file doesn't > even exist in my /etc/ directory. > for me it is /etc/mysql/my.cnf cu, Michael ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] understanding pydoc try

2012-08-30 Thread Michael Janßen
try statement is either of try-except-else-finally or of try-finally form". This notation is used to formally describe language syntax: http://docs.python.org/reference/introduction.html#notation best, Michael ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Running a script in the background

2012-09-01 Thread Michael Lewis
on and Windows 7. If need be, I can create two separate scripts to separate out the two OS's. Thanks! -- Michael J. Lewis ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Running a script in the background

2012-09-01 Thread Michael Crawford
For windows not sure but for osx just add an & after the command. python myscript.py & On Sep 1, 2012, at 11:29 PM, Michael Lewis wrote: > Hi everyone, > > I am sorry to ask this when there are a lot of resources online regarding the > subject, but I've spent th

Re: [Tutor] Running a script in the background

2012-09-01 Thread Michael Lewis
> For windows not sure but for osx just add an & after the command. > > python myscript.py & > Thanks, but I know about that. I should have been more clear. What I want to do is have the script run in the background without even seeing the terminal. Adding the & after the command will let do other

Re: [Tutor] Running a script in the background

2012-09-02 Thread Michael Lewis
> > > > Michael, I see you have several Windows answers, but it doesn't look as > though you found quite what you were hoping for on OSX. My suggestion > would be to take the script and run it through py2app, which will turn it > into a stand-alone application which can

[Tutor] Creating an email option in Python

2015-05-02 Thread Michael Lemon
I'm a beginner in Python and I wanted to know how to create an email optional field using Python. Michael ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] tkinter in Python 3

2015-08-27 Thread Michael Thomas
I'm trying to move a Python 2.x program to Python 3.x. When I try to import tkinter I get the error message that no module _tkinter can be found. I've tried sudo apt-get install python-tk. While this command works, there is no difference in the result. This problem has only cropped up after I chang

Re: [Tutor] cvxopt install problem

2015-11-05 Thread Michael Crawford
Learn to Program web site > http://www.alan-g.me.uk/ > http://www.amazon.com/author/alan_gauld > Follow my photo-blog on Flickr at: > http://www.flickr.com/photos/alangauldphotos > > > > ___ > Tutor maillist - Tutor@python.org &g

Re: [Tutor] using a for loop in another method

2016-04-22 Thread Michael Selik
On Fri, Apr 22, 2016 at 1:57 PM Rene.Castillo wrote: > expected output- > reverse_words("This is an example!") # returns "sihT si na !elpmaxe" > > def reverse_words(strng): > strng = strng[::-1].split(' ') > strng.reverse() > return ' '.join(strng) > Let's walk through each step that you

Re: [Tutor] The game of nim in python

2016-04-22 Thread Michael Selik
What's the problem you're trying to solve? Did you get an error? Here's a quick revision. There's probably a more elegant way, but this seems to work. #/usr/bin/env python from __future__ import print_function import random try: input = raw_input except NameError:

Re: [Tutor] Extracting bits from an array

2016-04-29 Thread Michael Selik
> On Apr 29, 2016, at 1:15 PM, Colin Ross wrote: > > Hello, > > I have an array that takes on the following form: > > x = [1000,1001,1011,] > > The array elements are meant to be binary representation of integers. > > Goal: Access array elements and extract the first two bits. > > e.g.

Re: [Tutor] Dictionary Question

2016-05-03 Thread Michael Selik
On Mon, May 2, 2016 at 8:58 PM Jason N. via Tutor wrote: > What is the best way to make dictionary requests case in-sensitive? For > example, "Apple and "apple" should bring back the same dictionary > response. Thank you. > Take a look at how the requests library solves the problem with a "CaseI

Re: [Tutor] Dictionary Question

2016-05-03 Thread Michael Selik
On Mon, May 2, 2016 at 5:28 PM Jason N. via Tutor wrote: > Hello, > Wanted to ask if its possible to have a dictionary that can be looked up > by either values? > For example, > mydic = {"A: "Apple", "B": "Banana"}When user inputs "A" I want "Apple" to > come. But if the user enter "Apple" I want

Re: [Tutor] Best Practices with JSON Data

2016-05-08 Thread Michael Selik
On Sun, May 8, 2016, 12:34 PM Hunter Jozwiak wrote: > Hello, > > > > I am intending to start work on a Python program that will allow me to > better manage my Digital Ocean droplets, due to the fact that the website > can be at times a bit overkill for some of the basic tasks I want to do. I > ha

Re: [Tutor] Create a pivot table

2016-05-20 Thread Michael Selik
On Fri, May 20, 2016 at 8:42 AM Peter Otten <__pete...@web.de> wrote: > jarod_v6--- via Tutor wrote: > > I have tried the pandas way but unfortunately there is many duplicates . > > Please show your code in a small self-contained example, > the output it produces, and what exact output you want in

Re: [Tutor] R: Re: Create a pivot table (Peter Otten)

2016-05-20 Thread Michael Selik
On Fri, May 20, 2016 at 7:16 AM jarod_v6--- via Tutor wrote: > Thanks s much for the help. I want to obtain table like this: > > > >csv.writer(sys.stdout, delimiter="\t").writerows(table) > >A100D33 D34 D35 D36 D37 D38 D39 > >A 5 0 ... > >B

<    1   2   3   4   5   6   7   8   9   >