Re: [Tutor] What is random.triangular() used for

2010-10-24 Thread Adam Bark
I think he may be using ipython but putting an "import numpy as np" should get that code to work. HTH Adam. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Summing up numbers in a file

2010-10-26 Thread Adam Bark
ow to iterate through a file, you could try saving the number of occurrences of each number in the file into a dictionary. Something like: if num in my_dict: my_dict[num] += 1 else: my_dict[num] = 1 HTH. Adam. ___ Tutor maillist - Tutor@python.o

Re: [Tutor] if statement

2010-11-02 Thread Adam Bark
On 02/11/10 19:02, Glen Clark wrote: File "/home/glen/workspace/test.py", line 19 if confirmed == "y": ^ SyntaxError: invalid syntax Why does this not work??? PyDev says "Expected:else" It's hard to tell without context. Can you send the code around it as well

Re: [Tutor] if statement

2010-11-02 Thread Adam Bark
ht need at least a pass after else as well, although it should be fine to leave it out altogether once you've added the ')'. HTH, Adam. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] if statement

2010-11-02 Thread Adam Bark
On 02/11/10 19:36, christopher.h...@allisontransmission.com wrote: Glen Clark wrote on 11/02/2010 03:07:18 PM: in general you should use raw_input instead of input. > confirmed = int(input("Are you happy with this? (y/n): ") > It would appear that Glen is using python 3.x as he used the pri

Re: [Tutor] While Loops: Coin Flip Game

2010-11-14 Thread Adam Bark
On 14/11/10 22:16, Dawn Samson wrote: Greetings, I'm a Python beginner and working my way through Michael Dawson's Python Programming for the Absolute Beginner. I'm stuck in a particular challenge that asks me to write a program that "flips a coin 100 times and then tells you the number of he

Re: [Tutor] Accessing columns of a CSV file

2010-11-17 Thread Adam Bark
, '26.508'] ['2005/01/31', '23:00:00', '26.508'] ['2005/01/31', '23:12:00', '26.508'] ['2005/01/31', '23:24:00', '26.508'] ['2005/01/31', '23:36:00', '26.508'] ['20

Re: [Tutor] Assistance with Psuedocode

2010-11-17 Thread Adam Bark
On 18/11/10 00:49, Alan Gauld wrote: "Joe Ohmer" wrote The following code works well but I don't understand why the mysteryEffect code block changes the picture. Doesn’t 64*(r/64) just equal r? That dependfs on which version of Python you use. In earlier versions '/' meant integer division

[Tutor] Tkinter Button Issue

2009-06-28 Thread Adam Cunningham
till a newbie. :-) Thanks for your time. Adam ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Memory usage (Lizhi Yang)

2009-10-08 Thread Adam Bark
2009/10/8 Lizhi Yang > Hi Adam, > > One more question, if I want to implement algorithms and load the huge > amount of data using C++, but using Python as the glue language to > implement other functionality such as Gui and txt processing, you > think Boost.python is better

[Tutor] for loop issue

2009-10-09 Thread Adam Bark
2009/10/9 Stefan Lesicnik Hi, > > This feels like a strange issue, so i hope I formulate this so its > understandable. > > I have some objects. Each object has associated values. I am looping > through these objects, working with a value and printing out the > value. > The issue in this case is t

[Tutor] Trying out Tkinter with problems

2005-02-19 Thread Adam Cripps
on is just the same as all the other buttons. Why is this? Secondly, when I try to exit the app, the quit button doesn't kill the root, window, but just the widgets. How do I reference the root window and all, instead of just exiting the widgets? TIA - Adam -- http://www.monkeez.org PGP key:

Re: [Tutor] Trying out Tkinter with problems

2005-02-19 Thread Adam Cripps
On Sat, 19 Feb 2005 10:43:07 +0100, Gregor Lingl <[EMAIL PROTECTED]> wrote: > Hi Adam! > > I'm not a Tkinter expert, so I probably cannot provide > the best solution for your problem. > Nevertheless I tried two corrections, which adress your > problem seeminly

[Tutor] Recursive Tkinter buttons

2005-02-24 Thread Adam Cripps
;, cnf, kw) File "C:\PYTHON24\lib\lib-tk\Tkinter.py", line 1130, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) File "C:\PYTHON24\lib\lib-tk\Tkinter.py", line 997, in _options if k[-1] == '_': k = k[:-1] TypeError: unsubscriptable ob

Re: [Tutor] Recursive Tkinter buttons

2005-02-24 Thread Adam Cripps
On Thu, 24 Feb 2005 21:26:29 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: > Adam Cripps wrote: > > I'm trying to create recursive Tkinter buttons with: > > > > for i in range(0,10): > > print i > >

Re: [Tutor] Recursive Tkinter buttons

2005-02-26 Thread Adam Cripps
ons - but when I use self.showButtons(i) showButtons gets called straight at run time. Any ideas? TIA Adam -- http://www.monkeez.org PGP key: 0x7111B833 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Recursive Tkinter buttons

2005-02-27 Thread Adam Cripps
ambda calls your method but now passes > in the value of i for that button. (You need to modify your method > to accept that value of course!) > > HTH, > > Alan G > Author of the Learn to Program web tutor > http://www.freenetpages.co.uk/hp/alan.gauld Yay! Thanks for the

[Tutor] Saving Entry fields in Tkinter

2005-03-01 Thread Adam Cripps
at would be a good way to open this file and re-populate the entry fields with the content? I'm not sure how to parse the text according to the \n separator. Am I going down the right path here? TIA Adam -- http://www.monkeez.org PGP key: 0x7111B833 __

Re: [Tutor] Saving Entry fields in Tkinter

2005-03-01 Thread Adam Cripps
On Tue, 1 Mar 2005 15:30:02 +, Adam Cripps <[EMAIL PROTECTED]> wrote: > On Tue, 1 Mar 2005 12:52:57 +0100, Ewald Ertl <[EMAIL PROTECTED]> wrote: > > Hi! > > > > Perhaps this could help you: > > > > fileContent=open( "my/file/to/read&

Re: [Tutor] Saving Entry fields in Tkinter

2005-03-01 Thread Adam Cripps
On Tue, 1 Mar 2005 15:31:10 +, Adam Cripps <[EMAIL PROTECTED]> wrote: > On Tue, 1 Mar 2005 15:30:02 +0000, Adam Cripps <[EMAIL PROTECTED]> wrote: > > On Tue, 1 Mar 2005 12:52:57 +0100, Ewald Ertl <[EMAIL PROTECTED]> wrote: > > > Hi! >

Re: [Tutor] (no subject)

2005-03-05 Thread Adam Cripps
On Sun, 6 Mar 2005 07:38:54 +, Adam Cripps <[EMAIL PROTECTED]> wrote: > On Fri, 04 Mar 2005 12:14:28 -0500, Brian van den Broek > <[EMAIL PROTECTED]> wrote: > Kevin said unto the world upon 2005-03-04 10:43: > > Hello all. I have just completed my very first pytho

[Tutor] ActiveState Komodo

2005-05-30 Thread Adam McNutt
e download step if you have already installed the software on your PC. You will then receive an email with a link to a licence installer executable. Simply follow the instructions in that email. Offer ends December 31, 2005. Enjoy, Adam McNutt ___ Tuto

[Tutor] New pet project - stripping down html content.

2005-06-10 Thread Adam Cripps
ut navigation content and just remain with the bare bones of the story? Any pointers for particular libraries I should be looking at would be very helpful. I've already had a quick play with feedparser [3], which was intuitive and easy to program with. What about stripping

Re: [Tutor] Python Books

2005-06-12 Thread Adam Cripps
y.com/catalog/pythonsl/ (of which an online PDF version is available at http://www.effbot.org/librarybook/) HTH Adam -- http://www.monkeez.org PGP key: 0x7111B833 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Adam Cripps
ay forward (where each tab is a school subject) but under Tkinter they don't appear to be that easy. TIA Adam -- http://www.monkeez.org PGP key: 0x7111B833 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Adam Cripps
On 6/24/05, Michael P. Reilly <[EMAIL PROTECTED]> wrote: > On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: > > I am a teacher and have written this little Python/Tkinter application > > to help me with my report writing: > > > > http://cvs.sourceforg

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-24 Thread Adam Cripps
On 6/24/05, Michael P. Reilly <[EMAIL PROTECTED]> wrote: > On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: > > I hadn't thought about a scrollbar - that would be very useful, > > although doesn't add to the management side of the statement (i.e. >

Re: [Tutor] Help with Tkinter teachers' report program?

2005-06-25 Thread Adam Cripps
On 6/25/05, Michael P. Reilly <[EMAIL PROTECTED]> wrote: > On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: > > On 6/24/05, Michael P. Reilly <[EMAIL PROTECTED]> wrote: > > > On 6/24/05, Adam Cripps <[EMAIL PROTECTED]> wrote: > > > > I hadn&#

Re: [Tutor] MineSweeper

2005-06-25 Thread Adam Cripps
ached to any particular data or meaning. The EVT_BUTTON passes the id to the function self.ButtonPushed, which then can tell which button was pushed. HTH Adam -- http://www.monkeez.org PGP key: 0x7111B833 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] wxPython shaped window

2005-06-25 Thread Adam Bark
Is it possible to put controls into a shaped window in wxPython. I have tried putting a button on the demo and it becomes the exact size and shape of the window. Also when I tried to bind it to an action it wouldn't even start. Adam ___ Tutor mai

Re: [Tutor] wxPython shaped window

2005-06-25 Thread Adam Cripps
On 6/25/05, Adam Bark <[EMAIL PROTECTED]> wrote: > Is it possible to put controls into a shaped window in wxPython. I have > tried putting a button on the demo and it becomes the exact size and shape > of the window. Also when I tried to bind it to an action it wouldn't even

Re: [Tutor] wxPython shaped window

2005-06-25 Thread Adam Bark
Thanks for the info Adam I just seem to be having a problem with the panel size it greys out nearly all the image. Ideally I would like to make the panel transparent but I can't work out how to do that.On 6/25/05, Adam Cripps <[EMAIL PROTECTED]> wrote: On 6/25/05, Adam Bark <[E

Re: [Tutor] wxPython shaped window

2005-06-26 Thread Adam Cripps
On 6/25/05, Adam Bark <[EMAIL PROTECTED]> wrote: > Thanks for the info Adam I just seem to be having a problem with the panel > size it greys out nearly all the image. Ideally I would like to make the > panel transparent but I can't work out how to do that. > > > On

[Tutor] wxPython shaped window

2005-06-30 Thread Adam Bark
On 6/26/05, Adam Cripps <[EMAIL PROTECTED]> wrote: On 6/25/05, Adam Bark <[EMAIL PROTECTED]> wrote:> Thanks for the info Adam I just seem to be having a problem with the panel > size it greys out nearly all the image. Ideally I would like to make the > panel transparent but

Re: [Tutor] A more Pythonic way to do this

2005-06-30 Thread Adam Bark
Here's the problem --> enemyship_sprites.add(Enemy((cols*60)+20, (rows*40)+30), level)     1,2   1    2    1  0 you've put a braket after +30 which ends the Enemy call. The numbering is +1 for op

Re: [Tutor] A more Pythonic way to do this

2005-06-30 Thread Adam Bark
r that.  And yes, it works now ;) it's lovely.~DeniseOn 6/30/05, Adam Bark <[EMAIL PROTECTED]> wrote: > Here's the problem -->> enemyship_sprites.add(Enemy((cols*60)+20, (rows*40)+30),> level)>> 1,2   12> 1  0> you&

Re: [Tutor] Another newbie question from Nathan.

2005-07-10 Thread Adam Bark
If I understand your problem correctly all you need to do is use the name of the function to call it ie: def func():     print "hello world" func() would give the output "hello world"On 7/10/05, Nathan Pinno <[EMAIL PROTECTED]> wrote:   Hi all,  How do I make Python get a def? Is it the "get" f

[Tutor] Catching OLE error

2005-07-14 Thread Adam Bark
Can you send me the output for an OLE error? The correct syntax should be included in the error message like this: Traceback (most recent call last):   File "", line 1, in ? TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' TypeError would be the exception so you would have: try

Re: [Tutor] Catching OLE error

2005-07-14 Thread Adam Bark
I just noticed you put OLEError before the colon you should have except:     OLEError     print "ole" if that doesn't work you could just get rid of the OLEError bit and all errors will be ignored.On 7/14/05, Bernard Lebel < [EMAIL PROTECTED]> wrote:Very well.#INFO : < NewRenderShot > importAnimat

Re: [Tutor] use gzip with large files

2005-07-19 Thread Adam Bark
If you use something like this: for line in file.readlines(): then line is a string to the next newline and it automatically detects the EOF and the same with file.readline() but that will give you one character at a time.On 7/19/05, frank h. <[EMAIL PROTECTED]> wrote: hello allI am trying to wri

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread Adam Bark
How to become a hackerOn 7/17/05, Suranga Sarukkali < [EMAIL PROTECTED]> wrote: Python's Great fro Hacking Right? Please tell me more like when you tell it to a College Student (That tell's What I'm) and since I Sort of new to Programming in Python it's going be easy if done so. Please rep

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Adam Bark
Hey luke what kind of game is it? Can I have a look when at your source as well? Cheers. AdamOn 7/27/05, luke <[EMAIL PROTECTED]> wrote: > Thanks. Will ask if I have any more questions. Maybe I won't have to go to> Visual Basic to write my games. Maybe Python will do the trick.Oh my god.Don't ever

Re: [Tutor] Socket Programming

2005-08-01 Thread Adam Bark
You have to put in how many bytes of data you want to recieve in clientsocket.recv() eg. clientsocket.recv(1024) for 1kB.On 7/31/05, Joseph Quigley < [EMAIL PROTECTED]> wrote:Hi Dan, Danny Yoo wrote:>##>clientsocket.recv()>##>>should work better.>>Ok well I tried your examples but they didn

Re: [Tutor] Socket Programming

2005-08-01 Thread Adam Bark
Hi Joe you can use 1 and just send 'Hi!' as long as something else isn't likely to be sent at the same time. It will just read what is in that socket when you call it so if something else that you don't want is there just behind what you're after then you could end up with that as well.On 8/1/0

Re: [Tutor] I've run into a jam on the exercise on file I/O

2005-08-01 Thread Adam Bark
>>> max_points = [25,25,50,25,100] >>> assignments = ['hw ch 1','hw ch 2','quiz   ','hw ch 3','test'] >>> students = {'#Max':max_points} >>> students {'#Max': [25, 25, 50, 25, 100]} The problem is the key in students is a list not an integer.On 8/1/05, Nathan Pinno <[EMAIL PROTECTED] > wrote:

Re: [Tutor] I've run into a jam on the exercise on file I/O

2005-08-01 Thread Adam Bark
dents.keys():     out_file.write(x+","+max_points[x]+"\n")    out_file.closeOn 8/1/05, Adam Bark <[EMAIL PROTECTED]> wrote: >>> max_points = [25,25,50,25,100] >>> assignments = ['hw ch 1','hw ch 2','quiz   ','hw ch 3','test&#x

Re: [Tutor] Deleting an entry from a dictionary

2005-08-02 Thread Adam Bark
meals.pop(key) will do it. Example: >>> meals = {} >>> meals['breakfast'] = 'slimfast' >>> meals['lunch'] = 'slimfast' >>> meals['dinner'] = 'something sensible' >>> meals {'lunch': 'slimfast', 'breakfast': 'slimfast', 'dinner': 'something sensible'} >>> meals.pop("breakfast") 'slimfast' >>> meals

Re: [Tutor] Deleting an entry from a dictionary

2005-08-03 Thread Adam Bark
+jsmith=[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Adam BarkSent: Tuesday, August 02, 2005 5:17 PMTo: Greg LindstromCc: tutor@python.orgSubject: Re: [Tutor] Deleting an entry from a dictionary meals.pop(key) will do it.Example:>>> meals = {}>>> meals[&#

[Tutor] python instances and type

2007-04-16 Thread Adam Pridgen
() [, ] print get_class_resolution(bar) instance I am not sure what the difference between the instance vs. a class, but I never thought the type of the object was allowed to change. Any help would be appreciated. Thanks, Adam def get_class_resolution(obj): ''' get th

[Tutor] How to program to python the right way?

2007-04-18 Thread Adam Pridgen
tantiating them the "correct" way, and there are some things I have not tried, but I would like to like contained execution and thread management. Are there any books (with examples) out there that show some of these techniques and explain the gotchas that come with the package. Than

Re: [Tutor] Seeking python projects

2007-04-18 Thread Adam Gomaa
Writing your own programs is a good idea. However, this is primarily a good idea with small programs. For example, when learning Python, I wrote a set of backup scripts for my computer; I still use them and they've served me well. If you want to write 'complete applications,' you're probably bette

Re: [Tutor] How to program to python the right way?

2007-04-21 Thread Adam Pridgen
process works when a class is instantiated. class Foo: string = "" int = 0 On 4/21/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > Adam Pridgen wrote: > > Hello everyone, > > > > I have pretty much finished hacking on my Thesis and I have come to &g

Re: [Tutor] How to program to python the right way?

2007-04-21 Thread Adam Pridgen
Disregard this email, gmail mis-fired. On 4/21/07, Adam Pridgen <[EMAIL PROTECTED]> wrote: > I guess the problem I am trying to quell really revolves around style > and the proper way to do application programming with Python. So one > of the things I found out the hard way a

[Tutor] Declaring a Python/C Package and Accessing Python Constants from C API

2007-05-11 Thread Adam Pridgen
, Adam ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Declaring a Python/C Package and Accessing Python Constants from C API

2007-05-11 Thread Adam Pridgen
I perform: python setup.py install and it compiles and installs without error, but when I try the following: import python_foo from python_foo import foo_interface It says it can not find the module. Thanks for any help in advance, Adam On 5/11/07, Adam Pridgen <[EMAIL PROTECTED]> wrote:

[Tutor] (no subject)

2007-05-11 Thread adam urbas
Hi,I just started python today and I would like a few pointers, if you don't mind. I tried using a tutorial, but was only able to get the correct results for the most basic problems. # Area calculation programprint “Welcome to the Area calculation program”print “–”print# Print out

[Tutor] ctypes typedef

2007-05-14 Thread Adam Pridgen
of performing this task? Thanks in advance, Adam ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] trouble with "if"

2007-05-23 Thread adam urbas
Hi all,I've been working with this new program that I wrote. I started out with it on a Ti-83, which is much easier to program than python. Now I'm trying to transfer the program to python but its proving to be quite difficult. I'm not sure what the whole indentation thing is for. And now I'

Re: [Tutor] two input acceptions

2007-05-23 Thread adam urbas
L")to var=raw_input("LOL")then it displays>>>LOL>>>Not sure what that means, but yeah. Well thanks anyway.Adam> Date: Sat, 19 May 2007 01:47:51 +0100> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]; tutor@python.org> Subject: Re: [Tutor] two input accep

Re: [Tutor] two input acceptions

2007-05-23 Thread adam urbas
it, to avoid problems like this.I put both the .py and .txt files on there, so which ever you prefer.Thanks,Adam> To: tutor@python.org> From: [EMAIL PROTECTED]> Date: Sat, 19 May 2007 08:28:19 +0100> Subject: Re: [Tutor] two input acceptions> > > "Rolando Pereira&

Re: [Tutor] trouble with "if"

2007-05-23 Thread adam urbas
ext "1" is not equal to the> number 1, so this evaluates to False.> > Instead you should do:> > if shape == "1":> > To also be able to type 'circle' instead of '1', you can do:> > if shape == "1" or shape == "circle&quo

Re: [Tutor] trouble with "if"

2007-05-23 Thread adam urbas
;t want me to multiply by pi. PLEASE HELP!!!thanks in advance,Adam> Date: Wed, 23 May 2007 18:08:20 +0200> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> Subject: Re: [Tutor] trouble with "if"> CC: tutor@python.org> > The problem is with types. The outcome of

Re: [Tutor] trouble with "if"

2007-05-23 Thread adam urbas
re the rest out. Well I have to go do other things so I'll save the rest of this figuring out till later.I shall return,Adam> Date: Wed, 23 May 2007 12:12:16 -0400> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: tutor@python.org> Subject: Re: [Tutor] trouble with &qu

[Tutor] error message questions

2007-05-27 Thread adam urbas
y sequence by non-int of type 'str'I really would like to know how to fix this.I get a similar message with my other one, radiacir.py:can't multiply sequence by non-int of type 'float'Please help!Thanks in advance,Adam __

Re: [Tutor] trouble with "if"

2007-05-27 Thread adam urbas
Thank you for the help Brian. I would like to ask you about these things. Which one of the examples you gave would be most fool proof.> Date: Wed, 23 May 2007 13:40:09 -0400> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: tutor@python.org> Subject: Re: [Tutor] trouble wi

Re: [Tutor] trouble with indents

2007-05-27 Thread adam urbas
Thanks for the clarification, but I'm still a tad confused. I'm not sure when to indent. I understand that it has to be done. That link was really confusing. Very newb non-friendly. Arrg... That site is doom. So confusing. I need somewhere to start from the beginning. This site uses all

Re: [Tutor] trouble with "if"

2007-05-27 Thread adam urbas
t int trick, which I seem to have forgotten. And guess what that did it. It's amazing when you apply the things that you learn. Apparently I am quite absent minded. Well It seems I don't need any of this help anymore. Oh well. Thanks anyway.Au > To: tutor@python.org> Fro

Re: [Tutor] trouble with "if"

2007-05-27 Thread adam urbas
I thank you much Alan. This has been very helpful already and I'm only on page 2. The world needs more newb-friendly people like you.> To: tutor@python.org> From: [EMAIL PROTECTED]> Date: Thu, 24 May 2007 23:39:41 +0100> Subject: Re: [Tutor] trouble with "if">

[Tutor] square root

2007-05-27 Thread adam urbas
Hi all,I was just wondering how I would go about performing a square root thing, for my radiacir.py program. _ Change is good. See what’s different about Windows Live Hotmail. www.windowslive-hotmail.com/learnmore/default.html?locale=

[Tutor] gmail

2007-05-29 Thread Adam Urbas
Hey, I have gmail now, but I'm not sure how to turn off HTML. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] trouble with "if"

2007-05-29 Thread adam urbas
Date: Sun, 27 May 2007 15:10:08 -0400> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: tutor@python.org> Subject: Re: [Tutor] trouble with "if"> > adam urbas said unto the world upon 05/27/2007 01:49 PM:> > Thank you for the help Brian. I would like to ask

Re: [Tutor] gmail

2007-05-29 Thread Adam Urbas
> i'd be curious to see what happens if you > use the tag around your (properly) > indented code, e.g. > > > this = 1 > that = 0 > if this == 1 : > that = 1 > print that > > > > > On May 29, 2007, at 9:24 AM, Adam Urbas wrote:

Re: [Tutor] trouble with "if"

2007-05-29 Thread Adam Urbas
ok well, I'm testing to see if the CC thing worked. On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote: > I'll try the CC thing. > > On 5/29/07, Adam Urbas <[EMAIL PROTECTED]> wrote: > > Well, Brian, I am now very sure that we have different versions of >

Re: [Tutor] trouble with "if"

2007-05-29 Thread Adam Urbas
Dang it... I am really going to have to figure out how to reply all. The cc thing only worked once and now I'm still sending to you. On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote: > I started to read Alan Gauld's tutorial. The problem is, once I get > past the very basic

Re: [Tutor] [Fwd: Re: trouble with "if"]

2007-05-30 Thread Adam Urbas
t works too, yay! Thanks, Au On 5/30/07, Andre Engels <[EMAIL PROTECTED]> wrote: 2007/5/30, Brian van den Broek <[EMAIL PROTECTED]>: > Another fwd, folks. > > Brian vdB > > Original Message ---- > Subject: Re: [Tutor] trouble with "if" > Da

Re: [Tutor] [Fwd: Re: trouble with "if"]

2007-05-30 Thread Adam Urbas
ecause def text(): works just fine with everything I've done so far. On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote: I can't exactly show you the error message anymore, because the program is now screwed up in so many ways that I can't even get it to do the things it used to. It

Re: [Tutor] [Fwd: Re: trouble with "if"]

2007-05-30 Thread Adam Urbas
ttach it. This is very exciting. Except, I renamed it and now it doesn't work. This frustrates me. How could something work one second and then not the next. Oh well, I'll still attach it and if you could help me find the problem, that would be nice. Thanks, Au On 5/30/07, Brian va

Re: [Tutor] [Fwd: Re: trouble with "if"]

2007-05-30 Thread Adam Urbas
I think I may have figured it out. I just switched some things around. On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote: I can't seem to get the type with the parameters to work. I can get def answer(): to work, but not def answer(my_first_parameter,my_second_parameter):.

Re: [Tutor] [Fwd: Re: trouble with "if"]

2007-05-30 Thread Adam Urbas
the user could keep using that segment of the program over and over again, without having to restart the program. Is it possible to do that? On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote: I think I may have figured it out. I just switched some things around. On 5/30/07, Adam Urbas &

Re: [Tutor] [Fwd: Re: trouble with "if"]

2007-05-30 Thread Adam Urbas
to be something after the def goodbye(): So If someone wouldn't mind taking a look at it, then I would be very grateful. Thanks, Au On 5/30/07, Adam Urbas <[EMAIL PROTECTED]> wrote: Ok I forgot to put some things on the previous one. I discovered a flaw in my loop. It is not infinite

[Tutor] Calculator research

2007-06-01 Thread Adam Urbas
Sup all, Ok, this is my research for a better calculator. I want to make a calculator that is much less lame than the one that comes standard with windows. If anyone has any ideas for how to start or some things I should know, then feel free to inform me. The truth is, I don't exactly know wher

Re: [Tutor] [Fwd: Re: trouble with "if"]

2007-06-01 Thread Adam Urbas
ould you mind explaining the global variable thing a little more, because I kept getting an error message that was saying something to the effect that the global variable was not defined. Thanks, Au On 5/30/07, Alan Gauld <[EMAIL PROTECTED]> wrote: > Hi Adam > > > flaw in my loop.

Re: [Tutor] Calculator research

2007-06-09 Thread Adam Urbas
, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "Adam Urbas" <[EMAIL PROTECTED]> wrote > > > Ok, this is my research for a better calculator. I want to make a > > calculator that is much less lame than the one that comes standard > > Thats a good beginn

Re: [Tutor] Correct use of range function..

2007-06-10 Thread Adam Urbas
I discovered something about your revers word program here. I used the "for c in word" one. if you type an indented print after print c, then it will print the words vertically. Just thought I'd share that with you. On 6/10/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > David Hamilton wrote: > >

Re: [Tutor] Correct use of range function..

2007-06-11 Thread adam urbas
I see... Very Intriguing.> To: tutor@python.org> From: [EMAIL PROTECTED]> Date: Sun, 10 Jun 2007 18:16:00 +0100> Subject: Re: [Tutor] Correct use of range function..> > > "Adam Urbas" <[EMAIL PROTECTED]> wrote> >I discovered something about your reve

Re: [Tutor] easygui question, again

2007-06-11 Thread Adam Urbas
Where did you get this easygui thing you are trying to install. Is it the thing that says Compiled Python File? If so I have it. I've kinda been following your little chat here about it. I want to see if I could do it. On 6/11/07, Kent Johnson <[EMAIL PROTECTED]> wrote: > Alan Gauld wrote: > >

Re: [Tutor] Losing theexpressiveness ofC'sfor-statement?/RESENDwith example

2007-08-10 Thread Adam Bark
On 10/08/07, Alan Gauld <[EMAIL PROTECTED]> wrote: > > full-fledged lambdas... > > I'm with you there but I've been waiting long enough to have > given up. In fact I think we are more likely to lose lambdas > altogether than see an improved version! Guido said he's keeping lambdas in Python 3000

Re: [Tutor] evaluating AND

2007-09-13 Thread Adam Bark
On 13/09/2007, Terry Carroll <[EMAIL PROTECTED]> wrote: > > On Thu, 13 Sep 2007, Orest Kozyar wrote: > > > Given a variable x that can either be None or a tuple of two floats [i.e > . > > (0.32, 4.2)], which syntax is considered most appropriate under Python > > coding standards? > > > > if x and x

[Tutor] Top Programming Languages of 2013

2007-10-07 Thread Adam Bark
On 07/10/2007, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > > Alan Gauld wrote: > > "Dick Moores" <[EMAIL PROTECTED]> wrote > > > >> > >> > > > > Interesting, but I'm not sure what the criteria for "top" is. > > Is it a measure of power, popularity, usa

[Tutor] Required method to make foo(*Vector(0,0,0)) work.

2007-12-18 Thread Adam Bark
I want to be able to get the values for my vector class but I don't know what method you need to get the * thing to work ie how to make it a sequence i think. Anybody know how to do this? Thanks in advance. ___ Tutor maillist - Tutor@python.org http://m

Re: [Tutor] Required method to make foo(*Vector(0,0,0)) work.

2007-12-18 Thread Adam Bark
On 19/12/2007, John Fouhy <[EMAIL PROTECTED]> wrote: > > On 19/12/2007, Adam Bark <[EMAIL PROTECTED]> wrote: > > I want to be able to get the values for my vector class but I don't know > > what method you need to get the * thing to work ie how to make it a >

Re: [Tutor] Run a cmd program

2005-08-09 Thread Adam Bark
>>> import commands >>> commands.getoutput("uptime AUTO-SRV-001 /s /d:04/01/2005") that should do itOn 8/9/05, Øyvind <[EMAIL PROTECTED]> wrote: Hello.I need to run a program(http://www.microsoft.com/ntserver/nts/downloads/management/uptime/default.asp)thru Python. It is normally run such as "upti

Re: [Tutor] Python hosting again

2005-08-15 Thread Adam Cripps
nning for you to use - not sure if this would interfere with what you are trying to do. Adam -- http://www.monkeez.org PGP key: 0x7111B833 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Confused about embedding python in Html

2005-08-20 Thread Adam Cripps
rver? > > I'm hoping ti use python as an alternative to vbscript and jaava > > > thanks > > > tony If your web server supports python (i.e. has it installed) then you should be able to run scripts server-side. Check

[Tutor] Timer on CGI

2005-09-19 Thread Adam Cripps
spent completing the task? TIA Adam -- http://www.monkeez.org PGP key: 0x7111B833 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Timer on CGI

2005-09-19 Thread Adam Cripps
> they > hit submit and pass the elapsed time as a hidden field for the > CGI > to pick up and display. Alternatively just pass the onLoad time > when submit is called and do the calculations at the CGI, but > then you get network transit and server queuing times added...

[Tutor] cgi.FieldStorage to int

2005-09-21 Thread Adam Cripps
r, I've trawled around trying to get this field into an integer but without any luck. Any pointers appreciated. TIA Adam -- http://www.monkeez.org PGP key: 0x7111B833 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] cgi.FieldStorage to int

2005-09-21 Thread Adam Cripps
On 9/21/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Adam Cripps wrote: > > I'm trying to get a cgi.FieldStorage into an int. > > > > The input is in numeric form, as it is provided by an > > drop-down box. However, when I try > > > > timestabl

Re: [Tutor] cgi.FieldStorage to int

2005-09-21 Thread Adam Cripps
On 9/21/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Adam Cripps wrote: > > On 9/21/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > > > >>Adam Cripps wrote: > >> > >>>I'm trying to get a cgi.FieldStorage into an int. > >>>

Re: [Tutor] Python equiv to PHP "include" ?

2005-09-29 Thread Adam Cripps
processing that's ALSO wrapped in my site template. > > I can't figure out how one would approach this in Python (i'm using > mod_python). There's no equivalent to the "include" function from PHP. I > can't use import because then Python would try to parse

<    1   2   3   4   >