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
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
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
[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
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
>
> 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
[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",
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
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
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,
[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
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
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
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
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
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=[])
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
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
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
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
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
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
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
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
> 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
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
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
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
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()
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
>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'
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
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
> 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
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
>
> 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
> 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
>
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')
>
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
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
Thanks everyone!
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
Thanks that helped a lot!
--
http://mail.python.org/mailman/listinfo/python-list
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
>
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".
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
> ..
Yes, i see.
Thank you very much for the fast help!
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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.
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
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
> 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
"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
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'
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
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
Á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
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
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í
[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
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:
> -
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
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
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
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:
> -
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
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
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
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
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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.
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
[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
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
[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
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
[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 - 100 of 151 matches
Mail list logo