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 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
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
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
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
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 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
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
> from kivy.app import App
> from kivy.uix.label import Label
>
> class MyApp(App):
> def build(self):
> return Label(text='Hello World')
>
> if __name__ == '__main__':
> MyApp().run()
>
>
>
> I get this error when I run it:
>
>
> Traceback (most recent call last):
> File
> Unindent the 'if' statement. Currently, it's indented inside the class
> definition, so MyApp isn't defined yet.
Thanks very much. That fixed it.
Best regards
David
--
https://mail.python.org/mailman/listinfo/python-list
On 2015-01-28 11:10, David Aldrich wrote:
Hi
I am just getting started with Python 3.3.3 and Kivy 1.8.
I am using the Kivy development environment on Windows (open a command prompt
and call kivy.bat).
With this minimal code:
import kivy
kivy.require('1.8.0')
from kivy.app import App
from k
On Fri, 09 Aug 2013 16:34:48 -0700, eschneider92 wrote:
> What does global mean?
Hi eschneider92,
A few bits of advice:
- You may like to actually sign your emails with a real name, or at least
an alias that you want to be called, otherwise we'll just call you by
your email address, and apar
On 10 August 2013 00:34, wrote:
> What does global mean?
Python has "scopes" for its variables. Most programming languages do.
A "scope" is a restriction on where variables exist -- they exist only
within the scope.
This can be seen in this example:
def function():
# A new "scope"
I'm sorry, but I still don't understand how it applies to my problem. Thanks
for everyone's patience.
--
http://mail.python.org/mailman/listinfo/python-list
On 10/08/2013 00:40, eschneide...@comcast.net wrote:
(I forgot to post this with my last post.)
Also, I don't understand any part of the following example, so there's no
specific line that's confusing me. Thanks for the help btw.
You don't understand _any_ of it?
> var = 42
Here you're assi
(I forgot to post this with my last post.)
Also, I don't understand any part of the following example, so there's no
specific line that's confusing me. Thanks for the help btw.
var = 42
def myfunc():
var = 90
print "before:", var
myfunc()
print "after:", var
def myfunc():
globa
(I forgot to post this with my last post.)
Also, I don't understand any part of the following example, so there's no
specific line that's confusing me. Thanks for the help btw.
var = 42
def myfunc():
var = 90
print "before:", var
myfunc()
print "after:", var
def myfunc():
glo
What does global mean?
--
http://mail.python.org/mailman/listinfo/python-list
On 10 August 2013 00:14, wrote:
> I don't understand any of the advice any of you have given.
What about it don't you understand? Pick a sentence you don't
understand and throw it back at us. If you understand all the
sentences but not how they come together, say so. If there's a leap
that you d
Thanks, though me not utilizing any of the other advice wasn't from lack of
trying; I couldn't understand any of it. I get it now that I have a corrrect
example code in front of me.
--
http://mail.python.org/mailman/listinfo/python-list
I don't understand any of the advice any of you have given.
--
http://mail.python.org/mailman/listinfo/python-list
On 9 August 2013 23:27, wrote:
> This is what I ended up with btw. Does this insult anyone's more well attuned
> Python sensibilities?
...
Yes.
You didn't listen to any of the advice we've been giving you. You've
had *much* better answers given than this.
Start from the top.
We need letter
This is what I ended up with btw. Does this insult anyone's more well attuned
Python sensibilities?
letters='abcdefghijkl'
def repeat():
print('wanna go again?')
batman=input()
if batman in ('y','yes'):
main()
else:
return
def main():
print('guess a letter')
This is what I ended up with btw. Does this insult anyone's more well-attuned
Pythonic sensibilities?
letters='abcdefghijkl'
def repeat():
print('wanna go again?')
batman=input()
if batman in ('y','yes'):
main()
else:
return
def main():
print('guess a
Le jeudi 8 août 2013 22:29:00 UTC+2, Terry Reedy a écrit :
> On 8/8/2013 7:41 AM, Chris Angelico wrote:
>
> > On Thu, Aug 8, 2013 at 7:20 AM, wrote:
>
> > def z2():
>
> >> ... letters = 'abc'
>
> >> ... while True:
>
> >> ... c = input('letter: ')
>
> >> ... if c
On 8/8/2013 7:41 AM, Chris Angelico wrote:
On Thu, Aug 8, 2013 at 7:20 AM, wrote:
def z2():
... letters = 'abc'
... while True:
... c = input('letter: ')
... if c not in letters:
... print('end, fin, Schluss')
... break
... else:
...
On Thu, Aug 8, 2013 at 7:20 AM, wrote:
def z2():
> ... letters = 'abc'
> ... while True:
> ... c = input('letter: ')
> ... if c not in letters:
> ... print('end, fin, Schluss')
> ... break
> ... else:
> ... print('do stuff')
Le mercredi 7 août 2013 10:17:21 UTC+2, eschne...@comcast.net a écrit :
> I'm trying to create an option for the program to repeat if the user types
> 'y' or 'yes', using true and false values, or otherwise end the program. If
> anyone could explain to me how to get this code working, I'd appreci
On 08/07/2013 01:17 AM, eschneide...@comcast.net wrote:
I'm trying to create an option for the program to repeat if the user types 'y'
or 'yes', using true and false values, or otherwise end the program. If anyone
could explain to me how to get this code working, I'd appreciate it.
letters='ab
eschneide...@comcast.net wrote:
> What I wanted to happen is when the user typed something other than 'y' or
> 'yes' after being asked 'go again?', the batman==False line would cause the
> program to stop asking anything and say 'this is the end'. Instead, what is
> happening is that the progra
What I wanted to happen is when the user typed something other than 'y' or
'yes' after being asked 'go again?', the batman==False line would cause the
program to stop asking anything and say 'this is the end'. Instead, what is
happening is that the program just keeps going. I figured that after
On 7 August 2013 09:17, wrote:
> I'm trying to create an option for the program to repeat if the user types
> 'y' or 'yes', using true and false values, or otherwise end the program. If
> anyone could explain to me how to get this code working, I'd appreciate it.
Always tell people what in par
Thanks that helped a lot!
--
http://mail.python.org/mailman/listinfo/python-list
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
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 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
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 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 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 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 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
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
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
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
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 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 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
>
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 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
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
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
Thanks everyone!
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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')
>
> 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
>
>
> 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
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
> 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: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
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 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: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
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()
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
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
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
> 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 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
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
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
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
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 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 Monday, November 15, 2010, Becky Kern wrote:
> Hi again users,
>
> This is in response to my post from 11/14/2010 (see below)
>
>> 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
>> succe
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
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 Mon, Dec 21, 2009 at 3:31 PM, Boris Epel wrote:
> Hi! Please help with the problem:
> send over TCPIP data packet organized as 6 bytes of identifier,
> integer (LSB) and length of following binary data, binary data
> the clear part: create socket, connect it, use send, close socket
> the uncle
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 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
On 13 Jul, 19:49, Terry Reedy <[EMAIL PROTECTED]> wrote:
> [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 / Express
>
> zip(*vec_list) will zip together all entries in vec_list
> Do be aware that zip stops on the shortest iterable. So if vec[1] is
> shorter than vec[0] and matches otherwise, your output line will be
> truncated. Or if vec[1] is longer and vec[0] matches as far as it goes,
> there will be no si
[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
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:
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 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 ma
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
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
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.
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
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
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
[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
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,
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 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
[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",
> 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
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
>
1 - 100 of 151 matches
Mail list logo