I plan on writing some documentation that will consist of blocks of
commentary with interspersed snippets of syntax-colored Python code and
the occaisional image.
Does anyone know of a package that will take a high level description
of what I just described and auto-generate clean-looking web page
[EMAIL PROTECTED] writes:
> But Lisp isn't dynamically typed "exactly the way Python is".
> Python documents ways to manipulate the internals of objects at
> runtime. It is possible to add, change or delete methods and slots
> by directly changing the hashtable they're stored in. While CLOS
> doe
cool i just tried:
>>> import os
>>>snd_filelist = [f for f in os.listdir('/Users/foo/snd') if
>>>f.endswith('.aif')]
and it worked! and will take a huge bite out of my big script ... which
i make by doing an ls
in the terminal and editing (boo hoo)
one one lc and one import!
cool..
that oth
Hallöchen!
Peter Mayne <[EMAIL PROTECTED]> writes:
> Torsten Bronger wrote:
>
> Another example: is Java the bytecode, which is compiled from
> Java the language, interpreted or not? Even when the HotSpot
> JIT cuts in?
It is partly interpreted and partly compiled. That's w
gosh i could even use other string methods like startswith to take all
the files in a given directory which i have organized with a prefix and
have them stuffed in different lists ... i think ...
snd_filelist = [f for f in os.listdir('/Users/foo/snd') if
f.endswith('.aif') & f.startswith('r')]
\
On Thu, 23 Feb 2006 14:46:20 +0100, Franz Steinhaeusler
<[EMAIL PROTECTED]> wrote:
>Hello, I need a regularexpression, which trims trailing whitespaces.
>
>While with unix line endings, it works;
>but not with Window (Dos) CRLF's:
Thank you all for the replies.
But I still don't have a solution.
John Salerno wrote:
> Ok, seems like the verdict is that the server doesn't have mod_python
> nor does it detect the .psp extension. It can, however, detect the .py
> extension. But does this mean I can simply include Python code in my
> HTML files, and then give my HTML files a .py extension?
On Fri, 24 Feb 2006 00:24:25 +, Jeffrey Schwab wrote:
> Steven D'Aprano wrote:
>> On Thu, 23 Feb 2006 12:05:59 -0800, darthbob88 wrote:
>>
>> My comments inserted inline.
>>
>>
>>
>>>#!/usr/bin/python
>>>#simple guessing game, with numbers
>>>import random
>>>spam = random.randint(1, 100)
Franz Steinhaeusler wrote:
> On Thu, 23 Feb 2006 14:46:20 +0100, Franz Steinhaeusler
> <[EMAIL PROTECTED]> wrote:
>
>> Hello, I need a regularexpression, which trims trailing whitespaces.
>>
>> While with unix line endings, it works;
>> but not with Window (Dos) CRLF's:
>
> Thank you all for the
On Thu, 23 Feb 2006 17:49:31 -0600, Larry Bates wrote:
> Steven D'Aprano wrote:
>> On Thu, 23 Feb 2006 14:30:22 -0600, Larry Bates wrote:
>>
>>> How about not naming files with leading and trailing spaces on
>>> the Mac? Seems like a bad habit that needs breaking ;-).
>>
>> Why is it a bad habi
Steven D'Aprano wrote:
> Just out of curiosity, when do you think is the right time to begin
> teaching programmers good practice from bad? Before or after they've
> learnt bad habits?
When you have authority over the coding guideline. Naming things is not
something limited to programming and most
Dr. Pastor wrote:
> Several Documents about Python
> refer to PYTHONPATH.
> I could not find such variable.
> (Python 2.4.2, IDLE 1.1.2, Windows XP)
> How should/could I nominate a Directory to be
> the local Directory?
> Thanks for any guidance.
It's a so called environment-variable. You can set
On Thu, 23 Feb 2006 20:41:52 -0600, Terry Hancock wrote:
> On Fri, 24 Feb 2006 09:14:53 +1100
> "Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
>> There are *reasons* why Python discourages functions with
>> side-effects. Side-effects make your code hard to test and
>> harder to debug.
>
> You of co
On Thu, 23 Feb 2006 16:49:09 -0800, bonono wrote:
>
> Steven D'Aprano wrote:
>> On Thu, 23 Feb 2006 12:04:38 -0700, Bob Greschke wrote:
>>
>> >> try:
>> >>i = a.find("3")
>> >>print "It's here: ", i
>> >> except NotFound:
>> >>print "No 3's here"
>> >
>> > Nuts. I guess you're right.
I V wrote:
> snd_filelist = [f for f in os.listdir('/snd/Public/') if
> f.endswith('.aiff')]
Or even
from glob import glob
snd_filelist = glob('/snd/Public/*.aiff')
Jeremy
--
Jeremy Sanders
http://www.jeremysanders.net/
--
http://mail.python.org/mailman/listinfo/python-list
Does anyone have a script to convert more conventional USENET quoting
style like this:
John wrote:
> Jacob Jingleheimer Schmidt <[EMAIL PROTECTED]> wrote in message-id
on 29 February 2004:
>> Lambda is the best Python feature ever!
>
> I disagree.
to the commonly used python-dev/python-lis
I have come over a strange problem regarding exceptions
This is my code:
try:
#some operation
except Exception, info:
#some message
except:
#??
When executing my code, I get to the last block here. This
I find rather strange, because I thought Exception would catch
all exceptions. But this
[EMAIL PROTECTED] wrote:
> I'm not calling COMMIT at all.
Then you must be using autocommit if your records stay in
the table. An DB-API 2.0 compliant adapter should turn off
autocommit by default! Does MyISAM even support proper
commit handling?
Oh well, Oracle will probably kill MySQL soon. G
Steven D'Aprano wrote:
> It looks like the time function under Linux at least is very slow.
Perhaps you should try doing the same thing in C.
Then you can see whether the problem is in the
wrapper or in the system call.
--
http://mail.python.org/mailman/listinfo/python-list
kanchy kang wrote:
> i browsed the following frameworks briefly: nose, OOBTest,
> testosterone, py.test, Sancho ... and found out they do support
> imediate screen-output only.
Look at TextTest.
--
http://mail.python.org/mailman/listinfo/python-list
Rubic wrote:
> I can understand why datetime can't handle
> arbitrary string inputs, but why not just
> simple iso8601 format -- i.e. the default
> output format for datetime?
Have you actually read the ISO 8601 standard?
If you have, you would know that parsing valid
ISO 8601 is fairly close to h
Steven D'Aprano wrote:
> On Thu, 23 Feb 2006 16:49:09 -0800, bonono wrote:
>
> >
> > Steven D'Aprano wrote:
> >> On Thu, 23 Feb 2006 12:04:38 -0700, Bob Greschke wrote:
> >>
> >> >> try:
> >> >>i = a.find("3")
> >> >>print "It's here: ", i
> >> >> except NotFound:
> >> >>print "No 3's
Odd-R. wrote:
> I have come over a strange problem regarding exceptions
> This is my code:
>
> try:
> #some operation
> except Exception, info:
> #some message
> except:
> #??
>
> When executing my code, I get to the last block here. This
> I find rather strange, because I thought Exceptio
Can anyone give an example how to send email with non-ascii characters(
both in subject and body).
I would like to use windows-1250 code page
Thank you
L.B.
--
http://mail.python.org/mailman/listinfo/python-list
Lad enlightened us with:
> Can anyone give an example how to send email with non-ascii
> characters( both in subject and body). I would like to use
> windows-1250 code page
I'd use Latin-1 or UTF-8, since they are both cross-platform instead
of windows-specific...
Sybren
--
The problem with the
On Thu, 23 Feb 2006 15:13:01 +0100, Franz Steinhaeusler wrote:
>>why not use string methods strip, rstrip and lstrip
>>
>
> because this removes only the last spaces,
r
> 'erewr\r\nafjdskl '
r.rstrip()
> 'erewr\r\nafjdskl'
>
> I want:
> 'erewr\r\nafjdskl'
>
> or for unix l
On Fri, 24 Feb 2006 10:11:18 +0100, Magnus Lycka wrote:
> Steven D'Aprano wrote:
>> It looks like the time function under Linux at least is very slow.
>
> Perhaps you should try doing the same thing in C.
> Then you can see whether the problem is in the
> wrapper or in the system call.
Good idea
Try using The Path module:
http://www.jorendorff.com/articles/python/path/.
I wrote a little script to traverse a directory structure which you
could use. (You just pass a function to it and it runs it on each file
in the directory. You want it to run on each directory instead, so
I've changed i
Odd-R.:
>I thought Exception would catch all exceptions.
Try this:
import sys
try:
pass # your code here
except:
e = sys.exc_value()
Either to catch everything, or to get a hold on e.
--
René Pijlman
--
http://mail.python.org/mailman/listinfo/python-list
Sybren,
and can give me an example of Python code that can send such email??
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano schreef:
> On Fri, 24 Feb 2006 10:11:18 +0100, Magnus Lycka wrote:
>
>> Steven D'Aprano wrote:
>>> It looks like the time function under Linux at least is very slow.
>> Perhaps you should try doing the same thing in C.
>> Then you can see whether the problem is in the
>> wrapper or
On Fri, 24 Feb 2006 01:50:40 -0800, bonono wrote:
> Steven D'Aprano wrote:
>> Just out of curiosity, when do you think is the right time to begin
>> teaching programmers good practice from bad? Before or after they've
>> learnt bad habits?
>
> When you have authority over the coding guideline.
Dr. Pastor wrote:
> Several Documents about Python refer to PYTHONPATH.
If you need to import libraries into Python, that don't reside in the
standard locations in your Python installation, you need to define
a PYTHONPATH environment variable in the operating system, which
points out this director
kpp9c wrote:
> that other sillyness i mentioned is not strickly required ... just
> dreaming but i know involves some kind of os walk type thing prolly ...
os.walk isn't exactly rocket science... Something similar to this?
>>> import os
>>> for dir, dirs, files in os.walk('.'):
... txt_fil
Paul Probert wrote:
> Yes, I'm doing this:
> .
> oldtime=time.time()
> time.sleep(1)
> newtime=time.time()
> dt=newtime-oldtime
> if dt > 2:
> print 'dt=',dt,' time=',time.strftime('%Y_%m_%d_%Hh_%Mm_%Ss')
> Its happening roug
On Fri, 24 Feb 2006 02:02:02 -0800, bonono wrote:
>> "test".index("a")
>> > Traceback (most recent call last):
>> > File "", line 1, in -toplevel-
>> > "test".index("a")
>> > ValueError: substring not found
>> "test".find("a")
>> > -1
>>
>>
>> Did you have a point?
>>
> It was abou
On Fri, 24 Feb 2006 10:51:09 +, Roel Schroeven wrote:
[snip]
> I think it looks like the problem is in the system call.
Thank you Roel for going the extra mile. I appreciate the unexpected bonus.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
Said obscure dialog is here:
My Computer > Properties > Advanced (tab) > Environment Variables
You probably want a new system variable.
You can check the value by starting a new terminal window and typing:
echo %PYTHONPATH%
Cheers
Tombo
Diez B. Roggisch wrote:
> Dr. Pastor wrote:
>
> > Several
Torsten Bronger wrote:
>
> Peter Mayne <[EMAIL PROTECTED]> writes:
> > What kind of implications are useful to you?
>
> Speed, ease of programming, necessity to learn/use a secondary
> language, issues with distributing, portability.
Indeed. Given the various convenient arguments about what "inter
On Thu, 23 Feb 2006 17:41:47 +, Martin Franklin
<[EMAIL PROTECTED]> wrote:
>Franz Steinhaeusler wrote:
>> On Thu, 23 Feb 2006 13:54:50 +, Martin Franklin
>> <[EMAIL PROTECTED]> wrote:
>>
>>> r="erewr\r\nafjdskl "
'erewr\r\nafjdskl'
2) Unix
>>> r="erewr
On Fri, 24 Feb 2006 12:36:01 +0100, Franz Steinhaeusler
<[EMAIL PROTECTED]> wrote:
>if n > 1:
if n > 0: (of course) :-)
--
Franz Steinhaeusler
--
http://mail.python.org/mailman/listinfo/python-list
Erwin S. Andreasen wrote:
> Pickling a Cookie.SimpleCookie (or SmartCookie) when using protocol=2
> seems to do something very strange. Protocol 0/1 work fine:
>
> $ python2.4
> Python 2.4.2 (#2, Nov 20 2005, 17:04:48)
> [GCC 4.0.3 2005 (prerelease) (Debian 4.0.2-4)] on linux2
> Type "help",
Yes I am but, I'm using a DOM Serializer in Firefox which for some
reason turns myCamelNames into MYCAMELNAMES for the nodenames. I'll
therefore need to control the case-spelling of these things as I'm
formatting the XML string.
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> Now that's a Python wart: using >>> for the prompt for interactive
> sessions. It makes it ambiguous when posting code in email or newsgroups,
> especially once the code gets quoted a few times.
So change it. My pythonstartup.py contains:
import sys
sys.ps1 = ' >>> '
sys.
Op 2006-02-23, Roy Smith schreef <[EMAIL PROTECTED]>:
> Bob Greschke <[EMAIL PROTECTED]> wrote:
>>I miss being able to do something like this in Python
>>
>>1f (I = a.find("3")) != -1:
>>print "It's here: ", I
>>else:
>>print "No 3's here"
>>
>>where I gets assigned the index returned by fi
Hi,
I was wondering if there is any way to make KDE PanelApplets using Python. I
have made a small window using Qt, kdeui nad kdecore libs. Now I want to add it
to the KDE kicker. Can I get any help regarding this matter.
Thank you.
--
---
Varun Hire
Magnus Lycka wrote:
> [EMAIL PROTECTED] wrote:
> > I'm not calling COMMIT at all.
>
> Then you must be using autocommit if your records stay in
> the table. An DB-API 2.0 compliant adapter should turn off
> autocommit by default! Does MyISAM even support proper
> commit handling? [...]
No, it d
Franz Steinhaeusler wrote:
>
> Thank you all for the replies.
> But I still don't have a solution.
>
> Of course with more lines it is possible,
> but it would be fine to have a "oneliner".
re.sub(r"\s+[\n\r]+", lambda x: x.expand("\g<0>"). \
lstrip(" \t\f\v"),text).rstrip()
...where "tex
I am not a Python expert, but I am using KDE on my workstation at home
and a big Python fan ;)
A couple of days ago I was thinking the same and found how to create
systray apps for Windows!
You can make this kind of apps with wxPython.
When I was at home and behind my KDE desktop I tried the Wind
On Fri, 24 Feb 2006 06:45:41 -0500, Kent Johnson wrote:
> Steven D'Aprano wrote:
>> Now that's a Python wart: using >>> for the prompt for interactive
>> sessions. It makes it ambiguous when posting code in email or newsgroups,
>> especially once the code gets quoted a few times.
>
> So change it
Steven D'Aprano wrote:
> On Fri, 24 Feb 2006 00:24:25 +, Jeffrey Schwab wrote:
>
>
>>Steven D'Aprano wrote:
>>
>>>On Thu, 23 Feb 2006 12:05:59 -0800, darthbob88 wrote:
>>>
>>>My comments inserted inline.
>>>
>>>
>>>
>>>
#!/usr/bin/python
#simple guessing game, with numbers
import
In article <[EMAIL PROTECTED]>,
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> Side-effects aren't always bad (import, for example, does all its work by
> side-effect). But they are generally frowned upon, and in functional
> languages they are verboten.
How do you do any I/O in a functional langu
Magnus,
Thanks for your reply. I wasn't clear in my
prior post. Rather than support the entire
range of iso8601 formats, how about *just* the
format that datetime emits? Call it the
parse_datetime() function. Then it would be
possible to take the output string of a datetime
object and read it
Dear Black Knight,
I have no quarrel with you sir Knight, but I must import your parents.
SHORT VERSION:
I tried three variants of "from ../brave.py import sir_robin", one
works. I want to use it in a py-file to execute command-line-style and
that does not work.
Can someone please give me, not
per9000 wrote:
from raw2nice_def import raw2nice
> --
>
> When I tried putting this into a program to execute command-line-style:
>
> from raw2nice_def.py import raw2nice
>
> output:
>
>>"C:\another_bridge\python\python.exe" rawhtml2nicehtml_template.py
>
> ['raw2nice_def.py', 'ra
Roy Smith:
>How do you do any I/O in a functional language if side effects are
>verboten?
The user is a function. Output is its parameter, input its return value.
The user is not allowed to maintain state ;-)
>For that matter, how does a functional program ever stop running?
By returning to t
On 24 Feb 2006 05:10:37 -0800, per9000 <[EMAIL PROTECTED]> wrote:
SHORT VERSION:I tried three variants of "from ../brave.py import sir_robin", oneworks. I want to use it in a py-file to execute command-line-style andthat does not work.Can someone please give me, not a bucket with the desert(s) on t
On Fri, 24 Feb 2006 08:03:49 -0500, Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>> Side-effects aren't always bad (import, for example, does all its work by
>> side-effect). But they are generally frowned upon, and in functional
>> languages
On Fri, 2006-02-24 at 08:10, per9000 wrote:
> Dear Black Knight,
>
> I have no quarrel with you sir Knight, but I must import your parents.
>
>
> SHORT VERSION:
>
> I tried three variants of "from ../brave.py import sir_robin", one
> works. I want to use it in a py-file to execute command-line-
Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>> Side-effects aren't always bad (import, for example, does all its work by
>> side-effect). But they are generally frowned upon, and in functional
>> languages they are verboten.
>
> How do you d
Chad Whitacre:
>I am pleased to announce the first public release of httpy -- a sane and
>robust HTTP library for Python. With httpy, you write "responders," and
>put them on the network with "couplers." Here is a trivial responder:
>
> import httpy
>
> class Responder:
> def respond(requ
Another way to do it is to use ksystraycmd which is included with your
KDE. Some usage info is covered in my tutorial:
http://xmelegance.org/customising-window-behaviour/html/customising-window-behaviour.html
Rich.
--
http://mail.python.org/mailman/listinfo/python-list
Thanks,
I added an environment variable PYTHONPATH and added the holy folder
with my script in. Works just perfectly.
But still: is there a way around this? (It is a lot easier to add
"../../" in my code than make everyone else add this variable).
/per9000
--
http://mail.python.org/mailman/lis
Hi,
I would like to create a dictionary of all the classes that exist while my
app is running. This is the best I can do:
def defineClassesDict (self):
self.allClassesDict = {}
for z in gc.get_objects():
t = type(z)
if t == types.ClassType:
name
Franz Steinhaeusler <[EMAIL PROTECTED]> wrote:
>On Thu, 23 Feb 2006 13:54:50 +, Martin Franklin
>>why not use string methods strip, rstrip and lstrip
>because this removes only the last spaces,
> [given r = 'erewr\r\nafjdskl ']
>I want:
>'erewr\r\nafjdskl'
os.linesep.join(l.rstrip() f
Magnus Lycka wrote:
> With an operating system such as Windows, this is
> probably something you can expect to happen, although
> I'm surprised if such long lag times as 200 s are typical.
No way. I mean, I'm the biggest critic of Windows operating systems
when used in realtime environments (at
You don't _need_ to go the PYTHONPATH route (although that works).
Re-read Carsten's post (particularly step 1, see section 6.1.1).
You can use:
sys.path.append('..')
from brave import sir_robin
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2006-02-24 at 09:10, per9000 wrote:
> Thanks,
>
> I added an environment variable PYTHONPATH and added the holy folder
> with my script in. Works just perfectly.
>
> But still: is there a way around this? (It is a lot easier to add
> "../../" in my code than make everyone else add this va
Rubic wrote:
> Thanks for your reply. I wasn't clear in my
> prior post. Rather than support the entire
> range of iso8601 formats, how about *just* the
> format that datetime emits? Call it the
> parse_datetime() function. Then it would be
> possible to take the output string of a datetime
> o
Grant Edwards wrote:
>Time to dowload a linux CD then, eh?
>
>
>
We are looking at that very seriously. The big hurdle is that we run a
lot of laboratory hardware that has no support under linux. A world
where there is no more Kazaa or sasser seems like it would be wonderful,
though.
Paul Pr
On 24/02/06, John Zenger <[EMAIL PROTECTED]> wrote:
Franz Steinhaeusler wrote:>> Thank you all for the replies.> But I still don't have a solution.>re.sub(r"\s+[\n\r]+", lambda x: x.expand("\g<0>"). \ lstrip(" \t\f\v"),text).rstrip()
But I think your code is a lot easier to read. :)
How about:
Claudio Grondi wrote:
> Paul Probert wrote:
>
>> Peter Hansen wrote:
>>
>>> Are you saying that you believe the time.sleep(1) call is actually
>>> blocking for 200 seconds?
> With such rare occurrence it is very hard to tell what is going on.
> Usually I put such strange things on a list of curi
Is there anything particularly bad with
obj = eval(classname + "()")
?
It appears to work, but I'm a noobie so I could be missing something
nasty, in which any edication would be gratefully received.
Mike
--
http://mail.python.org/mailman/listinfo/python-list
Magnus Lycka wrote:
> The other option is ASP. You have been given information about
> that already. Be aware that ASP does not imply VBScript. You can
> use Python in ASP as long as that's enabled. It seems to be exactly
> what you are asking for, so I don't understand why you seem to reject
> it
Dennis Lee Bieber wrote:
>On Thu, 23 Feb 2006 15:56:09 -0600, Paul Probert <[EMAIL PROTECTED]>
>declaimed the following in comp.lang.python:
>
>
>
>
>> Thanks for the reply. I should have mentioned, this happens to just
>>about every machine in our collection of about 20 machines. Each is of a
Thanks Peter,
because you have understood my need: a little understanding of
readlines() function.
# Following snippets of code is running in infinitive loop, but it is
not
necessary too be worried about processor utilization because the
readline waits for the data on the serial port and th
Torsten Bronger wrote:
> Hallöchen!
>
> "Paul Boddie" <[EMAIL PROTECTED]> writes:
>
> > Kay Schluehr wrote:
> >
> >> I would say yes, it is still "proper Python" in that each RPython
> >> program is also a CPython program.
> >
> > I suppose it depends on which direction you're coming from, in
> >
thanks philippe,
Hi will take care for the that.
--
http://mail.python.org/mailman/listinfo/python-list
...and there was much rejoicing... Even better, thanks - you guys are
the best.
import string, time, sys
sys.path.append("../../py_scripts")
Works just nice, and yes, I removed the env.variable before I tried it
:-D
/Per9000
--
http://mail.python.org/mailman/listinfo/python-list
"Erwin S. Andreasen" <[EMAIL PROTECTED]> writes:
> Pickling a Cookie.SimpleCookie (or SmartCookie) when using protocol=2
> seems to do something very strange. Protocol 0/1 work fine:
Oh well, it seems that it's a well-known bug that has been around for
more than 2 years:
http://sourceforge.net/t
Yeah, it's a trivial function that's rewritten for each new project
that passes datetime objects as strings <0.2 wink>. On the basis of it
being a trivial convenience, I could propose removing hundreds of
"redundant" functions from the library. ;-)
Never mind. I'll drop it.
Jeff Bauer
Rubicon,
John Salerno wrote:
> Magnus Lycka wrote:
>
>> The other option is ASP. You have been given information about
>> that already. Be aware that ASP does not imply VBScript. You can
>> use Python in ASP as long as that's enabled. It seems to be exactly
>> what you are asking for, so I don't understand
Cameron:
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Dean Allen Provins <[EMAIL PROTECTED]> wrote:
>
>>I need to determine the size of a canvas while the process is running.
>>Does anyone know of a technique that will let me do that?
>
> .
>
Hallöchen!
"Kay Schluehr" <[EMAIL PROTECTED]> writes:
> Torsten Bronger wrote:
>
>> [...]
>>
>> I'm still afraid of the following scenario: Eventually, people
>> might regard "RPython plus type declarations" (or something
>> similar) as first-class Python because it's faster and runs on
>> more i
The Apache Software Foundation and The Apache HTTP Server Project are
pleased to announce the release of version 3.2.8 of mod_python.
This release addresses a vulnerability in mod_python's FileSession
object whereby a carefully crafted session cookie could potentially
permit an attacker to execut
Dean Allen Provins wrote:
> Cameron:
>
> Cameron Laird wrote:
>> In article <[EMAIL PROTECTED]>,
>> Dean Allen Provins <[EMAIL PROTECTED]> wrote:
>>
>>> I need to determine the size of a canvas while the process is running.
>>> Does anyone know of a technique that will let me do that?
>>
Hello again my friends
here's my new problem.
How i can translate chr in to hex or int to integer value?
Best Regards
Luca
--
http://mail.python.org/mailman/listinfo/python-list
Andreas,
Congratulations, it's a well polished release.
For those not familiar with FLTK, there are many examples in the
Python24/pytfltk/test directory.
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I've spent all morning trying to work this one out:
I've got the following string:
04/01/2006Wednesday 09:1412:4412:5017:5808:14
from which I'm attempting to extract the date, and the five times from
into a list. Only the very last time is guaranteed to be there so it
should also wo
luca72 wrote:
> Hello again my friends
>
> here's my new problem.
>
> How i can translate chr in to hex or int to integer value?
print "%x" % ord('a')
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Kent Johnson wrote:
> John Salerno wrote:
>> Magnus Lycka wrote:
>>
>>> The other option is ASP. You have been given information about
>>> that already. Be aware that ASP does not imply VBScript. You can
>>> use Python in ASP as long as that's enabled. It seems to be exactly
>>> what you are asking
kanchy kang wrote:
>
> I don't think redirecting stdout to a file is a good resolution.
Nobody is suggesting:
python program.py >output
or
program.py >output
What is being suggested is:
import sys
import module
original, sys.stdout = sys.stdout, open('output', 'w')
t
John Salerno wrote:
> Kent Johnson wrote:
>
>> John Salerno wrote:
>>
>>> Magnus Lycka wrote:
>>>
The other option is ASP. You have been given information about
that already. Be aware that ASP does not imply VBScript. You can
use Python in ASP as long as that's enabled. It seems to
Or:
py> print hex(ord('a'))
0x61
py> print int(ord('a'))
97
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
is there a simple way to stop a doctest execution within its code ?
my use case is to abort the execution of part of the doc, given an arbitrary condition.
That could be: existence of a third party package or whatever.
Adding tests throughout the doctest does not look good.
Maybe it's ti
Mike Woodhouse wrote:
> Is there anything particularly bad with
> obj = eval(classname + "()")
> It appears to work, but I'm a noobie so I could be missing something
> nasty, in which any edication would be gratefully received.
It is a little too indirect. Usually wanting to use "eval" or "
There's more to re than just sub. How about:
sanesplit = re.split(r"||", text)
date = sanesplit[1]
times = times = [time for time in sanesplit if re.match("\d\d:\d\d",
time)]
... then "date" contains the date at the beginning of the line and
"times" contains all your times.
--
http://mail.pyth
John Salerno wrote:
> Maybe I'm misunderstanding what is meant when you say to use ASP. I'm
> thinking that it involves having to learn another language (such as C#
> with ASP.NET), instead of writing my code in Python. Is that not the case?
Nope. Just like CGI, ASP is language agnostic. It's a
On Fri, 24 Feb 2006 06:37:27 -0800, Mike Woodhouse wrote:
> Is there anything particularly bad with
>
> obj = eval(classname + "()")
>
> ?
>
> It appears to work, but I'm a noobie so I could be missing something
> nasty, in which any edication would be gratefully received.
In your own code, th
John Salerno wrote:
> Kent Johnson wrote:
> > John Salerno wrote:
> >> Magnus Lycka wrote:
> >>
> >>> The other option is ASP. You have been given information about
> >>> that already. Be aware that ASP does not imply VBScript. You can
> >>> use Python in ASP as long as that's enabled. It seems to
1 - 100 of 207 matches
Mail list logo