lf.d, self.i
>while i>0:
>i-=1
>yield d[i]
>>>> p=R3('eggs')
>>>> for i in p:
>>>>print i
I am asking because I want to fully understand what makes an
*iterator*.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Ah! that is what the __future__ brings I guess.
Damn that progress making me outdated ;)
Python 2.2.3 ( a lot of extensions I use are stuck there , so I still
use it)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
split
on "farmer john".
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
... print i
...
y
t
r
e
w
q
Ok I don't see __getitem__ anywhere in this object.
Still scratchin my head? Why does this work?
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
it down.
Have you been succesful in making the changes they mentioned?
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ent me a reply saying they appreciated my feedback.
Maybe they just need more feedback :)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
I am drawing a blank right now.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
'r'
py> a.next()
'e'
py> a.next()
'w'
py> a.next()
'q'
py> a.next()
Traceback (most recent call last):
File "", line 1, in ?
StopIteration
>>>
Doh! ok now I get it __iter__ RETURNS a generator ;)
It seems so obvious now I look at
so another idea is to use a class instead of a global.
I'll admit it I have a personal distaste for them, but classes work so
well I never miss them.
Py>class Store(object):
...pass
Now just create an instance and add your attributes.
Py>store = Store()
...store.color = 'red'
...store.height = 5.7
...store.secret = 42
And get them back when needed.
Py>self.SetHieght(store.hieght)
Hth
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
e a
problem with your managment and communication skills.
> so I prefer preemptively dealing with issue of everyone showing off
their OO
> design skills)
Work on that micro-management just a little bit more, that gets the
code flowing ;)
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
look good and
help them do it.
This advice holds true for every field I can think of. Ignorance can be
remedied with a book , but apathy sometimes needs a swift kick in the
ass.
Hope you do well,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
rpreter promt:
Py> class NewKlass(object):
... pass
Py> class OldKlass:
... pass
Py> new = NewKlass()
Py> old = OldKlass()
Py> print dir(new)
Py> print dir(old)
Also new style classes are faster.
Hth,
M.E.Farmer
Frans Englich wrote:
> (Picking up a side track of the "
'other_function_name_here':
...return 'your other action here'
...else:
...return None
Py>ftpconnect = StrFtp("connect 123.123.123.123 21 user password")
Also add asserts and error checking all through the code for malformed
input.
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
know search for 'python pickle module'.
examples abound but here it is anyway:
Py> import pickle
Py> # Pickle a dictionary
Py> f = open('/tmp/mydata', 'wb')
Py> f.write(pickle.dumps(yourdict)
Py> f.close()
Py> # and it is easy to get back as well
Py> f = open('tmp/mydata', rb')
Py> pdata = f.read()
Py> f.close()
Py> yourdict = pickle.load(pdata)
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
he images from
> the tv receiver card in real time using my
> own software.
>
> Do you use Java?
>
> John Casey
Ever do search on Google?
This was number 1 and 2 ;). I searched for "python video capture".
I have used this module and it works well, it also has a really nifty
ftp uploader demo script.
http://videocapture.sourceforge.net/
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
to it.
And use it anywhere you need it.
Py> globals.image_height = (255,777)
Py> globals.image_mode = 'RGB'
Py> globals.image_names = ['this.jpg', that.jpg']
etc...
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Steve,
Yes I agree ;) Never use builtin names.
I know better but missed it somehow.
I apologize for any confusion I may have caused.
Thank you Steve for the correction.
M.E.Farmer
Steven Bethard wrote:
> M.E.Farmer wrote:
> > alex wrote:
> >> is it possible to create 'glo
Ok it has been a long day,
In my reply to Steven Bethard , Steve should read Steven ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
thor
still answers questions.
Cherrypy2 is fairly logical and most of it is covered in the examples
on there website.
I can not speak for the other packages,have not used them yet ;)
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ound-color:#11;}
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ound-color:#11;}
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ound-color:#11;}
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ound-color:#11;}
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ioned it.
Overall I agree with your statement you *should* not nest div inside of
span, BUT...
Div *can* be nested inside a span. I just tried it in Firefox , I.E. ,
and Opera to be sure and it does work ;)
Probably not w3c compliant though.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Hello Bo,
Don't use dict it is a builtin ;)
Also try this stuff out in an interpreter session it is easy and fast
to get your own answers.
>>> def fun(d):
... __dict__ = d
... return __dict__
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
them in the dictionary they come in
and acess the members as needed. I really don't see your need.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Yes you can use absolute positioning.
You do not need sizers ( but they are very nice )
Most all the widgets have a pos keyword in there constructor. Just use
them.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
that do exactly one thing each and use them as your
interface.
Py> def fun_helper(d):
... d['z'] = func(d['x']+d['y']+d['whatever']['as']+d[a][0])
... return d
and use them as needed.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
th Python.
hth ,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
I guess it depends :)
Let us know what works for you.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
u have had a bit of a snag , sorry to
hear that.
I am glad you are at least learning new things, 'cause if you had used
CherryPy2 you would have be done by now :P
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
game
Py> pygame.mixer.init()
Py> pygame.mixer.music.load('c:/everyday.mp3')
Py> pygame.mixer.play()
Py> pygame.mixer.music.fadeout(4000)
You have a typo in the code you posted that may be your problem.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
return pathlist
.
. def list_dir(dir):
. ''' Another way to filter a dir '''
. import os
. pathlist = os.listdir(dir)
. # Now filter out all but py and pyw
. filterlist = [x for x in pathlist
.if x.endswith('.py')
.or x.endswith('.pyw')]
.return filterlist
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
http://sourceforge.net/projects/uncassist
the people who wrote pyFMOD (lots of stuff there)
http://www.cs.unc.edu/~parente/tech/tr01.shtml
Hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Just curious what is not suitable about FMOD ?
It seems to be exactly what you are looking for.
Cross platform, free, great sound, python bindings, no compiler needed.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
7;t ask a 2nd grade question yet
claim/pretend to be some sorta system specialists.
You tried searching the archives first I am sure.
Go here http://www.python.org and *read*, come back when you are
really stuck.
M.E.Farmer
P.S. YES the __ matter, they identify special methods ! __init__ is the
class CON
py hacking,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Sweet!
Glad you fixed it, and documented it all!
Thanks for the followups.
Now the next poor soul to stumble in can get the right fix.
Never know when it could be me ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
to take out the garbage or look at it?
Python does it for you so you don't have too.
But don't let me stop you.
You can probably still find some way to do it.
It is open source after all.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
> M.E.Farmer wrote:
>
> >>Jeffrey Borkent
> >>Systems Specialist
> >>Information Technology Services
> >
> >
> > With that kind of credentials, and the fact that you claim you are
a
> > system specialists
> >
details. If I am wrong someone correct me
;)
If you search around you can find many pointers to memory effecient
coding style in Python( never add a string together, use a list and
append then join, etc.)
Stick to profiling it will serve you better. But do not let me stop you
from writing a memory
line 95, in copy
> return _reconstruct(x, rv, 0)
> File "C:\Python24\lib\copy.py", line 320, in _reconstruct
> y = callable(*args)
> File "C:\Python24\lib\copy_reg.py", line 92, in __newobj__
> return cls.__new__(cls, *args)
> TypeError: objec
x27;myrecords.txt')
Py> first_record = records.next()
Py> second_record = records.next()
Py> # or you can do this
Py> for record in records:
Py> print record
Getting them in a single file is easy, and will be an excercise left to
the reader.
The fileinput module is your f
_init__(self, msg)
def __repr__(self):
return self._msg
__str__ = __repr__
class PathError(PSCError):
def __init__(self, msg):
PSCError.__init__(self,
'Path error! : %s'% msg)
class InputError(PSCError):
def __init__(self, msg):
PSCError.__init__(self,
'Input error! : %s'% msg)
# and you use it like this
raise PathError, 'Please check path'
raise InputError, 'Improper input try again'
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ewpos + len(toktext)
if toktype in [token.NEWLINE, tokenize.NL]:
self.out.write('\n')
return
if newpos > oldpos:
self.out.write(self.raw[oldpos:newpos])
if toktype in [token.INDENT, token.DEDENT]:
self.pos = newpos
return
if (toktype == token.STRING):
sname = self.StringName.next()
self.StringMap[sname] = toktext
toktext = sname
self.out.write(toktext)
self.out.flush()
return
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
This may help.
http://linuxgazette.net/107/pai.html
Also be sure to google.
search strategy:
Python threading
Python threads
Python thread tutorial
threading.py example
Python threading example
Python thread safety
hth,
M.E.Farmer
--
http://mail.python.org/mailman
02': "''' Store the source text & set some flags.\n'''",
's03': "'unix'"}
You can also strip out comments with a few line.
It can easily get single comments or doubles.
add this in your __call__ function
le):
...print 'you have %s apples' % apple
py>f1(4)
'you have 5 apples'
Read the docs this is pretty basic, it will save you time.
If in doubt try it out.
Use the interpreter, it is your friend.
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
eter and try playing with them and see what they do.
If you weant to know what an object or methods docs say, use help().
Py> help(q.count)
Help on built-in function count:
count(...)
L.count(value) -> integer -- return number of occurrences of value
If you want to know the number of items in a list ( or most builtins )
use len().
Py> len(q)
8
Spend time reading the docs. It will save you months of work.
Also learn the library it has many modules that will simplify your code
and save your mind.
http://www.python.org/doc/
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Your welcome for the help , be sure to pass it on ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
__mul__',
'__ne__', '__new__', '__reduce__', '__repr__', '__rmul__',
'__setattr__', '__setitem__', '__setslice__', '__str__', 'append',
'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse',
'sort']
Then you can try and get some help from Python.
Py>help(a.extend)
Help on built-in function extend:
extend(...)
L.extend(iterable) -- extend list by appending elements from the
iterable
And finally use pydoc it is very helpful.
Cl> python pydoc -g
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
that works ;)
"c:/windows/dir"
Windows uses '\' as a path sep but it also understands '/'.
*nix uses '/' as a path sep.
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
the question :
#contents of myfile.py:
testvar = [1,2,3,4]
# someother.py
# the problem is you are executing a script
# then searching in the wrong namespace.
def myfunction(filename):
execfile(filename, globals())
print testvar
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listi
#x27;)
eos = f.seek(107).read(1)
r = f.read()
f.close()
r = r.replace('\r', '')
r = r.replace('\n', '')
r = r.replace(eos, '\n')
f = open('yourrecord', 'w')
f.write(r)
f.close()
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Survey says.
...wxYield()
;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
l","w"]:
self.withdraw(amount)
else:
self.deposit(amount)
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
re appropriate for you right now till you
are up and running. http://www.python.org/mailman/listinfo/tutor
-Just keep reading and writing Python , you will 'get it'.
hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
p://bellsouthpwp.net/m/e/mefjr75/python/Thumbz.py
You can see my dumb newbie code , of course that was two years ago ;)
There are others out there too try thumbnail.py in a Google search sometime
;)
> Thanks
your welcome ...
HTH,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
###
if __name__ == '__main__':
Main()
# end of code
This is an example of how to use tokenize to replace names
that match a search string.
If you wanted to only replace strings and not
names then change the replacetokentype to
token.STRING instead of token.NAME etc...
HTH,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ClassA
import CJB.ClassB
classA = CJB.ClassA.ClassA
classB = CJB.ClassB.ClassB
# end of __init__.py
Now all you do is import.
import CJB
dir(CJB)
CJB.ClassA()
CJB.ClassB()
> Is my understand of modules/packages correct or am I way off?
Not to far off :)
> Thanks for the help.
HTH,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ou convert your icon to source using img2py.py you can do this:
import Icon
ICON = Icon.getIcon()
frame.SetIcon(ICON)
Hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
the nice looking 3-pane window pops up with lots of
tabs...a
> prompt...and then??? Where is the file I am trying to run? Even
the File
> options are all greyed out...
>
>
Yea it is not an IDE.
It is supposed to be a 'flaky' interactive interpreter, with code
completion, and
te cleaner cause you can use what you want
for the tokens, but takes more lines to do the replacements.
still clueless,
M.E.Farmer
Peter Hansen wrote:
> Jim Hill wrote:
> > I've done some Googling around on this and it seems like creating a
here
> > document is a bit tricky wi
Be sure to check the Blender forums before you give up, I recall
someone working on that very thing maybe a year or so ago, but maybe my
memory fuse is blown ;)
M.E.Farmer
Jelle Feringa // EZCT / Paris wrote:
> > Have you looked at Blender (http://www.blender3d.com)??
>
> Blender
#
py>## This is for py2exe.
py>## Remeber you can use --icon to change the icon(win2k only?)
py>#
py>## setup.py py2exe
py>#
py># from distutils.core import setup
py># import py2exe
py># setup(name="CD_Autorun",
py># scripts=["CD_Autorun.pyw"])
py>#
py>## 2004 M.E.Farmer Jr.
--
http://mail.python.org/mailman/listinfo/python-list
s = recordbreaker('/tmp/myrecords.txt')
py>for item in records:
...print item
M.E.Farmer
[EMAIL PROTECTED] wrote:
> Hi,
> I know that i can do readline() from a file object.
> However, how can I read till a specific seperator?
> for exmple,
> if my files are
>
>
f all at
once.
I dont have itertools yet. That module looks like it rocks.
thanks for the pointers,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Yea I should have mentioned I am running python 2.2.2.
Can it be ported to python 2.2.2?
Till they get python 2.4 all up and runningI'll wait a bit.
Thanks for the info,
M.E.Farmer
Scott David Daniels wrote:
> M.E.Farmer wrote:
> > I dont have itertools yet. That module looks
gt; print eval('None')
wassabi
>>> dir()
['None', '__builtins__', '__doc__', '__name__', 'shell']
>>>
I think you are seeing two things and I admit I was confused a bit too.
None is becoming a constant and this is the first ste
return numbers.get(numname.lower(), 'error')
print getNumber('OnE' , numbers)
print getNumber('siX' , numbers)
print getNumber('fOur' , numbers)
print getNumber('nine' , numbers)
print getNumber('SEven' , numbers)
#
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
t; numbers = numbers[idx+1:] + [1000*x for x in hundreds]
>
> if 100 in numbers:
> idx = numbers.index(100)
> hundreds = numbers[:idx]
> numbers = numbers[idx+1:] + [100*x for x in hundreds]
>
> return sum(numbers)
>
> Stephen Thorne
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Hello Ishwor ,
The simpliest way I can explain slicing is that the slices point to the
spot *between* the items..
Take this list for example
slicer = [0,1,2,3,4,5]
>>> slicer [1]
1
>>> slicer [1:2]
[1]
>>> slicer [:-1]
[0,1,2,3,4]
>>> slicer[2,
Hello Aaron,
You need to check the demo that comes with wxPython if you don't
have it get it. Look under wxHtmlWindow and click the demo tab then
just scroll down and there is a link to it that says IMAGEMAP.
Or in other words RTFD ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/p
Hello,
Seems you found os.chdir(), but you missed os.getcwd()
;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Ignore my last post to much eggnog I guess. I must have parsed it to
quickly.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ight post a code sample if I am up to itso much turkey, and
cookies.
> I want it to be powerful,
> yet simple and minimalistic, not requiring a huge amount of overhead.
Don't we all!
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
ser.read(cfgpath)
... return parser.get(section,key)
Hope that helps...now *where* are those sugar cookies
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
overed somewhere in the
wx demo ;)
Hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
t
> OS dependant to close and open the right descriptors, but I'm not
sure
> anymore. Any help or pointer in the right direction would be greatly
> appreciated.
>
> Happy christmas everyone,
>
> RGB
Hello RGB,
what you are loking for is sys.stdin.isatty()
py> if sys.stdin
>thanks for the replies, guys!
Your welcome, glad I could help.
>(Spending time on these newsgroups is giving me more questions that
>answers heh )
Thats good as long as it motivates you to learn ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
x :(...).
I have had problems with whitespace being stripped before, but I just
cannot understand WHY would you post KNOWING it was missing indents.
Fix-it repost and maybe someone might help you.
Hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
x = 0
... while x < 10:
... print x
... x += 1
... print " Ending"
Use it like this:
py> Test().start()
There are other ways to do this, but you need to do a web search on
threading.py , there are many examples
he button that
has focus using the return key than it already works like that just tab
to the button and press return.
If you want to make a button focused by default you can use
SetDefault()
Sounds like you are trying to hard to do something simple, try less.
Hth,
M.E.Farmer
--
http://mail.pyt
chahnaz.ourzikene wrote:
> "M.E.Farmer" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
>
> > Just a warning!
> > Threads and newbies don't mix well,
> > many pitfalls and hard to find bugs await you.
> > I would avoi
he same.
realpath is just an alias for abspath.
Using pydoc on os gives this:
py>realpath = abspath(path)
py> Return the absolute version of a path
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
of it.
hint: SEARCH GOOGLE / READ DOCS / WRITE CODE
Ahh the joy of learning frameworks.(and GUI editors)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
reinventing all
this junk and avoiding some eval hack to get the stuff back to the
right type.)
If you think I am kidding note others in this newsgroup have been there
done that, not me of course, I never need documentation ;)
Hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
eentrance of code.
'''
Just sprinkle your listctrl update loop with wx.Yield().
I am not sure if this will help you but has fixed update problems for
me before.
By the way when you have problems with wxPython you may get more
responses from the wxPython list. Comp.lang.python is
e):
py>shutil.copy(name, dst)
py>else:
py>print 'Warning, %s not found' % name
py>
py>
py>
py>
py>pygamedir = os.path.split(pygame.base.__file__)[0]
py>installfile(os.path.join(pygamedir,
pygame.font.get_default_font()))
py>installfile(os.path.join(pygamedir, 'pygame_icon.bmp'))
py>for data in extra_data:
py>installfile(data)
This is probably a complete mess by the time it reaches you.
I started every line with py> so just unwrap the lines that didn't make
it.
Hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
wbies needing help are using
wxGlade or Boa and it helps them get neck deep into trouble before they
even realize what they are doing wrong.
Because they have not worked directly with the framework they don't
understand the framework . But YMMV
M.E.Farmer
--
http://mail.python.org/mailma
LutherRevisited wrote:
> Thanks, yielding has solved all remaining problems I had with this
gui.
Thank you for the followup, glad to have helped.
Study, learn , pass it on.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
= 'mike'
a.weight= 220
dir(a)
del a.name
Sorry if it is incoherent, I am way past bed time .
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
he counter is now 31
Subject : the counter is now 32
Subject : the counter is now 33
Subject : the counter is now 34
Subject : the counter is now 35
Subject : the counter is now 36
Subject : the counter is now 37
Subject : the counter is now 38
Subject : the counter is now 39
It seems to be what yo
that.
Why do you suppose he is having problems with this on Linux?
I am not on a Linux box to test it.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
py>lexer.get_token()
'2'
py>lexer.get_token()
']'
py>lexer.get_token()
'fdfdfdfd'
You can do a lot with it that is just a teaser.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
with a grain of salt, and read more docs.
Check into queue it is in the standard lib.
By the way, I reread your post and still think that threads are not
the way for you to go you really need to search for 'python MVC'. It
may just enlighten you.
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
.
It imports os and sys only, they are standard library modules.
If you have python you have them already.
If you mean cStringIO it is in the standard library(at least on my
system).
You dont have to use it just feed shlex an open file.
py>lexer = shlex.shlex(open('myrecord.txt
chars += '-' # add the hyphen
py>a.get_token()
'moo'
py>a.get_token()
'cow'
py>a.get_token()
'"farmer john"'
py>a.get_token()
'-zug'
py>a.get_token()
''
Hth,
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Reread Russel Blau post he is spot on with his comments:
Russel Blau wrote:
>I don't get that from the passage quoted, at all, although it is
somewhat
>opaque. It says that your __iter__() method must *return an object*
with a
>next() method; your __iter__() method below doesn't return such an
obje
1 - 100 of 164 matches
Mail list logo