Replying to myself ...
I cooked up this solution involving os.pipe and os.fork, but I am not
especially happy with
it; anyway, let me write it. Feedback is welcome, since this was
written very quickly and
I may have missed something. BTW, are there libraries out there doing
something similar?
---
Hi all. I've attached my SendReceive class. I have e a big problem! My program create a packet, then call the send function to send this. the first time the packet is not sent, then it works perfectly!WHY??? Have you idea??
-- Sbaush
from socket import *
from struct import *
from string import *
c
| i'd like to do the following kind of event/job scheduling:
| run some task(s) (python code) everyday at (say) 8am for (say) a week.
|
| i need to do this for both windows xp and suse linux
| machines. although i know
| that i can use cron or its equivalent in windows to kick off
| the python i
Stefan Behnel wrote:
> M�ta-MCI schrieb:
>> The second way don't run:
>>
>> Traceback (most recent call last): File "C:\Program
>> Files\OpenOffice.org 2.0\program\hello_world.py", line 1, in?
>> import uno File "C:\Program Files\OpenOffice.org
>> 2.0\program\uno.py", line 37, in ? import pyuno I
[EMAIL PROTECTED] wrote:
> Is there a way to temporarily halt execution of a script (without using
> a debugger) and have it put you in an interactive session where you
> have access to the locals? And possibly resume? For example:
>
>
def a():
>
> ... x = 1
> ... magic_breakpoint()
>
Hello. I have written a module called PyAtom. It is designed to make it
really easy to create an Atom syndication feed.
Atom is a format similar to RSS, but with some additional features.
http://atomenabled.org/developers/syndication/
>From my Google searches, I think the name "PyAtom" is ava
jkn wrote:
>Hi all
>I'm considering having a go at replacing the wooden door step to
>our back door. The original is loose and rotting.
>
>I'm sure some of this will be clearer when I remove the (metal) door
>frame - how is such a step fixed? Vertical frame fixings?
>
>Also, any suggestions fo
'rar' is not recognized as an internal or external command,
operable program or batch file.
import os
import time
source = [r'e:\temp\code',r'e:\temp\domains']
target_dir = r'e:\temp\bak'
target = target_dir+time.strftime('%Y%m%d%H%M%S')+'.rar'
rar_cmd = "rar a -idcdp %s %s" % (target,' '.join(s
Hi !
I need to create a program that read eml file headers, analyze the
receive tags and create a path database. I finished with this program
section.
But I want to show a graphical summary about the paths.
This is (what I want to show) like a graph - show ways, stations, etc,
and I want to s
"Steve R. Hastings" <[EMAIL PROTECTED]> writes:
> I intend to donate this to the Python Software Foundation, so I have
> released it under the terms of the Academic Free License 2.1.
>
> You can download it from here:
>
> http://www.blarg.net/~steveha/pyatom.tar.gz
>
>
> The file includes a readme
Katja Suess wrote:
> Thanks. What I have in mind is to write a Python script to generate
> PDFs from a set of ODTs.
Pay attention that you have a OOo program running somewhere that accept
the connection from your zope server (I don't think that you have a X
server running on it.)
> This script ha
> you don't follow PEP 8 guidelines
Why do you say this? I don't think the code is perfectly polished and
ready to be called version 1.0, but I think it follows PEP 8 more than not.
> and AFAIK a module must be widespread and used by
> the community before can be accepted in the Python core.
I
Hi,
I found this interface
http://home.arcor.de/mulk/projects/mascyma/download.xhtml.en
I am actually have troubles to get it working. Some warnings and
errors occur when I try to start it. If anybody will have a look on
it na dget in running with python 2.4, please let me know.
I think it is
Hi,
I know in java , we can use
class.ForName("classname")
to get an instance of the class 'classname' from a
string , in python , how do I do that ?
Thanks in advance !
--
http://mail.python.org/mailman/listinfo/python-list
"Steve R. Hastings" <[EMAIL PROTECTED]> writes:
> Why do you say this? I don't think the code is perfectly polished and
> ready to be called version 1.0, but I think it follows PEP 8 more than not.
docstrings of method are messed up (why you begin them from the column 0?)
and
"
Function Na
Dennis Lee Bieber wrote:
> On Wed, 22 Feb 2006 20:43:38 GMT, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>
>>Does that answer the question about active scripting language?
>
>
> Slipping in... It sure sounds to me like they have Python as a pure
> CGI
Klaas wrote:
> Claudio Grondi wrote:
>
>
>>Beside the intended database file
>> databaseFile.bdb
>>I see in same directory also the
>> __db.001
>> __db.002
>> __db.003
>>files where
>> __db.003 is ten times as larger as the databaseFile.bdb
>>and
>> __db.001 has the same size as the d
Ê÷Éϲä»Ò wrote:
> 'rar' is not recognized as an internal or external command,
> operable program or batch file.
>
>
> import os
> import time
> source = [r'e:\temp\code',r'e:\temp\domains']
> target_dir = r'e:\temp\bak'
> target = target_dir+time.strftime('%Y%m%d%H%M%S')+'.rar'
> rar_cmd = "rar a
Bo Yang:
> to get an instance of the class 'classname' from a
> string , in python , how do I do that ?
This is a possibile way:
class C: pass
c = locals()["C"]()
print c
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
I'm having problems writing unicode to a csv file.I use the following code:-import codecsimport csvcsvfile = csv.writer(codecs.open('filename.csv','w+','utf-8'))a = u'\xc9'
csvfile.writerow([a,a])
-It fails with the message: UnicodeEncodeError: 'ascii
Forgot to mention that I work on Windows XP and Windows 2003.On 2/23/06, Rudy Schockaert <[EMAIL PROTECTED]
> wrote:I'm having problems writing unicode to a csv file.I use the following code:
-import codecsimport csvcsvfile = csv.writer(codecs.open('filename.csv','w+','utf-8
Ę÷ÉϲäťŇ said the following on 23.02.2006 10:03:
> rar_cmd = r'"D:\Program Files\WinRAR\rar.exe" a -idcdp %s %s' % (target,'
> '.join(source))
You can't cd to d:\Program Files\WinRAR and then call rar
You have to call rar with full path.
from subprocess import *
retcode = call([r'"D:\Program Fi
Ian Ward <[EMAIL PROTECTED]> wrote:
> - New raw_display module that handles console display without relying
> on external libraries. This module was written as a work around
> for the lack of UTF-8 support in the standard version of ncurses.
The "standard version" of ncurses has support
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 that
many Python programs just wouldn't be able to run in RPython. But then
I can understand the convenience
Bo Yang wrote:
> Hi,
> I know in java , we can use
>
> class.ForName("classname")
>
>
> to get an instance of the class 'classname' from a
> string , in python , how do I do that ?
You can use
getattr(module, classname)(*arguments)
Diez
--
http://mail.python.org/mailman/listinfo/python
John Salerno wrote:
> The python installation on our windows hosting is not configured as
> mod_python.
Perhaps you can switch to linux hosting instead?
If they have mod_python in that environment, you
can use Python Server Pages, and whatever tools
you use, there is much better support for Apac
Harald Armin Massa wrote:
> Hello,
>
> I am looking for a method to convince cx_Oracle and oracle to encode
> it's replies in UTF8.
>
> For the moment I have to...
>
> cn=cx_Oracle.connect("user","password", "database")
> cs=cn.Cursor()
>
> cs.execute("select column1, column2, column3 from ta
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
> that many Python programs just wouldn't be a
> a mutate function for a genetic algorithm which is giving me
> odd results. I suspect I'm missing somthing really simple, so I'd be
> grateful for any suggestions. Basically, when I comment out the line
> which is commented out below, it works fine (although of course it
> doesn't change the gen
In revising pydb the code and documentation for the routine originally
described, I learn that the pdb equivalent (sort of) is called
set_trace().
However set_trace() will terminate the program when you quit the
debugger, so I've retained this routine and made a couple of
corrections -- in particu
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> And here I was thinking that commas make tuples, not
> brackets. What is happening here?
What is happening is that the syntax for forming tuples is one of Python's
warts. Sometimes the comma is what makes a tuple:
>>> a = 1, 2
>>> type (a)
Sometim
> Rahulwrote:
Hi.
> Well is there an open source computer algebra system written in
python
> or at least having a python interface?
> I know of 2 efforts: pythonica and pyginac...are there any others?
>
> rahul
There is mascyma
http://home.arcor.de/mulk/projects/mascyma/download.xhtml.en
that i
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>You mean to say that "except X,Y:" gives different
>results to "except (X,Y):"?
> [ ... ]
>And here I was thinking that commas make tuples, not
>brackets. What is happening here?
Similar kind of thing to what's happening here:
>>> print "Hello,", "wo
Does anyone know how to call for the root prompt before launching your
app?
Kinda like synaptic or the superuser file manager does?
Thanks,
Tom
--
http://mail.python.org/mailman/listinfo/python-list
That's it! Thanks a lot!
--
http://mail.python.org/mailman/listinfo/python-list
kanchy kang wrote:
> Is there any reviews/remarks on these frameworks?
> nose, OOBTest,testosterone, py.test, Sancho.
http://agiletesting.blogspot.com/2005/02/articles-and-tutorials.html
--
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.
unittest.TextTestRunner() has an optional stream argument that would let
you output to a file.
Kent
--
http://mail.p
Hello
ALSO... YOU NEVER SPECIFY A VARIABLE TO RECEIVE THE DATA -- ANYTHING
YOU DO READ IS BEING DUMPED ON THE FLOOR!
I see the read data with a sniffer.
with the same serial caracteristic in delphi i obtain the right answer.
I use serial writestr and serial readstr.
If the serial package is
[EMAIL PROTECTED] wrote:
> Does anyone know how to call for the root prompt before launching your
> app?
> Kinda like synaptic or the superuser file manager does?
That is Windowmanager/Desktop dependand. For KDE, you can e.g. create links
to applications that instruct the KDE to first acquire roo
On 2006-02-19, Mladen Adamovic <[EMAIL PROTECTED]> wrote:
> I wonder which editor or IDE you can recommend me for writing
> Python programs. I tried with jEdit but it isn't perfect.
jed
--
Grant Edwards grante Yow! Vote for ME
at
Oh, by the way, is there any documentation about time of execution of
standart functions (is len(list) O(1) or O(n), etc) and is there any C
version of decimal?
--
http://mail.python.org/mailman/listinfo/python-list
Bo Yang wrote:
> I know in java , we can use
>
> class.ForName("classname")
>
>
> to get an instance of the class 'classname' from a
> string , in python , how do I do that ?
In Python, classes are first class objects, so normally you would pass
the class itself around, rather than use the names
Hi,
Is there a way to catch traceback.print_exc() output into a string ?
Philippe
--
http://mail.python.org/mailman/listinfo/python-list
Dietz,
thank you for your answer.
> It's called NLS (national language support),
>and it is like a locale-setting in python/C. I'm too lazy to google right
Sad thing: I allready googled that and had to learn: you CAN definitely
change some parameters, that is sort order and language for error
me
Alexander Schmolck wrote:
> Rocco Moretti <[EMAIL PROTECTED]> writes:
>
> > I think it's worth pointing out that not all dynamicism is equal, when it
> > comes to difficulty in compiling to machine code.
>
> No kidding (do you have any idea how this thread started out?).
I had to remind myself.
>
oops:
"""
format_exc( [limit[, file]])
This is like print_exc(limit) but returns a string instead of printing to a
file. New in version 2.4.
"""
Philippe Martin wrote:
> Hi,
>
> Is there a way to catch traceback.print_exc() output into a string ?
>
>
> Philippe
--
http://mail.python.org/
Aye, but i dont need to run an FTP daemon every time i want to upload
an image to Imageshack or any other website.
About the topic name, yes, it's meaningless and its a shame. I fucked
it up when typing the title =P
--
http://mail.python.org/mailman/listinfo/python-list
Hello, I need a regularexpression, which trims trailing whitespaces.
While with unix line endings, it works;
but not with Window (Dos) CRLF's:
>>> import re
>>> retrailingwhitespace = re.compile('(?<=\S)[ \t]+$', re.MULTILINE)
1) Windows
>>> r="erewr\r\nafjdskl "
>>> newtext, n = retrai
sudo is something of a quick fix.
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
You'll almost certainly need to take a look at mascyma's support
facilities: support web page, forum, etc (provided they do indeed
exist).
Harlin Seritt
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I use the pyserial to read data from a serial port.
My code is in window Xp and python 2.4. when I use Hyperteminal I can
read data without try and try again that it is not the case with
pyserial library.
anyone can help me ?
this is a part of my code:
self.ser = serial.Serial()
self.ser.b
Farel wrote:
> Thank you, Peter! Please understand, I was attempting to get more info
> on the WHY x is faster than y... from those with more experience.
> Timer cannot give me that info.
Thanks for clarifying. For future reference, it's traditional in
English to use the word "why" in a questi
Jennifer Hallinan wrote:
> Hi,
>
> I have a mutate function for a genetic algorithm which is giving me
> odd results. I suspect I'm missing somthing really simple, so I'd be
> grateful for any suggestions. Basically, when I comment out the line
> which is commented out below, it works fine (althoug
Franz Steinhaeusler wrote:
> Hello, I need a regularexpression, which trims trailing whitespaces.
>
> While with unix line endings, it works;
> but not with Window (Dos) CRLF's:
>
import re
retrailingwhitespace = re.compile('(?<=\S)[ \t]+$', re.MULTILINE)
>
> 1) Windows
r="erewr
Harald Armin Massa wrote:
> Dietz,
>
> thank you for your answer.
>
>>It's called NLS (national language support),
>>and it is like a locale-setting in python/C. I'm too lazy to google right
>
> Sad thing: I allready googled that and had to learn: you CAN definitely
> change some parameters, tha
mrstephengross wrote:
> I would like to distribute a python program, but only in .pyc form (so
> that people cannot simply look at my code). Is there a way to do this?
> I've read up a little on the logic by which python creates .pyc's, and
> it sounds like python requires the main executed program
Carl Friedrich Bolz wrote:
> I heard that wooden door steps will lead to much lower walking speeds.
Don't assume: use the timeit module to find out for yourself.
> Isn't a low-level door step out of stone to be prefered?
What did you learn when you Googled for it?
-answering-entirely-in-charac
Franz Steinhaeusler wrote:
> Hello, I need a regularexpression, which trims trailing whitespaces.
>
> While with unix line endings, it works;
> but not with Window (Dos) CRLF's:
>
> >>> import re
> >>> retrailingwhitespace = re.compile('(?<=\S)[ \t]+$', re.MULTILINE)
>
> 1) Windows
> >>> r="erewr
On Thu, 23 Feb 2006 13:54:50 +, Martin Franklin
<[EMAIL PROTECTED]> wrote:
>>
> r="erewr\r\nafjdskl "
>> 'erewr\r\nafjdskl'
>>
>> 2) Unix
> r="erewr\nafjdskl "
>> 'erewr\nafjdskl'
>
>why not use string methods strip, rstrip and lstrip
>
because this removes only
To whom it may concern:
I'm running Fedora Core 4 on a rather low-spec system (considered good
cirkabout '99), this one program I'm trying to run is dependant on Python, so I
downloaded the RPM, but when I tried installing it, the following packages were
"missing:" python, python2, and /usr/bin/py
Philippe Martin wrote:
> Is there a way to catch traceback.print_exc() output into a string ?
Presumably using one of the alternatives, like format_exc(). If that's
not sufficient, maybe some example code to demonstrate what you really
want would help.
-Peter
--
http://mail.python.org/mailm
I was thinking you can do a shell call or something and pass the info
for root access.
--
http://mail.python.org/mailman/listinfo/python-list
Luke Plant wrote:
> Bo Yang wrote:
>
>> I know in java , we can use
>>
>> class.ForName("classname")
>>
>>
>> to get an instance of the class 'classname' from a
>> string , in python , how do I do that ?
>
> In Python, classes are first class objects, so normally you would pass
> the class itsel
Carl -- Perfect! That is exactly what I want. I hoped it would be
that easy. Thanks for taking the time to post the solution.
--
http://mail.python.org/mailman/listinfo/python-list
gene tani wrote:
> Franz Steinhaeusler wrote:
> >
> > Who can help me (regular expression, which works for both cases).
>
> universal newlines:
> http://www.python.org/doc/2.3.3/whatsnew/node7.html
> http://mail.python.org/pipermail/python-list/2006-February/324410.html
if multiple end-of line ma
Norvell Spearman <[EMAIL PROTECTED]> writes:
> Lutz and Ascher have tuple and list assignment as separate entries in
> their assignment statement forms table so I was expecting there to be
> some difference; thanks for setting me straight.
In older Python versions there was a difference between l
Then you have root access in that shell only, and not in the 'mother'
python process. I guess Harlins suggestion is the nest: run with sudo
--
http://mail.python.org/mailman/listinfo/python-list
Gaz wrote:
> Aye, but i dont need to run an FTP daemon every time i want to upload
> an image to Imageshack or any other website.
Did you google 'python cgi file upload' yet? Several people have pointed
you to an answer that doesn't use FTP.
--
http://mail.python.org/mailman/listinfo/python-list
On 23 Feb 2006 06:44:36 -0800, "gene tani" <[EMAIL PROTECTED]> wrote:
>
>gene tani wrote:
>> Franz Steinhaeusler wrote:
>> >
>> > Who can help me (regular expression, which works for both cases).
>>
>> universal newlines:
>> http://www.python.org/doc/2.3.3/whatsnew/node7.html
>> http://mail.python
Isaac Gouy wrote:
>>I think it is wrong to call Python "very slow" just because it is slower
>>than some other language or languages, for the same reason it would be
>>wrong to describe the population of the UK as "very low" because 60
>>million people is a smaller number than China or India's one
JCDenton wrote:
>>Rahulwrote:
>
> Hi.
>
>>Well is there an open source computer algebra system written in
>
> python
>
>>or at least having a python interface?
>>I know of 2 efforts: pythonica and pyginac...are there any others?
[Apologies for piggybacking.]
http://sage.sourceforge.net/
--
I'm building a dictionary from values a database and upon print the
dictionary I see key value pairs like this:
u'Briarcliff' : [u'2500 E'],
u'Shumway' : [ u'2600 E']
do I need to slice off the "u", or anything? I know it has something to
do with unicode but I don't know how to treat it.
--
htt
On Thu, 23 Feb 2006 15:59:54 +0100, Franz Steinhaeusler
<[EMAIL PROTECTED]> wrote:
>I need it for a file, whose line endings I don't know.
>
>I wrote for DrPython this script:
>(using styled text control and wxPython) and this works,
>but I'm looking for a shorter way:
ah, sorry, I try to make th
> The entry in the spinbox is a string.
Thanks. The only question now is why oh why would anyone design
something so stupid.
(severely tempted to go back to a strongly typed language before even
finishing one program)
--
http://mail.python.org/mailman/listinfo/python-list
did you download the rpm from http://www.python.org/2.4/rpms.html? The
it runs as /usr/bin/python2.4 - see Q&A section on this page
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
How do I detect non-ascii letters in a string?
I want to detect the condition that a string have a letter that is not
here: string.ascii_letters
Best regards,
SB.
--
Bioinformatics news: http://www.bioinformatica.info
Lriser: http://www.linspire.com/lraiser_success.php?serial=318
--
http
Hi,
My application is receiving strings, representing windows paths, from
an external source. When using these paths, by for instance printing
them using str() (print path), the backslashes are naturally
interpreted as escape characters.
>>> print "d:\thedir"
d: hedir
The solution is to use
I have two code snippets to time a function object being executed. I
expected that they should give roughly the same result, but one is more
than an order of magnitude slower than the other.
Here are the snippets:
def timer1():
timer = time.time
func = lambda : None
itr = [None] * 100
On Thu, 23 Feb 2006 08:00:16 -0700, Bell, Kevin wrote:
> I'm building a dictionary from values a database and upon print the
> dictionary I see key value pairs like this:
>
> u'Briarcliff' : [u'2500 E'],
> u'Shumway' : [ u'2600 E']
>
> do I need to slice off the "u", or anything? I know it has
On Thu, 23 Feb 2006 07:32:36 -0800, nummertolv wrote:
> Hi,
>
> My application is receiving strings, representing windows paths, from
> an external source. When using these paths, by for instance printing
> them using str() (print path), the backslashes are naturally
> interpreted as escape chara
On Thu, 23 Feb 2006 12:32:35 -0300, Sebastian Bassi wrote:
> Hello,
>
> How do I detect non-ascii letters in a string?
> I want to detect the condition that a string have a letter that is not
> here: string.ascii_letters
for c in some_string:
if c not in string.ascii_letters:
raise V
Sebastian Bassi wrote:
> Hello,
>
> How do I detect non-ascii letters in a string?
> I want to detect the condition that a string have a letter that is not
> here: string.ascii_letters
>
> Best regards,
> SB.
>
> --
> Bioinformatics news: http://www.bioinformatica.info
> Lriser: http://www.linspire
Sebastian Bassi wrote:
> Hello,
>
> How do I detect non-ascii letters in a string?
> I want to detect the condition that a string have a letter that is not
> here: string.ascii_letters
"äöü".decode("ascii")
should do the trick -- you get an UnicodeError when there is anything ascii
can't encode
Steven D'Aprano wrote:
> I have two code snippets to time a function object being executed. I
> expected that they should give roughly the same result, but one is more
> than an order of magnitude slower than the other.
>
> Here are the snippets:
>
> def timer1():
> timer = time.time
> fu
Steven D'Aprano wrote:
> I have two code snippets to time a function object being executed. I
> expected that they should give roughly the same result, but one is more
> than an order of magnitude slower than the other.
>
> Here are the snippets:
>
> def timer1():
> timer = time.time
> fu
Yeah, i did. Thank you, im analyzing the examples found. I'll post my
results :)
--
http://mail.python.org/mailman/listinfo/python-list
> How do I detect non-ascii letters in a string? I want to detect the
> condition that a string have a letter that is not here:
> string.ascii_letters
I don't know how efficient it is, but it's fairly clean:
clean_string = ''.join([c for c in some_string if c in
string.ascii_letters])
If you
On 2/23/06, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> "äöü".decode("ascii")
> should do the trick -- you get an UnicodeError when there is anything ascii
> can't encode.
Thank you. This is good enought for me.
Best regards,
SB.
--
Bioinformatics news: http://www.bioinformatica.info
Lriser: ht
I think I might have misused the terms "escape character" and/or
"escape sequence" or been unclear in some other way because I seem to
have confused you. In any case you don't seem to be addressing my
problem.
I know that the \t in the example path is interpreted as the tab
character (that was par
Sybren Stuvel wrote:
> Check out PSP.
I found a PSP website that said this:
-
In general, PSP pages are like normal HTML files with two exceptions:
1. They always have a .PSP file extension
2. They can have JPython code embedded in them
-
That sounds like just what I want, exce
Casey Hawthorne wrote:
> I have heard, that one should always use objects when programming and
> avoid the builtin types!
Who told you that? Some university teacher with no industrial
experience? ;^)
It's not good advice in Python programming, for two reasons.
- It can influence performance signi
John Salerno wrote:
> Sybren Stuvel wrote:
>
>> Check out PSP.
>
> I found a PSP website that said this:
>
> -
> In general, PSP pages are like normal HTML files with two exceptions:
>
> 1. They always have a .PSP file extension
> 2. They can have JPython code embedded in them
> ---
quote:
> Does anyone know how to call for the root prompt before launching your
> app?
> Kinda like synaptic or the superuser file manager does?
Do you mean something like "kdesu" for KDE?
--
http://mail.python.org/mailman/listinfo/python-list
i am new to learning jython...
i just tried compiling a small piece of code that is given below:
def fac(x)
if x<=1:return 1
return x*fac(x-1)
on
C:\Program Files\jython\temp>jythonc factor.py
it showed the following error:
processing factor
Traceback (innermost last):
File "C:\Program F
Hello,
We would like to hide the left column for the main/home page of our
plone sites dynamically using a tal: expression. I figured out that I
need to customize the main_template file something like this:
What I haven't figured out, is how to identify that the current page is
the home pa
On 23 Feb 2006 05:22:25 -0800
"Luke Plant" <[EMAIL PROTECTED]> wrote:
> In Python, classes are first class objects, so normally
> you would pass the class itself around, rather than use
> the names of classes. Of course that might not be
> practical or applicable in your situation.
It is in fact,
John Salerno enlightened us with:
> That sounds like just what I want, except do I have to write my code
> in Jython? Can't I just use regular Python?
I wouldn't know, never used Python ;-)
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stu
I was a little surprised to recently discover
that datetime has no method to input a string
value. PEP 321 appears does not convey much
information, but a timbot post from a couple
years ago clarifies things:
http://tinyurl.com/epjqc
> You can stop looking: datetime doesn't
> support any kind o
See the following results:
Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> s = "1"
>>> re.sub('1','\\n',s)
'\n'
>>> '\\n'
'\\n'
>>> re.sub('1',r'\\n',s)
'\\n'
>>> s.replace('1',
[EMAIL PROTECTED] wrote:
> i am new to learning jython...
>
>
> i just tried compiling a small piece of code that is given below:
>
> def fac(x)
> if x<=1:return 1
> return x*fac(x-1)
This is invalid Python syntax. Have you gone through the Python
tutorial yet? Doing so is probably a good
1 - 100 of 213 matches
Mail list logo