How to retrieve list of installed module (or gentoo bad installation ?)

2005-09-16 Thread mathieu . malaterre
Hello, I am trying to build an executable that link against python libraries. If I only link to python lib I get thoses errors(*). This machine is a gentoo AMD64. I installed python by doing 'emerge python' and my USE flags uses 'zlib'. I am wondering if there is a 'python-config' like scrip

Re: Software bugs aren't inevitable

2005-09-16 Thread Paddy
The article states that their method calls for them to have much more than normal access to many more people in the clients organisation than is normal; from the CEO to the receptionist. The specification stage can take a year without the customer seeing a line of code. And they deliberately "write

Re: How to retrieve list of installed module (or gentoo bad installation ?)

2005-09-16 Thread mathieu . malaterre
Yes and it's called python-config... Sorry for the noise. -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a database. Sugestions?

2005-09-16 Thread Ed Hotchkiss
So I opted actually to stick with MySQL since I got hooked up with a DB free and It's more of a standard.   I'm looking at documentation, and wondering why not just use _mysql which is built in, versus the MySQLdb module? I don't get this ...   -edward -- http://mail.python.org/mailman/listinfo/py

Re: Why doesn't IDLE editor windows have horizontal scrollbars?

2005-09-16 Thread chuck
Well I don't want to start yet another thread on IDE's. I've googled and all of that an am aware of most of the IDE's that are out there. I am curious if there is someplace where statistics have been captured on what IDE's most people are using. Since IDLE ships with Python I assume a lot of peo

Re: strptime() doesn't recognize BST as a valid timezone

2005-09-16 Thread Adam Monsen
Ok, I've figured this out. >>> import os, time >>> date = '10 August 2005 at 17:26 BST' >>> format = '%d %B %Y at %H:%M %Z' >>> os.environ['TZ'] = 'Europe/London' >>> time.strptime(date, format) (2005, 8, 10, 17, 26, 0, 2, 222, 1) Works (unsuprisingly) as advertised at the bottom of this page: ht

First Script Problem

2005-09-16 Thread Ed Hotchkiss
This script should just be writing every possibly IP (yea, there are billions i know blah blah) to a txt file. Instead of just writing the IP, it continues and the number goes past 4 groups. IE: The possible IP keeps getting 3 characters longer every time. And at the end of the last loops do I some

Dictionary sorting problem

2005-09-16 Thread JerryB
Hi, I have a dictionary for counting ocurrences of strings in a document. The dictionary looks like this: 'hello':135 'goodbye':30 'lucy':4 'sky':55 'diamonds':239843 'yesterday':4 I want to print the dictionary so I see most common words first: 'diamonds':239843 'hello':135 'sky':55 'goodbye':3

Re: Dictionary sorting problem

2005-09-16 Thread Irmen de Jong
JerryB wrote: > Hi, > I have a dictionary for counting ocurrences of strings in a document. > The dictionary looks like this: > > 'hello':135 > 'goodbye':30 > 'lucy':4 > 'sky':55 > 'diamonds':239843 > 'yesterday':4 > > I want to print the dictionary so I see most common words first: > > 'diamond

Re: Problem with Help when using numarray

2005-09-16 Thread Colin J. Williams
Fredrik Lundh wrote: > Colin J. Williams wrote: > > >>With numarray, help gives unhelpful responses: >> >>import numarray.numarraycore as _n >>c= _n.array((1, 2)) >>print 'rank Value:', c.rank >>print 'c.rank Help:', help(c.rank) > > > c.rank returns a Python integer object. Fredrik, Thanks to

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Bengt Richter
On Fri, 16 Sep 2005 14:57:15 -, Grant Edwards <[EMAIL PROTECTED]> wrote: [...] > >What I would really, really like are fixed length integer types >so that I can manipulate 8, 16, 32 and maybe 64 bit, 2's >compliment values. I've seen some pretty good "user-space" >pure-python implimentations,

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Terry Reedy
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > One of the nasty bits in a pure-python approach is that there's > no way to write a literal with a fixed length. For example, > instead of writing 0xf7 to get an 8-bit value and 0x12345789 to > get a 32-bit value, you

Re: First Script Problem

2005-09-16 Thread Brett g Porter
Ed Hotchkiss wrote: > This script should just be writing every possibly IP (yea, there are > billions i know blah blah) to a txt file. Instead of just writing the > IP, it continues and the number goes past 4 groups. IE: The possible IP > keeps getting 3 characters longer every time. And at the

Re: Run VPython on FC3

2005-09-16 Thread Artur M. Piwko
In the darkest hour on Fri, 16 Sep 2005 10:44:34 -0700, York <[EMAIL PROTECTED]> screamed: > It seems Python cannot open/find the file "libgtkgl.so.4", but it > definitely lies in the lib directory: > > /usr/local/lib/libgtkgl.so.4.0.0 > /usr/local/lib/libgtkgl.so.4 > > Does anybody know a solutio

Re: 2.3 -> 2.4: long int too large to convert to int

2005-09-16 Thread Grant Edwards
On 2005-09-16, Terry Reedy <[EMAIL PROTECTED]> wrote: >> One of the nasty bits in a pure-python approach is that there's >> no way to write a literal with a fixed length. For example, >> instead of writing 0xf7 to get an 8-bit value and 0x12345789 to >> get a 32-bit value, you have to instantiate

Re: First Script Problem

2005-09-16 Thread Gustavo Picon
On Fri, 2005-09-16 at 15:19 -0400, Ed Hotchkiss wrote: > This script should just be writing every possibly IP (yea, there are > billions i know blah blah) to a txt file. Instead of just writing the > IP, it continues and the number goes past 4 groups. IE: The possible > IP keeps getting 3 character

Re: My First Python Script

2005-09-16 Thread John Hazen
* Ed Hotchkiss <[EMAIL PROTECTED]> [2005-09-15 20:36]: > But then I still get the error with the len(x) statement .. hmm Ahh. In the future, it will help us help you, if you make it clear that there was an error, and *paste the exact error* into your mail. For example, I'm guessing the error you

Brute force sudoku cracker

2005-09-16 Thread Bas
Hi group, I came across some of these online sudoku games and thought after playing a game or two that I'd better waste my time writing a solver than play the game itself any longer. I managed to write a pretty dumb brute force solver that can at least solve the easy cases pretty fast. It basical

Re: /usr/lib/python2.3/site-packages/_mysql.so: undefined symbol: mysql_rollback

2005-09-16 Thread skip
thomas> ImportError: /usr/lib/python2.3/site-packages/_mysql.so: undefined thomas> symbol: mysql_rollback thomas> What am I doing wrong? Is your libmysql.so installed in an odd place? Maybe the _mysql.so file needed to be linked with -R. Try: python setup.py build_ext --help

Re: My First Python Script

2005-09-16 Thread Ed Hotchkiss
Someone else actually got me some help, the end result he hooked me up with was:   # function to evaluate all possible IPs def findIPs(): ipFile = open("IPList.txt", 'w') for octet1 in range(256): for octet2 in range(256): for octet3 in range(256): for octet4 in range(256): ipAddress = '%03.d.%03.

Re: /usr/lib/python2.3/site-packages/_mysql.so: undefined symbol: mysql_rollback

2005-09-16 Thread skip
thomas> ImportError: /usr/lib/python2.3/site-packages/_mysql.so: undefined thomas> symbol: mysql_rollback skip> Is your libmysql.so installed in an odd place? Oh, also, try executing ldd /usr/lib/python2.3/site-packages/_mysql.so If that shows libmysql as undefined. Find out

Re: encryption with python?

2005-09-16 Thread Paul Rubin
Robert Kern <[EMAIL PROTECTED]> writes: > > http://www.nightsong.com/phr/crypto/p3.py > > [Ed Hotchkiss wrote:] > > Awesome. I just started Python today so I'd have no idea ... how good is > > this encryption compared to PGP? p3.py's functionality is nothing like PGP: it just encrypts character s

Re: Dictionary sorting problem

2005-09-16 Thread Jason Mobarak
You can't sort dictionaries (as implemented by hash tables), they are unordered data types, so by definition there's no way to force an order on them. http://en.wikipedia.org/wiki/Hash_tables -- http://mail.python.org/mailman/listinfo/python-list

Re: Brute force sudoku cracker

2005-09-16 Thread my . correo . basura
Bas ha escrito: > Hi group, > > I came across some of these online sudoku games and thought after > playing a game or two that I'd better waste my time writing a solver > than play the game itself any longer. I managed to write a pretty dumb > brute force solver that can at least solve the easy c

Re: Run VPython on FC3

2005-09-16 Thread York
Artur M. Piwko wrote: > In the darkest hour on Fri, 16 Sep 2005 10:44:34 -0700, > York <[EMAIL PROTECTED]> screamed: > >>It seems Python cannot open/find the file "libgtkgl.so.4", but it >>definitely lies in the lib directory: >> >>/usr/local/lib/libgtkgl.so.4.0.0 >>/usr/local/lib/libgtkgl.so.4 >

Unicode-aware file shortcuts in Windows

2005-09-16 Thread Stanislaw Findeisen
Does anyone know how to create file shortcuts in Windows? The only way I know is like: --- import win32com.client wScriptShellObject = win32com.client.Dispatch("WScript.Shell") shortcutName = unicode("shortcut.lnk", "utf8") shortcut =

Re: Accessing shared library file...

2005-09-16 Thread Peter Hansen
Ernesto wrote: > Where is the ctypes mailing list? GIYF (Google is your friend) -- http://mail.python.org/mailman/listinfo/python-list

Re: Software bugs aren't inevitable

2005-09-16 Thread Mike Meyer
[EMAIL PROTECTED] (phil hunt) writes: > Compilers/interpreters/runtimes are black boxes: we don't (or > shouldn't) care how they do their work as long as they run correctly > and aren't too heavy on system resources like CPU time and memory. Maybe in academia. Not in the real world. Or maybe you

Do thread die?

2005-09-16 Thread Maurice LING
Hi, I just have a simple question about threads. My classes inherits from threading.Thread class. I am calling threading.Thread.run() method to spawn a few threads to parallel some parts of my program. No thread re-use, pooling, joining ... just plainly spawn a thread, run a routine. So, at th

Possible bug in "metaclass resolution order" ?

2005-09-16 Thread Pedro Werneck
Hi I have a class A, with metaclass M_A, and class B, subclass of A, with metaclass M_B, subclass of M_A. A class C, subclass of B must have M_B or a subclass of it as metaclass, but what if I need to 'disable' the code in M_B on C ? The correct way to do that seems to be with a M_C metaclass, s

Re: Unicode-aware file shortcuts in Windows

2005-09-16 Thread Neil Hodgson
Stanislaw Findeisen: > E:\Documents and Settings\Staszek\Progs\Python-Windows\test_1>cf.py > Traceback (most recent call last): > File "E:\Documents and > Settings\Staszek\Progs\Python-Windows\test_1\cf.py", line 7, in ? > shortcut.Save() > File ">", line 2, in Save > pywintypes.com_error

Re: Dictionary sorting problem

2005-09-16 Thread Bengt Richter
On Fri, 16 Sep 2005 21:42:40 +0200, Irmen de Jong <[EMAIL PROTECTED]> wrote: >JerryB wrote: >> Hi, >> I have a dictionary for counting ocurrences of strings in a document. >> The dictionary looks like this: >> >> 'hello':135 >> 'goodbye':30 >> 'lucy':4 >> 'sky':55 >> 'diamonds':239843 >> 'yesterd

Re: Software bugs aren't inevitable

2005-09-16 Thread phil hunt
On Fri, 16 Sep 2005 20:05:04 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (phil hunt) writes: >> Compilers/interpreters/runtimes are black boxes: we don't (or >> shouldn't) care how they do their work as long as they run correctly >> and aren't too heavy on system resources like

FTP status problems. (Again)

2005-09-16 Thread Nainto
Hello, I have posted before about trying to find the status of an FTP uplaod but couldn't get anything to work. After some more searching I found http://groups.google.com/group/comp.lang.python/browse_thread/thread/76be9a994547db4/91917c906cdc04d4?q=ftp+progress&rnum=1#91917c906cdc04d4 but it does

Re: FTP status problems. (Again)

2005-09-16 Thread marduk
On Fri, 2005-09-16 at 19:27 -0700, Nainto wrote: > Hello, I have posted before about trying to find the status of an FTP > uplaod but couldn't get anything to work. After some more searching I > found > http://groups.google.com/group/comp.lang.python/browse_thread/thread/76be9a994547db4/91917c906cd

Re: FTP status problems. (Again)

2005-09-16 Thread marduk
On Sat, 2005-09-17 at 04:42 +, marduk wrote: > > ... and I haven't tried this myself, but you should be able to subclass > the builtin file object and prepare your own read() method. Something > like > > class ProgressFile(file): > > def read(self, size = None): > print '.', >

Re: Why doesn't IDLE editor windows have horizontal scrollbars?

2005-09-16 Thread fuzzylollipop
you assume wrong, most people DONT use it that is why it is in the crappy state it is in there ARE MUCH BETTER ALTERNATIVES, just pick one -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode-aware file shortcuts in Windows

2005-09-16 Thread John Bauman
"Stanislaw Findeisen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anyone know how to create file shortcuts in Windows? > > The only way I know is like: > > --- > > import win32com.client > > wScriptShellObject = wi

Re: Removing duplicates from a list

2005-09-16 Thread Steven Bethard
drochom wrote: > i suppose this one is faster (but in most cases efficiency doesn't > matter) > def stable_unique(s): > > e = {} > ret = [] > for x in s: > if not e.has_key(x): > e[x] = 1 > ret.append(x) > retur

Re: Rendering HTML

2005-09-16 Thread Harlin Seritt
Hi DH, Thanks for this blurb from ASPN. I am really looking, however, to do this on a Windows machine as opposed to a Unix one at this point. This will come in handy down the road I am sure. Thanks, Harlin Seritt -- http://mail.python.org/mailman/listinfo/python-list

<    1   2