No, your question was clear. With hindsght and a more thorough read of
your post I see my error ;^)
--
http://mail.python.org/mailman/listinfo/python-list
event.RequestMore(True)
> self.count += 1
> if self.count >= 50:
> self.count = 0
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
request to detail", 25)
print download("request to download", "abc", 99)
print
print "\n".join(view_obj.visited)
index, detail and download functions can be mapped
in urls.py now.
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
, only
that the counters are several million cycles apart, IOW running at the
same speed but with different initial values, or more likely starting
at different times.
For processors that run at (say) 2GHz, several million (say 10 million)
represents a difference of 10e6/2e9 = 0.005 se
None):
> print "hello"
>
> w.bind("", do_popup)
>
> b = Button(root, text="Quit", command=root.destroy)
> b.pack()
>
> mainloop()
Here's a great tutorial:
http://www.effbot.org/tkinterbook/tkinter-hello-again.htm
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
rm1")
form2 = wx.Panel(nb, -1)
form2.SetBackgroundColour(wx.RED)
nb.AddPage(form2, "Form2")
nb.SetSelection(1)
frame.Refresh()
frame.Show(True)
app.MainLoop()
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
> not red, but grey as labels.
>
> I want to color this space RED!!!
Oh, I see now. I don't know if that is possible on windows.
SetBackgroundColour works differently on windows than on unix,
so probably native windows widget doesn't support this feature.
(but I can be wrong of course.)
Regards,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
ton options for example:
{"text": "Hello", "padx": 2}
4. change value of element "padx" or add this element to dictionary kw
5. call parent __init__ method to create button
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
ast 2 python implementations, so
why worry about another one.
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
methods etc in html docs. It's very easy for me to
> understand the Java language.
> But in python, i find it kind of inconvient.
>
> Any advice?
With AcitvePython is distributed the htmlhelp version of python
reference
(ActivePython24.chm). It's really convinient to use.
HT
for x in [a] * seq[a]:
tmp.append( x )
>>> tmp
[0, 0, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3]
>>>
IOW a comprehension appends rather than extends. Other than
that you move the value you're appending from the inside of
the loop('s) to the begining of the comprehension then remove
newlines and colon's [inside some brakets ofcourse].
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
wouldn't load
some of the images too (I didn't test all), it had problems with
64 bit floating point images and images with RBGA data in them.
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
a python solution would be
> better (although this will run on unix anyway, but it'd be nice if it
> ran on windows too).
IMHO this is pretty portable:
>>> def is_on_path(fname):
... for p in os.environ['PATH'].split(os.pathsep):
... if os.path.isfile(os
Steve Holden <[EMAIL PROTECTED]> writes:
> Rob Wolfe wrote:
>> Hari Sekhon wrote:
>>
>>>I am writing a wrapper to a binary command to run it and then do
>>>something with the xml output from it.
>>>
>>>What is the best way of making sure th
[EMAIL PROTECTED] wrote:
> Hi,
[...]
> Step 3: Wrote the given script of multipication in a file named as
> multiply (using vi editor)
The name of module should be multiply.py
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> Rob Wolfe wrote:
> > [EMAIL PROTECTED] wrote:
> > > Hi,
> > [...]
> > > Step 3: Wrote the given script of multipication in a file named as
> > > multiply (using vi editor)
> >
> > The name of module should be multiply.p
; So, how can I do it in python?
Here is a nice example:
http://docs.python.org/lib/os-file-dir.html
Look for description of function walk.
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
t; part of the system since I've basically programmed myself into a
>> corner.
>>
According to the docs: http://effbot.org/zone/element-xinclude.htm
The default handler just sees the href value as a filename, so you
should be able to use a relative path if you os.chdir() to th
"Sandra-24" <[EMAIL PROTECTED]> writes:
> A dictionary that can be shared across processes without being
> marshaled?
>
> Is there such a thing already for python?
Check this out:
http://poshmodule.sourceforge.net/
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
bjvm.so','-ea')
# that's better
import jpype
jpype.startJVM('/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/i386/client/libjvm.so','-ea')
# for long names of modules
import jpype as jp
jp.startJVM('/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/jre/lib/i386/client/libjvm.so','-ea')
And see this:
http://docs.python.org/tut/node8.html
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
. "from jpype import"
This enters the name of the function startJVM in the currrent symbol
table,
so you can access the function just like that:
startJVM()
And have you read this: http://docs.python.org/tut/node8.html ?
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
):
print msg.__class__
for i in msg.keys(): # gets header names
print i
break
fmbx.close()
http://docs.python.org/lib/module-email.Message.html
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
kit; Microsoft took it off the net,
> but Google may still be able to help
I think the VS 2003 toolkit is a framework for extending Visual Studio
2003, IOW a bunch of .NET dlls, some examples and a helpfile (no
compiler).
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
=?ISO-8859-15?Q?=22Martin_v=2E_L=F6wis=22?= wrote in news:4514479B.5070808
@v.loewis.de in comp.lang.python:
> Rob Williscroft schrieb:
>> Download the 1.1 SDK:
>>
>> http://www.microsoft.com/downloads/details.aspx?familyid=9B3A2CA6-
>> 3647-4070-9F41-A333C6B9181D&am
Rob Williscroft wrote in news:Xns9846DDC7A18E0rtwfreenetREMOVEcouk@
216.196.109.145 in comp.lang.python:
>> That's yet another option. Somebody reported that the compiler in the
>> .NET SDK won't support generating optimized code, though. That's a
>> problem fo
ound enforcement on state variables and
parameters. There are several bug fixes and general improvements to
the API in this release too.
Please see http://pydstool.sourceforge.net for details and documentation.
Regards,
Rob, Drew, and Erik.
Center for Applied Mathematics,
Cor
nd' ] = HelloMolly
Where HelloMolly is an already defined python callable, for example:
def HelloMolly():
self.tts.Speak ('hello molly')
The above defenition of HelloMolly requires that somtime before it
is called, self.tts is created:
self.tts = pyTTS.Create()
HTH.
wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
> Hi all. How do I escape the "%" sign in a print statement so that it
> prints? Thanks.
>
print "%%"
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
Rob Williscroft wrote in news:Xns9849DC7DB4102rtwfreenetREMOVEcouk@
216.196.109.145 in comp.lang.python:
> wrote in news:[EMAIL PROTECTED] in
> comp.lang.python:
>
>> Hi all. How do I escape the "%" sign in a print statement so that it
>> prints? Thanks.
>>
(seq[::2], seq[1::2] + [None])
[(0, 1), (2, 3), (4, 5), (6, 7), (8, 9), (10, None)]
>>> seq = range(10)
>>> zip(seq[::2], seq[1::2] + [None])
[(0, 1), (2, 3), (4, 5), (6, 7), (8, 9)]
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
Rob Williscroft wrote in news:Xns984ACDA635C9rtwfreenetREMOVEcouk@
216.196.109.145 in comp.lang.python:
>>>> seq = range(11)
>>>> zip(seq[::2], seq[1::2] + [None])
> [(0, 1), (2, 3), (4, 5), (6, 7), (8, 9), (10, None)]
>
>>>> seq = range(10)
>>&g
them usiing different
> labels. This seems very clunky though, and there must be a better way.
> Can anyone offer any pointers or a short example for how to do this?
Try this:
menu.entryconfig(index, label="new_name")
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
nn() re-writen to return what you may have originaly expected:
def nn():
def _nn():
print 'inside'
yield 1
print 'before'
for i in _nn():
yield i
print 'after'
So to forward another generator you need to iterate over it an
o see one of those
> reasons.
What you wrote, where ?
>
> Arguably a better solution would be to do this:
>
> seconds = td.days * 24*60*60 + td.seconds
>
> Still not ideal though, although that depends on just how often you
> need to convert days to or from seconds.
>
>
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
ring all at once.
On the python 3k list there is a thread about stings becoming "views",
I think this is similar to what you are doing here.
http://search.gmane.org/?
query=string+view&author=&group=gmane.comp.python.python-
3000.devel&sort=relevance&DEFAULTOP=and&xP=
ifically, a raw string cannot end in a single backslash (since the
backslash would escape the following quote character). Note also that a
single backslash followed by a newline is interpreted as those two
characters as part of the string, not as a line continuation.
Rob.
--
http://mail.pytho
eval(type)
> return obj(row[table.c.name], row[table.c.handle])
>
>>> m = __import__( "StringIO" )
>>> x = getattr( m, "StringIO" )()
>>> x
>>>
Rob.
--
http://mail.python.org/mailman/listinfo/python-list
if fileinput.isfirstline():
> if not re.search('^From ',line):
> print line.rstrip('\n')
> # just print all other lines
> if not fileinput.isfirstline():
> print line.rstrip('\n')
> fileinput.close()
> # end of program
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
un() method to be invoked
in a separate thread of control.
Note the 2nd line:
This must be called at most once per thread object.
so you simply can't restart a Thread object.
[1] http://docs.python.org/lib/thread-objects.html
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
other ):
return self.lower() == other.lower()
def __hash__( self ):
return self.lower().__hash__()
def __setitem__( self, k, v ):
dict.__setitem__( self, idict.__istr( k ), v )
d = idict( a = 1, b = 2 )
d['A'] = 3
print d
Rob.
--
http://www.victim-prime.dsl.pip
t it. We do add support for new hardware all the time, so I'd be
interested in hearing about your application.
All the best,
-Rob
--
Rob Purser
Senior Team Lead, Connectivity Products
The MathWorks
[EMAIL PROTECTED]
"sturlamolden" <[EMAIL PROTECTED]> wrote in message
n
ope, the type argument to super tells it where you are in the
type hierarchy, type(self) is always the top of the hierarchy.
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
lcc/platform/shell/reference/objects/shellfolderitem/shellfolderit
em.asp>
Thats:
MSDN Home > MSDN Library > Win32 and COM Development > User Interface
> Windows Shell > Windows Shell > Shell Objects for Scripting and
Microsoft Visual Basic > ShellFolderItem >
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
dule(impname, [company])
m = imp.load_module(impname, fp, pathname, description)
return getattr(m, classname)
obj = get_class("SomeClass", "prog1", "company1")()
print obj.test()
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
as previously try...finally. I've tried it in 2.5 and it works
perfectly.
You have to use `from __future__ import with_statement`, though.
This statement will be always enabled in Python 2.6.
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
and stop it by
> user-Exception (after N passes or some complex criteria) without passing a
> recursion counter parameter through all the funcs?
What about `sys.setrecursionlimit`?
http://docs.python.org/lib/module-sys.html
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
t("/home/hg/test/test.py")
>>> dname
'/home/hg/test'
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
Mathias Panzenboeck wrote:
> Mark Tarver wrote:
> > How do you compare Python to Lisp? What specific advantages do you
> > think that one has over the other?
> >
> > Note I'm not a Python person and I have no axes to grind here. This is
> > just a question for my general education.
> >
> > Mark
>
Alex Mizrahi wrote:
> (message (Hello 'Kay)
> (you :wrote :on '(8 Dec 2006 08:03:18 -0800))
> (
>
> KS> http://www.sbcl.org/manual/Handling-of-Types.html#Handling-of-Types
>
> KS> If you'd read the docs of the tools you admire you might find the
> KS> answers yourself.
>
> SBCL is a COMPILER th
CLisp really blows its doors off.
+---
On my various machines, CMUCL startup is *slightly*
faster than CLISP, but both are under 20 ms...
I use Common Lisp for scripting a *lot*!
-Rob
-
Rob Warnock <[EMAIL PROTECTED]>
627 26th Avenue htt
Weird. This is exactly why I use *Lisp* -- because it stays
completely readable even if you don't use it on a daily basis!!!
[That's also why I *don't* use Perl, except when forced to...]
-Rob
-
Rob Warnock <[EMAIL PROTECTED]>
627 26th Avenue
lly-specified, bug-ridden,
slow implementation of half of Common Lisp."
-Rob
-
Rob Warnock <[EMAIL PROTECTED]>
627 26th Avenue http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
--
http://mail.python.org/mailman/listinfo/python-list
quot;good enough" for my purposes [given #2].
That's pretty much all you need to code in Lisp. It's what *I* use.
So "I loathe Emacs" is *NOT* a believable excuse for avoiding Lisp...
-Rob
-
Rob Warnock <[EMAIL PROTECTED]>
627 26th Avenue http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
--
http://mail.python.org/mailman/listinfo/python-list
vert)? That's in ANSI.
-Rob
-
Rob Warnock <[EMAIL PROTECTED]>
627 26th Avenue http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
--
http://mail.python.org/mailman/listinfo/python-list
Juan R. wrote:
> Ken Tilton ha escrito:
> > You missed it? Google fight:
> >
> >http://www.googlefight.com/index.php?lang=en_GB&word1=Python&word2=Ruby
> >
> > Python wins, 74 to 69.3. And there is no Monty Ruby to help.
> >
> > ken
>
> Nice animation!
>
> http://www.googlefight.com/index.php?l
Paul Rubin wrote:
> Pascal Costanza <[EMAIL PROTECTED]> writes:
> Yes; I'd rather go by what the standard says than rely on
> implementation-dependent hacks.
But in that case what do you call Python? The whole language has no
standard - is it an "implementation dependent hack"?
Standards are us
t; r = []
>>> for i in range(10):
def f( i = i ):
print i
r.append( f )
>>> for i in r:
i()
In this example the value of "i" is bound to the default argument
for the function "f" every time the def f() statments are executed.
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
pies)
everything through the matching paren into the anonymous buffer;
"d%" deletes likewise [and saves in the anonymous buffer]; "p" (or "P")
pastes after (or before) the current location. All can be prefixed
with a buffer ("Q-register") name for more flexib
loadable tarball of the whole thing, there's a link near
the bottom of this page:
http://www.lispworks.com/documentation/HyperSpec/index.html
-Rob
-
Rob Warnock <[EMAIL PROTECTED]>
627 26th Avenue http://rpw3.org/>
San Mateo, CA 94403
f course, that doesn't include the number of DEFUNs & DEFMACROs
which are defined *by* macros, or the total of 2809 DEFINE-VOPs
in the various flavors of the compiler...]
-Rob
-
Rob Warnock <[EMAIL PROTECTED]>
627 26th Avenue http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607
--
http://mail.python.org/mailman/listinfo/python-list
Robert Uhl wrote:
> Christophe <[EMAIL PROTECTED]> writes:
> > Robert Uhl a écrit :
> >
> >> The argument from popularity is invalid. French units have overtaken
> >> standard units,
> >
> > Never heard of that French unit thing. Unless you talk about that
> > archaic unit system that was in use b
mp;hl=en&q=setlocaltime+msdn&btnG=Google+Search>
Adding site:msdn.microsoft.com is even better (but alas more typing):
http://www.google.com/search?hl=en&lr=&client=firefox-
a&rls=org.mozilla%3Aen-US%3Aofficial_s&q=setlocaltime+site%
3Amsdn.microsoft.com&btnG=Sea
Podi wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
> Rob Williscroft wrote:
>>
>> Google will usually find the documentation of anything in the
>> Windows API however sometimes it also helps to add "msdn" to
>> your search as in:
> Yes, thank you
Bruno Desthuilliers wrote:
> Mathias Panzenboeck a écrit :
> > Rob Thorpe wrote:
> >
> >>Mathias Panzenboeck wrote:
> >>
> >>>Mark Tarver wrote:
> >>>
> >>>>How do you compare Python to Lisp? What specific advantages do
ef __init__(self):
self._voltage = 10
@property
def voltage(self):
"""Get the current voltage."""
return self._voltage
Note the use of "read-only" in the above description and that the
decorated function (voltage) *is* the
1]]
or if you need something that can be generalised:
[ind[i] for i in [0, -1]]
so if you have:
indexes_of_ind = [0, 2, -1, -2]
you can write:
[ind[i] for i in indexes_of_ind]
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
eclare (optimize (speed 3) (debug 0) (safety 0)))
(loop for i fixnum from 0 by 4
and v of-type (unsigned-byte 32) in values
do (setf (system:sap-ref-32 (system:int-sap addr) i) v))
(values))
Most other Common Lisp implementations surely have something similar.
-Rob
Anders J. Munch wrote:
> jayessay wrote:
> > Please note: GC is not part of CL's definition. It is likely not part
> > of any Lisp's definition (for reasons that should be obvious), and for
> > the same reasons likely not part of any language's definition.
>
> Really? So how do you write a port
Pascal Bourguignon wrote:
> "Rob Thorpe" <[EMAIL PROTECTED]> writes:
> > Anders J. Munch wrote:
> >> jayessay wrote:
> >> > Please note: GC is not part of CL's definition. It is likely not part
> >> > of any Lisp's definition (
Anders J. Munch wrote:
> Rob Thorpe wrote:
> > Anders J. Munch wrote:
> >> Really? So how do you write a portable program in CL, that is to
> >> run for unbounded lengths of time?
> >
> > You can't.
> >
> > The thing about the spe
Anders J. Munch wrote:
> Rob Thorpe wrote:
> > Anders J. Munch wrote:
> >> Let u(t) be the actual memory used by the program at time t.
> >> Let r(t) be the size of reachable memory at time t.
> >>
> >> Require that u(t) is a member of O(t -> max{t
s__;
otherwise, the class attribute would overwrite the descriptor assignment.
So its that the __slots__ assignment makes the descriptors and then the
subsiquent method defenitions and class attribute bindings remove them.
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote in
news:[EMAIL PROTECTED] in
comp.lang.python:
> Rob Williscroft wrote:
>> John Machin wrote in news:1167008799.074885.250770@
>> 73g2000cwn.googlegroups.com in comp.lang.python:
>>
>> > Given a = Adder(),
>> > a.tally = 0
>> &g
ers in
your programme from wxBlah to wx.Blah so:
class MyFrame( wxFrame ):
pass
becomes
class MyFrame( wx.Frame ):
pass
Rob.
--
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list
has a prebuilt action that applies a watermark to pdfs.
Transparency, size and placement are all editable. Obviously, no use if
you want to do this with Python, but it might suit your needs.
Rob C
--
http://mail.python.org/mailman/listinfo/python-list
the little "gotchas" involved in
cross platform development.
Rob
--
http://mail.python.org/mailman/listinfo/python-list
a=b/c
if (a >= 0.0):
d = int(a+0.5)
else:
d = int(a-0.5)
If you don't do this sort of thing your programs generally
are senstivie to the details of foating point rounding --
which is generally dependent on processor, compilier and
in pythons case probably the runti
gs to be excluded. My idea was to take an element,
examine what element precedes it and accordingly, insert it into the
relevant list. However, I have not been successful.
Is there a better way that I have not considered? If this method is
suitable, how might I implement it?
Thanks all,
Rob Cowie
--
http://mail.python.org/mailman/listinfo/python-list
Thanks everyone. I assumed there was something I had not considered...
list slicing is that thing.
The pyParsing example looks interesting - but for this case, a little
too heavy. It doesn't really warrant including a third party module.
Rob C
--
http://mail.python.org/mailman/listinfo/p
with Python.
I'm not asking for a comparison of each architecture per se that
seems to be well covered in this group. I would like to know how you
all would set about creating this realtively simple application.
Cheers,
Rob Cowie
Coventry University, Britain
--
http://mail.python.o
I agree with the sentiments that a single XML file is not the way to go
for storing data that may be accessed concurrently. However, my hands
are tied.
It seems that CGI is likely to be the most straightforward option. Is
the learning curve likely to be steeper for pure CGI or a web
application ar
Thanks for the comments.
I kind of get the impression that CGI is the way to go for this
application, and that I should forget about adding client-side
scripting based functionality for the sake of accessibility - which I
understand and kind of agree with.
I'll look into the problem of concurrent
As a relalative newbie myself I think I can say Python is used for
anything any major programming language is used for. One of its many
strengths is scalability - it can be used to great effect as a
scripting language AND as an object oriented language for creating
large, GUI apps.
Yours is not an
Ha,
I've just headed over here to ask the same thing!
Any good ideas not listed on the wiki?
I too am taking a Masters in Computer Science, however my first degree
was not purely CS - mostly microbiology, so I'm not yet what one would
call an expert
Cheers
--
http://mail.python.org/mailman/li
I'm not entirely sure what the point of your exercise is - if you have
access to the net, ,why do you want to collate code examples? They are
frequently updated in the cookbook so an offline repository would
quickly become out of date.
However you've aroused my interest in something related. W
:
sleep(100)
except KeyboardInterrupt:
pass
finally:
if popen.poll() is None:
print "killing process: %d" % popen.pid
os.kill(popen.pid, signal.SIGTERM)
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
ion childprocesses
become zombies and there is no way to avoid that.
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
t_encoding`` parameters
of ``Template``. Mako internally handles everything as Python unicode
objects.
For example:
t = Template(filename="templ.mako", input_encoding="iso-8859-2",
output_encoding="iso-8859-2")
content = t.render(**context)
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
ne terminators
$ file acrotex/eqchange.txt
acrotex/eqchange.txt:
$ file acrotex/exerquiz.dtx
acrotex/exerquiz.dtx: ISO-8859 English text, with CRLF line terminators
$ file -v
file-4.17
magic file from /etc/magic:/usr/share/file/magic
$ uname -orvm
2.6.18-4-k7 #1 SMP Wed May 9 23:42:01 UTC 2007 i686 GNU/Linux
That's really strange. Have you got only *one* version of ``file``
program on your machine?
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
boyeestudio wrote:
> Hi,all buddies.
> Are there any python jobs worked at home from the internet?
> I want to find a part time job.
> Please give a clue to this for me.
> Thanks a lot!
This is probably going to sound like I'm telling you something you
already know, but keep a close eye on the Pyt
)
except AttributeError:
pass
def start_a(self, attrs):
href = [v for k, v in attrs if k == "href"]
if href:
self.urls.extend(href)
parser = URLLister()
parser.feed(page)
parser.close()
for url in parser.urls: print url
--
Regards,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
l
It might be even one-liner:
print "\n".join((url.get('href', '') for url in tree.findall(".//a")))
But as far as HTML (not XML) is concerned this is not very realistic solution.
>
> I know that the wiki page is supposed to be Python 2.4 only, but I'd
> rather have no example than an outdated one.
This example is by no means "outdated".
--
Regards,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
on an XML
> parsing example instead?
>
> Thoughts?
I vote for example with ElementTree (without xpath)
with a mention of using ElementSoup for invalid HTML.
--
Regards,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
terator('tr'):
amt, unit, item = ingredient.getchildren()
if item.tag == "td" and item.text not in pantry:
print "%s: %s %s" % (item.text, amt.text, unit.text)
But if that's too complicated I will not insist on this. :)
Your example is good enough.
--
Regards,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
umming there is a slick, pythonic way of doing this, besides
> writing out a beast of a looping function. I've looked around on
> activestate cookbook, but have come up empty handed. Any suggestions?
You didn't try hard enough. :)
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/190465
--
HTH,
Rob
--
http://mail.python.org/mailman/listinfo/python-list
altime()
>
> I want just the date, like 2007-06-15. The value will go into a
> postgresql Date type column.
>>> import datetime
>>> d = datetime.date.today()
>>> d.isoformat()
'2007-06-15'
>>>
Rob.
--
http://mail.python.org/mailman/listinfo/python-list
a
>> > postgresql Date type column.
>>
>> >>> import datetime
>> >>> d = datetime.date.today()
>> >>> d.isoformat()
>> '2007-06-15'
>> >>>
>> >>>
>> Rob.
>>
> Thank
[EMAIL PROTECTED] wrote:
> So, I'm writing this to have your opinion on what tools I should use
> to do this and what technique I should use.
Take a look at parsing example on this page:
http://wiki.python.org/moin/SimplePrograms
--
HTH,
Rob
--
http://mail.python.org/mailman/list
of appending a fragment to the url?
Would anyone be so kind as to provide a working example?
cheers,
Rob Cowie
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 19, 8:13 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Rob Cowie wrote:
> > I currently use easy_install to install packages from a custom,
> > locally hosted package_index. The index consists of a single html doc
> > with a list of package names and urls. Al
501 - 600 of 1008 matches
Mail list logo