Re: Beginner Question

2009-01-19 Thread Benjamin Kaplan
On Mon, Jan 19, 2009 at 2:39 PM, K-Dawg wrote: > Please forgive my beginner question. I have used python a little bit, > mainly as a scripting language to perform specific administrative tasks. I > have trying to learn to use it to develop applications but there are a few > things I do not unde

Re: Beginner Question

2009-01-19 Thread Terry Reedy
K-Dawg wrote: I do no understand the underscore methods. Names of the form __xyx__ are defined by the language definition and recognized and used by the interpreter. See PythonLanguage / LexicalAnalysis / Identifiers / Reserved Most refer to methods, a few to other attributes. Modules may

Re: Beginner question!

2007-12-21 Thread kyosohma
On Dec 21, 9:11 am, SMALLp <[EMAIL PROTECTED]> wrote: > Hy! I have error something like this > > TypeError: unbound method insert() must be called with insertData > instance as first argument (got str instance instead) > > CODE: > > File1.py > sql.insertData.insert("files", data) > > sql.py > > cla

Re: Beginner question!

2007-12-21 Thread SMALLp
[EMAIL PROTECTED] wrote: > On Dec 21, 9:11 am, SMALLp <[EMAIL PROTECTED]> wrote: >> Hy! I have error something like this >> >> TypeError: unbound method insert() must be called with insertData >> instance as first argument (got str instance instead) >> >> CODE: >> >> File1.py >> sql.insertData.inse

Re: Beginner question!

2007-12-21 Thread Chris Mellon
On Dec 21, 2007 9:11 AM, SMALLp <[EMAIL PROTECTED]> wrote: > Hy! I have error something like this > > TypeError: unbound method insert() must be called with insertData > instance as first argument (got str instance instead) > > CODE: > > File1.py > sql.insertData.insert("files", data) > > sql.py >

Re: Beginner question!

2007-12-21 Thread kyosohma
> Traceback (most recent call last): >File "/home/pofuk/MzMFIleShare/sharePanel.py", line 130, in share > self.scanDirsAndFiles(dirPath) >File "/home/pofuk/MzMFIleShare/sharePanel.py", line 158, in > scanDirsAndFiles > sql.insertData.insert("files", data) > TypeError: unbound met

Re: Beginner question!

2007-12-21 Thread SMALLp
[EMAIL PROTECTED] wrote: >> Traceback (most recent call last): >>File "/home/pofuk/MzMFIleShare/sharePanel.py", line 130, in share >> self.scanDirsAndFiles(dirPath) >>File "/home/pofuk/MzMFIleShare/sharePanel.py", line 158, in >> scanDirsAndFiles >> sql.insertData.insert("files",

Re: Beginner question!

2007-12-21 Thread Carsten Haese
On Fri, 2007-12-21 at 18:06 +0100, SMALLp wrote: > >> sql ="INSERT INTO "+dataTable+" (user_name, file_name, > >> file_size, > >> file_path_local, file_path_FTP, curent_location, FTP_valid_time, > >> uploaded, last_modified, last_verified, file_type, file_category) VLAUES > >> "+da

Re: Beginner question!

2007-12-21 Thread SMALLp
Carsten Haese wrote: > On Fri, 2007-12-21 at 18:06 +0100, SMALLp wrote: sql ="INSERT INTO "+dataTable+" (user_name, file_name, file_size, file_path_local, file_path_FTP, curent_location, FTP_valid_time, uploaded, last_modified, last_verified, file_type, file_cat

Re: Beginner question!

2007-12-21 Thread kyosohma
On Dec 21, 1:44 pm, SMALLp <[EMAIL PROTECTED]> wrote: > Carsten Haese wrote: > > On Fri, 2007-12-21 at 18:06 +0100, SMALLp wrote: > sql ="INSERT INTO "+dataTable+" (user_name, file_name, > file_size, > file_path_local, file_path_FTP, curent_location, FTP_valid_time,

Re: Beginner question!

2007-12-21 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On Dec 21, 9:11 am, SMALLp <[EMAIL PROTECTED]> wrote: > (snip) >>class insertData: >>def insert(self, dataTable, data): (snip) > > I think you need to post the real traceback or the real code since > your error message doesn't look like it has anything to do

Re: Beginner question!

2007-12-21 Thread Bruno Desthuilliers
SMALLp a écrit : (snip) > One more question. How does my code looks like. I couldn't find any open > source program written in python You must be jocking ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question

2008-05-25 Thread Graham Dumpleton
On May 26, 4:13 am, howa <[EMAIL PROTECTED]> wrote: > Hi, > > Just want to try mod_python but it is more complicated then I > expected... > > I just followed the tutorial > on:http://www.modpython.org/live/mod_python-2.7.8/doc-html/inst-testing > > E.g. > > URL =http://www.example.com/mptest.p

Re: Beginner Question

2016-06-01 Thread boB Stepp
On Wed, Jun 1, 2016 at 7:55 PM, Marcin Rak wrote: > Hi to all > > I have a beginner question to which I have not found an answer I was able to > understand. Could someone explain why the following program: > > def f(a, L=[]): > L.append(a) > return L > > print(f(1)) > print(f(2)) > print

Re: Beginner Question

2016-06-01 Thread Steven D'Aprano
On Thursday 02 June 2016 10:55, Marcin Rak wrote: > Hi to all > > I have a beginner question to which I have not found an answer I was able to > understand. Could someone explain why the following program: > > def f(a, L=[]): > L.append(a) > return L The default value is set once, and

Re: Beginner Question

2016-06-01 Thread Igor Korot
Hi, guys, On Wed, Jun 1, 2016 at 9:42 PM, boB Stepp wrote: > On Wed, Jun 1, 2016 at 7:55 PM, Marcin Rak > wrote: >> Hi to all >> >> I have a beginner question to which I have not found an answer I was able to >> understand. Could someone explain why the following program: >> >> def f(a, L=[])

Re: Beginner Question

2016-06-01 Thread Steven D'Aprano
On Thursday 02 June 2016 14:21, Igor Korot wrote: > Hi, guys, > > On Wed, Jun 1, 2016 at 9:42 PM, boB Stepp wrote: >> On Wed, Jun 1, 2016 at 7:55 PM, Marcin Rak >> wrote: >>> Hi to all >>> >>> I have a beginner question to which I have not found an answer I was able >>> to understand. Could so

Re: Beginner Question

2016-06-02 Thread Marcin Rak
That linked help clear up my confusion...yes you really have to know how things work internally to understand why things happen the way they happen. Thanks again to all -- https://mail.python.org/mailman/listinfo/python-list

Re: Beginner Question

2016-06-02 Thread Igor Korot
Steven, On Thu, Jun 2, 2016 at 1:20 AM, Steven D'Aprano wrote: > On Thursday 02 June 2016 14:21, Igor Korot wrote: > >> Hi, guys, >> >> On Wed, Jun 1, 2016 at 9:42 PM, boB Stepp wrote: >>> On Wed, Jun 1, 2016 at 7:55 PM, Marcin Rak >>> wrote: Hi to all I have a beginner question

Re: Beginner Question

2016-06-02 Thread sohcahtoa82
On Thursday, June 2, 2016 at 6:38:56 AM UTC-7, Igor Korot wrote: > Steven, > > On Thu, Jun 2, 2016 at 1:20 AM, Steven D'Aprano > wrote: > > On Thursday 02 June 2016 14:21, Igor Korot wrote: > > > >> Hi, guys, > >> > >> On Wed, Jun 1, 2016 at 9:42 PM, boB Stepp wrote: > >>> On Wed, Jun 1, 2016 at

RE: Beginner question

2013-06-03 Thread Carlos Nepomuceno
That doesn't even works because input() is the same as eval(raw_input()). So you'll get a NameError exception. I think you know that. Perhaps you mean raw_input() instead of input(). In that case the answer is yes, it can be more 'efficient' because the if-then-else clause always breaks the whil

Re: Beginner question

2013-06-04 Thread Anssi Saari
eschneide...@comcast.net writes: > Is there a more efficient way of doing this? Any help is gratly appreciated. Efficiency in a short program isn't a big thing. You have some pretty weird things in there, there's no need make single element tuples out of your strings and then putting those in a l

Re: Beginner question

2013-06-04 Thread John Ladasky
On Monday, June 3, 2013 11:46:03 PM UTC-7, Carlos Nepomuceno wrote: > That doesn't even works because input() is the same as eval(raw_input()). So > you'll get a NameError exception. > > I think you know that. Perhaps you mean raw_input() instead of input(). But the OP's code shows print() funct

Re: Beginner question

2013-06-04 Thread John Ladasky
On Tuesday, June 4, 2013 12:45:38 AM UTC-7, Anssi Saari wrote: > BTW, did I get the logic correctly, the end result is random? You're right! I'm guessing that's not what the OP wants? -- http://mail.python.org/mailman/listinfo/python-list

RE: Beginner question

2013-06-04 Thread Carlos Nepomuceno
> Date: Tue, 4 Jun 2013 00:53:04 -0700 > Subject: Re: Beginner question > From: john_lada...@sbcglobal.net > To: python-list@python.org > > On Monday, June 3, 2013 11:46:03 PM UTC-7, Carlos Nepomuceno wrote: > > That doesn't even works because input() is the same

Re: Beginner question

2013-06-04 Thread Chris Angelico
On Tue, Jun 4, 2013 at 5:57 PM, John Ladasky wrote: > On Tuesday, June 4, 2013 12:45:38 AM UTC-7, Anssi Saari wrote: > >> BTW, did I get the logic correctly, the end result is random? > > You're right! I'm guessing that's not what the OP wants? I'm guessing that's exactly what the OP wants. This

Re: Beginner question

2013-06-04 Thread Larry Hudson
On 06/03/2013 08:39 PM, eschneide...@comcast.net wrote: Is there a more efficient way of doing this? Any help is gratly appreciated. import random def partdeux(): print('''A man lunges at you with a knife! Do you DUCK or PARRY?''') option1=('duck') option2=('parry') optionsi

Re: Beginner question

2013-06-04 Thread Peter Otten
Chris Angelico wrote: > On Tue, Jun 4, 2013 at 5:57 PM, John Ladasky > wrote: >> On Tuesday, June 4, 2013 12:45:38 AM UTC-7, Anssi Saari wrote: >> >>> BTW, did I get the logic correctly, the end result is random? >> >> You're right! I'm guessing that's not what the OP wants? > > I'm guessing th

RE: Beginner question

2013-06-04 Thread Carlos Nepomuceno
Started answering... now I'm asking! lol I've tried to use dict() to create a dictionary to use like the switch statement providing variable names instead of literals, such as: >>> a='A' >>> b='B' >>> {a:0,b:1}#here the variables are resolved {'A': 0, 'B': 1} That's ok! But if I use dict()

RE: Beginner question

2013-06-04 Thread Fábio Santos
On 4 Jun 2013 12:28, "Carlos Nepomuceno" wrote: > > Started answering... now I'm asking! lol > > I've tried to use dict() to create a dictionary to use like the switch statement providing variable names instead of literals, such as: > > >>> a='A' > >>> b='B' > >>> {a:0,b:1}#here the variables

RE: Beginner question

2013-06-04 Thread Carlos Nepomuceno
>On 4 Jun 2013 12:28, "Carlos Nepomuceno" wrote: [...] >> What's going on? Is there a way to make dict() to resolve the variables? >Well yes. >dict(**{a:0,b:1}) >The dict() constructor makes a dictionary from keyword arguments. So you just >have to feed it keyword arguments using **. >And if you'

RE: Beginner question

2013-06-04 Thread Fábio Santos
On 4 Jun 2013 12:57, "Carlos Nepomuceno" wrote: > > >On 4 Jun 2013 12:28, "Carlos Nepomuceno" wrote: > [...] > > >> What's going on? Is there a way to make dict() to resolve the variables? > >Well yes. > >dict(**{a:0,b:1}) > >The dict() constructor makes a dictionary from keyword arguments. So yo

Re: Beginner question

2013-06-04 Thread Steven D'Aprano
On Tue, 04 Jun 2013 14:53:29 +0300, Carlos Nepomuceno wrote: > That's exactly the same! dict(**{a:0,b:1})=={a:0,b:1} > True Of course it is. Isn't that what you wanted? It's also a waste of time, because you create a dict literal using {}, then unpack it into keyword arguments, then call d

RE: Beginner question

2013-06-04 Thread Carlos Nepomuceno
> From: steve+comp.lang.pyt...@pearwood.info > Subject: Re: Beginner question > Date: Tue, 4 Jun 2013 12:25:27 + > To: python-list@python.org > > On Tue, 04 Jun 2013 14:53:29 +0300, Carlos Nepomuceno wrote: > > > That's exactly the same! > >&g

Re: Beginner question

2013-06-04 Thread Steven D'Aprano
On Tue, 04 Jun 2013 14:23:39 +0300, Carlos Nepomuceno wrote: > Started answering... now I'm asking! lol > > I've tried to use dict() to create a dictionary to use like the switch > statement providing variable names instead of literals, such as: > a='A' b='B' {a:0,b:1}#here th

RE: Beginner question

2013-06-04 Thread Fábio Santos
> > Awesome! Now I can do it just like that: > > >>> dict([(chr(ord('a')+x),x) for x in range(2)]) > {'a': 0, 'b': 1} > > Thanks a lot! ;) > Or dict((c, i) for (i, c) in enumerate('ab')) But at this point you could just use a dict comprehension. {c: i for i, c in enumerate('ab')} -- http://mail

RE: Beginner question

2013-06-04 Thread Carlos Nepomuceno
> From: steve+comp.lang.pyt...@pearwood.info > Subject: Re: Beginner question > Date: Tue, 4 Jun 2013 12:35:59 + > To: python-list@python.org > > On Tue, 04 Jun 2013 14:23:39 +0300, Carlos Nepomuceno wrote: > > > Started answering... now I'm asking! lol >

Re: Beginner question

2013-06-04 Thread Roy Smith
In article , Larry Hudson wrote: > def partdeux(): > print('A man lunges at you with a knife!') > option = input('Do you DUCK or PARRY? ').lower() > success = random.randint(0, 1) > if success: > if option == 'duck': > print('He tumbles over you') >

Re: Beginner question

2013-06-04 Thread Mitya Sirenef
On 06/04/2013 07:53 AM, Carlos Nepomuceno wrote: >On 4 Jun 2013 12:28, "Carlos Nepomuceno" wrote: > [...] > >> What's going on? Is there a way to make dict() to resolve the variables? > >Well yes. > >dict(**{a:0,b:1}) > >The dict() constructor makes a dictionary from keyword arguments. So y

Re: Beginner question

2013-06-04 Thread Joshua Landau
On 4 June 2013 04:39, wrote: > Is there a more efficient way of doing this? Any help is gratly appreciated. > > > import random > def partdeux(): > print('''A man lunges at you with a knife! > Do you DUCK or PARRY?''') > option1=('duck') > option2=('parry') > optionsindex=[option1

Re: Beginner question

2013-06-05 Thread eschneider92
Thanks everyone! -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question

2013-06-06 Thread Steven D'Aprano
Sorry for the delay in replying. On Tue, 04 Jun 2013 15:51:38 +0300, Carlos Nepomuceno wrote: >> [1] Technically it's a type, not a function, but the difference makes >> no difference here. > Can you explain me the difference of the type and function you've just > mentioned? We were talking ab

Re: Beginner question

2013-06-12 Thread Chris Angelico
On Tue, Jun 4, 2013 at 9:53 PM, Carlos Nepomuceno wrote: > Are there any benefits from using dict() instead of {}? Not for what you're doing, but you can use dict() with an iterable. Most of the time, use the literal. ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question

2013-08-06 Thread Dave Angel
eschneide...@comcast.net wrote: > Why won't the 'goodbye' part of this code work right? it prints 'ok' no > matter what is typed. Much thanks. > > def thing(): > print('go again?') > goagain=input() > if goagain=='y' or 'yes': This expression doesn't do what you think. The compariso

Re: Beginner question

2013-08-06 Thread Chris Angelico
On Tue, Aug 6, 2013 at 10:35 PM, wrote: > Why won't the 'goodbye' part of this code work right? it prints 'ok' no > matter what is typed. Much thanks. > > def thing(): > print('go again?') > goagain=input() > if goagain=='y' or 'yes': > print('ok') > elif goagain!='y' or

Re: Beginner question

2013-08-06 Thread Rhodri James
On Tue, 06 Aug 2013 22:35:44 +0100, wrote: Why won't the 'goodbye' part of this code work right? it prints 'ok' no matter what is typed. Much thanks. def thing(): print('go again?') goagain=input() if goagain=='y' or 'yes': This line doesn't do what you think it does :-) Typin

Re: Beginner question

2013-08-06 Thread Chris Down
On 2013-08-06 14:35, eschneide...@comcast.net wrote: > Why won't the 'goodbye' part of this code work right? it prints 'ok' no > matter what is typed. Much thanks. "if" statements do not fall through, because the first statement was matched, no other ones in the same chain will be evaluted. "elif

Re: Beginner question

2013-08-06 Thread eschneider92
Thanks that helped a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: beginner question fibonacci

2005-07-17 Thread Robert Kern
Joon wrote: > > >>> # Fibonacci series: > ... # the sum of two elements defines the next > ... a, b = 0, 1 > >>> while b < 10: > ... print b > ... a, b = b, a+b > ... > 1 > 1 > 2 > 3 > 5 > 8 > > >>> a, b = 0, 1 > >>> while b < 10: > print b > a = b > b = a+b >

Re: beginner question fibonacci

2005-07-17 Thread Michael Hoffman
Joon wrote: > >>> a, b = 0, 1 > >>> while b < 10: > print b > a = b > b = a+b > > > 1 > 2 > 4 > 8 > > Why a, b = b, a+b isn't a = b; b = a+b ? Because you changed a before you added it to b. Let's call your existing a and b "a0" and "b0", and the next a and b "a1" and "b1".

Re: beginner question fibonacci

2005-07-17 Thread ralobao
The case is that Python in attribution commands solves first the right side, so he atributes the vars. So the a+b expression is executed first. Joon escreveu: > >>> # Fibonacci series: > ... # the sum of two elements defines the next > ... a, b = 0, 1 > >>> while b < 10: > ... print b > ..

Re: beginner question fibonacci

2005-07-17 Thread Joon
Yes, i see. Thank you very much for the fast help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question: Logs?

2005-06-01 Thread Robert Kern
Svens wrote: > Hey everyone! I'm a math student working on a short script involving > logs. I have a function on my scientific calculator, and was wondering > if there was a similar funtion in python. > > For example: > > (log65536)/(log4)= 8 > > I've searched around a bit and haven't been able

Re: Beginner question: Logs?

2005-06-01 Thread Svens
Hey thanks... Still getting an error message though. Here's what i'm doing: -- import math log10(15625) -- -It says that log10 is not defined, but it is since the module is imported, right? -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question: Logs?

2005-06-01 Thread Robert Kern
Svens wrote: > Hey thanks... > > Still getting an error message though. Here's what i'm doing: > -- > import math > log10(15625) > -- > -It says that log10 is not defined, but it is since the module is > imported, right? No, read the tutorial. import math math.log10(15625) -- Robert K

Re: Beginner question: Logs?

2005-06-01 Thread Stephen Prinster
Svens wrote: > Hey thanks... > > Still getting an error message though. Here's what i'm doing: > -- > import math > log10(15625) > -- > -It says that log10 is not defined, but it is since the module is > imported, right? > try this: import math math.log10(15625) -- http://mail.python.

Re: Beginner question: Logs?

2005-06-01 Thread Elliot Temple
On Jun 1, 2005, at 9:04 PM, Svens wrote: > Hey thanks... > > Still getting an error message though. Here's what i'm doing: > -- > import math > log10(15625) > -- > -It says that log10 is not defined, but it is since the module is > imported, right? do either import math math.log10(1562

Re: Beginner question: Logs?

2005-06-02 Thread Peter Hansen
Elliot Temple wrote: > from math import * > log10(15625) It's always a good idea, especially when answering a beginner's question, to add the caution that this form ("from xxx import *") has certain dangers** associated with it, and is widely considered poor style, and should really only rarely

Re: Beginner question: Logs?

2005-06-02 Thread Terry Reedy
> import math > math.log10(15625) To find out the names of function in the math module without checking the docs, do >>> dir(math) #same for any other module To get more info, do >>> help(math) # same for any other module with a doc string Terry J. Reedy -- http://mail.python.org/mailman

Re: Beginner question: Logs?

2005-06-02 Thread Terry Reedy
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Elliot Temple wrote: >> from math import * >> log10(15625) > > It's always a good idea, especially when answering a beginner's > question, to add the caution that this form ("from xxx import *") has > certain dangers** a

Re: Beginner question: Logs?

2005-06-02 Thread Greg Ewing
Peter Hansen wrote: > It's always a good idea, especially when answering a beginner's > question, to add the caution that this form ("from xxx import *") has > certain dangers** associated with it, and is widely considered poor > style, and should really only rarely be used. Better still, don'

Re: Beginner question: Logs?

2005-06-02 Thread Robert Kern
Greg Ewing wrote: > Peter Hansen wrote: > >>It's always a good idea, especially when answering a beginner's >>question, to add the caution that this form ("from xxx import *") has >>certain dangers** associated with it, and is widely considered poor >>style, and should really only rarely be use

Re: Beginner question: Logs?

2005-06-03 Thread Peter Hansen
Robert Kern wrote: > Greg Ewing wrote: [about the "from xxx import *" syntax] >> Better still, don't even *mention* it to a beginner. >> They don't need to know about it. At all. Really. > > Well, the OP's use is precisely why "from xxx import *" exists: the > interactive prompt. In that case (a

Re: Beginner question? Classes, variables, ...

2006-06-28 Thread Diez B. Roggisch
Ángel Gutiérrez Rodríguez wrote: > The problem: > > I have two classes: > > class X: > def __init__(self): > pass > > class Y: > def __init__(self): > self.a=1 > self.b=X() > > and I would like to make 'a' visible inside 'x'. Is there a way to refer > to the Y class from the X

Re: Beginner question? Classes, variables, ...

2006-06-28 Thread Diez B. Roggisch
Dennis Lee Bieber wrote: > On Wed, 28 Jun 2006 10:35:10 +0200, "Diez B. Roggisch" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> class X: >> def __init__(self, my_y): >> self.my_y > self.my_y = my_y *argl* Thanks :) No tea so far... Diez -- http://mail.python.o

Re: Beginner question? Classes, variables, ...

2006-06-28 Thread Ángel Gutiérrez Rodríguez
That wa sneat! Thanks! -- Ángel Gutiérrez Rodríguez - [EMAIL PROTECTED] Instituto de Ciencia de los Materiales de Madrid - CSIC SpLine - European Syncrothorn Radiation Facility - Grenoble - France Postal adress: Departamento de Química Física y Analítica Universidad de Oviedo - c/Julián Claverí

Re: Beginner question: module organisation

2007-05-19 Thread Rainer Grimm
[EMAIL PROTECTED] wrote: > Hello :) > > I am new to python and I don't have much expirience in object-oriented > technologies neither. > > The problem is the following: I have to create a simple python > template script that will always follow the same algorithm, let's say: > - read a mesh > - tr

Re: Beginner question: module organisation

2007-05-19 Thread 7stud
On May 14, 7:09 am, [EMAIL PROTECTED] wrote: > Hello :) > > I am new to python and I don't have much expirience in object-oriented > technologies neither. > > The problem is the following: I have to create a simple python > template script that will always follow the same algorithm, let's say: > -

Re: Beginner question: module organisation

2007-05-19 Thread 7stud
On May 19, 10:45 am, 7stud <[EMAIL PROTECTED]> wrote: > > refineModule.py: > --- > def refine(userfunc, mesh): > #process mesh > func(mesh) > The last line should be: userfunc(mesh) -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question: module organisation

2007-06-05 Thread Mail . To . Nathaniel
Thank you for all your help! I'll study the proposals to chose the one I prefer or to create something new :) Anyway, this is a perfect start-up for me. Nathaniel. -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner question on threads

2007-04-29 Thread Gabriel Genellina
En Sun, 29 Apr 2007 22:50:59 -0300, Teresa Hardy <[EMAIL PROTECTED]> escribió: > I have successfully made the threading work on a Window XP machine with > quad > processors but now I am trying to pass some variables around and am > fighting > with Lock() If there is the possibility that the

Re: Beginner question: module organisation

2007-05-14 Thread Nick Vatamaniuc
On May 14, 9:09 am, [EMAIL PROTECTED] wrote: > Hello :) > > I am new to python and I don't have much expirience in object-oriented > technologies neither. > > The problem is the following: I have to create a simple python > template script that will always follow the same algorithm, let's say: > -

Re: Beginner question: Python types

2005-05-31 Thread Paul McNett
Uppal, Deepali wrote: > Hello, Hello, and welcome to the world of Python. Don't take anything we say too personally, it is meant to help. > I am facing a bit of a problem due to python implicitly > attaching a type to an object. Ooh. In general, don't say 'implicit'. For the most part, Python

Re: Beginner Question: 3D Models

2013-06-18 Thread Steven D'Aprano
On Tue, 18 Jun 2013 19:47:34 -0700, andrewblundon wrote: > However, for one part of the program I'd like to be able to create a 3D > model based on the user input. The model would be very basic consisting > of a number of lines and objects. We have 3D models of each component > within our CAD sy

Re: Beginner Question: 3D Models

2013-06-18 Thread Christian Gollwitzer
Am 19.06.13 04:47, schrieb andrewblun...@gmail.com: However, for one part of the program I'd like to be able to create a 3D model based on the user input. The model would be very basic consisting of a number of lines and objects. We have 3D models of each component within our CAD system so it w

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 12:50:52 AM UTC-2:30, Steven D'Aprano wrote: > On Tue, 18 Jun 2013 19:47:34 -0700, andrewblundon wrote: > > > > > However, for one part of the program I'd like to be able to create a 3D > > > model based on the user input. The model would be very basic consisting >

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 3:30:41 AM UTC-2:30, Christian Gollwitzer wrote: > Am 19.06.13 04:47, schrieb andrewblun...@gmail.com: > > > However, for one part of the program I'd like to be able to create a > > > 3D model based on the user input. The model would be very basic > > > consisting of

Re: Beginner Question: 3D Models

2013-06-19 Thread Oscar Benjamin
On 19 June 2013 12:13, wrote: > > I've seen some information on Blender. Is it possible to have the entire > program contained within a single exe (or exe and some other files) so that > it can be passed around and used by others without having to install blender? I don't know if Blender woul

Re: Beginner Question: 3D Models

2013-06-19 Thread Fábio Santos
On 19 Jun 2013 12:56, "Oscar Benjamin" wrote: > > On 19 June 2013 12:13, wrote: > > > > I've seen some information on Blender. Is it possible to have the entire program contained within a single exe (or exe and some other files) so that it can be passed around and used by others without having

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
As I've said, I'm a fairly novice. I've compiled simple VB programs previously into exe files for use but nothing with pyton and nothing of this complexity. This application could potentially be distributed to hundreds of people throughout the world as our company is worldwide. Asking these peop

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
This sounds similar to what I might want. So you know of any online tutorials for this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginner Question: 3D Models

2013-06-19 Thread Oscar Benjamin
On 19 June 2013 14:14, wrote: > This sounds similar to what I might want. So you know of any online tutorials > for this? It's hard to tell what you're referring to since you haven't included any quoted context in your message (like I have above). I'll assume you're referring to what Fábio said

Re: Beginner Question: 3D Models

2013-06-19 Thread Fábio Santos
On Wed, Jun 19, 2013 at 2:57 PM, Oscar Benjamin wrote: > On 19 June 2013 14:14, wrote: >> This sounds similar to what I might want. So you know of any online >> tutorials for this? > > It's hard to tell what you're referring to since you haven't included > any quoted context in your message (li

Re: Beginner Question: 3D Models

2013-06-19 Thread Rick Johnson
On Tuesday, June 18, 2013 9:47:34 PM UTC-5, andrew...@gmail.com wrote: > I'm looking at developing a program for work that can be > distributed to others (i.e. and exe file). The > application would open various dialogue boxes and ask the > user for input and eventually perform mathematical > cal

Re: Beginner Question: 3D Models

2013-06-19 Thread andrewblundon
On Wednesday, June 19, 2013 11:47:36 AM UTC-2:30, Rick Johnson wrote: > On Tuesday, June 18, 2013 9:47:34 PM UTC-5, andrew...@gmail.com wrote: > > > > > I'm looking at developing a program for work that can be > > > distributed to others (i.e. and exe file). The > > > application would open v

Re: (beginner question) ConfigParser nuances

2011-05-02 Thread Chris Rebert
On Mon, May 2, 2011 at 3:04 PM, Unknown Moss wrote: > Hi - Beginner question here. I'm working with ConfigParser. I'd like > to take a multiline variable and convert it directly to an array. > Seems like a common  problem, but I don't see how I can do it without > doing a little parsing in my own

Re: (beginner question) ConfigParser nuances

2011-05-02 Thread Unknown Moss
On May 2, 3:25 pm, Chris Rebert wrote: > On Mon, May 2, 2011 at 3:04 PM, Unknown Moss wrote: > > Hi -Beginnerquestionhere. I'm working with ConfigParser. I'd like > > to take a multiline variable and convert it directly to an array. > > Seems like a common  problem, but I don't see how I can do i

Re: beginner question-very basic

2019-08-11 Thread Wildman via Python-list
On Sun, 11 Aug 2019 12:50:29 -0400, slefkowitz wrote: > Just getting started with Python. > > Downloaded 3.7.4 rom python.org > > I wrote program in Notepad, saved it with a ".py" extension. > > What do I do next? How do I execute a program? I am assuming you are using Windows since you poste

Re: [Beginner question] Raster to ASCII

2010-11-14 Thread MRAB
On 14/11/2010 19:07, Becky Kern wrote: Hi users, I'm using Python 2.5 (in concert with ArcGIS 9.3) to convert a raster to an ASCII file. I used the code (listed below) several weeks ago to successfully do the conversion, but when I tried to replicate it a few days ago, I got an error message. imp

Re: [Beginner question] Raster to ASCII

2010-11-14 Thread Tim Chase
On 11/14/2010 01:07 PM, Becky Kern wrote: import arcgisscripting gp = arcgisscripting.create(9.3) InRaster = "C:/data/raster1" OutAsciiFile = "C:/data/raster2ascii.asc" gp.RasterToASCII_conversion(InRaster, OutAsciiFile) The error message: arcgisscripting.ExecuteError: Failed to execute. Parame

Re: Beginner question on text processing

2006-12-29 Thread skip
Harold> To illustrate, assume I have a text file, call it test.txt, with Harold> the following information: Harold> X11 .32 Harold> X22 .45 Harold> My goal in the python program is to manipulate this file such Harold> that a new file would be created that looks like:

Re: beginner question, function returning object.

2008-02-07 Thread bambam
Second try (correction) I started with ths: -- def open_pipe(): pipe=PIPE() print pipe return pipe pipe=open_pipe() pipe.parent = self.parent print pipe -- It didn't do what I wanted: when I printed the pipe the second time i

Re: beginner question, function returning object.

2008-02-07 Thread Marc 'BlackJack' Rintsch
On Thu, 07 Feb 2008 19:14:54 +1100, bambam wrote: > I started with ths: > -- > def open_pipe(): > pipe=PIPE() > print pipe > return pipe > > pipe=open_pipe() > pipe.parent = self.parent > print pipe > -- > It didn't do what I

Re: beginner question, function returning object.

2008-02-07 Thread Steven D'Aprano
On Thu, 07 Feb 2008 19:14:54 +1100, bambam wrote: > Second try (correction) > > I started with ths: > -- > def open_pipe(): > pipe=PIPE() > print pipe > return pipe What's PIPE() do? > pipe=open_pipe() (Extraneous space removed.) > pipe.parent = self.

Re: beginner question, function returning object.

2008-02-07 Thread bambam
Thank you. So example 2 was clearly wrong, and example 1 was not clear :~). pipe is a serial port object: when I print pipe it shows first that it is connected to port 5, then that it is connected to port 6. I'll discard the clearly wrong code, and concentrate on the unclear code: probably by th

Re: Beginner Question : Iterators and zip

2008-07-12 Thread Larry Bates
[EMAIL PROTECTED] wrote: Hi group, I have a basic question on the zip built in function. I am writing a simple text file comparison script, that compares line by line and character by character. The output is the original file, with an X in place of any characters that are different. I have ma

Re: Beginner Question : Iterators and zip

2008-07-12 Thread [EMAIL PROTECTED]
On 12 juil, 20:55, [EMAIL PROTECTED] wrote: > Hi group, > > I have a basic question on the zip built in function. > > I am writing a simple text file comparison script, that compares line > by line and character by character. The output is the original file, > with an X in place of any characters t

Re: Beginner Question : Iterators and zip

2008-07-12 Thread Terry Reedy
[EMAIL PROTECTED] wrote: Hi group, I have a basic question on the zip built in function. I am writing a simple text file comparison script, that compares line by line and character by character. The output is the original file, with an X in place of any characters that are different. I have

Re: Beginner Question : Iterators and zip

2008-07-13 Thread moogyd
On 12 Jul, 21:50, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 12 juil, 20:55, [EMAIL PROTECTED] wrote: > > > > zip is (mostly) ok. What you're missing is how to use it for any > arbitrary number of sequences. Try this instead: > > >>> lists = [range(5), range(5,11), range(11, 16)] > >>> lis

Re: Beginner Question : Iterators and zip

2008-07-13 Thread Terry Reedy
[EMAIL PROTECTED] wrote: What is this *lis operation called? I am having trouble finding any reference to it in the python docs or the book learning python. One might call this argument unpacking, but Language Manual / Expressions / Primaries / Calls simply calls it *expression syntax. "If the

  1   2   >