Hi All,
Please find the smart debugger for python. it is an enchanced version of
python pdb with
data rendering feature.
http://develsdb.googlecode.com/svn/trunk/python/
http://develsdb.googlecode.com/svn/wiki/SmartDebuggerPython.wiki
hope you find this useful.
Regards,
Karthik
Mark Dickinson [EMAIL PROTECTED] writes:
Any change to Python that made == and != checks involving NaNs raise
an exception would have to consider the consequences for set, dict,
list membership testing.
and if Python had separate operators for these two purposes it
wouldn't be Python
On 2008-01-24, Steven D'Aprano [EMAIL PROTECTED] wrote:
On Thu, 24 Jan 2008 13:34:56 +, Antoon Pardon wrote:
On 2008-01-21, Steven D'Aprano [EMAIL PROTECTED]
wrote:
On Sun, 20 Jan 2008 21:15:02 -0600, Albert Hopkins wrote:
According to the IEEE-754 standard the usual trichotomy of x is
I have been programming in python for some time but I have become
short of ideas. A software exhibition is coming up, and I plan to show
python's worth 'cos it is quite underrated in this part of the world.
Could anyone suggest any really good program ideas and information on
how to implement
Ambush Commander wrote:
The primary problem involves binary extensions to the Python
interpreter itself, which Mercurial uses. The only C compiler I have
on my machine is Visual Studio 2005 Express, but Python's binary
distribution was compiled with VS 2003, so the installer refuses to
alex23 schreef:
On Jan 25, 5:44 am, Roel Schroeven [EMAIL PROTECTED]
wrote:
I guess I just need to try somewhat harder to use TDD in my daily
coding. Apart from books, are there other resources that can help
beginners with TDD? Mailing lists, forums, newsgroups possibly?
There's the
Tim Rau wrote:
I'm sorry: I forgot to say what my problem was. Python seems to think
that nextID is a local, and complains that it can't find it. THis is
not the full text of the function, just the level that is causing
errors. the lack of : on the if is a transcription error.
Traceback
On Jan 25, 10:55 am, goldtech [EMAIL PROTECTED] wrote:
Hi,
Given an MS-Access table with a date type field with a value of:
12:00:00 AM - just12:00:00 AM, there's nothing else in the field.
I want to print exactly what's in the field, ie. 12:00:00 AM. What I
get printed is: 12/30/0/
Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Thu, 24 Jan 2008 17:17:25 +0200, Donn Ingle wrote:
Given these two examples:
1.
./fui.py *.py
2.
ls *.py | ./fui.py
How can I capture a list of the arguments?
I need to get all the strings (file or dir names) passed via the
On Fri, 25 Jan 2008 07:57:38 +, Pete Forman wrote:
Mark Dickinson [EMAIL PROTECTED] writes:
Any change to Python that made == and != checks involving NaNs raise
an exception would have to consider the consequences for set, dict,
list membership testing.
[…]
and if Python had
[EMAIL PROTECTED] wrote:
I have a goal function that returns the fitness of a given solution. I
need to wrap that function with a class or a function to keep track of
the best solution I encounter. Which of the following would best serve
my purpose and be the most pythonic?
You could write a
we know that time.gmtime(secs) takes a parameter secs. what does this
secs suggest ??What is it's significance ??
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I wish to pass an argument to a function which will inset rows in a
db. I wish to have the follow possibilities -
(one,two)
((one,two),(three,four))
The first possibility would mean that one row is added with one and
two being its column values. The second possibility means that two
rows
On Thu, 24 Jan 2008 23:04:42 -0800, Tim Rau wrote:
UnboundLocalError: local variable 'nextID' referenced before assignment
When you assign to a name in Python, the compiler treats it as a local
variable. So when you have a line like this:
nextID += 1 # equivalent to nextID = nextID + 1
you
Hi,
I wish to know which python library is popular for SOAP related
programming, especially for sending SOAP requests and parsing SOAP
responses.
I can't find any such library in the Python standard library but I
could find ZSI and soap.py libraries. However, ZSI does not support
SOAP 1.2.
Does
Hi,
I am facing a peculiar problem. socket.gethostbyaddr is not working
fine on my MAC for ip addresses on the LAN. The LAN happens to consist
of linux and windows machines and this is the only one MAC on the
LAN.
Please see the example below. I am getting error: socket.herror: (1,
'Unknown
Hallo pyPeople,
I wrote a little snippet of code that takes a list representing some
'digits', and according to a list of symbols, increments the digits through
the symbol list.
so for example,
digits=[a,a,a]
symbols=[a,b,c]
increment(digits,symbols) repeatedly would return digits as
aab
aac
On 25 Jan, 11:43, asit [EMAIL PROTECTED] wrote:
we know that time.gmtime(secs) takes a parameter secs. what does this
secs suggest ??What is it's significance ??
From the documentation [1] with some editing:
gmtime([secs])
Convert a time expressed in seconds since the epoch to a time
On Fri, 25 Jan 2008 07:57:13 +, Antoon Pardon wrote:
But if you consider that having x is not smaller than y be equivalent
to x is greater than or equal to y is more important than forcing a
boolean answer in the first place, then you need something to signal
Undefined, and an exception
On Jan 25, 9:26 pm, [EMAIL PROTECTED] wrote:
Hi,
I wish to pass an argument to a function which will inset rows in a
db. I wish to have the follow possibilities -
(one,two)
((one,two),(three,four))
The first possibility would mean that one row is added with one and
two being its column
On Jan 25, 5:31 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Thu, 24 Jan 2008 23:04:42 -0800, Tim Rau wrote:
UnboundLocalError: local variable 'nextID' referenced before assignment
When you assign to a name in Python, the compiler treats it as a local
variable. So when
On Fri, 25 Jan 2008 03:28:05 -0800, Tim Rau wrote:
Because you don't assign to allThings, and therefore it is treated as
global.
Hmm so I can't assign to globals in a local environment? How do I
make it see that I'm assigning to a global?
I thought somebody had already mentioned
asit wrote:
we know that time.gmtime(secs) takes a parameter secs. what does this
secs suggest ??What is it's significance ??
import time
help (time.gmtime)
Help on built-in function gmtime in module time:
gmtime(...)
gmtime([seconds]) - (tm_year, tm_mon, tm_day, tm_hour, tm_min,
Can someone tell me the minimum requitements for Python as I can't
find it anwhere on the site. I have 3 PC's which are only 256mb RAM,
wanted to know if this was sufficenent.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 25, 5:31 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Thu, 24 Jan 2008 23:04:42 -0800, Tim Rau wrote:
UnboundLocalError: local variable 'nextID' referenced before assignment
When you assign to a name in Python, the compiler treats it as a local
variable. So when
On 1/25/08, shailesh [EMAIL PROTECTED] wrote:
apples-computer:~ apple$ ping 192.168.4.123
PING 192.168.4.123 (192.168.4.123): 56 data bytes
64 bytes from 192.168.4.123: icmp_seq=0 ttl=64 time=0.328 ms
64 bytes from 192.168.4.123: icmp_seq=1 ttl=64 time=0.236 ms
64 bytes from 192.168.4.123:
http://norvig.com/sudoku.html
(...)
Below is the winner of my hacking for an as fast as
possible 110% pure python (no imports at all!) comprehensive sudoku
solver under 50 LOCs, back in 2006. Performance is comparable to the
solver you advertize - numbers are slightly better, but
Hi All,
I'm trying to access individual video frames of an AVI file from within
Python 2.4 or 2.5 under Windows XP.
I have found this example code here for that does exactly what I want,
using the windows avifile.dll but I am unable to find the AVIFile.h
header...
[EMAIL PROTECTED] wrote:
Can someone tell me the minimum requitements for Python as I can't
find it anwhere on the site. I have 3 PC's which are only 256mb RAM,
wanted to know if this was sufficenent.
Python runs even on mobile phones with far less memory. However the
memory consumption
On 25 Jan, 12:03, John Machin [EMAIL PROTECTED] wrote:
On Jan 25, 9:26 pm, [EMAIL PROTECTED] wrote:
Hi,
I wish to pass an argument to a function which will inset rows in a
db. I wish to have the follow possibilities -
(one,two)
((one,two),(three,four))
The first possibility would
On Fri, 25 Jan 2008 04:28:43 -0800, asit wrote:
why this program shows ambiguous behavior ??
You should read this page, it will help you solve your problem:
http://catb.org/~esr/faqs/smart-questions.html
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
why this program shows ambiguous behavior ??
import os
import stat
import time
#import types
file_name=raw_input(Enter file name : )
print file_name, information
st=os.stat(file_name)
print mode, =, oct(stat.S_IMODE(st[stat.ST_MODE]))
print type,=,
if stat.S_ISDIR(st[stat.ST_MODE]):
print
Nick Craig-Wood wrote:
This iterates over the lines of all files listed in sys.argv[1:],
defaulting to sys.stdin if the list is empty. If a filename is '-', it
is also replaced by sys.stdin. To specify an alternative list of
filenames, pass it as the first argument to input(). A single file
On 25 ene, 10:28, asit [EMAIL PROTECTED] wrote:
why this program shows ambiguous behavior ??
st=os.stat(file_name)
print file size, =,st[stat.ST_SIZE]
print inode number, =,st[stat.ST_INO]
print device inode resides on, =,st[stat.ST_DEV]
print number of links to this inode,
[EMAIL PROTECTED] wrote:
Diez B. Roggisch wrote:
No, there is no way. You would change general interpreter behavior if
you could set arbitrary operators for predefined types.
Start grumping...
Thank you, Diez.
If I ever design a language, please remind me that complete, easy,
[EMAIL PROTECTED] schrieb:
Diez B. Roggisch wrote:
No, there is no way. You would change general interpreter behavior if
you could set arbitrary operators for predefined types.
Start grumping...
Thank you, Diez.
If I ever design a language, please remind me that complete, easy,
On Jan 25, 8:43 pm, [EMAIL PROTECTED] wrote:
This means NO X-windows, NO GTK/Gnome, NO
computer mouse, on my machine (AMD Geode 500MHz CPU, VGA output).
I would like to write some really light weighted GU interface. My
concept is to have just few user screens (about 10) controlled via 4
or 5
Hi,
I am working with the Python 2.5 running on the command line version
of Linux Ubuntu 7.04. This means NO X-windows, NO GTK/Gnome, NO
computer mouse, on my machine (AMD Geode 500MHz CPU, VGA output).
I would like to write some really light weighted GU interface. My
concept is to have just few
[EMAIL PROTECTED] wrote:
Hexamorph wrote:
You mean you want the ability to change for example the + operator
for ints to something like calculating the cosine instead of doing
addition?
Sure. Cosines are a monadic operation and the monadic '+' is a NOP, so
why shouldn't I define +45 to
On Jan 26, 7:58 am, [EMAIL PROTECTED] wrote:
I find the first and third solutions simpler to read, and the first
solution requires less memory, it probably works quite well with
Psyco, and it's easy to translate to other languages (that is
important for programs you want to use for a lot of
[EMAIL PROTECTED] schrieb:
Hi,
I am working with the Python 2.5 running on the command line version
of Linux Ubuntu 7.04. This means NO X-windows, NO GTK/Gnome, NO
computer mouse, on my machine (AMD Geode 500MHz CPU, VGA output).
I would like to write some really light weighted GU
Thanks Hexamorph and Neal. Somehow I didn't make the connection with using
'index', but I'm all sorted out now :)
On Jan 25, 2008 1:47 PM, Hexamorph [EMAIL PROTECTED] wrote:
Henry Baxter wrote:
Oops, gmail has keyboard shortcuts apparently, to continue:
def maxi(l):
m = max(l)
Hi all,
I made an application that use multithreading (indifferently importing
thread or threading module) , but when I call some wrapped modules
(with swig) from my application they run like there is only a single
thread (and my application gui ,made with wxPython, freezes). If I use
other
On Jan 25, 6:45 pm, Ben Finney [EMAIL PROTECTED]
wrote:
Gabriel Genellina [EMAIL PROTECTED] writes:
You can also put, in animal/__init__.py:
from monkey import Monkey
and now you can refer to it as org.lib.animal.Monkey, but keep the
implementation of Monkey class and all related stuff
On Jan 25, 5:04 am, Karlheinz Klingbeil
[EMAIL PROTECTED] wrote:
Am 25.01.2008, 06:21 Uhr, schrieb David Erickson [EMAIL PROTECTED]:
Bottom of the headers... but I am looking to insert at the top, and re-
ordering/inserting does matter depending on what type of header you
are, received
On Jan 25, 11:10 pm, [EMAIL PROTECTED] wrote:
Once a python py file is compiled into a pyc file, I can disassemble
it into assembler. Assembler is nothing but codes, which are
combinations of 1's and 0's. You can't read a pyc file in a hex
editor, but you can read it in a disassembler. It
Hi,
I am looking for the code of pyfov, which is on the Package Index.
However, the link is broken and the author does not seem to respond to
e-mails.
Any chance to get hands on the code?
Martin
--
http://mail.python.org/mailman/listinfo/python-list
This is likely an easy problem; however, I couldn't think of
appropriate keywords for google:
Basically, I have some raw data that needs to be preprocessed before
it is saved to the database e.g.
In [1]: unicode_html = u'\u3055\u3080\u3044\uff0f\r\n\u3064\u3081\u305f
\u3044\r\n'
I need to turn
On Wed, 23 Jan 2008 08:49:20 +0100, Christian Heimes wrote:
It's even
possible to write code with Python assembly and compile the Python
assembly into byte code.
Really? How do you do that?
I thought it might be compile(), but apparently not.
--
Steven
--
On Jan 26, 1:11 pm, globophobe [EMAIL PROTECTED] wrote:
This is likely an easy problem; however, I couldn't think of
appropriate keywords for google:
Basically, I have some raw data that needs to be preprocessed before
it is saved to the database e.g.
In [1]: unicode_html =
On Jan 25, 2008 5:17 PM, Paul Boddie [EMAIL PROTECTED] wrote:
On 25 Jan, 22:06, Lorenzo E. Danielsson
[EMAIL PROTECTED] wrote:
What you need then is something like SVGAlib (http;//svgalib.org). Only
really old people like myself know that it exists. I've never heard of
any Python
On Jan 25, 1:47 pm, Hexamorph [EMAIL PROTECTED] wrote:
Henry Baxter wrote:
Oops, gmail has keyboard shortcuts apparently, to continue:
def maxi(l):
m = max(l)
for i, v in enumerate(l):
if m == v:
return i
What's about l.index(max(l)) ?
from itertools
I was wondering what kind of python code I would need to enable me to
use the up and down, left and right arrow keys to control software
programming decisions within a Python Program.
Any direction and advice would be greatly appreciated,
Thank You,
Rodney
--
[newsgroups line fixed, f'ups set to clpm]
Quoth Summercool [EMAIL PROTECTED]:
On Jan 25, 5:16 pm, Summercool [EMAIL PROTECTED] wrote:
somebody who is a regular expression guru... how do you negate a word
and grep for all words that is
tire
but not
snow tire
or
Summercool [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
somebody who is a regular expression guru... how do you negate a word
and grep for all words that is
tire
but not
snow tire
or
snowtire
so for example, it will grep for
winter tire
tire
retire
tired
On Jan 25, 2008 9:09 PM, Steven D'Aprano
[EMAIL PROTECTED] wrote:
On Wed, 23 Jan 2008 08:49:20 +0100, Christian Heimes wrote:
It's even
possible to write code with Python assembly and compile the Python
assembly into byte code.
Really? How do you do that?
I thought it might be
Hi,
Wondering if there is a way to measure a child process's cpu usage
(sys and user) when the child is still running. I see os.times()
working fine in my system (Linux 2.6.9-42.7.ELsmp), but it gives valid
data only after the child has exited. When the child is alive,
os.times() data for child
Hexamorph wrote:
...
What's about l.index(max(l)) ?
What about
max((x,i) for i,x in enumerate(lst))[1]
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 25, 5:54 pm, [EMAIL PROTECTED] wrote:
On Jan 25, 5:46 pm, Bjoern Schliessmann usenet-
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
print x.ends,y.ends,z.ends
#
Running the following code outputs:
[(0, 2)] [(0, 2)] [(0, 2)]
Can anyone explain this?
Carl Banks [EMAIL PROTECTED] writes:
AirplaneInterface = InterfaceTracker(Airplane)
...
set_up_initial_state()
...
AirplaneInterface.report(self)
Thoughts? (Surely someone's thought to do this before.)
A decorator might express the idea a little more naturally.
On Jan 25, 10:25 pm, [EMAIL PROTECTED] wrote:
I agree that SDL is probably the best choice but for the sake of
completeness, Gtk can (at least in theory - I've never tried it) be
built against directfb and run without X.
from the Pygame Introduction: Pygame is a Python extension library
Traceback (most recent call last):
File C:\Documents and Settings\Owner\My Documents\NIm's code\sandbox
\sandbox.py, line 242, in module
player = ship()
File C:\Documents and Settings\Owner\My Documents\NIm's code\sandbox
\sandbox.py, line 121, in __init__
self.phyInit()
File
While thinking about generational garbage collection, the thought of
generational interfaces occurred to me. I'd thought I'd run it by you
guys. I'm curious if there are any examples of this out there.
I've opined on this chat room before that interfaces are more often
cumbersome than helpful,
On 2008-01-26, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Once a python py file is compiled into a pyc file, I can disassemble
it into assembler.
No you can't. It's not native machine code. It's byte code
for a virtual machine.
Assembler is nothing but codes, which are combinations of 1's
On Jan 26, 1:41 am, John Machin [EMAIL PROTECTED] wrote:
On Jan 26, 4:20 pm, Tim Rau [EMAIL PROTECTED] wrote:
Traceback (most recent call last):
File C:\Documents and Settings\Owner\My Documents\NIm's code\sandbox
\sandbox.py, line 242, in module
player = ship()
File
On Jan 26, 5:32 pm, Jeroen Ruigrok van der Werven [EMAIL PROTECTED]
nomine.org wrote:
-On [20080126 06:26], Tim Rau ([EMAIL PROTECTED]) wrote:
Line 147 reads:
moi = cp.cpMomentForCircle(self.mass, .2, 0, vec2d((0,0)))
I think it expects something like:
# badly named variable, pick
On Jan 26, 1:32 am, Jeroen Ruigrok van der Werven [EMAIL PROTECTED]
nomine.org wrote:
-On [20080126 06:26], Tim Rau ([EMAIL PROTECTED]) wrote:
Line 147 reads:
moi = cp.cpMomentForCircle(self.mass, .2, 0, vec2d((0,0)))
I think it expects something like:
# badly named variable, pick
Paul Boddie wrote:
Well, it is important to make distinctions when people are wondering,
If Python is 'so slow' and yet everyone tells me that the way it is
executed is 'just like Java', where does the difference in performance
come from? Your responses seemed to focus more on waving that
I agree that SDL is probably the best choice but for the sake of
completeness, Gtk can (at least in theory - I've never tried it) be
built against directfb and run without X.
from the Pygame Introduction: Pygame is a Python extension library
that wraps the SDL library and it's helpers. So you
On Jan 25, 11:36 pm, ajaksu [EMAIL PROTECTED] wrote:
On Jan 25, 11:10 pm, [EMAIL PROTECTED] wrote:
[...]
Gaah, is this what's going on?
[EMAIL PROTECTED]:~$ cat error.txt
This is not assembler...
[EMAIL PROTECTED]:~$ ndisasm error.txt
54push sp
0001 686973
On Thu, 24 Jan 2008 08:02:06 GMT, Tim Roberts [EMAIL PROTECTED] wrote:
Bjoern Schliessmann [EMAIL PROTECTED] wrote:
Grant Edwards wrote:
Trying to find assembly language stuff to look at is futile.
Python doesn't get compiled into assembly language.
So, how do processors execute Python
www.enmac.com.hk
GSM Mobile Phones, Digital iPods, Digital Clocks, Digital Pens,
Digital Quran. Enjoy these products with Islamic Features (Complete
Holy Quran with Text and Audio, Tafaseer books, Ahadees Books, Daily
Supplications, Universal Qibla Direction, Prayer Timing and much more)
visit our
John Deas wrote:
My problem is that f.read() outputs nothing
Since ``open`` did not give you an IOError,
you did get a handle to the files,
so this suggests that the files you read
are empty...
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I'd use the first solution.
It can be speeded up a bit with
a try/except:
for k,v in kv:
try:
if d[k] v:
d[k] = v
except KeyError:
d[k] = v
Cheers,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
On 25 Jan, 22:06, Lorenzo E. Danielsson
[EMAIL PROTECTED] wrote:
What you need then is something like SVGAlib (http;//svgalib.org). Only
really old people like myself know that it exists. I've never heard of
any Python bindings for it, but that might be where you come in. I
haven't looked at
I'm playing with wxPython 2.8.7.1 on OS X 10.4.11 with MacPython 2.5
I ran the demo program found what may be a bug with the right mouse
button up event.
The demo is ShapedWindow.py. Everthing thing seems to work fine except
that right
clicking does not close the window. Tracing the program
On Jan 26, 12:32 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
Carl Banks [EMAIL PROTECTED] writes:
AirplaneInterface = InterfaceTracker(Airplane)
...
set_up_initial_state()
...
AirplaneInterface.report(self)
Thoughts? (Surely someone's thought to do this
Henry Baxter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
| Thanks Hexamorph and Neal. Somehow I didn't make the connection with
using
| 'index', but I'm all sorted out now :)
|
| On Jan 25, 2008 1:47 PM, Hexamorph [EMAIL PROTECTED] wrote:
|
| Henry Baxter wrote:
| Oops, gmail
also
if i were to write unit test for this method ,how shd i do it? shd i
be checking all values in the matrix created inside and so on?
gordon
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy [EMAIL PROTECTED] writes:
| What's about l.index(max(l)) ?
Both of these methods scan the list twice. The two given by RH and SDD do
so just once. Both of those will give the index of the of the last maximum
value. If you want the index of the first max value (you did not
On Jan 25, 10:48 pm, jitrowia [EMAIL PROTECTED] wrote:
I was wondering what kind of python code I would need to enable me to
use the up and down, left and right arrow keys to control software
programming decisions within a Python Program.
Any direction and advice would be greatly appreciated,
On Jan 26, 4:20 pm, Tim Rau [EMAIL PROTECTED] wrote:
Traceback (most recent call last):
File C:\Documents and Settings\Owner\My Documents\NIm's code\sandbox
\sandbox.py, line 242, in module
player = ship()
File C:\Documents and Settings\Owner\My Documents\NIm's code\sandbox
-On [20080126 06:26], Tim Rau ([EMAIL PROTECTED]) wrote:
Line 147 reads:
moi = cp.cpMomentForCircle(self.mass, .2, 0, vec2d((0,0)))
I think it expects something like:
# badly named variable, pick something better depending on context
temp = vec2d(0, 0)
cp.cpMomentForCircle(self.mass, .2,
Olivier Lefevre [EMAIL PROTECTED] wrote:
1. The subprocess has stopped producing output.
Indeed, if I do this interactively, I can tell after 3 lines that I've
gotten all there is to get right now and the fourth readline() call
hangs.
Can you really? How do you know if the program has
John Deas wrote:
Hi, I am very new to Python (1 evening...)
I need to process a series of files (toto-1.txt toto-2.txt toto-3.txt
toto-4.txt), and as such I created a small program to go through the
files in a directory. I want to call the script with arguments, like
python script.py toto-
On Jan 26, 6:25 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Fri, 25 Jan 2008 22:53:16 -0800, John Machin wrote:
On Jan 26, 5:32 pm, Jeroen Ruigrok van der Werven [EMAIL PROTECTED]
nomine.org wrote:
-On [20080126 06:26], Tim Rau ([EMAIL PROTECTED]) wrote:
Line 147
Dotan Cohen [EMAIL PROTECTED] wrote:
Maybe you mean:
for match in re.finditer(r'\([A-Z].+[a-z])\', contents):
Note the last backslash was in the wrong place.
The location of the backslash in the orignal reply is correct, it is
there to escape the closing paren, which is a special character:
The Fine Manual mentions that pickle works for classes that are
defined at the top level of a module. Is there a way to extend this
behavior so that I can pickle and unpickle instances of dynamically
generated classes ?
Longer version: I have a function RecordTypeFactory(fields, ...) that
whatazor schrieb:
Hi all,
I made an application that use multithreading (indifferently importing
thread or threading module) , but when I call some wrapped modules
(with swig) from my application they run like there is only a single
thread (and my application gui ,made with wxPython,
On Fri, 25 Jan 2008 22:53:16 -0800, John Machin wrote:
On Jan 26, 5:32 pm, Jeroen Ruigrok van der Werven [EMAIL PROTECTED]
nomine.org wrote:
-On [20080126 06:26], Tim Rau ([EMAIL PROTECTED]) wrote:
Line 147 reads:
moi = cp.cpMomentForCircle(self.mass, .2, 0, vec2d((0,0)))
I think
hi
i am writing code to check a folder containing images and then process
thir vals using PIL and do some calc to create a matrix of values .if
the folder has any new imgs added the program will do all calc again
and dump the values into a cachefile.If the folder contents remain
unaltered the
Hello, I'm trying to make a python script that take an email in (raw)
text format, and add a footer to the text (or html) body of the email.
I'm aware of the email and email.mime modules, but I can't figure out
how to identify 'the main text (or html) content' from the email, and
how to be sure
[EMAIL PROTECTED] wrote:
Hello,
I have a class called 'Axis' that I use as a base class for several
types of axes that can be created by a grid generation program that I
have written: equally-spaced grids, logarithmic grids, etc. In any
case, if I use this base class by itself, I see some
Alan Isaac wrote:
#sort by id and then value
kv_sorted = sorted(kv, key=lambda x: (id(x[0]),x[1]))
#groupby: first element in each group is object and its min value
d =dict( g.next() for k,g in groupby( kv_sorted, key=lambda x: x[0] ) )
Yes, that appears to be fastest and is
pretty easy
Apologies for any multiple copies received. We would appreciate it if
you could distribute
the following call for papers to any relevant mailing lists you know
of.
CALL FOR PAPERS
===
Special Session:
Henry Baxter wrote:
Oops, gmail has keyboard shortcuts apparently, to continue:
def maxi(l):
m = max(l)
for i, v in enumerate(l):
if m == v:
return i
What's about l.index(max(l)) ?
--
http://mail.python.org/mailman/listinfo/python-list
Oops, gmail has keyboard shortcuts apparently, to continue:
def maxi(l):
m = max(l)
for i, v in enumerate(l):
if m == v:
return i
But it seems like something that should be built in - or at least I should
be able to write a lambda function for it, but I'm not sure how
I apologize if this has already been discussed - funnily enough my googling
did bring up a previous thread about it on this mailing list, but despite
the promising subject line, seemed to mainly be concerned with whether
python-list should its own FAQ...so I assume this has been asked many times
On Jan 26, 12:48 am, goldtech [EMAIL PROTECTED] wrote:
snip
try this:
val = oRS.Fields(dt).Value
print type(val)
this gives: type 'time'
print float(val)
yes, it gives 0.0
But there should be a way to print what is *actually in the field*.
What is actually in the field is a
On Fri, 25 Jan 2008 17:31:16 +0100, Olivier Lefevre wrote:
Thanks for the answer. Yes this is tricky. I have done it in Java
before, where you can, e.g., set up a thread to pump stuff out of
both stderr and stdout continuously but my python is too rudimentary
for that.
The `trheading` module
1 - 100 of 215 matches
Mail list logo