Re: Python and Lotus Notes

2005-11-02 Thread Grzegorz Ślusarek
thank you Graham Now I know how to get it thru And i have last question is it possible send mail from Lotus via Python/COM? Once Again Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: reading internet data to generate random numbers.

2005-11-02 Thread Robert Kern
Steven D'Aprano wrote: > Mike Meyer wrote: >>BSD as well. The key word is "one". While network events don't make a >>good source of random data, proplery combining such sources can create >>good random data. > > > > Depends on what you mean by "random". In particular, > the randomness of netw

Re: how can I run python interactively?

2005-11-02 Thread [EMAIL PROTECTED]
try something like -> s = raw_input("Please Press a button...") #s is the string they type. Although i believe i remember a PEP that said they were removing raw_input so perhaps print "Please Press A button..." s = sys.stdin.readline() would be better, note the above requires yo

Re: how can I run python interactively?

2005-11-02 Thread questions?
Thanks guys for the reply. This is very helpful -- http://mail.python.org/mailman/listinfo/python-list

Re: Pychecker Re: Nested List Question

2005-11-02 Thread Mike Meyer
Roman Suzi <[EMAIL PROTECTED]> writes: > On Thu, 3 Nov 2005, Chris McCoy wrote: >>> gridSystemId = [[None]*columns]*rows >> You've made gridSystemID a list of `rows` references to the SAME "inner" >> list, so the behavior you observe is the only possible one. >> If you want copies instead, ASK for

Re: Nested List Question

2005-11-02 Thread Fredrik Lundh
"Newsfeeds" <[EMAIL PROTECTED]> wrote: > Could anyone tell me why this code produces the output it does? http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list has the full story. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pychecker Re: Nested List Question

2005-11-02 Thread Chris McCoy
It may, but I haven't been using Pychecker yet. I'm still fairly new to Python. Thanks, Chris M. "Roman Suzi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 3 Nov 2005, Chris McCoy wrote: > >> Thank you! I've been banging my head against the wall! >> >> Chris M. > >>> g

Re: how to write a blog system with Python

2005-11-02 Thread Graham
Are you fresh to Python or just to this group? There are quite a few python frameworks that provide functionality for blogs. You'll just have to decide which one you want to try out. -- http://mail.python.org/mailman/listinfo/python-list

Re: how can I run python interactively?

2005-11-02 Thread Graham
You could use either: s = raw_input("Please Hit a Key...") s being the string they typed before hitting enter. or you could use print "Please hit a key..." s = sys.stdin.readline() the only reason i recommend the second is because i believe i saw in a PEP that raw_input was being de

Re: reading internet data to generate random numbers.

2005-11-02 Thread Steven D'Aprano
Mike Meyer wrote: > Grant Edwards <[EMAIL PROTECTED]> writes: > >>On 2005-11-02, Neil Schemenauer <[EMAIL PROTECTED]> wrote: >> >>>Grant Edwards <[EMAIL PROTECTED]> wrote: >>>Using data from the Internet is just a bad idea. >> >>I think that the timing of certain network events is one of the >>Li

Re: how can I run python interactively?

2005-11-02 Thread Fredrik Lundh
"questions?" wrote: > I need to stop the program in the middle and pause there. > > Are there anyway I can stop the program in the middle and have > something like: > > please press y to continue. portable: raw_input("please press return to continue.") to get a single character, you

Re: String Identity Test

2005-11-02 Thread Tim Roberts
"Richard Brodie" <[EMAIL PROTECTED]> wrote: > >"Roy Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> On the other hand, I can't imagine any reason why you would want to >> define such a class, > >PEP 754? My congratulations on a very subtle and somewhat multicultural joke...

Re: Windows - Need to process quotes in string...

2005-11-02 Thread Tim Roberts
>Ernesto enlightened us with: >> >>I'm trying to use a $ delimeter, but it doesn't seem to work. Here is >>the code: >> >> >>launchWithoutConsole("devcon.exe",d'$enable >> "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&"$) Where did you get the idea that this would work? I can't find any referen

Re: Getting a function name from string

2005-11-02 Thread Steven D'Aprano
David Rasmussen wrote: > If I have a string that contains the name of a function, can I call it? > As in: > > def someFunction(): > print "Hello" > > s = "someFunction" > s() # I know this is wrong, but you get the idea... py> eval("someFunction()") 'Hello' py> eval(s)() # note the second

how can I run python interactively?

2005-11-02 Thread questions?
I need to stop the program in the middle and pause there. Are there anyway I can stop the program in the middle and have something like: please press y to continue. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Pychecker Re: Nested List Question

2005-11-02 Thread Roman Suzi
On Thu, 3 Nov 2005, Chris McCoy wrote: > Thank you! I've been banging my head against the wall! > > Chris M. >> gridSystemId = [[None]*columns]*rows > > You've made gridSystemID a list of `rows` references to the SAME "inner" > list, so the behavior you observe is the only possible one. > > If y

Re: XML DOM: XML/XHTML inside a text node

2005-11-02 Thread Roman Suzi
On Thu, 2 Nov 2005 [EMAIL PROTECTED] wrote: > In my program, I get input from the user and insert it into an XHTML > document. Sometimes, this input will contain XHTML, but since I'm > inserting it as a text node, xml.dom.minidom escapes the angle brackets > ('<' becomes '<', '>' becomes '>'). I

Re: another beginner sort of question

2005-11-02 Thread Mike Meyer
John Salerno <[EMAIL PROTECTED]> writes: [Wants to learn C# and Python simultaneously.] > So my question is, is this feasible? Should be. It might be faster to do them sequentually. > Or does learning Python require (or entail) learning all the details > behind it? Not really. There are some tra

Re: [OT] Gmane/Tunderbird users: is g.c.p.general too big?

2005-11-02 Thread Robert Kern
Steve Holden wrote: > Sorry about this almost off-topic post, but I am guessing there must be > other readers of this group who use Thunderbird (in my case 1.0.2) to > access it as gmane.comp.general.python. > > I'm currently showing 344,548 articles in the group due to the gmane > policy of pe

Re: Nested List Question

2005-11-02 Thread Chris McCoy
Thank you! I've been banging my head against the wall! Chris M. "Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Newsfeeds <[EMAIL PROTECTED]> wrote: > >> Hello All, >> >> Could anyone tell me why this code produces the output it does? > ... >> gridSystemId = [[

Re: Nested List Question

2005-11-02 Thread Alex Martelli
Newsfeeds <[EMAIL PROTECTED]> wrote: > Hello All, > > Could anyone tell me why this code produces the output it does? ... > gridSystemId = [[None]*columns]*rows You've made gridSystemID a list of `rows` references to the SAME "inner" list, so the behavior you observe is the only possible on

Re: weakrefs to functions for observer pattern

2005-11-02 Thread Alex Martelli
Michael Schneider <[EMAIL PROTECTED]> wrote: > I would like to use weak refs in an observer pattern implementation. > The problme that I have seems to be that weakrefs can't manage functions. They can manage just fine functions written in *Python*, just not "builtin functions*, i.e., ones written

Nested List Question

2005-11-02 Thread Newsfeeds
Hello All, Could anyone tell me why this code produces the output it does? noAdjacencies = 2 gridsPerAdj = 3 rows = 4 columns = 5 gridSystemId = [[None]*columns]*rows for row in range(rows): for column in range(columns): gridSystemId[row][column] = "%d-%d" % (row,column) print gr

Re: Python's website does a great disservice to the language

2005-11-02 Thread Alex Martelli
The Eternal Squire <[EMAIL PROTECTED]> wrote: ... > 2) Consider what he really wants for a supervisor of software > engineers. Ideally such a person should be a software engineer with > at least 3 times the experience of the most junior member. Such a I like the general idea but not your fo

Re: Suggestion for (re)try statement

2005-11-02 Thread Alex Martelli
Sori Schwimmer <[EMAIL PROTECTED]> wrote: ... > 2) Rocco Morreti wrote: > > What is so repugnant about the equivalent, currently > valid way of writing it? > Nothing "repugnant". We have in almost all procedural > languages an "if-else" construct, and a "case" or > "elif" as well. Python has no

XML DOM: XML/XHTML inside a text node

2005-11-02 Thread noahlt
In my program, I get input from the user and insert it into an XHTML document. Sometimes, this input will contain XHTML, but since I'm inserting it as a text node, xml.dom.minidom escapes the angle brackets ('<' becomes '<', '>' becomes '>'). I want to be able to override this behavior cleanly.

another beginner sort of question

2005-11-02 Thread John Salerno
Ok, like I mentioned before, I'm learning C# for fun. I'm interested in learning Python sort of as a "supplement" (by that, I mean a language with scripting capabilities that can do things maybe simpler than C# might). One concern I have about learning them simultaneously is that I'll start to

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Alex Martelli
Brandon K <[EMAIL PROTECTED]> wrote [inverting his topposting!]: > > Six megabytes is pretty much nothing on a modern computer. > BTW, it'd be 6 megabits or 750kb ;) ...but Mike was proposing using one digit per bit, hence, 6 megabytes. That makes it easy to search for bitpatterns with re or str

[OT] Gmane/Tunderbird users: is g.c.p.general too big?

2005-11-02 Thread Steve Holden
Sorry about this almost off-topic post, but I am guessing there must be other readers of this group who use Thunderbird (in my case 1.0.2) to access it as gmane.comp.general.python. I'm currently showing 344,548 articles in the group due to the gmane policy of permanent retention, and lately it

Re: Python for .NET and IronPython

2005-11-02 Thread Alex Martelli
hrh1818 <[EMAIL PROTECTED]> wrote: > For more information on Iron Python see http://www.ironpython.com/ > My take on Iron Python is the new job the develolper of Iron Python > started last year takes up just about all of his time and the developer > is currently spending very little time actively

weakrefs to functions for observer pattern

2005-11-02 Thread Michael Schneider
Hello All, I am comming back to python after being away for several years. I would like to use weak refs in an observer pattern implementation. The problme that I have seems to be that weakrefs can't manage functions. --- from docs: http://www.python.org/doc/current/lib/module-

Re: reading internet data to generate random numbers.

2005-11-02 Thread Mike Meyer
Grant Edwards <[EMAIL PROTECTED]> writes: > On 2005-11-02, Neil Schemenauer <[EMAIL PROTECTED]> wrote: >> Grant Edwards <[EMAIL PROTECTED]> wrote: >> Using data from the Internet is just a bad idea. > I think that the timing of certain network events is one of the > Linux kernel's entropy sources.

Re: Running autogenerated code in another python instance

2005-11-02 Thread Paul Cochrane
On Wed, 02 Nov 2005 06:33:28 +, Bengt Richter wrote: > On Wed, 2 Nov 2005 06:08:22 + (UTC), Paul Cochrane <[EMAIL PROTECTED]> > wrote: > >>Hi all, >> >>I've got an application that I'm writing that autogenerates python code >>which I then execute with exec(). I know that this is not the

Re: how to write a blog system with Python

2005-11-02 Thread Peter Hansen
ice wrote: > I am a fresh here , and I have no idea of it. > Do you have any comments? Why do you want to write your own system? There are already lots of blog programs written in Python which you could just use, or customize. -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python for .NET and IronPython

2005-11-02 Thread Brett Hoerner
hrh1818 wrote: > For more information on Iron Python see http://www.ironpython.com/ > My take on Iron Python is the new job the develolper of Iron Python > started last year takes up just about all of his time and the developer > is currently spending very little time actively developing Iron Pyth

Re: reading internet data to generate random numbers.

2005-11-02 Thread Grant Edwards
On 2005-11-02, Neil Schemenauer <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> wrote: >> Doesn't your OS have an entropy-gathering RN generator built-in? > > Alternatively, if you want lots of high-quality random numbers, buy > a cheap web camera: http://www.lavarnd.org/. The therm

Re: install warning

2005-11-02 Thread jepler
You are importing and using, directly or indirectly, the "strop" module. Here's an example from the interactive interpreter which triggers the warning: $ python2.3 Python 2.3.3 (#1, May 7 2004, 10:31:40) [GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2 Type "help", "copyright", "credits"

Re: Microsoft Hatred FAQ

2005-11-02 Thread John W. Kennedy
entropy wrote: > [EMAIL PROTECTED] wrote... > >>On Tue, 25 Oct 2005 16:54:13 +, John Wingate wrote: >> >> >>>Steven D'Aprano <[EMAIL PROTECTED]> wrote: >>> That would be a good guess, except that Microsoft's predatory and illegal behaviour began long before OS/2 was even planned. It be

how to write a blog system with Python

2005-11-02 Thread ice
I am a fresh here , and I have no idea of it. Do you have any comments? -- http://mail.python.org/mailman/listinfo/python-list

install warning

2005-11-02 Thread python473
I downloaded python 2.4. When attempting to run python interpreter, I get following: warning: strop functions are obsolete; use string methods How do I correct this? Did I do install incorrectly? Thanks - John -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP submission broken?

2005-11-02 Thread Steve Holden
Bryan Olson wrote: > Though I tried to submit a (pre-) PEP in the proper form through the proper > channels, it has disappeared into the ether. > > > In building a class that supports Python's slicing interface, > >http://groups.google.com/group/comp.lang.python/msg/8f35464483aa7d7b > > I e

Re: Python for .NET and IronPython

2005-11-02 Thread James
IronPython is good if you want to bring in Python into a .NET world. Python for .NET is good if you want to bring in .NET into a Python world. As for your learning concerns, there need be none. There is really nothing to learn extra for the integration. They just work. Once you learn the .NET fra

Re: Python and MySQL

2005-11-02 Thread Steve Holden
Thomas Bartkus wrote: > "Steve Holden" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Thomas Bartkus wrote: >> >>>Well, I'm looking at the source for the ever popular MySQLdb library. It >>>appears to be nothing but straight up Python source code. I see no > > reason > >>>why

Re: How to print random strings

2005-11-02 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Im at the end of chapter 3 of "Python Programming For The Absolute > Beginner, Michael Dawson " and he asks to make a fortune program that > displays a fortune each time its ran, and to have 5 unique fortunes. > > Whats confusing is that, he never discussed how to do th

Re: Python for .NET and IronPython

2005-11-02 Thread hrh1818
For more information on Iron Python see http://www.ironpython.com/ My take on Iron Python is the new job the develolper of Iron Python started last year takes up just about all of his time and the developer is currently spending very little time actively developing Iron Python. I suspect it will be

PEP submission broken?

2005-11-02 Thread Bryan Olson
Though I tried to submit a (pre-) PEP in the proper form through the proper channels, it has disappeared into the ether. In building a class that supports Python's slicing interface, http://groups.google.com/group/comp.lang.python/msg/8f35464483aa7d7b I encountered a Python bug, which, upon

Re: Rich __repr__

2005-11-02 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Ben Finney <[EMAIL PROTECTED]> wrote: > Erik Max Francis <[EMAIL PROTECTED]> wrote: > > Ben Finney wrote: > > > If I want to implement a __repr__ that's reasonably "nice" to the > > > programmer, what's the Right Way? Are there recipes I should look > > > at? > >

Re: How to print random strings

2005-11-02 Thread Jorge Godoy
[EMAIL PROTECTED] writes: > Im at the end of chapter 3 of "Python Programming For The Absolute > Beginner, Michael Dawson " and he asks to make a fortune program that > displays a fortune each time its ran, and to have 5 unique fortunes. > > Whats confusing is that, he never discussed how to do t

Re: computer programming

2005-11-02 Thread Brandon K
what is .tk? Turkmenistan? or is it just some arbitrary suffix. > www.javaholics.tk == Posted via Newsgroups.com - Usenet Access to over 100,000 Newsgroups == Get Anonymous, Uncensored, Access to West and East Coast Server Farms! == Highest Retention and Completion Rates! HTTP:/

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Brandon K
BTW, it'd be 6 megabits or 750kb ;) > Six megabytes is pretty much nothing on a modern computer. == Posted via Newsgroups.com - Usenet Access to over 100,000 Newsgroups == Get Anonymous, Uncensored, Access to West and East Coast Server Farms! == Highest Retention and Completion Rat

How to print random strings

2005-11-02 Thread theboringdays
Im at the end of chapter 3 of "Python Programming For The Absolute Beginner, Michael Dawson " and he asks to make a fortune program that displays a fortune each time its ran, and to have 5 unique fortunes. Whats confusing is that, he never discussed how to do this. The only thing he talked about w

Re: Xah's edu corner: the Journey of Foreign Characters thru Internet

2005-11-02 Thread Brandon K
So just stop talking. It's funny that you guys are having a conversations about not responding to a guys post. First of all, freedom of speech, blah blah, who cares, just let him alone. But certainly don't go on his post, reply, telling people not to reply. That's like saying EVEN THOUGH I'M

Re: Getting a function name from string

2005-11-02 Thread Mike Meyer
"Paul McGuire" <[EMAIL PROTECTED]> writes: > "David Rasmussen" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> If I have a string that contains the name of a function, can I call it? >> As in: >> >> def someFunction(): >> print "Hello" >> >> s = "someFunction" >> s() # I know this

Re: An FAQ Please Respond

2005-11-02 Thread SPE - Stani's Python Editor
Hi Clinton, If I was you, I would stick for a little while with python 2.3 untill Blender 2.40 gets stable. In the meantime you can use Movable Python (python on an usb stick) to program in Python 2.4: http://www.voidspace.org.uk/python/movpy/ But I guess Blender will become stable soon. Stani

Re: Burrows-Wheeler (BWT) Algorithm in Python

2005-11-02 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, "DENG" <[EMAIL PROTECTED]> wrote: > Hi, all > > I've used Python Bz2 module for times and want to kown something about > Burrows-Wheeler (BWT) algorithm, the Bz2 module is wrriten in C, is > there a version in Python too? > > BWT > http://gatekeeper.dec.com/pub/D

Re: An FAQ Please Respond

2005-11-02 Thread Terry Hancock
On Wednesday 02 November 2005 04:58 pm, clinton Brandt wrote: > Hey I am Learning Blender for 3D mesh design and the current Relese doesnt > recognize my python 2.4.1 it stopped at python 2.3. there alpha test of > their next release supports py 2.4 but as a noob id like to learn an a less > bu

Re: lists <-> tuple

2005-11-02 Thread Robert Kern
Peter Notebaert wrote: > I am new to Python and have to create an import library in C that uses > matrices. > > These matrices can be one-dimensional (vectors) or two-dimensional. If I > look in the ActivePython 2.4 documentation at data structures, then I see at > least 2 posibilities to repre

Re: An FAQ Please Respond

2005-11-02 Thread Larry Bates
You can certainly have more than one version loaded. You may find it easier to fall back to Python 2.3. Unless you are using 2.4 specific features, it won't cost you much. You have to mess with path, associations, etc. in Windows registry to switch between the two. -Larry Bates clinton Brandt

pyzeroconf on windows

2005-11-02 Thread matt
Since I'm on the topic of pyzeroconf today, I might as well keep posting ;) So on to another platform... windows. Has anyone used pyzeroconf on Windows recently? It doesn't appear to work (and it isn't the 127.0.0.1 thing either). Running python Zeroconf.py gives the following: Multicast DNS Ser

Re: lists <-> tuple

2005-11-02 Thread Jim
> Tuples or lists for matrix-like functionality? Use lists. Tuples are meant for small immutable sets of things that go together. Lists are more like arrays, and you can assign to one existing element if you want. One exception, is a short vector is often a tuple like (x, y, z) and you might wa

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Dan Bishop
Tor Erik Sønvisen wrote: > Hi > > I need a time and space efficient way of storing up to 6 million bits. The most space-efficient way of storing bits is to use the bitwise operators on an array of bytes: import array class BitList(object): def __init__(self, data=None): self._data = arr

RE: convert COM obj to integer

2005-11-02 Thread Bell, Kevin
Well that looks quite nice, so I'll work that into my script. Thanks!!! That 1-tuple business was confusing me, and I was getting errors stating something about converting an object, so as you can see, I was grasping at straws. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: reading internet data to generate random numbers.

2005-11-02 Thread Neil Schemenauer
Grant Edwards <[EMAIL PROTECTED]> wrote: > Doesn't your OS have an entropy-gathering RN generator built-in? Alternatively, if you want lots of high-quality random numbers, buy a cheap web camera: http://www.lavarnd.org/ . Using data from the Internet is just a bad idea. Neil -- http://mail.

lists <-> tuple

2005-11-02 Thread Peter Notebaert
I am new to Python and have to create an import library in C that uses matrices. These matrices can be one-dimensional (vectors) or two-dimensional. If I look in the ActivePython 2.4 documentation at data structures, then I see at least 2 posibilities to represent them: Lists and Tuples. The d

Re: Python and MySQL

2005-11-02 Thread Thomas Bartkus
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thomas Bartkus wrote: > > Well, I'm looking at the source for the ever popular MySQLdb library. It > > appears to be nothing but straight up Python source code. I see no reason > > why you couldn't just take these modules

Re: Getting a function name from string

2005-11-02 Thread Paul McGuire
"David Rasmussen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If I have a string that contains the name of a function, can I call it? > As in: > > def someFunction(): > print "Hello" > > s = "someFunction" > s() # I know this is wrong, but you get the idea... > > /David Lookup th

Re: convert COM obj to integer

2005-11-02 Thread Steve M
I don't know exactly what a COM object is, but those aren't them. The win32com package takes care of converting everything to Python types. The excel call returns a tuple of tuples. That is, the outer tuple is the sequence of rows, and each such row is itself a tuple with one member per column requ

Getting a function name from string

2005-11-02 Thread David Rasmussen
If I have a string that contains the name of a function, can I call it? As in: def someFunction(): print "Hello" s = "someFunction" s() # I know this is wrong, but you get the idea... /David -- http://mail.python.org/mailman/listinfo/python-list

An FAQ Please Respond

2005-11-02 Thread clinton Brandt
Hey I am Learning Blender for 3D mesh design and the current Relese doesnt recognize my python 2.4.1 it stopped at python 2.3. there alpha test of their next release supports py 2.4 but as a noob id like to learn an a less buggy release. so my question is can i install 2 versions of python and

Re: Hexadecimal Conversion in Python

2005-11-02 Thread Peter Hansen
DaBeef wrote: > I have been coding for 5 years. This is a proprietary protocol, so it > is difficult converting. I did this in java but was just able to > convert a stream. What exactly did you do in Java to get the results you want? Python's library is certainly *not* "limited" in this area,

Re: Python for .NET and IronPython

2005-11-02 Thread Steve M
I was under the impression that IronPython is like CPython and Jython, namely an implementation of the Python language. So in that sense it is exactly like normal Python, although I don't know how convenient it is to deploy. I was also under the impression that Python for .NET is like an API wrapp

Re: urlencode with high characters

2005-11-02 Thread Martin v. Löwis
Jim wrote: > My understanding is that I am supposed to be able to urlencode anything > up to the top half of latin-1 -- decimal 128-255. I believe your understanding is incorrect. Without being able to quote RFCs precisely, I think your understanding should be this: - the URL literal syntax only

Re: Python and MySQL

2005-11-02 Thread Steve Holden
Thomas Bartkus wrote: > "Aquarius" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>I appologize in advance for this strange (and possibly stupid) >>question. >> >>I want to know if there is a way to interface a MySQL database without >>Python-MySQL or without installing anything

Re: Suggestion for (re)try statement

2005-11-02 Thread Brigham Brown
It doesn't seem like a very useful construct, because you won't know at what point the code failed in the try block, so it could execute code at the beginning of the block several times if the error was in the middle. That could be weird. So, it would probably only be useful for one line try block

Re: Python and MySQL

2005-11-02 Thread Thomas Bartkus
"Aquarius" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I appologize in advance for this strange (and possibly stupid) > question. > > I want to know if there is a way to interface a MySQL database without > Python-MySQL or without installing anything that has C files that need > t

Re: Retain reference to a struct

2005-11-02 Thread Carsten Haese
On Wed, 2005-11-02 at 16:23, [EMAIL PROTECTED] wrote: > Hi All, > > A C library I'm using has a number of functions that all require a > struct as an argument. The example module shows how to make a new > Python Object from C code and I've seen other posts that recommend this > way of doing it. >

Re: Hexadecimal Conversion in Python

2005-11-02 Thread James Stroud
On Wednesday 02 November 2005 12:53, DaBeef wrote: > I have been coding for 5 years. This is a proprietary protocol, so it > is difficult converting. I did this in java but was just able to > convert a stream. I looked through the Python library, I am more or > less getting backa string represe

Re: Suggestion for (re)try statement

2005-11-02 Thread Rocco Moretti
Sori Schwimmer wrote: > 0) Sorry, I don't know how to post a reply in the same > thread. Usually it is simply hitting the "Reply" button/link/key combination on your mail/news reader when the post you want to reply to in view. (If you want reply to multiple people, you can always reply to the or

Re: Hexadecimal Conversion in Python

2005-11-02 Thread Bengt Richter
On 2 Nov 2005 12:53:45 -0800, "DaBeef" <[EMAIL PROTECTED]> wrote: >I have been coding for 5 years. This is a proprietary protocol, so it >is difficult converting. I did this in java but was just able to >convert a stream. I looked through the Python library, I am more or >less getting backa st

Re: Python for .NET and IronPython

2005-11-02 Thread John Salerno
John Salerno wrote: > code? I know Python for .NET is treated as a true language in the CLR, > but I don't quite grasp what all this means for each language isn't* treated, I meant to say! -- http://mail.python.org/mailman/listinfo/python-list

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Steven D'Aprano
On Wed, 02 Nov 2005 13:55:10 +0100, Tor Erik Sønvisen wrote: > Hi > > I need a time and space efficient way of storing up to 6 million bits. [inserts pinky in corner of mouth] Six MILLION bits!!! That's almost 750K. Are you sure your computer will handle that much data? > Time > efficency

Re: reading internet data to generate random numbers.

2005-11-02 Thread Roman Suzi
On Wed, 2 Nov 2005, Grant Edwards wrote: > On 2005-11-02, Levi Campbell <[EMAIL PROTECTED]> wrote: > >> Hi, I'm working on a random number generator using the internet as a >> way to gather entropy, I have two questions. So far interesting. >> 1. is there a way to capture the internet stream? M

Retain reference to a struct

2005-11-02 Thread andychambers2002
Hi All, A C library I'm using has a number of functions that all require a struct as an argument. The example module shows how to make a new Python Object from C code and I've seen other posts that recommend this way of doing it. In this case though, it would seem easier if I could create the ob

Re: Web automation with twill

2005-11-02 Thread qwweeeit
I solved the problem by myself with the classical method of newbyes (trial and error). Bye. -- http://mail.python.org/mailman/listinfo/python-list

Python for .NET and IronPython

2005-11-02 Thread John Salerno
Hi all. I'm currently learning C#, and I'm also interested in learning Python (all of this just for fun, mind you), so it seems like a decent idea to want to integrate the two. But I don't quite understand the difference between these two Python implementations and I was hoping someone could ex

Re: Hexadecimal Conversion in Python

2005-11-02 Thread Grant Edwards
On 2005-11-02, DaBeef <[EMAIL PROTECTED]> wrote: > I have been coding for 5 years. This is a proprietary protocol, so it > is difficult converting. Eh? What's so difficult about it? > I did this in java but was just able to convert a stream. Yet you seem unable to describe what it is you're t

Re: Hexadecimal Conversion in Python

2005-11-02 Thread Bengt Richter
On 2 Nov 2005 12:28:26 -0800, "DaBeef" <[EMAIL PROTECTED]> wrote: >Hello, I am reading in a socket message from a server and am only >receiving this ''. Now obviously it is in the wrong format. How >would I convert these bys in Python, I have looked everywhere but I do >not see much document

Re: is open(...).read() a resource leak?

2005-11-02 Thread Benjamin Rutt
"Fredrik Lundh" <[EMAIL PROTECTED]> writes: > Benjamin Rutt wrote: > >> If I did the following in an infinite loop, would the host system/user >> account soon run out of file descriptors? (I'm thinking no, since I'd >> imagine that a file object has a __del__-like method that will call >> close()

Re: Hexadecimal Conversion in Python

2005-11-02 Thread DaBeef
I have been coding for 5 years. This is a proprietary protocol, so it is difficult converting. I did this in java but was just able to convert a stream. I looked through the Python library, I am more or less getting backa string represented as a "" So now I want to convert it to all the h

convert COM obj to integer

2005-11-02 Thread Bell, Kevin
I'm pulling a range of cells from Excel into a list and the data in Excel is a number or possibly some text like an asterisk. Each member of the list is a com object (I think) and I'm converting them to integers (or to None if not numberic) but my method seems very silly. Is this the best way to g

Re: Py2Exe produced "binary" shows terminal screen on execution

2005-11-02 Thread Kristina Kudriašova
Hi, 2 Nov 2005 05:31:07 -0800, Thomas W <[EMAIL PROTECTED]>: > I've produced a "binary" version of a python-script using Py2Exe and > when run on WinXP it shows a terminal window for a brief moment then > the window disappears. How can I avoid this? I want the script to run > without being visible

Re: Hexadecimal Conversion in Python

2005-11-02 Thread Fredrik Lundh
"DaBeef" wrote:/ > it is returning data such as 0x04. I am new to python so this is a > pain for me, learning to do this in a language whose llibrary is > somewhat limited. you make no sense at all. what are you receiving data from? how are you receiving it? what library are you using? what'

Re: Hexadecimal Conversion in Python

2005-11-02 Thread Stefan Näwe
DaBeef wrote: > it is returning data such as 0x04. But you need to know what kind of data the other side is sending, i.e. what kind of protocol it speaks. > I am new to python New and starting with socket/network programming ? Brave! > so this is a > pain for me, learning to do this in a

Re: Hexadecimal Conversion in Python

2005-11-02 Thread DaBeef
it is returning data such as 0x04. I am new to python so this is a pain for me, learning to do this in a language whose llibrary is somewhat limited. But instead I receieve So I wnat to convert to the original data. Also can you define a constant in Python such as #define value 0x04 Thank-y

Re: Hexadecimal Conversion in Python

2005-11-02 Thread Stefan Näwe
DaBeef wrote: > Hello, I am reading in a socket message from a server and am only > receiving this ''. Now obviously it is in the wrong format. How > would I convert these bys in Python, I have looked everywhere but I do > not see much documentation on converting ptyhon types to other data >

Re: reading internet data to generate random numbers.

2005-11-02 Thread Grant Edwards
On 2005-11-02, Levi Campbell <[EMAIL PROTECTED]> wrote: > Hi, I'm working on a random number generator using the internet as a > way to gather entropy, I have two questions. > > 1. is there a way to capture the internet stream? What OS? What, exactly, do you want to capture? > 2. how would I sk

urlencode with high characters

2005-11-02 Thread Jim
Hello, I'm trying to do urllib.urlencode() with unicode correctly, and I wonder if some kind person could set me straight? My understanding is that I am supposed to be able to urlencode anything up to the top half of latin-1 -- decimal 128-255. I can't just send urlencode a unicode character: P

Hexadecimal Conversion in Python

2005-11-02 Thread DaBeef
Hello, I am reading in a socket message from a server and am only receiving this ''. Now obviously it is in the wrong format. How would I convert these bys in Python, I have looked everywhere but I do not see much documentation on converting ptyhon types to other data types. Any Help would be

SPE 0.7.5.e - Python IDE with improved uml, debugger & unicode support

2005-11-02 Thread SPE - Stani's Python Editor
What's new? SPE now creates backup files and can insert your standard signature (with for example license and copyright information) in your code. A bug that prevented SPE to start on Linux has been fixed and also a lot of bugfixes were implemented, especially for unicode. You can read more on the

Re: reading internet data to generate random numbers.

2005-11-02 Thread Fredrik Lundh
Peter Hansen wrote: >> Hi, I'm working on a random number generator using the internet as a >> way to gather entropy, I have two questions. >> >> 1. is there a way to capture the internet stream? > > What specifically do you mean by the term "internet stream" here? > Generally speaking, the intern

  1   2   3   >