Re: [Tutor] help

2012-11-19 Thread Mark Lawrence
On 19/11/2012 18:07, Isaac Parkes wrote: First of all giving a meaningful subject helps everybody, how about tkinter problems? hi, I'm quite new to python and have just made a program that makes a GUI but when i open it it says there are some errors. I can't find any :( if you find any

Re: [Tutor] help

2012-11-19 Thread Mark Lawrence
On 19/11/2012 23:28, Matthew Ngaha wrote: It's asking a lot if you want people to read your whole code to try and spot the errors. Try to run it from the console and paste what the errors are here. I believe that to be complete nonsense, there was very little code to parse. What was

Re: [Tutor] help

2012-11-19 Thread Steven D'Aprano
On 20/11/12 11:33, Mark Lawrence wrote: On 19/11/2012 23:28, Matthew Ngaha wrote: It's asking a lot if you want people to read your whole code to try and spot the errors. Try to run it from the console and paste what the errors are here. I believe that to be complete nonsense, there was very

Re: [Tutor] Help with a SQL Statement

2012-11-18 Thread Khalid Al-Ghamdi
Hi, I found one typo in 'Workshop' which should be 'Workshop%' but it still gives results containing majors with 'Customer%' and 'Warehouse%' in them... On Sun, Nov 18, 2012 at 2:21 PM, Khalid Al-Ghamdi emailkg...@gmail.comwrote: Hi All, The SQL statement below doesn't return anything.. and

Re: [Tutor] Help with a SQL Statement

2012-11-18 Thread Bod Soutar
On Nov 18, 2012 11:30 AM, Khalid Al-Ghamdi emailkg...@gmail.com wrote: Hi, I found one typo in 'Workshop' which should be 'Workshop%' but it still gives results containing majors with 'Customer%' and 'Warehouse%' in them... On Sun, Nov 18, 2012 at 2:21 PM, Khalid Al-Ghamdi

Re: [Tutor] Help with a SQL Statement

2012-11-18 Thread Alan Gauld
On 18/11/12 11:29, Khalid Al-Ghamdi wrote: The SQL statement below doesn't return anything.. and I don't know why... I've used the parans but still no luck. Any Suggestions? I'll restructure it to how I think you want it... cur.execute( select badge, name, stage, tc, major, package,

Re: [Tutor] help on dic creation

2012-11-06 Thread Mark Lawrence
On 31/10/2012 01:01, Brayden Zhao wrote: def fieldict(filename): D={} with open(filename) as FileObject: for lines in FileObject: linelist=lines.split('\t') Key=linelist[0] ValCity=(linelist[12]).strip() ValState=linelist[13] ValOne=linelist[2]

Re: [Tutor] help on dic creation

2012-11-06 Thread Dave Angel
On 11/06/2012 09:01 AM, Mark Lawrence wrote: On 31/10/2012 01:01, Brayden Zhao wrote: def fieldict(filename): D={} with open(filename) as FileObject: for lines in FileObject: linelist=lines.split('\t') Key=linelist[0] ValCity=(linelist[12]).strip()

Re: [Tutor] help on dic creation

2012-11-06 Thread Mark Lawrence
On 06/11/2012 14:16, Dave Angel wrote: On 11/06/2012 09:01 AM, Mark Lawrence wrote: On 31/10/2012 01:01, Brayden Zhao wrote: def fieldict(filename): D={} with open(filename) as FileObject: for lines in FileObject: linelist=lines.split('\t') Key=linelist[0]

Re: [Tutor] Help with class example

2012-11-06 Thread Prasad, Ramit
Ramit Prasad wrote: You would be better off trying to run this from the command line. I just wanted to clarify on this. The reason you will have a better results running this from the command line is that Python will normally give you very good error traceback. An IDE might hide or obscure

Re: [Tutor] Help with class example

2012-11-05 Thread Prasad, Ramit
Frank Pontius wrote: Sent: Saturday, October 27, 2012 12:27 PM To: d...@davea.name; bgai...@gmail.com Cc: tutor@python.org Subject: Re: [Tutor] Help with class example Here ya go! Can't do what you want as this is a programmatic error from interrupter.  Only a screen shot will tell you

Re: [Tutor] help on dic creation

2012-11-05 Thread Brett Ritter
Here is my code and I dont know why my code is only reading the 500th line of the file. Thanks for your help! Let me offer you some hints: This sounds like only the last line is getting saved into the dict. Yet your loop is clearly going over each line. Ergo, the problem is probably in the

Re: [Tutor] help on dic creation

2012-11-05 Thread Brett Ritter
FYI - Gmail's new compose feature makes it WAY too easy to miss trimming the quotes. :( On Mon, Nov 5, 2012 at 3:37 PM, Brett Ritter swift...@swiftone.org wrote: (way too much) -- Brett Ritter / SwiftOne swift...@swiftone.org ___ Tutor maillist -

Re: [Tutor] Help with OOP!

2012-11-05 Thread Oscar Benjamin
On 30 October 2012 06:56, Pete p...@radiokinetics.com wrote: I’m taking this class on python at UCSC. They said this list could help. I don’t’ understand OOP and I’m having a hard time understanding the “scope” and why the def inside class are not like function –plus I can’t get my c-brain

Re: [Tutor] Help with OOP!

2012-11-05 Thread Steven D'Aprano
On 30/10/12 17:56, Pete wrote: I'm taking this class on python at UCSC. They said this list could help. I don't' understand OOP and I'm having a hard time understanding the scope and why the def inside class are not like function But they are like functions. Can you explain in more detail what

Re: [Tutor] Help with class example

2012-11-05 Thread Dave Angel
On 11/05/2012 06:07 PM, Prasad, Ramit wrote: Frank Pontius wrote: Sent: Saturday, October 27, 2012 12:27 PM To: d...@davea.name; bgai...@gmail.com Cc: tutor@python.org Subject: Re: [Tutor] Help with class example Here ya go! Can't do what you want as this is a programmatic error from

Re: [Tutor] help on dic creation

2012-11-05 Thread Alan Gauld
On 31/10/12 01:01, Brayden Zhao wrote: Here is my code and I dont know why my code is only reading the 500th line of the file. Thanks for your help! def fieldict(filename): D={} with open(filename) as FileObject: for lines in FileObject: linelist=lines.split('\t')

Re: [Tutor] help with homework

2012-10-29 Thread Asokan Pichai
[SNIPPED] Always use a while loop in this situation, This is excellent advice. Use a for loop in two situations: 1. Iterating a fixed(known) number of times 2. Iterating through the contents of any container Use a while loop to iterate as long as a condition applies. regardless of whether

Re: [Tutor] help with homework

2012-10-29 Thread Alan Gauld
On 29/10/12 08:37, Asokan Pichai wrote: teachers put stupid artificial constraints on your code, such as banning the use of len(). There may be legitimate learning outcomes for a teacher to specify such conditions. In that

Re: [Tutor] help with homework

2012-10-29 Thread Asokan Pichai
On Mon, Oct 29, 2012 at 2:28 PM, Alan Gauld alan.ga...@btinternet.com wrote: On 29/10/12 08:37, Asokan Pichai wrote: teachers put stupid artificial constraints on your code, such as banning the use of len(). There may be

Re: [Tutor] Help Passing Variables

2012-10-29 Thread Prasad, Ramit
David Hutto wrote: #A little more complex in terms of params: def SwapCaseAndCenter(*kwargs): if upper_or_lower == upper: print a_string.center(center_num).upper() if upper_or_lower == lower: print a_string.center(center_num).lower() a_string

Re: [Tutor] help with homework

2012-10-28 Thread Mark Lawrence
On 28/10/2012 21:37, Sandra Beleza wrote: Hi, I have to write a script that asks the user for names one at a time, and accept the name only if the user did not gave it before. The script has to do this until it gets 3 unique names. So far I have this: def GetNames(): names=[] while

Re: [Tutor] help with homework

2012-10-28 Thread Alan Gauld
On 28/10/12 21:37, Sandra Beleza wrote: def GetNames(): names=[] while len(names)3: name=raw_input(Name: ) if name in names: print name, is already in the data. Try again. if name not in names: names.append(name) names.sort()

Re: [Tutor] help with homework

2012-10-28 Thread Matthew Ngaha
In your original getNames do something like this. Initialise a counter to zero. Every time you get a valid name increment the count. If the count is three you're finished. hey i was looking at the question as im learning also. With the counter, would you use a while loop instead of a for

Re: [Tutor] help with homework

2012-10-28 Thread Mark Lawrence
On 29/10/2012 01:40, Matthew Ngaha wrote: In your original getNames do something like this. Initialise a counter to zero. Every time you get a valid name increment the count. If the count is three you're finished. hey i was looking at the question as im learning also. With the counter,

Re: [Tutor] Help with class example

2012-10-27 Thread bob gailer
On 10/27/2012 4:51 PM, Frank Pontius wrote: But, this is an if. When replying please put your response after the text it applies to, and delete all irrelevant text. In other words avoid top-posting. Sorry I really messed up my reply! The offending line is: coin = random.randragge(0,2): get

Re: [Tutor] Help Passing Variables

2012-10-26 Thread David Hutto
Algorithm it, and look at the instance below the function first where variables are drawn in as raw input, and comments with # are just comments, not part of the code: def SwapCaseAndCenter(a_string, upper_or_lower = None): #find if it's upper, and print if upper_or_lower == upper:

Re: [Tutor] Help Passing Variables

2012-10-26 Thread David Hutto
#This is the actual code: def SwapCaseAndCenter(a_string, upper_or_lower = None): if upper_or_lower == upper: print a_string.center(center_num).upper() if upper_or_lower == lower: print a_string.center(center_num).lower() a_string =

Re: [Tutor] Help Passing Variables

2012-10-26 Thread David Hutto
#A little more complex in terms of params: def SwapCaseAndCenter(*kwargs): if upper_or_lower == upper: print a_string.center(center_num).upper() if upper_or_lower == lower: print a_string.center(center_num).lower() a_string = raw_input(Give me a

Re: [Tutor] Help Passing Variables

2012-10-26 Thread David Hutto
#Apologies, this is the actual code: def SwapCaseAndCenter(a_string, upper_or_lower = None, center_num = None): if upper_or_lower == upper: print a_string.center(center_num).upper() if upper_or_lower == lower: print

Re: [Tutor] Help with class example

2012-10-26 Thread bob gailer
On 10/18/2012 7:59 PM, Frank Pontius wrote: Help with class example Hello, Hi - this just showed up in my mailbox. Perhaps there was a delay getting it posted. The around tails and heads are not ascii quote characters. They are what some word processors change ascii quotes into to meet

Re: [Tutor] Help with class example

2012-10-26 Thread Dave Angel
On 10/18/2012 07:59 PM, Frank Pontius wrote: Hello, I'm taking a beginners course on Python. Have class example which is to be used in H/W, which I can't get to work. Thus I figure the example is wrong. But I need this to get H/W done. Using 'import random' and random.randrange in

Re: [Tutor] Help on Remote File Copy Exection

2012-10-25 Thread Oscar Benjamin
On 25 October 2012 10:26, Arumugam N aru1...@gmail.com wrote: Hi All, First of the big thanks and congrats for managing such a brilliant online community. I am new to Python and have started getting the taste of python on my day to day work. I have a requirement and i am trying to solve it

Re: [Tutor] Help on Remote File Copy Exection

2012-10-25 Thread Alan Gauld
On 25/10/12 10:26, Arumugam N wrote: 1. Revert the snapshot of a VM used for testing. - i have automated using pysphere 2. Copy the build from share location to the VM - here i can have a python script run from the VM but is it possible to run it remotely? for example. if i run the script from

Re: [Tutor] Help on Remote File Copy Exection

2012-10-25 Thread Prasad, Ramit
Arumugam N wrote: Hi All, First of the big thanks and congrats for managing such a brilliant online community. I am new to Python and have started getting the taste of python on my day to day work. I have a requirement and i am trying to solve it using python. I am from QA. Here is

Re: [Tutor] Help - Using Sort and Join

2012-10-22 Thread Dave Angel
On 10/22/2012 03:57 PM, Daniel Gulko wrote: Hi Python Tutor, I have an issue trying to figure out how to print out final answers using sort and join functions. Assignment Specification: make a function that is a magic eight ball emulator. emulator will be a function that returns one of

Re: [Tutor] Help - Using Sort and Join

2012-10-22 Thread Oscar Benjamin
On 22 October 2012 20:57, Daniel Gulko dangu...@hotmail.com wrote: Hi Python Tutor, Hi Daniel, I have an issue trying to figure out how to print out final answers using sort and join functions. Do you know how to use sort and join to print a list of strings in alphabetical order?

Re: [Tutor] Help Passing Variables

2012-10-19 Thread Daniel Gulko
Thanks David. This has been helpful in understanding a bit more on how parameters are passed through. Date: Thu, 18 Oct 2012 04:44:55 -0400 Subject: Re: [Tutor] Help Passing Variables From: dwightdhu...@gmail.com To: dangu...@hotmail.com CC: tutor@python.org #A little more complex

Re: [Tutor] Help Passing Variables

2012-10-19 Thread Dave Angel
the things they follow? There is a long-standing convention in this forum, and many others, and why let Microsoft ruin it for all of us? Date: Thu, 18 Oct 2012 04:44:55 -0400 Subject: Re: [Tutor] Help Passing Variables From: dwightdhu...@gmail.com To: dangu...@hotmail.com CC: tutor@python.org

Re: [Tutor] Help Passing Variables

2012-10-18 Thread Alan Gauld
On 18/10/12 08:08, Daniel Gulko wrote: The function calls for passing in two variables a_string, width but I am still confused on this concept. You just provide the list of input parameters when you define the function: def add(x,y): ... return x+y ... add(4,5) 9 I define add to take two

Re: [Tutor] Help Passing Variables

2012-10-18 Thread Dave Angel
On 10/18/2012 03:08 AM, Daniel Gulko wrote: Hi Python Tutor, I have a write a simple function named SwapCaseAndCenter(a_string, width). So why did you define it with only one formal parameter? The idea is to use the function swapcase and center so that when the userenters a string it

Re: [Tutor] Help for Python Beginner with extracting and manipulating data from thousands of ASCII files

2012-10-02 Thread Oscar Benjamin
Hi Cecilia, I'm sending this again as the first message was sent only to you (I hadn't realised that your own message was sent only to me as well). If you want to reply please reply-all to this message. On 1 October 2012 17:42, Cecilia Chavana-Bryant cecilia.chav...@gmail.com wrote: On Mon, Oct

Re: [Tutor] Help for Python Beginner with extracting and manipulating data from thousands of ASCII files

2012-10-01 Thread Oscar Benjamin
On Sep 30, 2012 11:10 PM, Cecilia Chavana-Bryant cecilia.chav...@gmail.com wrote: Hola again Python Tutor! Hi Cecilia With a friend's help I have the following code to extract reflectance data from an ASCII data file, do a bit of data manipulation to calibrate the data and then write the

Re: [Tutor] Help for Python Beginner with extracting and manipulating data from thousands of ASCII files

2012-10-01 Thread Cecilia Chavana-Bryant
On Mon, Oct 1, 2012 at 12:33 AM, Alan Gauld alan.ga...@btinternet.comwrote: On 30/09/12 23:07, Cecilia Chavana-Bryant wrote: Hola again Python Tutor! With a friend's help I have the following code to extract reflectance data from an ASCII data file, do a bit of data manipulation to

Re: [Tutor] Help for Python Beginner with extracting and manipulating data from thousands of ASCII files

2012-10-01 Thread Cecilia Chavana-Bryant
On Mon, Oct 1, 2012 at 1:16 AM, Dave Angel d...@davea.name wrote: On 09/30/2012 06:07 PM, Cecilia Chavana-Bryant wrote: Hola again Python Tutor! With a friend's help I have the following code to extract reflectance data from an ASCII data file, do a bit of data manipulation to calibrate

Re: [Tutor] HELP!

2012-10-01 Thread c smith
Is the only problem that your code is giving unexpected results, or that it doesnt run or what? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] HELP!

2012-10-01 Thread Brian van den Broek
On 1 Oct 2012 19:58, Mark Rourke mark.rour...@gmail.com wrote: hello, I am a college student in my first year of computer programming, I was wondering if you could look at my code to see whats wrong with it. # Mark Rourke # Sept 29, 2012 # Write a program to calculate the sales tax at the

Re: [Tutor] Help for Python Beginner with extracting and manipulating data from thousands of ASCII files

2012-09-30 Thread Alan Gauld
On 30/09/12 23:07, Cecilia Chavana-Bryant wrote: Hola again Python Tutor! With a friend's help I have the following code to extract reflectance data from an ASCII data file, do a bit of data manipulation to calibrate the data and then write the calibrated file into an out file. snip I have

Re: [Tutor] Help for Python Beginner with extracting and manipulating data from thousands of ASCII files

2012-09-30 Thread Dave Angel
On 09/30/2012 06:07 PM, Cecilia Chavana-Bryant wrote: Hola again Python Tutor! With a friend's help I have the following code to extract reflectance data from an ASCII data file, do a bit of data manipulation to calibrate the data and then write the calibrated file into an out file. import

Re: [Tutor] Help

2012-09-21 Thread Jerry Hill
On Fri, Sep 21, 2012 at 10:33 AM, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Ironically, that describes me. So what is the preference for large code samples? Just always include it? What about for the main list? It's tricky. Ideally, you need to take your large code base, and reduce it

Re: [Tutor] Help - My First Program Fails

2012-09-10 Thread tayo rotimi
Hi Steven. Thank you for your answer below. The program now runs, using print(Game Over). I use Python 3..; but the book - python for absolute beginner - that I have is an old (2003) edition. I don't know how this combination may affect my learning, going forward. Could you please suggest

Re: [Tutor] Help - My First Program Fails

2012-09-10 Thread Steven D'Aprano
On 10/09/12 19:40, tayo rotimi wrote: Hi Steven. Thank you for your answer below. The program now runs, using print(Game Over). I use Python 3..; but the book - python for absolute beginner - that I have is an old (2003) edition. I don't know how this combination may affect my learning, going

Re: [Tutor] Help with class in class

2012-09-09 Thread leam hall
Of course, showing the code might help... http://bpaste.net/show/44593/ Thanks! Leam On Sun, Sep 9, 2012 at 10:42 AM, leam hall leamh...@gmail.com wrote: I'm in the O'Reilly Python 2 class, so pointers to learning would be better than just answers, please. My brain is a bit slow but needs

Re: [Tutor] Help with class in class

2012-09-09 Thread Kwpolska
On Sun, Sep 9, 2012 at 5:43 PM, leam hall leamh...@gmail.com wrote: Of course, showing the code might help... http://bpaste.net/show/44593/ Thanks! Leam On Sun, Sep 9, 2012 at 10:42 AM, leam hall leamh...@gmail.com wrote: I'm in the O'Reilly Python 2 class, so pointers to learning

Re: [Tutor] Help with class in class

2012-09-09 Thread Peter Otten
leam hall wrote: I'm in the O'Reilly Python 2 class, so pointers to learning would be better than just answers, please. My brain is a bit slow but needs to go forward. Line 16 calls line 31. Rather, it is supposed to. I'm trying to figure out why I get File ./ch8_project.py, line 31,

Re: [Tutor] Help with class in class

2012-09-09 Thread leam hall
On Sun, Sep 9, 2012 at 12:12 PM, Peter Otten __pete...@web.de wrote: the above will no longer complain about a missing attribute. root = Tk() project = ch8_Project(master=root) project.mainloop() Another problem that caught my attention: self.green = Button(root, text=Green,

Re: [Tutor] Help with class in class

2012-09-09 Thread leam hall
self.blue = Button(root, text=Blue, command=self.change_text_color(blue)) self.blue.pack(side=LEFT) self.green = Button(root, text=Green, command=self.change_text_color(green)) self.green.pack(side=LEFT) To follow up, I've added a second button. Of course, it doesn't work, the

Re: [Tutor] Help with class in class

2012-09-09 Thread Dave Angel
On 09/09/2012 04:56 PM, leam hall wrote: self.blue = Button(root, text=Blue, command=self.change_text_color(blue)) self.blue.pack(side=LEFT) self.green = Button(root, text=Green, command=self.change_text_color(green)) self.green.pack(side=LEFT) To follow up, I've added a

Re: [Tutor] Help - My First Program Fails

2012-09-09 Thread Steven D'Aprano
Please, please, PLEASE do not reply to a digest without deleting the irrelevant text from your email! We don't need to read HUNDREDS of lines of text we've already seen before. When you want to start a *new* question, ALWAYS start a fresh, blank email, set the To address to tutor@python.org,

Re: [Tutor] Help

2012-09-06 Thread Ray Jones
On 09/03/2012 07:39 AM, Jack Little wrote: Ok, I am somewhat new to python, and I am making a text-based RPG. I get a weird error with this code: #A Python text-RPG #A Jak Production #APOC global ammo global health global lives global exp global food ammo=55 health =

Re: [Tutor] Help

2012-09-06 Thread Dave Angel
On 09/03/2012 10:39 AM, Jack Little wrote: Ok, I am somewhat new to python, and I am making a text-based RPG. I get a weird error with this code: #A Python text-RPG #A Jak Production #APOC global ammo global health global lives global exp global food ammo=55 health = 100 lives=10

Re: [Tutor] help me decide

2012-09-06 Thread Matthew Ngaha
hey guys i just like to thank everyone for their input. Its really helped me in deciding a lot of things. also @ Alan i think? as ive started writing this mail it won;t let me look up previous senders but thanks for your input. Also your field of work sounds very interesting indeed. I can't dare

Re: [Tutor] Help

2012-09-06 Thread Alan Gauld
On 06/09/12 09:35, Ray Jones wrote: #A Python text-RPG #A Jak Production #APOC global ammo You use global inside a function not outside. All variables declared at the module level are global by definition. ammo=55 This sets the global ammo value def part1(): if answer == SHOW or

Re: [Tutor] Help

2012-09-06 Thread Walter Prins
Hi Ian, On 4 September 2012 20:36, Ian o donovan ianodonova...@gmail.com wrote: Hey, I am writing this to you because I want to know could you help. My school is doing enterprise and I want to enter. What do you mean your school is doing enterprise? Is it some competition or something? I

Re: [Tutor] Help

2012-09-06 Thread Mark Lawrence
On 03/09/2012 15:39, Jack Little wrote: Ok, I am somewhat new to python, and I am making a text-based RPG. I get a weird error with this code: [snip] Thanks, Jack Little Further to the sound advice you've already been given a rather more informative subject line would have been

Re: [Tutor] help me decide

2012-09-05 Thread Matthew Ngaha
Hi Alan thanks so much for your helpful answers. probably wxPython or GTk But if you want to get serious about GUIs I'd probably suggest wxPython instead - it ultimately is more powerful and complete and if you are only just starting will be easy to learn whereas learning Tkinter and

Re: [Tutor] help me decide

2012-09-05 Thread Prasad, Ramit
From: Matthew Ngaha [snip] i feel confident using Python now but im still not sure which direction i want to go in. I would at some point like to learn how to use GUIs and a web Framework(Django). But i don't know which of the 2 to start out with. a) IF you happen to have used both, which

Re: [Tutor] help me decide

2012-09-05 Thread Alan Gauld
On 05/09/12 11:04, Matthew Ngaha wrote: also please could you tell me why you suggest wxPython over GTK? Support, there are probably more beginner friendly resources for wxPython than for GTk, although that is changing. that wxPython is the easiet to pick up yet a lot more complete than

Re: [Tutor] help me decide

2012-09-05 Thread Steve Willoughby
On 05-Sep-12 10:40, Alan Gauld wrote: On 05/09/12 11:04, Matthew Ngaha wrote: also please could you tell me why you suggest wxPython over GTK? Support, there are probably more beginner friendly resources for wxPython than for GTk, although that is changing. Yeah, and wxPython is a large,

Re: [Tutor] help me decide

2012-09-05 Thread Dwight Hutto
No matter what the kit used for GUI, make sure it's well documented, and has plenty of tuts/docs. I used tkinter, and wxpython, and like the widget set/cross OS usages in wxpython better. However, with more experience, now I'm moving toward the Blender Game Engine to give more feel, and a 3-d pop

Re: [Tutor] help me decide

2012-09-05 Thread Wayne Werner
On Tue, 4 Sep 2012, Matthew Ngaha wrote: a) IF you happen to have used both, which one fills you with joy and is more fun for you to program with, GUI programming, or web related / Framework programming? Honestly - both. It's really a highly subjective question and depends what you want to

Re: [Tutor] help me decide

2012-09-04 Thread leam hall
Matthew, Program what is fun for you. I prefer PHP for web work but I'm learning Python for my day job. Python provides a wider range of abilities but PHP is more fun for me. If Python GUIs are fun, then do that. The more you enjoy the topic the more reason you will have to learn more and more. I

Re: [Tutor] help me decide

2012-09-04 Thread Matthew Ngaha
sorry wrong i didnt send mail right. hey i didnt explain it properly, i wasn't asking what language to use or learn. I am only going to be using Python. I meant whic area to study on 1st, GUI programing e.g Tkinter or Programming with a web framwork e.g Django.

Re: [Tutor] help me decide

2012-09-04 Thread Matthew Ngaha
hey you didnt read my question:( i dont enjoy either because i have no experience with them. so im asking questions about peoples personal experiences with the 2 areas which can give me further information to research on. ___ Tutor maillist -

Re: [Tutor] Help : File formatting

2012-08-23 Thread Alan Gauld
On 23/08/12 07:12, rahool shelke wrote: I want to take the list of files present in packages. On AIX we get the files list present in packges using command lslpp -f pkgname. Can you provide a short example of the output format from lslpp? Now i want to format output of above command such

Re: [Tutor] help--- opening csv in different functions

2012-08-10 Thread Dave Angel
On 08/10/2012 06:02 AM, leon zaat wrote: I am trying to fill a file. When i am start the leading fuction the file schould be overwriting the , probarly, existing csv file. Accoording from keys from different keys in my sql files, information is collected and written in a other function.

Re: [Tutor] help--- opening csv in different functions

2012-08-10 Thread Alan Gauld
On 10/08/12 11:02, leon zaat wrote: I am trying to fill a file. I assume you mean create a file? Or overwrite an existing one? Or append to an existing one. There isn't really a concept of filling a file, they just keep getting bigger until you ruin out of space. (There are some filesystems

Re: [Tutor] help - SyntaxError: Non-UTF-8 code using python 3

2012-08-09 Thread Alan Gauld
On 09/08/12 04:26, Lily Tran wrote: I am getting the following error when I try to run this python program in eclipse. I am running python 3: I see you fixed that,but there are other problems: def MagicEightBallEmulator(): answers = [As I see it, yes, Very doubtful] while

Re: [Tutor] help -Global name xxxxxxxx is not definied.

2012-08-09 Thread leon zaat
Hello everyone, Can anybody help me with this problem. Ik have a program that i' am modifying. Ik build a function to export data to a csv file. I tried the functions over different parts, that needed to be extracted. The parts on it self worked fine. Now I put all parts in my function.

Re: [Tutor] help -Global name xxxxxxxx is not definied.

2012-08-09 Thread Peter Otten
leon zaat wrote: Hello everyone, Can anybody help me with this problem. Ik have a program that i' am modifying. Ik build a function to export data to a csv file. I tried the functions over different parts, that needed to be extracted. The parts on it self worked fine. Now I put all

Re: [Tutor] help -Global name xxxxxxxx is not definied.

2012-08-09 Thread leon zaat
Thanks, adding the self as suggested did the trick. To: tutor@python.org From: __pete...@web.de Date: Thu, 9 Aug 2012 14:45:58 +0200 Subject: Re: [Tutor] help -Global name is not definied. leon zaat wrote: Hello everyone, Can anybody help me with this problem. Ik

Re: [Tutor] help -Global name xxxxxxxx is not definied.

2012-08-09 Thread Alan Gauld
On 09/08/12 13:20, leon zaat wrote: When i run the program i got the following message: NameError: global name 'schrijfExportRecord' is not found What I am doing wrong and how can i fix it? Looks like you found the problem in this case but for future reference... Please, always post the

Re: [Tutor] help - SyntaxError: Non-UTF-8 code using python 3

2012-08-08 Thread Dave Angel
On 08/08/2012 11:26 PM, Lily Tran wrote: Hello; I am getting the following error when I try to run this python program in eclipse. I am running python 3: File /Users/lilytran/Desktop/python/Ex_Files_Python_3_EssT/Exercise Files/class_beginner_python/hw3_2_lab6.py, line 30

Re: [Tutor] help - SyntaxError: Non-UTF-8 code using python 3

2012-08-08 Thread Lily Tran
Thanks. I found the problem character and was able to resolve it. Lily On 8/8/12 10:10 PM, Dave Angel d...@davea.name wrote: On 08/08/2012 11:26 PM, Lily Tran wrote: Hello; I am getting the following error when I try to run this python program in eclipse. I am running python 3: File

Re: [Tutor] Help please!

2012-07-31 Thread ttmticdi .
print Mum is in a %s mood % (mum_mood) print Dad is in a %s mood % (dad_mood) Hi Victoria! Since you have only one format character in the strings above there is no need to surround the variables mum_mood and dad_mood with parenthesis. You only do that when you have multiple formats in

Re: [Tutor] Help please!

2012-07-31 Thread Joel Goldstick
On Tue, Jul 31, 2012 at 5:52 AM, ttmticdi . ttmti...@gmail.com wrote: print Mum is in a %s mood % (mum_mood) print Dad is in a %s mood % (dad_mood) Hi Victoria! Since you have only one format character in the strings above there is no need to surround the variables mum_mood and

Re: [Tutor] Help please!

2012-07-31 Thread ttmticdi .
Ex: No! print Hi %s! You like %s and %s (user_name, x, y) Yes! print Hi %s! You like %s and %s % (user_name, x, y) Forgot the interpolation operator(%). Thank you very much Joel for correcting me. Regards, ttmticdi. ___ Tutor maillist -

Re: [Tutor] Help please!

2012-07-30 Thread Puneeth Chaganti
On Mon, Jul 30, 2012 at 9:35 PM, Victoria Homsy victoriaho...@yahoo.com wrote: Hi! I am a new Python user, and would really appreciate some help. My code is as follows: from sys import argvs script, mum_mood, dad_mood = argvs # my own function def dad_and_mum_mood(mum_mood, dad_mood):

Re: [Tutor] Help please!

2012-07-30 Thread Emile van Sebille
On 7/30/2012 12:52 PM Victoria Homsy said... Hello all! I have a very simple question but I'm very new to python. Could you describe to me what the following piece of Python code says in English please? def print_a_line(line_count, f): print line_count, f.readline() This function accepts

Re: [Tutor] Help please!

2012-07-30 Thread Prasad, Ramit
Hello all! I have a very simple question but I'm very new to python. Could you describe to me what the following piece of Python code says in English please? Welcome to the list and Python! When posting code in the future I recommend posting in plain text and not rich text or HTML. If you are

Re: [Tutor] Help with Matplotlib labels

2012-06-19 Thread Mark Lawrence
On 19/06/2012 00:46, Alan Gauld wrote: On 19/06/12 00:13, Sean Carolan wrote: and not the total of all the individual items. Anyone matplotlib experts out there who can weigh in? Not me, but I notice there is a gmane newsfeed for matplotlib: gmane.comp.python.matplotlib.general Probably

Re: [Tutor] Help with Matplotlib labels

2012-06-18 Thread Sean Carolan
Unfortunately my graph is generated dynamically. How can I create my legend when my 'bar' objects have no names to refer to? I also noticed another issue with my stacked bar graph; the total height of the bar is the size of the largest number of the dataset, and not the total of all the

Re: [Tutor] Help with Matplotlib labels

2012-06-18 Thread Alan Gauld
On 19/06/12 00:13, Sean Carolan wrote: and not the total of all the individual items. Anyone matplotlib experts out there who can weigh in? Not me, but I notice there is a gmane newsfeed for matplotlib: gmane.comp.python.matplotlib.general Probably worth posting questions there. -- Alan

Re: [Tutor] Help with Matplotlib labels

2012-06-18 Thread Sean Carolan
Not me, but I notice there is a gmane newsfeed for matplotlib: gmane.comp.python.matplotlib.general Probably worth posting questions there. Thank you, I will inquire on the newsfeed. ___ Tutor maillist - Tutor@python.org To unsubscribe or change

Re: [Tutor] Help with Matplotlib labels

2012-06-18 Thread Sean Carolan
Unfortunately my graph is generated dynamically. How can I create my legend when my 'bar' objects have no names to refer to?    for admin in bd:        bar(ind, bd[admin], width, color=colordict[admin])    xticks(ind+width/2., datenames)    legend()    grid('on')    outfile =

Re: [Tutor] Help with Matplotlib labels

2012-06-18 Thread Sean Carolan
I also noticed another issue with my stacked bar graph; the total height of the bar is the size of the largest number of the dataset, and not the total of all the individual items.  Anyone matplotlib experts out there who can weigh in? I figured out what was going on here; the bars were all

Re: [Tutor] Help with graphics please

2012-04-24 Thread Steven D'Aprano
On Tue, Apr 24, 2012 at 03:57:58PM +0800, Ivor Surveyor wrote: I request help in locating the graphics module graphics.py Have you tried searching for Python programming by John Zelle graphics.py on any of the major search engines, like Google, Yahoo or DuckDuckGo? That should always be your

Re: [Tutor] Help with regular expression

2012-04-15 Thread Steven D'Aprano
syed zaidi wrote: Dear all Can someone please tell me how to solve the following problem. I have developed a python code to extract specific information from more than 1000 files which have slightly different format. The problem I am facing is that I have to develop specific RE for each of the

Re: [Tutor] Help with regular expression

2012-04-15 Thread Steven D'Aprano
syed zaidi wrote: Dear Steve,Tutor doesn't allow attachment of huge files. I am attaching the files I am taking as input, code and the output CSV file. I hope then you would be able to help me. DOT keg files open in file viewer, you can also view them in python. The CSV file is the desired

Re: [Tutor] Help with regular expression

2012-04-15 Thread syed zaidi
Thanks for the help I need the whole line starting from 'D' but in seperate columns.like KO, EC, Gene ID, Enzyme Name etc Date: Mon, 16 Apr 2012 00:24:17 +1000 From: st...@pearwood.info To: tutor@python.org Subject: Re: [Tutor] Help with regular expression syed zaidi wrote: Dear Steve

<    2   3   4   5   6   7   8   9   10   11   >