Jinja 1.0 Released
==
Jinja 1.0 is out now. Jinja is a sandboxed template engine written in
pure Python
licensed under the BSD license. It provides a Django-like non-XML
syntax and
compiles templates into executable python code. It's basically a
combination
of Django templates
On Fri, 2007-03-23 at 09:54 -0700, [EMAIL PROTECTED] wrote:
When constructing a particularly long and complicated command to be
sent to the shell, I usually do something like this, to make the
command as easy as possible to follow:
commands.getoutput(
'mycommand -S %d -T %d ' %
I'm in a process of rewriting a bash/awk/sed script -- that grew to
big -- in python. I can rewrite it in a simple line-by-line way but
that results in ugly python code and I'm sure there is a simple
pythonic way.
The bash script processed text files of the form:
On 24/03/2007 8:11 AM, Matt Garman wrote:
I'm trying to use Python to work with large pipe ('|') delimited data
files. The files range in size from 25 MB to 200 MB.
Since each line corresponds to a record, what I'm trying to do is
create an object from each record.
An object with only 1
Ben Finney [EMAIL PROTECTED] writes:
Hmm. I typed the example program in as a simplified version of what
I'm doing; but didn't actually *run* it. When I do run it, I get no
exception, as you say.
Now I'll have to find out what significant difference there is
between my failing code and this
hello,
would there be any speed increase in code execution after python code being
compiled into exe file with py2exe?
thanks,
kelie
--
http://mail.python.org/mailman/listinfo/python-list
would there be any speed increase in code execution after python
code being
compiled into exe file with py2exe?
No. I would expect slower startup followed by the same code
execution time you'd get from running normally (not that I've
actually tested it, mind you).
regards,
Michael
Kelie [EMAIL PROTECTED] writes:
hello,
would there be any speed increase in code execution after python code being
compiled into exe file with py2exe?
AIUI that's not what p2yexe is about - it's essentially about
packaging up your python program for ease of distribution and
installation on
Michael Bentley wrote:
would there be any speed increase in code execution after python code
being
compiled into exe file with py2exe?
No. I would expect slower startup followed by the same code execution
time you'd get from running normally (not that I've actually tested it,
mind
On Mar 24, 6:18 am, jd [EMAIL PROTECTED] wrote:
I'd like to create a program that takes files with jsp-like markup
and processes the embedded code (which would be python) to produce the
output file. There would be two kinds of sections in the markup file:
python code to be evaluated, and
Actualy startup is faster for the apps that I have py2exe'd. I think
this may be because all the modules are in one place and Python
doesn't
have to go searching for them.
Thanks, Will! That's good to know.
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 23, 1:30 pm, Paulo da Silva [EMAIL PROTECTED] wrote:
Mike Kent escreveu:
...
New way:
l=['a','b','c']
jl=','.join(l)
I thank you all.
Almost there ...
I tried .join(l,',') but no success ... :-(
Paulo
Perhaps you're doing it wrong, despite having an example right in
front
Irmen de Jong schrieb:
Shane Geiger wrote:
This reminds me of something I once wanted to do: How can I install
Python in a totally non-gui way on Windows (without the use of VNC)? I
think I was telnetted into a computer (or something like that) and I was
unable to run the usual Python
On Mar 24, 5:59 am, Dustan [EMAIL PROTECTED] wrote:
On Mar 23, 1:30 pm, Paulo da Silva [EMAIL PROTECTED] wrote:
Mike Kent escreveu:
...
New way:
l=['a','b','c']
jl=','.join(l)
I thank you all.
Almost there ...
I tried .join(l,',') but no success ... :-(
Paulo
Perhaps
import string
def test_join(l):
print Joining with commas: , string.join(l,',')
print Joining with empty string: , string.join(l,'')
print Joining same way, using another syntax: , ''.join(l)
print Joining with the letter X: ,
Godzilla [EMAIL PROTECTED] writes:
Rob, I would be logging into another XP machine to do some software
I was afraid of that. :)
installation... the code you provided, correct me if I'm wrong, seems
to work under Unix/Linux.
This part of running and killing processes, yes.
Any idea how to
Type the taskmgr, Windows performance Graph give a really nice
dynamic history curve, It will be wonderful If I could use the same
kind of graph to represent the network flow in my python program. Is
there a windows api for this graph drawing?
--
Dustan [EMAIL PROTECTED] wrote:
Perhaps you're doing it wrong, despite having an example right in
front of you?
Side by side comparison:
jl=string.join(l,',')
jl=','.join(l)
The sequence is passed as an argument to the join method, and the
delimiter is the string whose method is being
jd wrote:
I'd like to create a program that takes files with jsp-like markup
and processes the embedded code (which would be python) to produce the
output file. There would be two kinds of sections in the markup file:
python code to be evaluated, and python code that returns a value that
John Machin escreveu:
..
Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on
win32
Type help, copyright, credits or license for more information.
| help(.join)
Help on built-in function join:
join(...)
S.join(sequence) - string
Return a string which is the
Dustan escreveu:
On Mar 23, 1:30 pm, Paulo da Silva [EMAIL PROTECTED] wrote:
Mike Kent escreveu:
...
New way:
l=['a','b','c']
jl=','.join(l)
I thank you all.
Almost there ...
I tried .join(l,',') but no success ... :-(
Paulo
Perhaps you're doing it wrong, despite having an example
On Mar 23, 9:30 am, Mark [EMAIL PROTECTED] wrote:
A small script called python_compile_and_run in pseudo code:
#!/usr/bin/env python
import sys
# Following is invalid syntax unfortunately :(
from sys.argv[1].rstrip('.py') import main
sys.argv = sys.argv[1:]
if __name__ == __main__:
Steven D'Aprano escreveu:
On Fri, 23 Mar 2007 13:15:29 -0700, John Machin wrote:
Western civilization is 6,000 years old.
After reading that post I wouldn't talk about
civilization, western or any other :-)
Regards.
Paulo
--
http://mail.python.org/mailman/listinfo/python-list
Chuck Rhode [EMAIL PROTECTED] writes:
John J. Lee wrote this on Thu, 22 Mar 2007 21:16:13 +. My reply is
below.
I sympathise but conventional wisdom (which surely has a lot of
truth in it) is that employers are not faced with the problem of
minimising false negatives (failing to
Anton Vredegoor [EMAIL PROTECTED] writes:
John J. Lee wrote:
[...]
but I'm sure you appreciate the point -- if you're hiring employees,
being fairly risk-averse is probably quite rational.
So when we really mean business, you're back to static typing?
I'm not wedded to dynamic typing, as
Hello,
the following script (it's in German):
import random
print Wie oft wollen Sie spielen?
anzahl_spiele = input()
games = 0
while games anzahl_spiele:
games += 1
print Raten sie die Zahl, die vom Computer generiert wird!
random_number = random.randint(1, 100)
File Python-episode12-Zahlenraten.py, line 15
print Die eingegebene Zahl ist kleiner als die generierte Zahl.
IndentationError: expected an indented block
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
On Fri, 23 Mar 2007 21:15:56 -0400, Eric S. Johansson [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
Gabriel Genellina wrote:
I don't get all the details of what's all that stuff for, but from the
error and traceback, I think you forgot to create
On Mar 24, 5:20 pm, [EMAIL PROTECTED] wrote:
File Python-episode12-Zahlenraten.py, line 15
print Die eingegebene Zahl ist kleiner als die generierte Zahl.
IndentationError: expected an indented block
You should indent stuff inside if-statement deeper than the if itself.
I.e. NOT LIKE
In article [EMAIL PROTECTED],
David Abrahams [EMAIL PROTECTED] wrote:
I was under the impression that both the current directory *and* the
python library directory were already, automatically, in sys.path, so
I'm really surprised to see this. Am I doing something wrong, or is
this simply the
I'm looking for a pattern where different client implementations can use the
same commands of some fictive tool (foo) by accessing some kind of API.
Actually I have the need for such pattern for my own tool
(http://openswarm.sourceforge.net). I already started restructuring my code
to separate
Aahz [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
David Abrahams [EMAIL PROTECTED] wrote:
I was under the impression that both the current directory *and* the
python library directory were already, automatically, in sys.path, so
I'm really surprised to see this. Am I doing
On Mar 24, 7:16 am, Paulo da Silva [EMAIL PROTECTED] wrote:
Dustan escreveu:
On Mar 23, 1:30 pm, Paulo da Silva [EMAIL PROTECTED] wrote:
Mike Kent escreveu:
...
New way:
l=['a','b','c']
jl=','.join(l)
I thank you all.
Almost there ...
I tried .join(l,',') but no success ...
On Sun, Mar 18, 2007 at 09:38:52PM EST, Paul McGuire wrote:
On Mar 16, 9:27 am, BartlebyScrivener [EMAIL PROTECTED] wrote:
On Mar 16, 8:39 am, Paul McGuire [EMAIL PROTECTED] wrote:
Wow, are you still reading? Quit wasting time and go download a
Python dist and get started already!
From: [EMAIL PROTECTED]
Date: 23 Mar 2007 06:20:15 -0700
Core Python Programming is mostly theory and very little code. It's
good for reference and digging deeper into the language...
let me clarify here that mike's statement refers to the total number
of large applications in the book.
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Robert
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 24, 8:30 am, Duncan Booth [EMAIL PROTECTED] wrote:
In case you are feeling that the ','.join(l) looks a bit jarring, be aware
that there are alternative ways to write it. You can call the method on the
class rather than the instance:
jl = str.join(',', l)
jl =
On Mar 24, 11:30 am, Robert Hicks [EMAIL PROTECTED] wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Robert
Windows allows us to uninstall it. I think the only thing it really
installs is the files, and then it sets the system path, so just
delete the files
On Mar 24, 10:31 am, Anastasios Hatzis [EMAIL PROTECTED] wrote:
I'm looking for a pattern where different client implementations can use the
same commands of some fictive tool (foo) by accessing some kind of API.
Actually I have the need for such pattern for my own tool
Hi,
Robert Hicks wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Robert
I don't know if this is pertinent to your situation, but yesterday I
read something that said you need a framework install in order to do
GUI programming with wxPython. I believe a
Robert Hicks wrote:
... but I don't see any unistall instructions
anywhere.
Did 2.4.4 come pre-installed?
--
http://mail.python.org/mailman/listinfo/python-list
On 24 Mar 2007 10:30:28 -0700, Robert Hicks [EMAIL PROTECTED] wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
You're not required to remove the old version before installing the new version.
Just install the new version somewhere like /usr/local and put
Robert Hicks schrieb:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Don't do it. OSX uses the shipped version for its own purposes, and
you'll break things if you uninstall it.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
7stud schrieb:
On Mar 24, 8:30 am, Duncan Booth [EMAIL PROTECTED] wrote:
In case you are feeling that the ','.join(l) looks a bit jarring, be aware
that there are alternative ways to write it. You can call the method on the
class rather than the instance:
jl = str.join(',', l)
jl =
Diez B. Roggisch [EMAIL PROTECTED] wrote:
7stud schrieb:
When I try the latter example, I get an error:
lst = [hello, world]
print unicode.join(u\u00d7, lst)
Traceback (most recent call last):
File test1.py, line 2, in ?
print unicode.join(u\u00d7, lst)
UnicodeEncodeError:
Since a few days I've been experimenting with a construct that enables
me to send the sourcecode of the web page I'm reading through a Python
script and then into a new tab in Mozilla. The new tab is automatically
opened so the process feels very natural, although there's a lot of
reading,
7stud [EMAIL PROTECTED] wrote:
On Mar 24, 8:30 am, Duncan Booth [EMAIL PROTECTED]
wrote:
In case you are feeling that the ','.join(l) looks a bit
jarring, be aware that there are alternative ways to write it.
You can call the method on the class rather than the instance:
jl =
On Mar 24, 2:09 pm, Greg Donald [EMAIL PROTECTED] wrote:
On 24 Mar 2007 10:30:28 -0700, Robert Hicks [EMAIL PROTECTED] wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
You're not required to remove the old version before installing the new
version.
On Mar 24, 2:06 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Robert Hicks schrieb:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Don't do it. OSX uses the shipped version for its own purposes, and
you'll break things if you uninstall it.
Diez
No, the OSX
MICR = The line of digits printed using magnetic ink at the bottom of
a check.
Does anyone know of a Python function that has been written to parse a
line of MICR data?
Or, some financial package that may contain such a thing?
Or, in general, where I should be looking when looking for a piece of
On Mar 24, 12:09 pm, Greg Donald [EMAIL PROTECTED] wrote:
On 24 Mar 2007 10:30:28 -0700, Robert Hicks [EMAIL PROTECTED] wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
You're not required to remove the old version before installing the new
version.
On 24 Mar 2007 12:10:12 -0700, 7stud [EMAIL PROTECTED] wrote:
Can you explain how that works? If you install python in /usr/local,
doesn't that leave you with something like /usr/local/python? So what
does putting usr/local/bin ahead of your other paths do?
./configure --prefix=/usr/local
bbxx789 Can you explain how that works? If you install python in
bbxx789 /usr/local, doesn't that leave you with something like
bbxx789 /usr/local/python? So what does putting usr/local/bin ahead of
bbxx789 your other paths do?
When you install with --prefix==/usr/local you
You don't have to uninstall 2.4.4 to use 2.5. Just change where the
symlink points:
[EMAIL PROTECTED]:~\ 14:45:35$ ls -la /usr/bin/python
lrwxr-xr-x 1 root wheel 24 Mar 1 12:48 /usr/bin/python -
/usr/local/bin/python2.5
[EMAIL PROTECTED]:~\ 14:45:40$
In general, I am a little wary of
On Mar 23, 4:04 pm, Jack Diederich [EMAIL PROTECTED] wrote:
If you make the record a new style class (inherit from object) you can
specify the __slots__ attribute on the class. This eliminates the per
instance dictionary overhead in exchange for less flexibility.
How is efficiency improved
On 24 Mar 2007 13:08:02 -0700, 7stud [EMAIL PROTECTED] wrote:
On Mar 23, 4:04 pm, Jack Diederich [EMAIL PROTECTED] wrote:
If you make the record a new style class (inherit from object) you can
specify the __slots__ attribute on the class. This eliminates the per
instance dictionary overhead
David Abrahams wrote:
I'm seeing highly surprising (and different!) behaviors of
PyImport_ImportModule on Linux and Windows when used in a program with
python embedding.
On Linux, when attempting to import a module xxx that's in the current
directory, I get
ImportError: No module named
Shane Geiger wrote:
You don't have to uninstall 2.4.4 to use 2.5. Just change where the
symlink points:
[EMAIL PROTECTED]:~\ 14:45:35$ ls -la /usr/bin/python
lrwxr-xr-x 1 root wheel 24 Mar 1 12:48 /usr/bin/python -
/usr/local/bin/python2.5
[EMAIL PROTECTED]:~\ 14:45:40$
I have
7stud wrote:
On Mar 24, 12:09 pm, Greg Donald [EMAIL PROTECTED] wrote:
On 24 Mar 2007 10:30:28 -0700, Robert Hicks [EMAIL PROTECTED] wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
You're not required to remove the old version before installing the new
Dennis Lee Bieber wrote:
On Sat, 24 Mar 2007 11:29:34 -0400, Eric S. Johansson [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
yes. here is the code that fails. I don't understand why the unbound
method. what is really weird is that when I singlestep through the
code,
On Mar 24, 2:19 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
Only one list is created. It is used to define a C array where attributes
will be stored. Each instance still has that C array, but it has much less
overhead than a Python list or dictionary.
It's all C underneath, right? So
On 24 Mar 2007 13:52:46 -0700, 7stud [EMAIL PROTECTED] wrote:
On Mar 24, 2:19 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
Only one list is created. It is used to define a C array where attributes
will be stored. Each instance still has that C array, but it has much less
overhead than a
On 3/23/07, Bjoern Schliessmann
[EMAIL PROTECTED] wrote:
(Note that almost everything in Python is an object!)
Could you tell me what in Python isn't an object? Are you counting
old-style classes and instances as not objects?
--
Felipe.
--
http://mail.python.org/mailman/listinfo/python-list
En Sat, 24 Mar 2007 15:45:41 -0300, Anton Vredegoor
[EMAIL PROTECTED] escribió:
Since a few days I've been experimenting with a construct that enables
me to send the sourcecode of the web page I'm reading through a Python
script and then into a new tab in Mozilla. The new tab is
On Mar 25, 12:32 am, Paulo da Silva [EMAIL PROTECTED] wrote:
John Machin escreveu:
..
Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on
win32
Type help, copyright, credits or license for more information.
| help(.join)
Help on built-in function join:
join(...)
En Sat, 24 Mar 2007 18:07:57 -0300, Felipe Almeida Lessa
[EMAIL PROTECTED] escribió:
On 3/23/07, Bjoern Schliessmann
[EMAIL PROTECTED] wrote:
(Note that almost everything in Python is an object!)
Could you tell me what in Python isn't an object? Are you counting
old-style classes and
Hi,
I'm having a problem with modal forms on windows. I've written a very
short test program, with a main window and a form called from the main
window. The form is set to modal with form.setModal(1) before calling
form.show().
All works as expected on Linux. The form is modal, not allowing
Just got comment spam in:
http:// bugs.py thon.org/file7722/order-cialis.html
http:// bugs.py thon.org/file7722/order-cialis.html order cialis
http:// bugs.py thon.org/file7723/order-tramadol.html order tramadol
Seems someone found a nice hole in python.org and someone should be
severely
On Mar 24, 2:05 pm, mkppk [EMAIL PROTECTED] wrote:
MICR = The line of digits printed using magnetic ink at the bottom of
a check.
Does anyone know of a Python function that has been written to parse a
line of MICR data?
Or, some financial package that may contain such a thing?
Or, in
On Sat, 24 Mar 2007 07:21:21 -0700, irstas wrote:
Also, rstrip doesn't work like you think it does.
'pyxyypp.py'.rstrip('.py') == 'pyx'
Well there is embarrassing confirmation that I am a python newbie :(
I timed it against running plain .py and running .pyc directly. It
seemed to be roughly
Gabriel Genellina wrote:
I use the Opera browser: http://www.opera.com
Among other things (like having tabs for ages!):
- enable/disable tables and divs (like you do)
- enable/disable images with a keystroke, or only show cached images.
- enable/disable CSS
- banner supressing (aggressive)
Dennis Lee Bieber wrote:
I've never resorted to the debugger -- it's always been faster for
me to just wolf-fence* code with print statements...
depends on the situation for me. normally I use log statements that
turn on or off based on predicates (now I need to figure out how to
On Saturday 24 March 2007 23:08, Mike wrote:
I'm having a problem with modal forms on windows. I've written a very
short test program, with a main window and a form called from the main
window. The form is set to modal with form.setModal(1) before calling
form.show().
Is form an instance of
On Saturday 24 March 2007 18:55, [EMAIL PROTECTED] wrote:
On Mar 24, 10:31 am, Anastasios Hatzis [EMAIL PROTECTED] wrote:
I'm looking for a pattern where different client implementations can use
the same commands of some fictive tool (foo) by accessing some kind of
API. Actually I have the
John Just got comment spam in:
John http:// bugs.py thon.org/file7722/order-cialis.html
John http:// bugs.py thon.org/file7722/order-cialis.html order cialis
John http:// bugs.py thon.org/file7723/order-tramadol.html order tramadol
Yes, we know about it and are working on
Hi all,
I'm trying to write a python script using plotting form pylab.
Unfortunatelly I've encountered a problem. When I run the script via
'python myscript.py' the plot windows open and close very quickly, or
when I added the show() command the shell window was locked until I
closed the figures.
On Sat, 24 Mar 2007 07:21:21 -0700, irstas wrote:
A simple implementation that works:
Not quite irstas BTW ..
import imp, sys, os
c = sys.argv[1]
if not os.path.exists(c + 'c') or os.stat(c).st_mtime os.stat(c +
'c').st_mtime:
import compiler
compiler.compileFile(c)
del
Hi there. So I have a challenge in the Python book I am using (python
programming for the absolute beginner) that tells me to improve a
function, so that it can be called with a step value, and I havn't
been able to find out yet what's meant by a step value, but i'll keep
looking of course. I'd
Hi:
I have a question about extending python with C. I have read the docs
and done some googling, but come up short on this particular (small)
problem. I want to write a c extension to int. In particular, I want
to grab the memory for the int from an alternative heap. I am confused
about
On Mar 24, 4:55 pm, Paul McGuire [EMAIL PROTECTED] wrote:
On Mar 24, 2:05 pm, mkppk [EMAIL PROTECTED] wrote:
MICR = The line of digits printed using magnetic ink at the bottom of
a check.
Does anyone know of a Python function that has been written to parse a
line of MICR data?
Or,
Answers interspersed.
David Boddie wrote:
On Saturday 24 March 2007 23:08, Mike wrote:
I'm having a problem with modal forms on windows. I've written a very
short test program, with a main window and a form called from the main
window. The form is set to modal with form.setModal(1) before
The next PyWeek game programming challenge starts next Sunday at 00:00UTC.
If you're interested, there's definitely still time to sign up to the
challenge.
http://www.pyweek.org/
Theme voting has started. You may now log into (or sign up to ;) the PyWeek
website to lodge your vote for theme.
[EMAIL PROTECTED] wrote:
Hi there. So I have a challenge in the Python book I am using (python
programming for the absolute beginner) that tells me to improve a
function, so that it can be called with a step value, and I havn't
been able to find out yet what's meant by a step value, but i'll
Rodrigo Lopez-Negrete wrote:
Hi all,
I'm trying to write a python script using plotting form pylab.
Unfortunatelly I've encountered a problem. When I run the script via
'python myscript.py' the plot windows open and close very quickly, or
when I added the show() command the shell window was
Hi James,
Thanks for the answer, the ampersand only works if I use the show()
command at the end of my script. I guess that helps although I haven't
tested it with plotting subroutines.
cheers,
Rodrigo
On Mar 24, 6:50 pm, James Stroud [EMAIL PROTECTED] wrote:
Rodrigo Lopez-Negrete wrote:
En Sat, 24 Mar 2007 20:46:15 -0300, Mark [EMAIL PROTECTED] escribió:
The above doesn't actually work for my test script. I have an atexit
call in the script which is deleting some temp files and I get the
following traceback on termination when run with the above:
Error in
On Mar 24, 2007, at 12:30 PM, Robert Hicks wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Don't uninstall it.
That's why Apple put python under /Library/Frameworks/
Python.framework/Versions. So you can have multiple versions installed.
Hopefully you
On Mar 24, 2007, at 12:55 PM, 7stud wrote:
In addition, the download notes for the stand alone MacPython 2.5
install say that there aren't as many modules for 2.5 as there are for
the 2.4, which is something you may want to consider.
There aren't as many pre-built modules for 2.5 at the
No, the OSX version is like 2.3 something. I installed the 2.4.4
version in /usr/local bypassing the Apple stuff.
Oh! Well then:
---[cut here]---
# danger will robinson -- use at your own risk ;-)
rm /usr/local/bin/python*
rm -rf /usr/local/lib/python
---[snip]---
Is the uninstall program
Here is some example code that produces an error:
class Test(object):
def greet():
print Hello
t = Test()
t.greet()
TypeError: greet() takes no arguments (1 given)
Ok. That makes sense. t.greet() is a bound method, so something
automatically relays the instance object
On 24 Mar 2007 20:24:36 -0700, 7stud [EMAIL PROTECTED] wrote:
Here is some example code that produces an error:
[snip]
Why do people absolutely *love* to do weird and ugly things with
Python? Contests apart, I don't see lots of people trying this kind of
things on other (common) languages.
Say
On Sat, 24 Mar 2007 22:59:06 +, Mark wrote:
I timed it against running plain .py and running .pyc directly. It
seemed to be roughly on par with running .pyc directly, and about 18ms
faster than running .py. The file had 600 lines (21kb) of code.
So see my point at least? I'm still not
On Mar 24, 8:18 pm, Michael Bentley [EMAIL PROTECTED] wrote:
On Mar 24, 2007, at 12:30 PM, Robert Hicks wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Don't uninstall it.
That's why Apple put python under /Library/Frameworks/
On Mar 24, 9:40 pm, 7stud [EMAIL PROTECTED] wrote:
On Mar 24, 8:18 pm, Michael Bentley [EMAIL PROTECTED] wrote:
On Mar 24, 2007, at 12:30 PM, Robert Hicks wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Don't uninstall it.
That's why Apple put
The only way you can do is rermove python2.4.4's files manually.
I suggest you to use MacPorts or Fink.
With MacPort, you can uninstall python2.4 by doing
$ port uninstall python24
And Installation is
$ port install python25
On 24 Mar 2007 10:30:28 -0700, Robert Hicks [EMAIL PROTECTED]
On Sat, 24 Mar 2007 20:24:36 -0700, 7stud wrote:
Here is some example code that produces an error:
class Test(object):
def greet():
print Hello
t = Test()
t.greet()
TypeError: greet() takes no arguments (1 given)
Ok. That makes sense. t.greet() is a bound
7stud [EMAIL PROTECTED] wrote:
On Mar 24, 9:40 pm, 7stud [EMAIL PROTECTED] wrote:
On Mar 24, 8:18 pm, Michael Bentley [EMAIL PROTECTED] wrote:
On Mar 24, 2007, at 12:30 PM, Robert Hicks wrote:
I want to upgrade to 2.5 but I don't see any unistall instructions
anywhere.
Is there any possible way that I can place a .py file on the internet,
and use that source code in an .py file on my computer?
--
http://mail.python.org/mailman/listinfo/python-list
7stud wrote:
Here is some example code that produces an error:
class Test(object):
def greet():
print Hello
t = Test()
t.greet()
TypeError: greet() takes no arguments (1 given)
[snip]
Test.greet()
TypeError: unbound method greet() must be called with Test
I think I may have figured all this out by looking at examples in the
python source, e.g. xxsubtype.c etc. Nonetheless, I would appreciate
any extra info others might provide.
Thanks again.
--ralph
Ralph Butler wrote:
Hi:
I have a question about extending python with C. I have read the docs
1 - 100 of 122 matches
Mail list logo