Re: Newbie question about Python syntax

2019-08-26 Thread Paul St George
On 25/08/2019 02:39, Cameron Simpson wrote: On 24Aug2019 21:52, Paul St George wrote: [snip]> Aside from "map" being a poor name (it is also a builtin Python function), it seems that one creates one of these to control how some rendering process is done. The class reference page you

Re: Newbie question about Python syntax

2019-08-24 Thread Cameron Simpson
On 24Aug2019 21:52, Paul St George wrote: Have you not got one of these handed to you from something? Or are you right at the outside with some "opaque" blender handle or something? (Disclaimer: I've never used Blender.) Thank you once again. If I understand your question, I am right

Re: Newbie question about Python syntax

2019-08-24 Thread Barry
Have you tried asking on a blender user mailing list for help with this problem? It seems that someone familiar with blender and its python interface should be able to help get you going. Barry > On 24 Aug 2019, at 20:52, Paul St George wrote: > >> On 24/08/2019 01:23, Cameron Simpson wrote:

Re: Newbie question about Python syntax

2019-08-24 Thread Paul St George
On 24/08/2019 01:23, Cameron Simpson wrote: On 23Aug2019 13:49, Paul St George wrote: Context: I am using Python to interrogate the value of some thing in Blender (just as someone else might want to use Python to look at an email in a Mail program or an image in Photoshop). Assumptions:

Re: Newbie question about Python syntax

2019-08-23 Thread Cameron Simpson
On 23Aug2019 13:49, Paul St George wrote: Context: I am using Python to interrogate the value of some thing in Blender (just as someone else might want to use Python to look at an email in a Mail program or an image in Photoshop). Assumptions: So, I want to look at the attribute of an

Re: Newbie question about Python syntax

2019-08-23 Thread Paul St George
On 22/08/2019 23:21, Kyle Stanley wrote: [snip] The tutorial that Terry was referring to was the one on docs.python.org, here's a couple of links for the sections he was referring to: Full section on classes: https://docs.python.org/3/tutorial/classes.html Section on instantiating objects

Re: Newbie question about Python syntax

2019-08-22 Thread Kyle Stanley
> You are right, but it is even worse than you think. I do not have a tutorial so I have no examples to understand. The tutorial that Terry was referring to was the one on docs.python.org, here's a couple of links for the sections he was referring to: Full section on classes:

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 20:02, Terry Reedy wrote: On 8/22/2019 3:34 AM, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as:

Re: Newbie question about Python syntax

2019-08-22 Thread Terry Reedy
On 8/22/2019 3:34 AM, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy ...

Re: Newbie question about Python syntax

2019-08-22 Thread Chris Angelico
On Thu, Aug 22, 2019 at 9:20 PM Paul St George wrote: > > On 22/08/2019 11:49, Cameron Simpson wrote: > > On 22Aug2019 09:34, Paul St George wrote: > >> I have the Python API for the Map Value Node here: > >> . > >> > >>

Re: Newbie question about Python syntax

2019-08-22 Thread Paul St George
On 22/08/2019 11:49, Cameron Simpson wrote: On 22Aug2019 09:34, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as:

Re: Newbie question about Python syntax

2019-08-22 Thread Cameron Simpson
On 22Aug2019 09:34, Paul St George wrote: I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy

Newbie question about Python syntax

2019-08-22 Thread Paul St George
I have the Python API for the Map Value Node here: . All well and good. Now I just want to write a simple line of code such as: import bpy ... >>>print(bpy.types.CompositorNodeMapValue.max[0]) If this works, I will

Re: hello this ali .. i want some question about python

2019-04-05 Thread Igor Korot
Hi, On Fri, Apr 5, 2019 at 9:02 PM Sayth Renshaw wrote: > > On Saturday, 6 April 2019 08:21:51 UTC+11, maak khan wrote: > > i need your help guys .. plz Are you trying to create a teaching software? Thank you. > > With? > -- > https://mail.python.org/mailman/listinfo/python-list --

hello this ali .. i want some question about python

2019-04-05 Thread maak khan
i need your help guys .. plz -- https://mail.python.org/mailman/listinfo/python-list

Re: hello this ali .. i want some question about python

2019-04-05 Thread Sayth Renshaw
On Saturday, 6 April 2019 08:21:51 UTC+11, maak khan wrote: > i need your help guys .. plz With? -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about python package numpy

2015-03-02 Thread Robert Kern
On 2015-03-01 20:32, fl wrote: Hi, It is difficult to install numpy package for my PC Windows 7, 64-bit OS. In the end, I install Enthought Canopy, which is recommended on line because it does install numpy automatically. Now, I can test it with import numpy it succeeds. On

Re: Question about python package numpy

2015-03-01 Thread Andrea D'Amore
On 2015-03-01 20:32:34 +, fl said: import numpy it succeeds. On http://wiki.scipy.org/Cookbook, it shows some interesting code example snippet, such as Cookbook / ParticleFilter, Markov chain etc. I don't know how I can access these code examples, because I don't know where Enthought

Re: Question about python package numpy

2015-03-01 Thread fl
On Sunday, March 1, 2015 at 1:25:59 PM UTC-8, Andrea D'Amore wrote: On 2015-03-01 20:32:34 +, fl said: import numpy it succeeds. On http://wiki.scipy.org/Cookbook, it shows some interesting code example snippet, such as Cookbook / ParticleFilter, Markov chain etc. I don't know how

Question about python package numpy

2015-03-01 Thread fl
Hi, It is difficult to install numpy package for my PC Windows 7, 64-bit OS. In the end, I install Enthought Canopy, which is recommended on line because it does install numpy automatically. Now, I can test it with import numpy it succeeds. On http://wiki.scipy.org/Cookbook, it shows some

A Question about Python

2014-05-06 Thread doaa eman
hello; I'm a researcher from Cairo University (Information science Dep.) i want to know how can i use Paython language on CiteULike i need to use it for extracting only tagged articles in the field of medicine for example for my Ph.D research. another question please : can this webpage help me

Re: A Question about Python

2014-05-06 Thread Rustom Mody
On Tuesday, May 6, 2014 5:39:25 PM UTC+5:30, doaa eman wrote: hello; I'm a researcher from Cairo University (Information science Dep.) i want to know how can i use Paython language on CiteULike i need to use it for extracting only tagged articles in the field of medicine for example for

Re: A Question about Python

2014-05-06 Thread Denis McMahon
On Tue, 06 May 2014 05:09:25 -0700, doaa eman wrote: I'm a researcher .. Obviously part of your PhD research is going to be whether the citeulike_api 0.1.3dev python package can help you extract the information you want from http://citeulike.org/ We look forwards to seeing your

Question about python 3.2 distutils

2012-03-17 Thread Collin Day
Hi all, I have a question about python 3.2 distutils on a Gentoo amd64 system. When I open an ipython session and import distutils.unixcompiler and then check the shared library extension with UnixCCompiler.shared)lib_extension, it returns '.so', as I would expect. When I run a setup.py

Re: A question about Python Classes

2011-04-23 Thread chad
On Apr 22, 12:47 pm, Carl Banks pavlovevide...@gmail.com wrote: On Thursday, April 21, 2011 11:00:08 AM UTC-7, MRAB wrote: On 21/04/2011 18:12, Pascal J. Bourguignon wrote: chadcda...@gmail.com  writes: Let's say I have the following class BaseHandler:      def foo(self):  

Re: A question about Python Classes

2011-04-23 Thread Steven D'Aprano
On Sat, 23 Apr 2011 13:30:02 -0700, chad wrote: On Apr 22, 12:47 pm, Carl Banks pavlovevide...@gmail.com wrote: On Thursday, April 21, 2011 11:00:08 AM UTC-7, MRAB wrote: On 21/04/2011 18:12, Pascal J. Bourguignon wrote: chadcda...@gmail.com  writes: Let's say I have the following

Re: A question about Python Classes

2011-04-22 Thread Jean-Michel Pichavant
MRAB wrote: On 21/04/2011 18:12, Pascal J. Bourguignon wrote: chadcdal...@gmail.com writes: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo()

Re: A question about Python Classes

2011-04-22 Thread Kyle T. Jones
Ethan Furman wrote: chad wrote: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo() How can HomeHandler call foo() when I never created an instance

Re: A question about Python Classes

2011-04-22 Thread Ethan Furman
Kyle T. Jones wrote: Ethan Furman wrote: chad wrote: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo() How can HomeHandler call foo() when I

Re: A question about Python Classes

2011-04-22 Thread Ian Kelly
On Fri, Apr 22, 2011 at 7:49 AM, Kyle T. Jones onexpadrem...@evomeryahoodotyouknow.com wrote: You don't need to create an instance of BaseHandler.  You have the class, Python knows you have the class -- Python will look there if the subclasses lack an attribute. ~Ethan~ Really?  That's not

Re: A question about Python Classes

2011-04-22 Thread Carl Banks
On Thursday, April 21, 2011 11:00:08 AM UTC-7, MRAB wrote: On 21/04/2011 18:12, Pascal J. Bourguignon wrote: chadcda...@gmail.com writes: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass

A question about Python Classes

2011-04-21 Thread chad
Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo() How can HomeHandler call foo() when I never created an instance of BaseHandler? Chad --

Re: A question about Python Classes

2011-04-21 Thread Rafael Durán Castañeda
You did: class BaseHandler: ... def foo(self): ... print Hello ... class HomerHandler(BaseHandler): ... pass ... test = HomerHandler() test.foo() Hello isinstance(test, BaseHandler) True isinstance(test, HomerHandler) True You could say test is a BaseHandler of type

Re: A question about Python Classes

2011-04-21 Thread Jean-Michel Pichavant
chad wrote: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo() How can HomeHandler call foo() when I never created an instance of BaseHandler? Chad

Re: A question about Python Classes

2011-04-21 Thread chad
On Apr 21, 9:30 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: chad wrote: Let's say I have the following class BaseHandler:     def foo(self):         print Hello class HomeHandler(BaseHandler):     pass Then I do the following... test = HomeHandler()

Re: A question about Python Classes

2011-04-21 Thread Benjamin Kaplan
On Apr 21, 2011 12:55 PM, chad cdal...@gmail.com wrote: On Apr 21, 9:30 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: chad wrote: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler):

Re: A question about Python Classes

2011-04-21 Thread Pascal J. Bourguignon
chad cdal...@gmail.com writes: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo() How can HomeHandler call foo() when I never created an

Re: A question about Python Classes

2011-04-21 Thread Terry Reedy
On 4/21/2011 11:43 AM, chad wrote: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo() How can HomeHandler call foo() when I never created an

Re: A question about Python Classes

2011-04-21 Thread MRAB
On 21/04/2011 18:12, Pascal J. Bourguignon wrote: chadcdal...@gmail.com writes: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo() How can

Re: A question about Python Classes

2011-04-21 Thread Ethan Furman
chad wrote: Let's say I have the following class BaseHandler: def foo(self): print Hello class HomeHandler(BaseHandler): pass Then I do the following... test = HomeHandler() test.foo() How can HomeHandler call foo() when I never created an instance of BaseHandler? You

Re: A question about Python Classes

2011-04-21 Thread Steven D'Aprano
On Thu, 21 Apr 2011 19:00:08 +0100, MRAB wrote: How can HomeHandler call foo() when I never created an instance of BaseHandler? But you created one! No, he didn't, he created an instance of HomeHandler. test is an instance of HomeHandler, which is a subclass of BaseHandler, so test is

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-27 Thread TuckerTherese
Some specialists tell that a href=http://bestfinance-blog.com;loan/a help people to live their own way, because they are able to feel free to buy necessary things. Moreover, various banks offer small business loan for young and old people. --

Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread George Burdell
My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on internally in Python? Does Python retain the whole

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Robert Kern
On 11/12/10 4:03 PM, George Burdell wrote: My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Steve Holden
On 11/12/2010 2:03 PM, George Burdell wrote: My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Emile van Sebille
On 11/12/2010 2:03 PM George Burdell said... My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on

Newbie question about Python + CouchDB

2010-09-13 Thread C3
Total newbie here - have a quick question I have a script that takes data in a flat text file, breaks it up and builds a CouchDB with all my data - however during the loop in which the data is loaded into couchdb - I sometimes get crashes becuase of a duplicate Document ID (which in my case is

Re: Newbie question about Python + CouchDB

2010-09-13 Thread James Mills
On Tue, Sep 14, 2010 at 8:59 AM, C3 modulu...@yahoo.com wrote: i was wondering if it is possible to; 1. capture the HTTP status code for each post 2. write logic around that code (such as skip post if error code was a 409) An appropriate exception should by thrown when it crashes. Use an

Question about Python upgrade on linux

2010-07-15 Thread guandalino
Hi, suppose I have python 2.6.4 installed from source and I want to upgrade to 2.6.5. Python standard library is automatically upgraded at 2.6.5 as well, while 3rd party pure Python and extension modules in site-packages don't. Is it safe to keep the old site-packages or is it suggested to

Re: Question about Python upgrade on linux

2010-07-15 Thread Jeff McNeil
On Jul 15, 11:54 am, guandalino guandal...@gmail.com wrote: Hi, suppose I have python 2.6.4 installed from source and I want to upgrade to 2.6.5. Python standard library is automatically upgraded at 2.6.5 as well, while 3rd party pure Python and extension modules in site-packages don't. Is it

Re: A question about Python versions

2010-01-13 Thread Gib Bogle
Sridhar Ratnakumar wrote: On 1/12/2010 10:09 PM, Gib Bogle wrote: I am learning Python, and using PyQt to develop a GUI that will be used to run a Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw). Without thinking about it I downloaded and started working with a

Re: A question about Python versions

2010-01-13 Thread Gib Bogle
Terry Reedy wrote: On 1/13/2010 1:09 AM, Gib Bogle wrote: I am learning Python, and using PyQt to develop a GUI that will be used to run a Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw). Without thinking about it I downloaded and started working with a fairly

A question about Python versions

2010-01-12 Thread Gib Bogle
I am learning Python, and using PyQt to develop a GUI that will be used to run a Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw). Without thinking about it I downloaded and started working with a fairly recent Python version, 2.5.4. I've now become aware of the

Re: A question about Python versions

2010-01-12 Thread Chris Rebert
On Tue, Jan 12, 2010 at 10:09 PM, Gib Bogle g.bo...@auckland.no.spam.ac.nz wrote: I am learning Python, and using PyQt to develop a GUI that will be used to run a Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw). Without thinking about it I downloaded and started

Re: A question about Python versions

2010-01-12 Thread Sridhar Ratnakumar
On 1/12/2010 10:09 PM, Gib Bogle wrote: I am learning Python, and using PyQt to develop a GUI that will be used to run a Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw). Without thinking about it I downloaded and started working with a fairly recent Python version,

Re: A question about Python versions

2010-01-12 Thread Terry Reedy
On 1/13/2010 1:09 AM, Gib Bogle wrote: I am learning Python, and using PyQt to develop a GUI that will be used to run a Fortran program on Windows, Linux and Mac OS X (I think Python is great, btw). Without thinking about it I downloaded and started working with a fairly recent Python version,

a question about python

2009-11-26 Thread 李白,字一日
hi, i have a question on python programming. let file a.py has a class named a, class a(): __G__ = in file b.py i need to insert an attribute __C__ to class a it would be as if class a defined in file a.py like this: class a(): __G__ = __C__ = 2 how this be done

Re: a question about python

2009-11-26 Thread Steven D'Aprano
On Thu, 26 Nov 2009 01:21:39 -0800, 李白,字一日 wrote: hi, i have a question on python programming. let file a.py has a class named a, class a(): __G__ = Methods with double leading and trailing underscores are reserved for Python's special use. You should find a different naming

Re: a question about python

2009-11-26 Thread 李白,字一日
thanks. On Nov 26, 5:45 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 26 Nov 2009 01:21:39 -0800, 李白,字一日 wrote: hi, i have a question on python programming. let file a.py has a class named a,   class a():     __G__ = Methods with double leading and

Re: Beginning Question about Python functions, parameters...

2009-11-25 Thread Bruno Desthuilliers
astral orange a écrit : On Nov 23, 10:37 pm, r rt8...@gmail.com wrote: (snip) This is a horrible example to show noobs. I think the OP could better understand this as a class EVEN though the OP may or may not know what a class *is* yet. class Name(): def __init__(self, first,

Re: Beginning Question about Python functions, parameters...

2009-11-25 Thread Lie Ryan
astral orange wrote: As for the class Name(): example above? Even though I haven't seen exactly what purpose 'self' serves In many other programming language, self (or this, or Me) refers the the current class instance. In some languages, you can refer to an instance attribute without an

Re: Beginning Question about Python functions, parameters...

2009-11-24 Thread Peter Otten
Terry Reedy wrote: astral orange wrote: As far as the program. I did add print statements such as print (MyNames) and got back: {'middle': {}, 'last': {'Smith': ['John Larry Smith']}, 'first': {}} Hmmm, as I understood the code, either that should be ... 'last': {} ... before the

Re: Beginning Question about Python functions, parameters...

2009-11-24 Thread astral orange
On Nov 23, 10:37 pm, r rt8...@gmail.com wrote: On Nov 23, 11:19 am, astral orange 457r0...@gmail.com wrote: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and

Re: Beginning Question about Python functions, parameters...

2009-11-24 Thread Terry Reedy
Peter Otten wrote: Terry Reedy wrote: remember exactly what was stored. Maybe a typo. That's a bug in the store() function # as posted def store(data, full_name): names = full_name.split() if len(names) == 2: names.insert(1, '') labels = 'first', 'middle', 'last' for label,

Re: Beginning Question about Python functions, parameters...

2009-11-24 Thread r
On Nov 24, 9:45 am, astral orange 457r0...@gmail.com wrote: As for the class Name(): example above? Even though I haven't seen exactly what purpose 'self' serves yet I can follow and understand what is going on very easily, that helps out tremendously. Very clearly written...Thank you! Yes

Beginning Question about Python functions, parameters...

2009-11-23 Thread astral orange
Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain parts are very clear but once it enters the def store(data, full_name): function

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Neo
astral orange schrieb: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain parts are very clear but once it enters the def store(data,

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Diez B. Roggisch
astral orange wrote: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain parts are very clear but once it enters the def store(data,

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread j
On Nov 23, 12:37 pm, Neo n...@picture-art.eu wrote: astral orange schrieb: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread david wright
- Original Message From: j jimmy.case...@gmail.com To: python-list@python.org Sent: Mon, November 23, 2009 10:26:42 AM Subject: Re: Beginning Question about Python functions, parameters... On Nov 23, 12:37 pm, Neo n...@picture-art.eu wrote: astral orange schrieb: Hi, I am trying

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread MRAB
j wrote: On Nov 23, 12:37 pm, Neo n...@picture-art.eu wrote: astral orange schrieb: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing.

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread astral orange
On Nov 23, 1:17 pm, Diez B. Roggisch de...@nospam.web.de wrote: astral orange wrote: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing.

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Stephen Hansen
On Mon, Nov 23, 2009 at 10:26 AM, j jimmy.case...@gmail.com wrote: What I am not totally sure about is when the store function callsthe lookup function and does return data[label].get(name), that line trips me up somethen the lookup function returns that back to the store function,

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Stephen Hansen
On Mon, Nov 23, 2009 at 11:14 AM, astral orange 457r0...@gmail.com wrote: But back to the example, on line 104 I see there's a call to the lookup function, passing 3 parameters ('data', which I think is a nested dictionary, label (first, middle, last) and name). But I am getting lost on

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Terry Reedy
astral orange wrote: Yes, lines 104-111 is really where my problem lies in understanding what is going on here. I am beginner so this stuff seems a little unwieldy at the moment. :) I *did* invest $40 Water under the bridge. Focus on the future... into this book so it' what I have to work

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread astral orange
On Nov 23, 4:35 pm, Terry Reedy tjre...@udel.edu wrote: astral orange wrote: Yes, lines 104-111 is really where my problem lies in understanding what is going on here. I am beginner so this stuff seems a little unwieldy at the moment. :) I *did* invest $40 Water under the bridge. Focus

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread Terry Reedy
astral orange wrote: As far as the program. I did add print statements such as print (MyNames) and got back: {'middle': {}, 'last': {'Smith': ['John Larry Smith']}, 'first': {}} Hmmm, as I understood the code, either that should be ... 'last': {} ... before the first store(), as you seem to

Re: Beginning Question about Python functions, parameters...

2009-11-23 Thread r
On Nov 23, 11:19 am, astral orange 457r0...@gmail.com wrote: Hi, I am trying to teach myself Python and have a good book to help me but I am stuck on something and I would like for someone to explain the following piece of code for me and what it's actually doing. Certain parts are very clear

Re: Simple question about Python lists

2008-11-17 Thread Eric
On Nov 11, 7:31 pm, Ben Finney [EMAIL PROTECTED] wrote: Steven D'Aprano [EMAIL PROTECTED] writes: On Wed, 12 Nov 2008 10:08:45 +1100, Ben Finney wrote: Eric[EMAIL PROTECTED] writes: In MATLAB, if  I just want the first, fifth  and eighth element I might do something like this: b =

Re: Simple question about Python lists

2008-11-12 Thread Scott David Daniels
Eric wrote: ... In MATLAB, if I just want the first, fifth and eighth element I might do something like this: b = a([1 5 8]); On Nov 11, 1:51 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] replied: b = [a[i] for i in [1, 5, 8]] To which Eric said: Thanks! It makes sense, but in this case

Simple question about Python lists

2008-11-11 Thread Eric
I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them out. In MATLAB, if I just want the first, fifth and eighth element I might do something like this: b = a([1 5 8]); I can't seem to

Re: Simple question about Python lists

2008-11-11 Thread Marc 'BlackJack' Rintsch
On Tue, 11 Nov 2008 11:47:53 -0800, Eric wrote: I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them out. In MATLAB, if I just want the first, fifth and eighth element I might do

Re: Simple question about Python lists

2008-11-11 Thread Guilherme Polo
On Tue, Nov 11, 2008 at 5:47 PM, Eric [EMAIL PROTECTED] wrote: I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them out. In MATLAB, if I just want the first, fifth and eighth element

Re: Simple question about Python lists

2008-11-11 Thread Robert Kern
Guilherme Polo wrote: On Tue, Nov 11, 2008 at 5:47 PM, Eric [EMAIL PROTECTED] wrote: I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them out. In MATLAB, if I just want the first,

Re: Simple question about Python lists

2008-11-11 Thread Eric
On Nov 11, 1:51 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Tue, 11 Nov 2008 11:47:53 -0800, Eric wrote: I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them out. In

Re: Simple question about Python lists

2008-11-11 Thread Robert Kern
Eric wrote: On Nov 11, 1:51 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: On Tue, 11 Nov 2008 11:47:53 -0800, Eric wrote: I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them

Re: Simple question about Python lists

2008-11-11 Thread Ben Finney
Eric [EMAIL PROTECTED] writes: I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them out. In MATLAB, if I just want the first, fifth and eighth element I might do something like

Re: Simple question about Python lists

2008-11-11 Thread Steven D'Aprano
On Wed, 12 Nov 2008 10:08:45 +1100, Ben Finney wrote: Eric [EMAIL PROTECTED] writes: I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them out. In MATLAB, if I just want the first,

Re: Simple question about Python lists

2008-11-11 Thread Robert Kern
Steven D'Aprano wrote: On Wed, 12 Nov 2008 10:08:45 +1100, Ben Finney wrote: Eric [EMAIL PROTECTED] writes: I'm learning Python (while coming from MATLAB). One question I have is that if I have a list with say 8 elements, and I want just a few of them how do I select them out. In MATLAB, if

Re: Simple question about Python lists

2008-11-11 Thread Ben Finney
Steven D'Aprano [EMAIL PROTECTED] writes: On Wed, 12 Nov 2008 10:08:45 +1100, Ben Finney wrote: Eric [EMAIL PROTECTED] writes: In MATLAB, if I just want the first, fifth and eighth element I might do something like this: b = a([1 5 8]); Yes: the above code uses magic numbers

question about python

2008-09-13 Thread fishfin
I was working through a tutorial about how to write a server using python (the url is bellow). I am sure that the server is working to some degree because when the server is running localhost:8080 just keeps trying to load until it times out. I would like to know how to send information through

Re: question about python

2008-09-13 Thread Diez B. Roggisch
fishfin schrieb: I was working through a tutorial about how to write a server using python (the url is bellow). I am sure that the server is working to some degree because when the server is running localhost:8080 just keeps trying to load until it times out. I would like to know how to send

Re: question about python

2008-09-13 Thread Carl Banks
On Sep 13, 12:15 am, fishfin [EMAIL PROTECTED] wrote: I was working through a tutorial about how to write a server using python (the url is bellow). I am sure that the server is working to some degree because when the server is running localhost:8080 just keeps trying to load until it times

Re: question about python

2008-09-13 Thread fishfin
@ Carl: Yes, I think your right now that I look at it (or at least all except for the last two lines need to be indented). I'm still not sure how to send the stuff to the web browser though. Thanks for pointing it out! @ Diez: I'll start googling those right away. Carl Banks wrote: On Sep 13,

Re: question about python

2008-09-13 Thread Carl Banks
On Sep 13, 1:00 am, fishfin [EMAIL PROTECTED] wrote: @ Carl: Yes, I think your right now that I look at it (or at least all except for the last two lines need to be indented). I'm still not sure how to send the stuff to the web browser though. Thanks for pointing it out! Try reading in the

Re: question about python

2008-09-13 Thread Tino Wildenhain
fishfin wrote: @ Carl: Yes, I think your right now that I look at it (or at least all except for the last two lines need to be indented). I'm still not sure how to send the stuff to the web browser though. what do you think is the cfile.write() doing? As a hint, beside having a look at

Re: question about python

2008-09-13 Thread fishfin
On Sep 13, 4:25 pm, Carl Banks [EMAIL PROTECTED] wrote: On Sep 13, 1:00 am, fishfin [EMAIL PROTECTED] wrote: @ Carl: Yes, I think your right now that I look at it (or at least all except for the last two lines need to be indented). I'm still not sure how to send the stuff to the web

Re: Basic Question about Python WebServer File handling

2008-07-11 Thread Gabriel Genellina
En Thu, 10 Jul 2008 22:20:21 -0300, Alok Kumar [EMAIL PROTECTED] escribi�: I need to have a python webserver which can handle Get request from the clients and upload the *files* from 4 different directories. Can someone please point me what to exactly look for. Look at SimpleHTTPServer.py

Basic Question about Python WebServer File handling

2008-07-10 Thread Alok Kumar
Hi, I need to have a python webserver which can handle Get request from the clients and upload the *files* from 4 different directories. Can someone please point me what to exactly look for. Thanks you very much for this great help. Regards Alok Kumar --

RE: question about python statements

2008-05-13 Thread Ohad Frand
','finally','for','from','global', 'if','import','pass','print','raise','return','try','while','yield'] Thanks, Ohad Frand -Original Message- From: Gary Herron [mailto:[EMAIL PROTECTED] Sent: Monday, May 12, 2008 10:41 PM To: Ohad Frand Cc: python-list@python.org Subject: Re: question about

  1   2   3   >