[Tutor] I am learning python3 and would like some more python3 modules/programs on my...

2012-10-09 Thread frank ernest
version python3.2 linux
 I am learning python3 and would like some more python3 modules/programs on my 
computer to look at and work with to learn more about python3. I have read the 
tutorial and some of the complete language reference. I can't tell from the 
package index whats a python3 module/program and whats for 2.X. I seems from 
the voting guide that their are not many python3 programs; did I learn python 
at the wrong time? If possible I would like to get involved with a python3 
program despite the fact I would not be at first a good programmer (It may help 
you to know that python3 is my first language though I did try to learn ruby 
but I did not like the language much [I like python though]) unfortunately 
their does not seem to be much choice of what to or not to help program. On my 
OS their are only a few bindings to libraries the standard python installation 
and the python3-tools package which contains some turtle programs and examples 
of programming in python. To give you an idea of what I should li
 ke to work in I eventually want to create with python something like a voice 
recognition program though not to recognize voice but rather music. Though I 
intend to create more then the afore mentioned program so any branch of 
application programming would do, I intend to create it first.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] insufficient control of ossaudiodev and or wave modules

2012-12-04 Thread frank ernest
Opensuse 12.2 python3.2
 I would like to set the to get better control of the play back of wave files. 
I would like to set the play back volume, send the audio out only one of the 
two speakers and ajust the play back speed. I am completely blank on ideas of 
how to accomplish this and reading the recommendation in the documentation 
suggesting that you should not try to rewrite part of the standard library by 
your self I have decided to ask how to go about this.
 Perhaps instead of reimplementing the library a new class should be created 
for basic audio manipulation.
 If so then how would I go about this?
 The wav file format is not exactly human readable.
 I have not seen anything similer to what I desire in the repo of 3rd party 
packages at the python web site.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] On understanding defintions

2012-12-04 Thread frank ernest
Opensuse 12.2 python3.2
 I discoverd that some of the examples for definitions in the tutorial are not 
valid. I am reporting this as a bug.
 In the mean time I tried to look up definitions in the Language Referance part 
of the python documentation but I'm still confused. The if, for, etc. are 
statements of evaluation, comparing one item to another; so what does that make 
definitions?
 What is self?
 How are definitions properly used?
 What are the mandetory parts?
 What are the optional parts? (in if statements the optional parts are or, and, 
elif, else, etc.)
 I also tried looking into the demos directory, I found lots of definitions but 
little help in understanding them.
 I am confused on all types of definitions not just functions or classes.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] I'm trying to wrap my head around defs

2012-12-04 Thread frank ernest
Opensuse 12.2 python3.2
 I'm having trouble understanding them.
 Python is my first language... excluding English.
 I've already read ALL OF THE PYTHON Language Referance and I still don't "get 
it."
 What do they do?
 How do they work?
 How do you define self?
 Is self an object, a variable, or what?
 How about some over commented examples?
 The if statement is a statement of comparison. what is a def and more 
specifically a class?
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Proper useage of "open"

2012-12-12 Thread frank ernest
I want to open a file so I read the library useage because I could not recall 
the propor useage.
 I typed in to my script:
 a = open (dupli, r)
 and got an error stating that "dupli" is not deffined.
 I started the script from within to same directorie that the file "dupli" was 
in. Perhaps it needs me to tell it to generate a list of files in the 
directorie?
 How do I get it to open the file "dupli"
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Proper uses of classes

2013-04-03 Thread frank ernest
Hi guys, it's been a while since I posted and I've learned a lot since then. 
Today I have a question on classes, I can't get mine to work.
class alist(list):
 def __init__(self, b, a):
 self = list()
 self.append(b)
 a = a + b
 def appendit(self):
 self.append(a)
 
print(alist(2,4))
[]
#It's blank!
c = alist(2,4)
c.appendit()
print(c)
[[...]]
#It's still blank!
If I add this:
 a = a + b
 
the last line of my deffinition I get:
c = alist(2,4)
c.appendit()
Traceback (most recent call last):
File "", line 1, in 
File "", line 7, in appendit
UnboundLocalError: local variable 'a' referenced before assignment
If I make a nonlocal I get
SyntaxError: name 'a' is parameter and nonlocal
I want it to get my list and all the members in it when printing for instance. 
I also would like to without making them global create two variables which I 
can use throughout the whole class as their value will not change.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Proper uses of classes

2013-04-04 Thread frank ernest
Sorry about the indentation guys my mail service atomatically removed it when I 
pasted the text (I tried to fix it by hand but it was hard to tell if I was 
sucessful.)
I was tring to create a list object (self) and change it using the list methods 
and some additional ones I will define in my class.
I wanted to create some varibles which I pass to most if not all of my methods. 
Two of my variables are to be passed to the class apon creation of the object 
and then they in turn are to be passed to all or most of the methods I create 
(a, b in this case.) If I make a, b nonlocal I get the message that they are 
already nonlocal.
I will need for debuging purposes to print my object in random places in my 
class.
If I did this:
> self.a = aWhat would that create (I'm thinking local variable?)?

class alist(): def __init__(self, b, a): self.mylist = list() 
self.mylist.append(b) self.a = a + b def appendit(self): #I need to get a in 
hear without passing  #it in; it must come from the init method. 
self.mylist.append(self.a) #(I hope I've updated the code well, I can't test it 
from this computer.)PS: This is not the real code that I'm Emailing: I thought 
I'd be better off with some simpler code that produces the same errors.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] The proper use of classes

2013-04-15 Thread frank ernest
Thanks guys! I've got my class up and running and am having a fine time 
programming in python... again.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor