On Feb 27, 4:49 pm, Mattias Brändström [EMAIL PROTECTED] wrote:
Hello!
I'm trying to find what package I should use if I want to:
1. Create 3d vectors.
2. Normalize those vectors.
3. Create a 3x3 rotation matrix from a unit 3-d vector and an angle in
radians.
4. Perform matrix
On Feb 27, 6:36 pm, [EMAIL PROTECTED] wrote:
Was anybody blogging about PyCon (talks and/or sprints)? Got any pointers?
Have you tried Planet Python?
http://planet.python.org/
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 1, 4:01 pm, Steven Bethard [EMAIL PROTECTED] wrote:
Arnaud Delobelle wrote:
[...]
This does pretty much the same thing as the recipe I posted:
Not at all. My new_struct create returns a new class which is similar
to a C struct (notice the __slots__). The recipe you refer to is
nothing
Duncan Booth kirjoitti:
Dennis Lee Bieber [EMAIL PROTECTED] wrote:
For floating point, smallest magnitude to largest IS the most
precise.
Pretend you only have 2 significant digits of precision...
10 + 0.4 + 0.4 + 0.4 = 10
0.4 + 0.4 + 0.4 + 10 = 11
and if you try
The timeit code disables the garbage collector while running. I ran
the tests on my system after adding the following lines to t1() and
t2().
del base
gc.collect()
Original timetest.py:
Using proxy
100 loops, best of 3: 4.45 msec per loop
Call to dummy proxy
100 loops, best of 3:
In article [EMAIL PROTECTED],
Robert Kern [EMAIL PROTECTED] wrote:
Ron Garret wrote:
I'm trying to run the Python examples distributed with XCode and they
all give me the same error:
Traceback (most recent call last):
File checktext.py, line 35, in module
main()
File
Ron Garret wrote:
In article [EMAIL PROTECTED],
Robert Kern [EMAIL PROTECTED] wrote:
Note that in recent versions of Python, I believe that the pythonw
executable
is no longer necessary as a workaround.
How recent? I'm already using 2.5.
2.5 definitely works. I think it might have
class MenuDemo(Frame):
def __init__(self, parent=None):
Frame.__init__(self, parent)
self.pack(expand=YES, fill=BOTH)
self.createWidgets()
def createWidgets(self):
self.makeMenuBar()
self.makeToolBar()
L = Label(self, text='Menu and
On Mar 1, 12:46 pm, Bart Ogryczak [EMAIL PROTECTED] wrote:
This solution looks nice, but how does it work? I'm guessing
struct.unpack will provide me with 8 bit bytes
unpack with 'B' format gives you int value equivalent to unsigned char
(1 byte).
(will this work on any system?)
Any
I've got a question regarding the implementation of a caching system that
I'm porting over from C.
I have multiple processes across an array of systems that must retrieve data
from a central database at a fairly high rate. The current system uses
shared memory and supports expiry after a
Tim Golden ha scritto:
I vaguely remember that you can get an ODBC driver for CSV.
There is a standard ODBC driver for use text file or csv, in windows.
But I use Linux on production servers.
I'd like to find a Python library or tool.
Thanks!
Paolo
--
Great guys:
As a newbie, I'm trying to simply parse a xml file using minidom, but
I don't know why I get some extra children(?). I don't know what is
wrong in xml file, but I've tried different xml files, still same
problem.
Given an sqlite db that stores the strings data such as names, etc.
encoded in Unicode.
How do I write a sql query statement with 'LIKE' or '=' operators and
insert the Unicoded name.
for example:
in table MY_TABLE, in column COL01 there is a value ¿Habla español?
within python I represent this
In article [EMAIL PROTECTED],
Robert Kern [EMAIL PROTECTED] wrote:
Ron Garret wrote:
In article [EMAIL PROTECTED],
Robert Kern [EMAIL PROTECTED] wrote:
Note that in recent versions of Python, I believe that the pythonw
executable
is no longer necessary as a workaround.
How
In [EMAIL PROTECTED], bkamrani
wrote:
**
xml file (fileTest) looks like:
?xml version=1.0 encoding=ISO-8859-1 ?
afc xmlns=http://python.org/:aaa; xmlns:afc=http://
python.org/:foo
afc:Bibliography
On Feb 28, 3:46 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
I didn't think so but I can't conveniently test it for now. Maybe
tonight.
After playing with it a bit (only have 2.5 on this box), it looks like
you do need to subscript the next() call. For example, the return from
unique( [[1],
[EMAIL PROTECTED] schrieb:
Great guys:
As a newbie, I'm trying to simply parse a xml file using minidom, but
I don't know why I get some extra children(?). I don't know what is
wrong in xml file, but I've tried different xml files, still same
problem.
On Mar 1, 12:46 pm, [EMAIL PROTECTED] wrote:
As a newbie, I'm trying to simply parse a xml file using minidom, but
I don't know why I get some extra children(?). I don't know what is
wrong in xml file, but I've tried different xml files, still same
problem.
Most simply, if you need to stick
Ron Garret wrote:
In article [EMAIL PROTECTED],
Robert Kern [EMAIL PROTECTED] wrote:
Ron Garret wrote:
In article [EMAIL PROTECTED],
Robert Kern [EMAIL PROTECTED] wrote:
Note that in recent versions of Python, I believe that the pythonw
executable
is no longer necessary as a
Arnaud Delobelle wrote:
On Mar 1, 4:01 pm, Steven Bethard [EMAIL PROTECTED] wrote:
Arnaud Delobelle wrote:
[...]
This does pretty much the same thing as the recipe I posted:
Not at all. My new_struct create returns a new class which is similar
to a C struct (notice the __slots__). The
Martin P. Hellwig wrote:
I'll looked at the perl function you mentioned and it seems to me (but
I'm not a pearl coder) that it uses the dynamic update procedure, which
is explained by the RFC 2136 (Bjoern mentioned that already).
So I googled for Python DNS dynamic update and in the results
I had tried the global prefix in the real code (vs. the contrived
example in the post), but in the incorrect code block, which made me
think something else was up. Yes, these were supposed to be constants
that under rare circumstances were changed ;) In the end, I scrapped
the rebind approach,
HI Group,
As I am very new in python field so this question might be very silly to
you but if I get any help is highly appreciated.
Problem:
I wrote a python script which is working fine to upload files to the ftp
server but the problem is it is reducing the actual size after
transferring. I
Hi,
I've tried to add from __future__ import division to the startup
script of pycrust. It seems to be imported as division is listed in the
namespace. But it is somehow not activated.
Any suggestions?
PyCrust 0.9.5
Python 2.5
--
http://mail.python.org/mailman/listinfo/python-list
Ok the window has resized but the elements inside are still like they
were, so they are going off the edge on the window. How can I get
these to resize? I have put sizes on the frames they are in. Sorry to
keep asking but I'm flying blind here, I have checked the python site
and the intro to
On Thu, 1 Mar 2007 14:58:11 -0500, Ahmed, Shakir [EMAIL PROTECTED] wrote:
HI Group,
As I am very new in python field so this question might be very silly to
you but if I get any help is highly appreciated.
Problem:
I wrote a python script which is working fine to upload files to the ftp
server
On Mar 1, 7:37 pm, Steven Bethard [EMAIL PROTECTED] wrote:
Arnaud Delobelle wrote:
On Mar 1, 4:01 pm, Steven Bethard [EMAIL PROTECTED] wrote:
Arnaud Delobelle wrote:
[...]
This does pretty much the same thing as the recipe I posted:
Not at all. My new_struct create returns a new class
I feel like an idiot. I've been struggling with this for 4 days. I can
make a window but I can't seem to close them. I think I've narrowed
down the problem being with my button event bindings. They don't seem
to take. But I don't get any errors either. So am I missing something?
Any help would be
Arnaud Delobelle wrote:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/502237
[snip]
Although I don't see the necessity of a metaclass: you could have
class Record(object):
def __init__(self, *vals):
for slot, val in zip(self.__slots__, vals):
[EMAIL PROTECTED] a écrit :
Hi
I am working on a python app, an outliner(a window with a TreeCtrl
on the
left to select a document, and a RichTextBox at the right to edit the
current
doc).
I am familiarized with OOP concepts and terms but I lack practical
experience
, so any
I recently moved from XP to Linux, but would like to use Python
whenever possible.
line from bash script:
find ~/Mail -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp -aPvu
{} /backup-dest \;
What modules would I use to accomplish this in Python? Or any other
Python tricks to copy or backup
Timm Florian Gloger wrote:
Hi,
is Guido van Rossum's Python Tutorial in non-HTML formats (e.g. PDF
or PS) avaiable for free?
Regards,
Timm
You mean like here: http://docs.python.org/download.html
You have to download them all, but a download of the PDFs will include the
tutorial.
j
Is there a way to capture key strokes on a system using python (other
than pyHook)? can wxPython capture keystrokes for the system (not
just, say a text box)?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 1, 3:03 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote:
On Mar 1, 4:01 pm, Steven Bethard [EMAIL PROTECTED] wrote:
Arnaud Delobelle wrote:
[...]
This does pretty much the same thing as the recipe I posted:
Not at all. My new_struct create returns a new class which is similar
to a C
On 1 Mar 2007 12:14:43 -0800, BartlebyScrivener [EMAIL PROTECTED] wrote:
I recently moved from XP to Linux, but would like to use Python
whenever possible.
line from bash script:
find ~/Mail -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp -aPvu
{} /backup-dest \;
What modules would I
You can probably replicate that using the modules os and shutil.
Thank you both for the quick response.
rd
--
http://mail.python.org/mailman/listinfo/python-list
Luis M. González wrote:
This is the closest we got so far to the intended result.
If there was a way to enter attributes without quotes, it would be
almost identical.
Ok, below is the Python code so that the following works::
class Person(Struct): name birthday children
Note that
* The
Hello List
Apologies if this is documented somewhere already, but Google is turning
up nothing useful. Does anybody know if it is possible to set up an SSL
connection to a remote MySQL database using MySQLdb?
Thanks
Rory
--
http://mail.python.org/mailman/listinfo/python-list
George Sakkis [EMAIL PROTECTED] writes:
On Feb 28, 10:45 pm, Ben Finney wrote:
Tuples are intended for use as heterogeneous data structures [...]
Lists are intended for use as homogeneous sequences [...]
Nice, that's a good summary of the straw man arguments about the
true distinction
What's wrong here?
from struct import unpack
I can unpack an unsigned char
unpack('B','\x90')
(144,)
I can unpack a short
unpack('h','\x06\x00')
(6,)
But an unsigned char a short give me this
unpack('Bh','\x90\x06\x00')
Traceback (most recent call last):
File stdin, line 1, in ?
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
On 1 mar, 04:46, Daniel Klein [EMAIL PROTECTED] wrote:
Thanks for setting me straight. I had (wrongly) thought that the
stuff inside of () was a tuple.
For the record, it's the ',' that makes the tuple. The () are (in
this context) the call
Alan Isaac a écrit :
Bruno Desthuilliers [EMAIL PROTECTED] wrote in
message news:[EMAIL PROTECTED]
I don't share your definition of reasonable. But you should have
guessed by now
My view may be shaped by a different experience.
I have found dynamic attribute creation convenient
when
On Mar 1, 9:45 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
As a side note : hungarian notation is usually considered bad form here.
Look here for usual naming
conventions:http://www.python.org/dev/peps/pep-0008/
Thanks for the tip. It's been too many years of VB6, and its difficult
to
BartlebyScrivener a écrit :
I recently moved from XP to Linux, but would like to use Python
whenever possible.
line from bash script:
find ~/Mail -xdev -type f \( -mtime 0 -or -mtime 1 \) -exec cp -aPvu
{} /backup-dest \;
What modules would I use to accomplish this in Python? Or any
Gigs_ wrote:
class MenuDemo(Frame):
def __init__(self, parent=None):
Frame.__init__(self, parent)
self.pack(expand=YES, fill=BOTH)
self.createWidgets()
def createWidgets(self):
self.makeMenuBar()
self.makeToolBar()
L = Label(self,
[EMAIL PROTECTED] a écrit :
On Mar 1, 9:45 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
I understand (I've been in wikipedia :-) ). Right now the Frame is the
controller as well
as the view.
Yeps. Note that this is a common simplification of the MVC - Microsoft
labelled it
The security application seems to call for roles.
I'll have to think about the schema example.
But in any case, my question was poorly stated.
I started out wanting to trap was the dynamic
addition of attributes to class instances after
initialization. While you responded to my later question
as
In [EMAIL PROTECTED], Chris Garland
wrote:
But an unsigned char a short give me this
unpack('Bh','\x90\x06\x00')
Traceback (most recent call last):
File stdin, line 1, in ?
struct.error: unpack str size does not match format
Let's pack this:
In [90]: pack('Bh', 0x90, 0x6)
Out[90]:
The problem is, that len('\x90\x06\x00') is not equivalent to
calcsize('Bh'):
calcsize('Bh')
4
len('\x90\x06\x00')
3
Actually calculating the size for 'hB' results in:
calcsize('hB')
3
So far I have not figured out, why there is an additional byte, but it
does not effect the result in any
Ok, that solves my confusion.
Thanks, Marc.
--
http://mail.python.org/mailman/listinfo/python-list
Andi Clemens wrote:
It's working!!!
Yeah!
I don't know why I didn't get this the first time I tried
dnspython, but now its working! And it's so easy, 3 lines of code:
Great, thanks for reporting back.
Regards,
Björn
--
BOFH excuse #310:
asynchronous inode failure
--
Alan Isaac a écrit :
The security application seems to call for roles.
Considering that a role is a set of permissions in a context. The
application doesn't want to say you need this role, but you need to
have a role that has this permission (nb : this is based on Zope's
security model).
One last point. While I remain interested in examples of how
late addition of attributes to class instances is useful,
I must note that everyone who responded agreed that it
has been a source of bugs. This seems to argue against a
general ban on locking objects in some way, in some
I am trying to build a python program that will reset a user's account
(password) on a windows machine (NOTE: my intention here is not to implement
anything malicious {and I know about Trinity which is very useful}, but I
just wanted a challenge and do it myself.). I have been working with win32
I've been asking this question at the matplotlib user list and never
gotten an answer. I am hoping that there are matplotlib users here
that can help.
My problem with matplotlib's way of handling axes label is illustrated
by this example:
On Mar 1, 3:58 pm, Bruno Desthuilliers
[EMAIL PROTECTED] wrote:
MHO is that you'd better learn linux (well... Unix) tools. Reinventing
the SquareWheel(tm) is usually not a good idea.
I agree. It's just a matter of experience and learning when to use
Unix tools and when to use Python.
The
Hendrik van Rooyen wrote:
- It is going to be an inferior subset of Python -
From what the OP said, it isn't necessarily a subset of
Python, just something whose surface syntax is similar.
The semantics could be quite different.
However, if the semantics *are* to be similar as well,
it makes
En Thu, 01 Mar 2007 14:42:00 -0300, [EMAIL PROTECTED] escribió:
BUT If I use PIPE for both (so I can .write() on the stdin and .read()
from the subprocess' stdout stream (better: file descriptor)) reading
from the subprocess stdout blocks forever. If I write something onto
the subprocess'
En Thu, 01 Mar 2007 15:46:53 -0300, [EMAIL PROTECTED] escribió:
As a newbie, I'm trying to simply parse a xml file using minidom, but
I don't know why I get some extra children(?). I don't know what is
wrong in xml file, but I've tried different xml files, still same
problem.
If you don't
John Machin wrote:
Storing 1.1 and using it in calculations may save you a few
microseconds a day in your real-time apps.
The main advantage would be clarity of code.
naming 1.1 as anualRate (sic) is utterly ludicrous.
So call it annualMultiplicationFactor or something
in the code.
--
Greg
On Mar 1, 2:05 am, Gabriel Genellina [EMAIL PROTECTED] wrote:
En Wed, 28 Feb 2007 19:54:26 -0300, MRAB [EMAIL PROTECTED]
escribió:
On Feb 28, 5:27 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
you want to run the windows command prompt, which is called cmd.exe
in windows xp. press the
you can find it here the World Ultimate Fighting at
http://www.dirtyfighting.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 01 Mar 2007 10:44:48 +0100, Bjoern Schliessmann wrote:
Mh. I suspect there's also more to it than I see now, but this
__name__ seems quite useless to me. What if I rebind the class'
name after definition? Or is it really just for some manual
introspection? If it is, it seems a bit of
zefciu wrote:
Hi!
I want to embed a function in my python application, that creates a
two-dimensional array of integers and passes it as a list (preferably a
list of lists, but that is not necessary, as the python function knows
the dimensions of this array). As I read the reference, I
Now that I've half recovered from PyCon, I've uploaded some initial prattle:
http://trekkingbob.blogspot.com/2007/03/pycon-all-up-in-my-veins.html
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 01 Mar 2007 21:45:55 +0100, Bruno Desthuilliers wrote:
As a side note : hungarian notation is usually considered bad form here.
Look here for usual naming conventions:
http://www.python.org/dev/peps/pep-0008/
Which Hungarian notation do you mean?
If you mean the Windows Systems
Steven D'Aprano [EMAIL PROTECTED] writes:
But if you used Apps Hungarian, and saw this line of code:
if hmmCurrentHeight = hinCriticalHeight:
then you should instantly recognise that there's a problem. Comparing
a height in millimetres to a height in inches is not a good thing to do,
no
On Thu, 01 Mar 2007 20:24:33 -0800, Paul Rubin wrote:
Steven D'Aprano [EMAIL PROTECTED] writes:
But if you used Apps Hungarian, and saw this line of code:
if hmmCurrentHeight = hinCriticalHeight:
then you should instantly recognise that there's a problem. Comparing
a height in
On Mar 1, 1:40 pm, Gabriel Genellina [EMAIL PROTECTED] wrote:
En Wed, 28 Feb 2007 22:45:40 -0300, gert [EMAIL PROTECTED] escribió:
import re
def htc(m):
return chr(int(m.group(1),16))
def urldecode(url):
rex=re.compile('%([0-9a-hA-H][0-9a-hA-H])',re.M)
return
Anybody who is interested in a sql client with a html interface
http://sourceforge.net/projects/dfo/
db7 is for python based on cherrypy, code is straightforward and easy
to modify so it can work with other sql databases.
db5 was before i knew pyhton :)
Suggestions very welcome about what to
[EMAIL PROTECTED] wrote:
Hi,
Thanks for your answer. I had a look into the fcntl module and tried
to unlock the output-file, but
fcntl.lockf(x.stdout, fcntl.LOCK_UN)
Traceback (most recent call last):
File stdin, line 1, in module
IOError: [Errno 9] Bad file descriptor
I
Steven D'Aprano wrote:
A type system doesn't help. So what if they're both floats? The test
is still bogus, your code will still wait too long to engage the
retro-rockets, and the billion dollar space craft will still be travelling
at hundreds of miles an hour when it reaches the surface of
Steven D'Aprano [EMAIL PROTECTED] writes:
That still sounds like an unreliable manual type system,
It's unreliable in the sense that the coder has to follow the naming
convention, and must have some bare minimum of sense. If your coders are
morons, no naming convention will save you. (For
On Mar 1, 3:10 pm, John Henry [EMAIL PROTECTED] wrote:
I've been asking this question at the matplotlib user list and never
gotten an answer. I am hoping that there are matplotlib users here
that can help.
My problem with matplotlib's way of handling axes label is illustrated
by this
On Mar 1, 9:53 pm, [EMAIL PROTECTED] wrote:
On Mar 1, 3:10 pm, John Henry [EMAIL PROTECTED] wrote:
I've been asking this question at the matplotlib user list and never
gotten an answer. I am hoping that there are matplotlib users here
that can help.
My problem with matplotlib's way of
[EMAIL PROTECTED] wrote:
8--
The C programm gets its commands from its stdin and sends its state
to stdout. Thus I have some kind of dialog over stdin.
So, once I start the C Program from the shell, I immediately get its
output in my terminal. If I start it from a
In [EMAIL PROTECTED], gert wrote:
I was thinking about making a column module that names the columns, i
was hoping there would be some sort of api feature that already exist
because parsing sql statemants to figure out which column is refers to
what is allot of work.
Are you searching for
On Mar 2, 7:33 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
In [EMAIL PROTECTED], gert wrote:
I was thinking about making a column module that names the columns, i
was hoping there would be some sort of api feature that already exist
because parsing sql statemants to figure out
Bugs item #1647654, was opened at 2007-01-30 13:48
Message generated for change (Comment added) made by jhenstridge
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1647654group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1628895, was opened at 2007-01-05 16:24
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1628895group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1671411, was opened at 2007-03-01 11:27
Message generated for change (Comment added) made by shashikala
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1671411group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1671676, was opened at 2007-03-01 19:24
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1671676group_id=5470
Please note that this message will contain a full copy of
Bugs item #1669743, was opened at 2007-02-27 08:32
Message generated for change (Comment added) made by kayhayen2
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1669743group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1671965, was opened at 2007-03-01 20:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1671965group_id=5470
Please note that this message will contain a full copy of
Bugs item #1671411, was opened at 2007-03-01 05:27
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1671411group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1671965, was opened at 2007-03-01 20:44
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1671965group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1669743, was opened at 2007-02-27 08:32
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1669743group_id=5470
Please note that this message will contain a full copy of the comment
101 - 187 of 187 matches
Mail list logo