Re: references/addrresses in imperative languages

2005-06-20 Thread Kaz Kylheku
Walter Roberson wrote: In article [EMAIL PROTECTED], Xah Lee [EMAIL PROTECTED] wrote: In hindsight analysis, such language behavior forces the programer to fuse mathematical or algorithmic ideas with implementation details. A easy way to see this, is to ask yourself: how come in mathematics

Re: Python choice of database

2005-06-20 Thread Philippe C. Martin
Yes, I agree, but as most of the customer base I target uses the O/S that cannot be named ;-) , file names could become a problem just as 'ln -s' is out of the question. Yet, this might be the best trade-off. Regards, Philippe Oren Tirosh wrote: Philippe C. Martin wrote: Hi, I am

Re: Embedded Systems Python?

2005-06-20 Thread Diez B. Roggisch
Dennis Clark wrote: I'm a bit of a newb when it comes to Python, is there anyone with experience compiling it on Linux platforms that can offer me pointers to try this out myself? Seatch for cross-compiling python patches. I'm working on an XScale255 platform with python2.2 and soon 2.3 -

Re: UML to Python/Java code generation

2005-06-20 Thread Magnus Lycka
James wrote: The brain may be fine for generating Python from UML but it is MANY MANY orders of magnitude harder to generate UML from code with just your brain than using a tool (usually zero effort and error free) no matter how good you are at Python. I've really only used Rational Rose, but

Re: Python choice of database

2005-06-20 Thread Brian
I am really surprised that someone hasn't mentioned Gadfly yet. It is a quick, free, relational database written directly for Python itself. http://gadfly.sourceforge.net/ Brian --- Philippe C. Martin wrote: Hi, I am looking for a stand-alone (not client/server) database solution for

Re: binary file

2005-06-20 Thread Scott David Daniels
Kent Johnson wrote: Nader Emami wrote: Kent Johnson wrote: Nader Emami wrote: I have used the profile module to measure some thing as the next command: profile.run('command', 'file') ...How can I read (or convert) the binary file to an ascii file? Use an instance of pstats.Stats to

Python and encodings drives me crazy

2005-06-20 Thread Oliver Andrich
Hi everybody, I have to write a little skript, that reads some nasty xml formated files. Nasty xml formated means, we have a xml like syntax, no dtd, use html entities without declaration and so on. A task as I like it. My task looks like that... 1. read the data from the file. 2. get rid of the

[no subject]

2005-06-20 Thread python-list-bounces+archive=mail-archive . com
#! rnews 902 Newsgroups: comp.lang.python Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp From: Harry George [EMAIL PROTECTED] Subject: Re: Couple functions I need, assuming

Re: Python and encodings drives me crazy

2005-06-20 Thread Steven Bethard
Oliver Andrich wrote: def remove_html_entities(data): for html, char in html2text: data = apply(string.replace, [data, html, char]) return data I know this isn't your question, but why write: data = apply(string.replace, [data, html, char]) when you could write data =

Re: JEP and JPype in a single process

2005-06-20 Thread Steve Menard
skn wrote: Hello, I have written a very simple java class file, which invokes a Python script using JEP. Code snippet:- --- Jep jep = new Jep(false); jep.runScript(C:\\temp\\testscript.py); jep.close(); Now inside this Python script I want to make Java calls using

Re: Python and encodings drives me crazy

2005-06-20 Thread Oliver Andrich
I know this isn't your question, but why write: data = apply(string.replace, [data, html, char]) when you could write data = data.replace(html, char) ?? Cause I guess, that I am already blind. Thanks. Oliver -- Oliver Andrich [EMAIL PROTECTED] --- http://fitheach.de/ --

Re: sudoku dictionary attack

2005-06-20 Thread Oliver Albrecht
Has some one an sodoku-task-generator? Here another solutions-ways: http://www.python-forum.de/viewtopic.php?t=3378 -- !--Olliminatore--input?/ -- http://mail.python.org/mailman/listinfo/python-list

reading a list from a file

2005-06-20 Thread David Bear
I have a file that contains lists -- python lists. sadly, these are not pickled. These are lists that were made using a simple print list statement. Is there an easy way to read this file into a list again? I'm thinking I would have to read until char = '[' read until char = ' Well,

Re: Python and encodings drives me crazy

2005-06-20 Thread Oliver Andrich
Well, I narrowed my problem down to writing a macroman or cp850 file using the codecs module. The rest was basically a misunderstanding about codecs module and the wrong assumption, that my input data is iso-latin-1 encode. It is UTF-8 encoded. So, curently I am at the point where I have my data

Re: reading a list from a file

2005-06-20 Thread Tim Williams
- Original Message - From: David Bear [EMAIL PROTECTED] I have a file that contains lists -- python lists. sadly, these are not pickled. These are lists that were made using a simple print list statement. Is there an easy way to read this file into a list again? I'm thinking I

Question about HTMLgen

2005-06-20 Thread Sebastian Bassi
Hello, I am using HTMLgen. It is very nice. But I can't make it to generate an arbitrary command. For example I want to output this: embed src=canvas_norelief.svg width=140 height=68 type=image/svg+xml name=wmap wmode=transparent Each time I put it gets escaped from HTML, instead of being

Re: references/addrresses in imperative languages

2005-06-20 Thread Michael Sparks
Jeremy Jones wrote: I think the only reason I read your posts is for comedy, Indeed. Xah Lee wrote: ... [ lots of stuff, that if Xah cared about Xah would attempt to write better docs, rather than criticise) ... ... Btw, behavior such as this one, common in imperative languages and info

Re: Using print with format to stdout generates unwanted space

2005-06-20 Thread Michael Hoffman
Paul Watson wrote: While printf() does tightly control formatting in C, it does not in Python. There is no printf() in Python. You should not think of print as being a Python version of printf. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and encodings drives me crazy

2005-06-20 Thread Diez B. Roggisch
Oliver Andrich wrote: Well, I narrowed my problem down to writing a macroman or cp850 file using the codecs module. The rest was basically a misunderstanding about codecs module and the wrong assumption, that my input data is iso-latin-1 encode. It is UTF-8 encoded. So, curently I am at the

Re: reading a list from a file

2005-06-20 Thread Jordan Rastrick
Be careful, though - make sure you can absolutely trust your source of data before calling eval on it. If an unauthorised person could forseeably modify your file, then they could insert a string containing arbitrary Python code into it in place of your list, and then running your program would

Re: Python and encodings drives me crazy

2005-06-20 Thread Konstantin Veretennicov
On 6/20/05, Oliver Andrich [EMAIL PROTECTED] wrote: Does the following code write headline and caption in MacRoman encoding to the disk? f = codecs.open(outfilename, w, macroman) f.write(headline) It does, as long as headline and caption *can* actually be encoded as macroman. After

Re: Python and encodings drives me crazy

2005-06-20 Thread Oliver Andrich
2005/6/21, Konstantin Veretennicov [EMAIL PROTECTED]: It does, as long as headline and caption *can* actually be encoded as macroman. After you decode headline from utf-8 it will be unicode and not all unicode characters can be mapped to macroman: u'\u0160'.encode('utf8') '\xc5\xa0'

Re: reading a list from a file

2005-06-20 Thread Jordan Rastrick
If you decide to steer clear of eval, the following comes close to what you want, and is somewhat Pythonic (I feel): def back_to_list(str): return str.strip([]).split(, ) s = [1, 2, 3, 4, 5, 6] back_to_list(s) ['1', '2', '3', '4', '5', '6'] So parsing the list structure is pretty easy. The

Re: references/addrresses in imperative languages

2005-06-20 Thread Jordan Rastrick
You can add Australia to the list :) Any volunteers for a fourth continent? Antarctica, perhaps? ;) - Jordan -- http://mail.python.org/mailman/listinfo/python-list

Re: reading a list from a file

2005-06-20 Thread Rune Strand
But iif it are many lists in the file and they're organised like this: ['a','b','c','d','e'] ['a','b','c','d','e'] ['A','B','C','D','E'] ['X','F','R','E','Q'] I think this'll do it data = open('the_file', 'r').read().split(']') lists = [] for el in data: el = el.replace('[',

Re: Using print with format to stdout generates unwanted space

2005-06-20 Thread Tim Williams (gmail)
On 6/20/05, Michael Hoffman [EMAIL PROTECTED] wrote: Paul Watson wrote: While printf() does tightly control formatting in C, it does not in Python. There is no printf() in Python. You should not think of print as being a Python version of printf. For quick and simple removal of the

Re: What is different with Python ?

2005-06-20 Thread Mike Meyer
Andrea Griffini [EMAIL PROTECTED] writes: On Tue, 14 Jun 2005 16:40:42 -0500, Mike Meyer [EMAIL PROTECTED] wrote: Um, you didn't do the translation right. Whoops. So you know assembler, no other possibility as it's such a complex language that unless someone already knows it (and in

Re: What is different with Python ?

2005-06-20 Thread Mike Meyer
Andrew Dalke [EMAIL PROTECTED] writes: Andrea Griffini wrote: Wow... I always get surprises from physics. For example I thought that no one could drop confutability requirement for a theory in an experimental science... Some physicists (often mathematical physicists) propose alternate

Re: What is different with Python ?

2005-06-20 Thread Mike Meyer
Claudio Grondi [EMAIL PROTECTED] writes: What has it all to do with Python? To be not fully off-topic, I suggest here, that it is much easier to discuss programming related matters (especially in case of Python :-) or mathematics than any other subjects related to nature, because

Re: Python and encodings drives me crazy

2005-06-20 Thread John Machin
Oliver Andrich wrote: 2005/6/21, Konstantin Veretennicov [EMAIL PROTECTED]: It does, as long as headline and caption *can* actually be encoded as macroman. After you decode headline from utf-8 it will be unicode and not all unicode characters can be mapped to macroman:

Re: Question about HTMLgen

2005-06-20 Thread Konstantin Veretennicov
On 6/20/05, Sebastian Bassi [EMAIL PROTECTED] wrote: Hello, I am using HTMLgen. It is very nice. But I can't make it to generate an arbitrary command. For example I want to output this: embed src=canvas_norelief.svg width=140 height=68 type=image/svg+xml name=wmap wmode=transparent

Install MySQL-python-0.9.1

2005-06-20 Thread Cathy Hui
I am trying to install MySQL-Python 0.9.1 on my Solaris 8 system. The system has Python 2.3.3 and Mysql 4.0.21 installed. This is where I downloaded the distribution of the Mysql-python package:

Re: reading a list from a file

2005-06-20 Thread John Machin
Rune Strand wrote: But iif it are many lists in the file and they're organised like this: ['a','b','c','d','e'] ['a','b','c','d','e'] ['A','B','C','D','E'] ['X','F','R','E','Q'] I think this'll do it data = open('the_file', 'r').read().split(']') lists = [] for el in data:

Tuple Unpacking in raise

2005-06-20 Thread James Stroud
Hello All, Is this a bug? Why is this tuple getting unpacked by raise? Am I missing some subtle logic? Why does print not work the same way as raise? Both are statements. Why does raise need to be so special? py sometup = 1,2 py print sometup (1, 2) py print 1,2,3, sometup 1 2 3 (1, 2) py

Re: Want to learn a language - is Python right?

2005-06-20 Thread James Stroud
Python will help you as a novice for these reasons: 1. Help you to learn programming concepts and develop good habits. 2. Powerful Standard Library to help you do more advanced things. 3. Smooth, shallow learning curve, e.g. hello world is: print Hello World So you can do simple

Re: sudoku dictionary attack

2005-06-20 Thread r.e.s.
Oliver Albrecht [EMAIL PROTECTED] wrote ... Has some one an sodoku-task-generator? Sudoku puzzles can be generated (and solved) online at http://act365.com/sudoku/ -- http://mail.python.org/mailman/listinfo/python-list

Re: reading a list from a file

2005-06-20 Thread Konstantin Veretennicov
On 6/20/05, David Bear [EMAIL PROTECTED] wrote: I have a file that contains lists -- python lists. sadly, these are not pickled. These are lists that were made using a simple print list statement. Sad, indeed. But what kind of objects they held? Only ints? Ints and strings? Arbitrary objects?

Re: Tuple Unpacking in raise

2005-06-20 Thread Steven Bethard
James Stroud wrote: Hello All, Is this a bug? Why is this tuple getting unpacked by raise? Am I missing some subtle logic? Why does print not work the same way as raise? Both are statements. Why does raise need to be so special? py sometup = 1,2 py print sometup (1, 2) py print

Re: reading a list from a file

2005-06-20 Thread Rune Strand
:-/ You're right! -- http://mail.python.org/mailman/listinfo/python-list

getting list of all available modules

2005-06-20 Thread Benjamin Rutt
I note that the help() function of interactive python can determine all available modules: [EMAIL PROTECTED] ~]$ python Python 2.4 (#1, Mar 31 2005, 15:26:02) [GCC 3.2.3 (Debian)] on linux2 Type help, copyright, credits or license for more information. help() [...]

Re: multi threading and win9x

2005-06-20 Thread Tim Peters
[Timothy Smith] i want to run my sql statements on a seperate thread to prevent my app from stop responding to input (atm is says not responding under windows until the sql is finished) but i'm hesitant because i have to still support win9x and i'm not sure how well this will play. All

Re: references/addrresses in imperative languages

2005-06-20 Thread Kaz Kylheku
SM Ryan wrote: # easy way to see this, is to ask yourself: how come in mathematics # there's no such thing as addresses/pointers/references. The whole point of Goedelisation was to add to name/value references into number theory. Is that so? That implies that there is some table where you

Re: references/addrresses in imperative languages

2005-06-20 Thread Kaz Kylheku
Lawrence D’Oliveiro wrote: In article [EMAIL PROTECTED], Xah Lee [EMAIL PROTECTED] wrote: A[n] easy way to see this, is to ask yourself: how come in mathematics there's no such thing as addresses/pointers/references. Yes there are such things in mathematics, though not necessarily under

Using code objects?

2005-06-20 Thread Chinook
Using code objects? === As an OO exercise I have a factory pattern that returns class objects that each have an action method. ClassObj.action() in turn returns a code object in my recursive process loop. I create the code objects as a one time step outside my factory pattern

Re: references/addrresses in imperative languages

2005-06-20 Thread SM Ryan
Kaz Kylheku [EMAIL PROTECTED] wrote: # SM Ryan wrote: # # easy way to see this, is to ask yourself: how come in mathematics # # there's no such thing as addresses/pointers/references. # # The whole point of Goedelisation was to add to name/value references into # number theory. # # Is that

after transfer of data from MS-outlook(mail ids) to application, mail ids are consisting of strange characters

2005-06-20 Thread vamsikrishna_b
Hello all,the following problem i encountered while transferring data(mail ids) from MS-outlook to one application.Some mail ids after came into the application looked as strange characters.Eg are [Å@ [Å. [Å,©Ä@ ©Ä. ©Ä etc.I thought these are the Ascii characters but i'm not quite sure about

Re: references/addrresses in imperative languages

2005-06-20 Thread Kaz Kylheku
SM Ryan wrote: Kaz Kylheku [EMAIL PROTECTED] wrote: # SM Ryan wrote: # # easy way to see this, is to ask yourself: how come in mathematics # # there's no such thing as addresses/pointers/references. # # The whole point of Goedelisation was to add to name/value references into #

Re: references/addrresses in imperative languages

2005-06-20 Thread Kaz Kylheku
SM Ryan wrote: Kaz Kylheku [EMAIL PROTECTED] wrote: # SM Ryan wrote: # # easy way to see this, is to ask yourself: how come in mathematics # # there's no such thing as addresses/pointers/references. # # The whole point of Goedelisation was to add to name/value references into #

[ python-Bugs-1223937 ] subprocess.py abuse of errno

2005-06-20 Thread SourceForge.net
Bugs item #1223937, was opened at 2005-06-20 06:56 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1223937group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1224047 ] Len too large with national characters

2005-06-20 Thread SourceForge.net
Bugs item #1224047, was opened at 2005-06-20 12:52 Message generated for change (Comment added) made by henrikwj You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1224047group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1224047 ] Len too large with national characters

2005-06-20 Thread SourceForge.net
Bugs item #1224047, was opened at 2005-06-20 11:52 Message generated for change (Comment added) made by mwh You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1224047group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1221424 ] buffer() object broken.

2005-06-20 Thread SourceForge.net
Bugs item #1221424, was opened at 2005-06-15 11:17 Message generated for change (Comment added) made by rjs_org You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1221424group_id=5470 Please note that this message will contain a full copy of the comment

[ python-Bugs-1224347 ] int/long unification and hex()

2005-06-20 Thread SourceForge.net
Bugs item #1224347, was opened at 2005-06-20 12:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1224347group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1215928 ] Large tarfiles cause overflow

2005-06-20 Thread SourceForge.net
Bugs item #1215928, was opened at 2005-06-06 21:19 Message generated for change (Comment added) made by complex You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1215928group_id=5470 Please note that this message will contain a full copy of the comment

<    1   2