Hi group i have created a simple .pyd using which i m able call C
function from python code. There are around 6 such functions. 4 of
them work great. But when i try to run other two python's exe breaks
giving memory dump.
Any pros or cons on what led to such a situation.. Is it a problem in
my c
Hi group any idea on HOW TO HANDLE POINTERS FROM NON-LOCAL HEAPS??
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
hi
i have written a program that takes in user input thru a gui and then
does some calculations and then displays a result value.I have split
the code into 3 parts
1.the gui code--mygui.py containing a class to handle all ui stuff
2.calculations.py (also has one class to do all processing)
3.
John Nagle [EMAIL PROTECTED] wrote:
I'm printing out each entry in gc.garbage after a garbage collection in
DEBUG_LEAK mode, and I'm seeing many entries like
cell at 0x00F7C170: function object at 0x00FDD6B0
That's the output of repr. Are cell objects created only from
external C
abhishek [EMAIL PROTECTED] wrote:
Hi group any idea on HOW TO HANDLE POINTERS FROM NON-LOCAL HEAPS??
Yes, it indicates you haven't read
http://catb.org/~esr/faqs/smart-questions.html
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
when a module gets imported the statements not contained in
function definitions or classes are executed.
This can be thought of an initializer for the module.
But how can I get control when the module gets unloaded
either by Python's gc, Python's exit or by a module reload.
Many thanks for
abhishek wrote:
Hi group any idea on HOW TO HANDLE POINTERS FROM NON-LOCAL HEAPS??
Thank you
POINTERS? Heaps? Huh? Ummm, let me think -- those terms *do* sound
vaguely familiar -- from sometime in the deep dark primitive past.
Perhaps from back in my (shudder) C/C++ days -- ya,
here is what I have to do:
This question involves a game with teddy bears. The game starts when I
give you some bears. You then start giving me back some bears, but you
must follow these rules (where n is the number of bears that you
have):
If n is even, then you may give back exactly n/2 bears.
Tom_chicollegeboy a écrit :
(snip)
As you see my program must use recursion.
It's conceptually easier to express using recursions - but every
recursion-based algorithm can be rewritten to use iteration (and
vice-versa).
I came up with this idea but I am not sure if its right or are there
Tom_chicollegeboy wrote:
here is what I have to do:
This question involves a game with teddy bears. The game starts when I
give you some bears. You then start giving me back some bears, but you
must follow these rules (where n is the number of bears that you
have):
This sounds very much
Dale a écrit :
I am using a simple python webserver (see code below) to serve up
python scripts located in my cgi-bin directory.
import BaseHTTPServer
import CGIHTTPServer
class Handler(CGIHTTPServer.CGIHTTPRequestHandler):
cgi_directories = ['/cgi-bin']
httpd =
On Jan 11, 9:46 am, Gary Herron [EMAIL PROTECTED] wrote:
Tom_chicollegeboy wrote:
here is what I have to do:
This question involves a game with teddy bears. The game starts when I
give you some bears. You then start giving me back some bears, but you
must follow these rules (where n is
Hi all
i want to access a web page through python script, fillup the necessary
fields,
and press submit button (which does POST call) and retrieve the result page
and retrieve some values from it.
Here is the script i have written till now.
import urllib2
# create array of name/value pairs
Ross Ridge a écrit :
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
And the reference implementation of Python (CPython) is not
interpreted, it's compiled to byte-code, which is then executed by a VM
(just like Java).
Ed Jensen a écrit :
Wow, this is pretty misleading.
Bruno
Fredrik Lundh a écrit :
A.T.Hofkamp wrote:
Now the question you need to answer for yourself, is how much more
worth is
your own time compared to the gain in CPU time. If you think they are
equal (ie
the problem as a whole should be solved as fast as possible, thus the
sum of
On Jan 11, 10:30 am, Tom_chicollegeboy [EMAIL PROTECTED] wrote:
here is what I have to do:
This question involves a game with teddy bears. The game starts when I
give you some bears. You then start giving me back some bears, but you
must follow these rules (where n is the number of bears that
Bruno Desthuilliers [EMAIL PROTECTED]
wrote:
You want:
return bears(n - 42)
Actually, no he doesn't. He needs to explore all options when the first
attempt fails. But I'm not going to write his homework for him.
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis a écrit :
On Jan 10, 3:37 am, Bruno Desthuilliers wrote:
I fail to see how the existence of JIT compilers in some Java VM changes
anything to the fact that both Java (by language specification) and
CPython use the byte-code/VM scheme.
Because these some Java VMs with JIT
Stylistically I prefer 'if not n % 5', looks neater.
As for your assignment, the hardest task will be creating an effective
method of ensuring you recurse through all possibilities.
I was chatting to a friend about the 'if not n % 5' and while I am
happy to use it saying that when 5 % 5 is
Ed Jensen a écrit :
Fredrik Lundh [EMAIL PROTECTED] wrote:
oh, please. it was perfectly clear for anyone with the slightest clue
what Bruno was talking about (especially if they'd read the post he was
replying to), so the only question that remains is why you didn't
understand it.
If
Gary Herron a écrit :
Tom_chicollegeboy wrote:
here is what I have to do:
This question involves a game with teddy bears. The game starts when I
give you some bears. You then start giving me back some bears, but you
must follow these rules (where n is the number of bears that you
have):
Can anybody tell how I could go about running python scripts with
scons.
--
http://mail.python.org/mailman/listinfo/python-list
I'm using Window XP. How to install PIL 1.1.6? The Python i installed, is come
with Plone. So, is it ok? Thank you.
Regards,
Chan Kuang Lim
-
Looking for last minute shopping deals? Find them fast with Yahoo! Search.--
[EMAIL PROTECTED] a écrit :
I've been reading the following example, and couldn't figure out, what
**kw mean. (It's an empty dictionary, but what's the semantics):
Keyword varargs. And FWIW, *args is for positional varargs.
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 11, 4:38 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I've been reading the following example, and couldn't figure out, what
**kw mean. (It's an empty dictionary, but what's the semantics):
It's a keyword argument. It's some kind of repository for arguments
that aren't recognized.
If
abhishek wrote:
Hi group i have created a simple .pyd using which i m able call C
function from python code. There are around 6 such functions. 4 of
them work great. But when i try to run other two python's exe breaks
giving memory dump.
Any pros or cons on what led to such a situation..
Chan Kuang Lim wrote:
I'm using Window XP. How to install PIL 1.1.6? The Python i installed,
is come with Plone. So, is it ok? Thank you.
Just run the appropriate installer for your Python version:
http://www.pythonware.com/products/pil
as the page says, If the Windows installer cannot
Lie wrote:
Is there a way to create a property with arguments?
That's called method in Python, and has it's own syntax. You cannot
assign to methods.
Or an index value like a list?
Make the property that returns a list-like object (hooking __getitem__,
__setitem__, etc).
/F
--
[EMAIL PROTECTED] a écrit :
Can I access the class attributes from a method added at runtime?
Of course.
(My
experience says no.)
So there's something wrong with your experience !-)
I experimented with the following code:
class myclass(object):
myattr = myattr
instance =
Duncan Booth a écrit :
Bruno Desthuilliers [EMAIL PROTECTED]
wrote:
You want:
return bears(n - 42)
Actually, no he doesn't. He needs to explore all options when the first
attempt fails.
Possibly - I didn't bother checking the algorithm correctness, just
pointed out an
Thanks guys, you've helped me very much :) Cheers happy new year!
--
http://mail.python.org/mailman/listinfo/python-list
Dimitrios Apostolou [EMAIL PROTECTED] wrote:
I want to limit the download speed when using urllib2. In particular,
having several parallel downloads, I want to make sure that their total
speed doesn't exceed a maximum value.
I can't find a simple way to achieve this. After researching
evenOrOdd = True
s1, s2 = hi_cat_bye_dog_foo_bar_red,
for i in s1:
if i == '_':
s2 += ':' if evenOrOdd else ','
evenOrOdd = not evenOrOdd
else:
s2 += i
print s2
Presently I cannot work out how to use .join instead of += ...
While I realise this is producing a new
I've been reading the following example, and couldn't figure out, what
**kw mean. (It's an empty dictionary, but what's the semantics):
def wrap(method):
def wrapped(self, *args, **kw):
print begin
method(self, *args, **kw)
print end
return wrapped
class
Hello,
this question has come by repeatedly in several guises over the past
years but has never been solved in this forum as far as I have been able
to Google.
However since so many people are asking the question, I hope someone has
made a solution and is willing to share it.
The problem: I
Does this help?
def foobar(first_name,last_name, *args, **kwargs):
print first_name
print last_name
print Tuple:,args
print Dict:,kwargs
x = has
y = demonstrated
foobar('Shane','Geiger', x, y, adjective='useful', thing='PYTHON trick
known as extended call syntax',
On Wednesday 09 January 2008 18:52:02 Dennis Lee Bieber wrote:
On Wed, 9 Jan 2008 10:11:09 +0100, Frank Aune [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
The only clue I have so far, is that the cursor in task 1 seems to be
unable to register any new entries in the log
def bears (n):
if n==42:
return True
if n%5==0:
bears(n-42)
if n%2==0:
bears(n/2)
if n%3==0 or n%4==0:
one = (n%10)
two = ((n%100)/10)
if one!=0 and two!=0:
bears(n-(one*two))
return False
If a game
On Jan 9, 12:34 pm, cesco [EMAIL PROTECTED] wrote:
Hi,
say I have a string like the following:
s1 = 'hi_cat_bye_dog'
and I want to replace the even '_' with ':' and the odd '_' with ','
so that I get a new string like the following:
s2 = 'hi:cat,bye:dog'
Is there a common recipe to
On Jan 11, 10:44 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Thu, 10 Jan 2008 14:55:18 -0800, [EMAIL PROTECTED] wrote:
Can I access the class attributes from a method added at runtime? (My
experience says no.)
I experimented with the following code:
[Code snipped]
So it
import collections
names = freddy fred bill jock kevin andrew kevin kevin jock
freq = collections.defaultdict(int)
for name in names.split():
freq[name] += 1
keys = freq.keys()
keys.sort(key = freq.get, reverse = True)
for k in keys:
print %-10s: %d % (k, freq[k])
On Jan 9, 6:58 pm,
Dennis Lee Bieber:
So� in Python, your str[n] :=
':' just can not be done! You would have to create a new string
containing everything in front of n, the ':', and then everything behind
n (skipping n itself, of course). This is a painfully slow operation in
Python as it allocates memory for
Is there a way to create a property with arguments? Or an index value
like a list?
To be used in the form like:
someClass.someProperty['arguments'] = 'some value'
or
someClass.someProperty('argument1', 'argument2') = 'some value'
--
http://mail.python.org/mailman/listinfo/python-list
Dear all,
Please help, i have error message when i import gzip module. The error
like this below:
bash-3.00$ python
Python 2.5 (r25:51908, Sep 20 2006, 03:46:40)
[GCC 3.4.6] on sunos5
Type help, copyright, credits or license for more information.
import gzip
Traceback (most recent call last):
You can execute cleanup code if the interpreter exits:
http://docs.python.org/lib/module-atexit.html
This will only cover the `Python's exit' part of your question, not the
module reloading stuff. On the other hand, if you load a module you
could set a global variable and check for it on
rent [EMAIL PROTECTED] writes:
keys = freq.keys()
keys.sort(key = freq.get, reverse = True)
for k in keys:
print %-10s: %d % (k, freq[k])
I prefer (untested):
def snd((x,y)): return y # I wish this was built-in
sorted_freq = sorted(freq.iteritems(), key=snd, reverse=True)
for
Patrick Stinson wrote:
Is it possible to load a script from it's text data, and not from a
file? I'm writing a scripting engine and need to run the scripts right
from the editor.
look up the exec statement and, optionally, the compile function in
the manual.
/F
--
On 2008-01-11, cesco [EMAIL PROTECTED] wrote:
Hi,
I have a file containing four columns of data separated by tabs (\t)
and I'd like to read a specific column from it (say the third). Is
there any simple way to do this in Python?
I've found quite interesting the linecache module but
syahreza.octadian wrote:
Please help, i have error message when i import gzip module. The error
like this below:
bash-3.00$ python
Python 2.5 (r25:51908, Sep 20 2006, 03:46:40)
[GCC 3.4.6] on sunos5
Type help, copyright, credits or license for more information.
import gzip
Traceback
HYRY [EMAIL PROTECTED] wrote:
def bears (n):
if n==42:
return True
if n%5==0:
if bears(n-42):
return True
if n%2==0:
if bears(n/2):
return True
if n%3==0 or n%4==0:
one = (n%10)
two =
- Speed Performance: Do you think that changing from list to Array()
would improve speed? I'm going to do lots of tilemap[y][x] checks (I
mean, player jumping around the screen, checking if it's falling over
a non-zero tile, and so).
First of all: if you have enough memory to use a
On Jan 11, 2:15 pm, cesco [EMAIL PROTECTED] wrote:
Hi,
I have a file containing four columns of data separated by tabs (\t)
and I'd like to read a specific column from it (say the third). Is
there any simple way to do this in Python?
I've found quite interesting the linecache module but
Hi,
I have a file containing four columns of data separated by tabs (\t)
and I'd like to read a specific column from it (say the third). Is
there any simple way to do this in Python?
I've found quite interesting the linecache module but unfortunately
that is (to my knowledge) only working on
A.T.Hofkamp wrote:
On 2008-01-11, cesco [EMAIL PROTECTED] wrote:
Hi,
I have a file containing four columns of data separated by tabs (\t)
and I'd like to read a specific column from it (say the third). Is
there any simple way to do this in Python?
I've found quite interesting the
I'm the author of Yapgvb, a Python binding for Graphviz. Yapgvb
enjoys modest success, but for some time it has been in dire need of a
Python 2.5 build for Windows. I'm posting this message in the hopes of
finding someone who is interested in making this build.
This is a relatively quick task
Bruno Desthuilliers [EMAIL PROTECTED]
writes:
fact 1: CPython compiles source code to byte-code.
fact 2: CPython executes this byte-code.
fact 3: Sun's JDK compiles source code to byte-code.
fact 4: Sun's JDK executes this byte-code.
Care to prove me wrong on any of these points ? Don't
On Jan 10, 9:15 pm, tijo [EMAIL PROTECTED] wrote:
Hi mate
i need o do a python program to connect 2 systems using TCP/IP and
UDP. Also i need to check the performance of these two protocols (how
many bytes received and how much time took). I havent worked in python
earlier and have no idea
On 11 Jan, 08:30, Tom_chicollegeboy [EMAIL PROTECTED] wrote:
here is what I have to do:
This question involves a game with teddy bears. The game starts when I
give you some bears. You then start giving me back some bears, but you
must follow these rules (where n is the number of bears that
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
fact 1: CPython compiles source code to byte-code.
fact 2: CPython executes this byte-code.
fact 3: Sun's JDK compiles source code to byte-code.
fact 4: Sun's JDK executes this byte-code.
Care to prove me wrong on any of these points ? Don't bother:
Hello!
I'm pleased to announce the 0.10.0b1, the first beta release of a new
SQLObject branch, 0.10.
What is SQLObject
=
SQLObject is an object-relational mapper. Your database tables are described
as classes, and rows are instances of those classes. SQLObject is meant to be
On Jan 11, 8:41 am, Lonnie Princehouse [EMAIL PROTECTED]
wrote:
I'm the author of Yapgvb, a Python binding for Graphviz. Yapgvb
enjoys modest success, but for some time it has been in dire need of a
Python 2.5 build for Windows. I'm posting this message in the hopes of
finding someone who is
On Jan 11, 5:20 am, anush [EMAIL PROTECTED] wrote:
Can anybody tell how I could go about running python scripts with
scons.
Have you tried reading the SCons user guide (http://www.scons.org/doc/
production/HTML/scons-user.html)? It's actually pretty good.
I'm not too clear on what you're
On Jan 11, 2008 9:10 AM, George Sakkis [EMAIL PROTECTED] wrote:
On Jan 11, 8:59 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
George Sakkis a écrit :
On Jan 11, 4:12 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
George Sakkis a écrit :
On Jan 10, 3:37
-Original Message-
From: [EMAIL PROTECTED] [mailto:python-
[EMAIL PROTECTED] On Behalf Of Tom_chicollegeboy
Sent: Friday, January 11, 2008 3:30 AM
To: python-list@python.org
Subject: python recursive function
Now, you are to write a program that, if I give you n bears, returns
Hi all
In my MFC application I need to call Python IDLE, pass some terms (or
scripts or values - they are simple strings or memo fields) there so
that user may modify/evaluate/interpret it and then return the
modified terms back to the application.
How can I do it the best way (MFC-IDLE)?
As for
On Jan 11, 8:59 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
George Sakkis a écrit :
On Jan 11, 4:12 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
George Sakkis a écrit :
On Jan 10, 3:37 am, Bruno Desthuilliers wrote:
I fail to see how the existence of JIT
Fredrik Lundh [EMAIL PROTECTED] writes:
(and if you use sane naming conventions, the risk for collisions is
near zero as well).
I haven't felt that way, I'm always worried about clobbering something
by leaking a variable. Maybe collisions don't really happen much, but
it's always seemed
Task:
build and install python 2.5.1 on AIX 5.3 to /opt/python2.5 with the
subdirectories:
./lib
./bin
./include
./man
./info
a.s.o
The ./bin ./man are created fine but for ./lib ./include the
structure is
/opt/python2.5/lib/python2.5
/opt/python2.5/include/python2.5
where i would like
Paul Rubin wrote:
it just seems way too obscure though. Python style seems to favor
spewing extra variables around.
that's because (local) variables have near-zero cost, and zero overhead.
use as many as you want, and reuse them as often as you want to.
(and if you use sane naming
On Jan 11, 4:12 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
George Sakkis a écrit :
On Jan 10, 3:37 am, Bruno Desthuilliers wrote:
I fail to see how the existence of JIT compilers in some Java VM changes
anything to the fact that both Java (by language specification) and
Helmut Jarausch wrote:
But how can I get control when the module gets unloaded
either by Python's gc, Python's exit or by a module reload.
Here's a simple approach using the finalizer of an object in the module's
globals():
$ cat nirvana.py
class Exit(object):
def __del__(self):
Ahh it's good to know that you love pointers like everyone else!
On Jan 11, 2008 9:30 AM, Gary Herron [EMAIL PROTECTED] wrote:
abhishek wrote:
Hi group any idea on HOW TO HANDLE POINTERS FROM NON-LOCAL HEAPS??
Thank you
POINTERS? Heaps? Huh? Ummm, let me think -- those terms
On Jan 11, 9:41 am, Hrvoje Niksic [EMAIL PROTECTED] wrote:
Bruno Desthuilliers [EMAIL PROTECTED]
writes:
fact 1: CPython compiles source code to byte-code.
fact 2: CPython executes this byte-code.
fact 3: Sun's JDK compiles source code to byte-code.
fact 4: Sun's JDK executes this
The code that follows is the result of noodling around with switches as a
learning tool. I've played with python for a few years, but I'm self-taught, so
. . .
Class Switch builds a set of functions. Method switch executes one of them
given a value of the switch variable.
My question is, why
Hi all!
As is about to become apparent, I really don't know what I'm doing
when it comes to using eggs.
I'm writing some software that is going to be deployed on a machine as
a number of eggs. Which is all well and good.
These eggs all end up depending on each other; modules in egg A want
to
On Jan 11, 12:24 pm, Lie [EMAIL PROTECTED] wrote:
On Jan 11, 4:38 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I've been reading the following example, and couldn't figure out, what
**kw mean. (It's an empty dictionary, but what's the semantics):
It's a keyword argument. It's some kind
Duncan Booth wrote:
John Nagle [EMAIL PROTECTED] wrote:
I'm printing out each entry in gc.garbage after a garbage collection in
DEBUG_LEAK mode, and I'm seeing many entries like
cell at 0x00F7C170: function object at 0x00FDD6B0
That's the output of repr. Are cell objects created only
On Jan 11, 9:44 am, Mike [EMAIL PROTECTED] wrote:
On Jan 11, 8:41 am, Lonnie Princehouse [EMAIL PROTECTED]
wrote:
I'm the author of Yapgvb, a Python binding for Graphviz. Yapgvb
enjoys modest success, but for some time it has been in dire need of a
Python 2.5 build for Windows. I'm
On Jan 11, 10:33 am, oj [EMAIL PROTECTED] wrote:
Hi all!
As is about to become apparent, I really don't know what I'm doing
when it comes to using eggs.
I'm writing some software that is going to be deployed on a machine as
a number of eggs. Which is all well and good.
These eggs all end
There are several attempts to allow python to work with per user (or even
per session) 'site-packages' like virtualpython / workingenv / virtualenv.
But they all have their own shortcomings and quirks.
My question is, shoudn't it be enough to set PYTHONPATH and everything
automagically to work
Hi All,
I'm using a simple program that uploads a file on a remote ftp server.
This is an example (not the whole program):
def store(self,hostname,username,password,destdir,srcpath):
self.ftp = ftplib.FTP(hostname)
self.ftp.login(username,password)
self.ftp.set_pasv(False)
Hi experts!
I am trying to write a menu script that will execute bash scripts.
Everything is fine until the script executes and I want to see if there are
any more options to run before quitting. Example:
def menu(opt1 = something, opt2 = something else):
--
Computers are like air
On Jan 11, 9:31 am, [EMAIL PROTECTED] wrote:
evenOrOdd = True
s1, s2 = hi_cat_bye_dog_foo_bar_red,
for i in s1:
if i == '_':
s2 += ':' if evenOrOdd else ','
evenOrOdd = not evenOrOdd
else:
s2 += i
print s2
Presently I cannot work out how to use .join
George Sakkis a écrit :
On Jan 11, 4:12 am, Bruno Desthuilliers bruno.
[EMAIL PROTECTED] wrote:
George Sakkis a écrit :
On Jan 10, 3:37 am, Bruno Desthuilliers wrote:
I fail to see how the existence of JIT compilers in some Java VM changes
anything to the fact that both Java (by language
[EMAIL PROTECTED] schrieb:
I have a C program that works very well. However, being C it has no
GUI. Input and Output are stdin and stdout... works great from a
terminal. Just wondering, has anyone every written a Python GUI for an
existing C program? Any notes or documentation available?
I
I have a C program that works very well. However, being C it has no
GUI. Input and Output are stdin and stdout... works great from a
terminal. Just wondering, has anyone every written a Python GUI for an
existing C program? Any notes or documentation available?
I have experience using wxPython
cesco wrote:
I have a file containing four columns of data separated by tabs (\t)
and I'd like to read a specific column from it (say the third). Is
there any simple way to do this in Python?
use the split method and plain old indexing:
for line in open(file.txt):
columns =
On Jan 11, 4:29 pm, [EMAIL PROTECTED] wrote:
Hi all,
I'm part of a small team writing a Python package for a scientific
computing project. The idea is to make it easy to use for relatively
inexperienced programmers. As part of that aim, we're using what we're
calling 'magic functions', and
On Fri, 11 Jan 2008 14:44:19 +0530 suyash jape [EMAIL PROTECTED] wrote:
Hi all
i want to access a web page through python script, fillup the necessary
fields,
and press submit button (which does POST call) and retrieve the result page
and retrieve some values from it.
Here is the script i
sorry for the spam Here is the complete message!
I am trying to write a menu script that will execute bash scripts.
Everything is fine until the script executes and I want to see if there are
any more options to run before quitting.
Example:
=
def
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
I don't think you're going to make you some friends here insulting
Fredrik. I don't know who Ed Jensen is, but we are quite a lot here to
know and respect Mr Lundh for his contributions to Python as both a
language and a community.
I'll keep in
On 11 Jan, 04:14, Mike Meyer [EMAIL PROTECTED]
wrote:
On Thu, 10 Jan 2008 18:37:59 -0800 (PST) Devraj [EMAIL PROTECTED] wrote:
My Python program needs reliably detect which Operating System its
being run on, infact it even needs to know which distribution of say
Linux its running on. The
On 11 Jan 2008 03:50:53 -0800 Paul Rubin http://phr.cx@NOSPAM.invalid wrote:
rent [EMAIL PROTECTED] writes:
keys = freq.keys()
keys.sort(key = freq.get, reverse = True)
for k in keys:
print %-10s: %d % (k, freq[k])
I prefer (untested):
def snd((x,y)): return y # I wish
-Original Message-
From: [EMAIL PROTECTED] [mailto:python-
[EMAIL PROTECTED] On Behalf Of Ivan Novick
Sent: Friday, January 11, 2008 12:46 PM
To: python-list@python.org
Subject: Re: reading a specific column from file
You say you would like to read a specific column. I wonder
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
And the reference implementation of Python (CPython) is not
interpreted, it's compiled to byte-code, which is then executed by a VM
(just like Java).
Ross Ridge a écrit :
Python's byte-code interpreter is not just like Java's virtual machine.
Mike Meyer [EMAIL PROTECTED] writes:
On 11 Jan 2008 03:50:53 -0800 Paul Rubin http://phr.cx@NOSPAM.invalid
wrote:
rent [EMAIL PROTECTED] writes:
keys = freq.keys()
keys.sort(key = freq.get, reverse = True)
for k in keys:
print %-10s: %d % (k, freq[k])
I prefer (untested):
On Fri, 11 Jan 2008 08:29:18 -0800 (PST) [EMAIL PROTECTED] wrote:
Hi all,
I'm part of a small team writing a Python package for a scientific
computing project. The idea is to make it easy to use for relatively
inexperienced programmers. As part of that aim, we're using what we're
calling
Hi,
I have what I suspect to be a fairly simple problem while using python Numeric.
I am attempting to count the number of times that an element 'b' occurs in
numeric array 'a'. I tried unsuccessfully to find a more efficient function to
do this for me such as that offered when using a list, but
On Jan 11, 2008 6:20 PM, John Nagle [EMAIL PROTECTED] wrote:
Tried:
print item.dir()
got:
'cell' object has no attribute 'dir'
I don't know nothing about cell objects...
but why don't you try dir(item) instead?
Francesco
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 11 Jan 2008 08:12:48 -0800 (PST) [EMAIL PROTECTED] wrote:
I have a C program that works very well. However, being C it has no
GUI.
What does C have to do with it not having a GUI? I've written more C
programs with a GUI than Python ones - and the C experience was
generally better. Of
1 - 100 of 363 matches
Mail list logo