Re: * TypeError - Need help passings args

2005-11-02 Thread Ernesto
Thanks, that ran without errors. The only problem now is that it launches devcon.exe without actually passing the parameters to the program. It's as if I just typed "devcon" at a Windows command prompt and pressed enter. I can't figure out why it doesn't accept my parameter. -- http://mail.pyt

Re: Flat file, Python accessible database?

2005-11-02 Thread Magnus Lycka
Karlo Lozovina wrote: > I've been Googling around for _small_, flat file (no server processes), > SQL-like database which can be easily access from Python. There are some suggestions in my EPC 2004 DB presentation: http://www.thinkware.se/epc2004db/epc04_mly_db.pdf -- http://mail.python.org/mail

Python and MySQL

2005-11-02 Thread Aquarius
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 to be compiled. The reason for this, is that I want to develop a certain web applic

Subprocess.Popen - passing args help

2005-11-02 Thread Ernesto
I'm trying to use Popen to do some command line work Windows XP style. I have devcon.exe which I would use on a Windows command line like so: devcon disable "@USB\VID_05E3&PID_0605\5&2CE74B9E&1&6" Using subprocess.Popen, I have something like this: subprocess.Popen([r"devcon.exe","disable",'"USB

Re: where to download md5.py?

2005-11-02 Thread Paul Rubin
"Bell, Kevin" <[EMAIL PROTECTED]> writes: > I've been looking around, but haven't found a place to download the > md5.py module. I need it to run the dupinator.py It's part of the standard Python distro. There is a C module that you need along with it. -- http://mail.python.org/mailman/listinfo

[Subprocess/Windows] subprocess module under Windows 98

2005-11-02 Thread Andreas Jung
Hi, I am using subprocess.Popen() to start Java processes (converters) from within Zope under Windows 98 (sorry, we have to support the platform). The call looks like this: P = Popen('java.exe arguments...', stdout=PIPE, stderr=PIPE, stdin=open('nul:')). stdin=open('nul:') is required to

Which is worse, Xah's stuff or everyone's effing crap about it? And don't even get me started on that MS bashing or top posting nonsense

2005-11-02 Thread Michael . Coll-Barth
Actually, the continuous complaining and ranting about Xah's 'postings' are far worse than Xah's actual postings. I can filter his stuff to /dev/null. The drivel that follows is almost as bad as the moronic effluent about how extra-python things should be done or not be done or the legal notices

Re: * TypeError - Need help passings args

2005-11-02 Thread Juho Schultz
Ernesto wrote: > Thanks, that ran without errors. The only problem now is that it > launches devcon.exe without actually passing the parameters to the > program. It's as if I just typed "devcon" at a Windows command prompt > and pressed enter. I can't figure out why it doesn't accept my > parame

Re: Python and MySQL

2005-11-02 Thread Alan Kennedy
[Aquarius] > 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 > to be compiled. The reason for this, is that I want to devel

Re: dictionary that have functions with arguments

2005-11-02 Thread Tim Williams (gmail)
On 1 Nov 2005 20:02:41 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi > i have a dictionary defined as > > execfunc = { 'key1' : func1 } ## def __HELLO(x=' '): print 'HELLO',x def __BYE(x=' '): print 'BYE',x def __PRINT(x=None, y=None): print 'PRINT',x,y c

Re: Flat file, Python accessible database?

2005-11-02 Thread Peter Hansen
Steve Holden wrote: > My experience on Cygwin was that I had to install sqlite before pySqlite > worked. So although the Windows install of Pysqlite bundles a .pyd that includes the statically linked sqlite library, other platforms do not? I agree that would represent a potentially annoying

Forcing the position of scroll bars on a wxTextCtrl

2005-11-02 Thread Clans Of Intrigue
Hello, this is my first post here so apologies if it's in the wrong place, inappropriate or embarrassingly stupid - please let me know :) My problem seems quite simple - I've redirected stdout to a wxTextCtrl, so that any trace messages appear in a log window at the bottom of my app. The problem

Re: subprocess module under Windows 98

2005-11-02 Thread Ernesto
This worked for me on XP... not sure for 98... http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409002 -- http://mail.python.org/mailman/listinfo/python-list

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

2005-11-02 Thread Fredrik Lundh
"CppNewB" wrote: > But the logos look like they were done in Paint that's probably why the designers won a prestigious design award for their: "...innovative letter designs and typographic experiments, which are testimony to their unconventional thinking about, and use of, existing s

Re: expanding dictionary to function arguments

2005-11-02 Thread bruno at modulix
Noah wrote: > Bruno Desthuilliers a écrit : > >>Noah a écrit : >>If you have control over the API functions declarations, makes them so: >>def my_api_func(arg1='', arg2='whatever', **kwargs): >> code_here > > > Unfortunately I cannot change the API functions. > I should have mentioned that. Y

Re: Subprocess.Popen - passing args help

2005-11-02 Thread Ernesto
A nice person from another thread helped me... a = 'disable "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&' print a disable "@USB\VID_0403&PID_6010&MI_00&15E4F68&1& \7 is the ASCII bell so your args may be different from what you think. I thought the quote method I have fixes this problem,

Re: About the Python Expert

2005-11-02 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hey, i didnt say i need an expert. wel i did... anyways, i m just > saying that Fan is not a good python programmer, he doesnt know enough > python to help those who have joined his group, i know its askin a > lot, and i m not askin for a private tutor, just someone(s)

Re: how to check for unix password

2005-11-02 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > i created a login page that authenticate the user and his/her password > to the unix ssystem. what modules can i used to compare the unix > password with what the user typed in the cgi form? the password is > encrypted (shadowed) so i need to decrypt it first before comp

Re: how to check for unix password

2005-11-02 Thread Magnus Lycka
[EMAIL PROTECTED] wrote: > hi > i created a login page that authenticate the user and his/her password > to the unix ssystem. what modules can i used to compare the unix > password with what the user typed in the cgi form? the password is > encrypted (shadowed) so i need to That's not the same thi

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

2005-11-02 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > And if anyone wants to take the responsibiblity to warn the general > public that it is troll so innocent readers may not be tempted into > one, at least do it privately huh? -- http://mail.python.org/mailman/listinfo/python-list

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

2005-11-02 Thread Jarek Zgoda
Fredrik Lundh napisał(a): >>And if anyone wants to take the responsibiblity to warn the general >>public that it is troll so innocent readers may not be tempted into >>one, at least do it privately > > huh? Don't fed the troll, don't give him any public audience. Easy. -- Jarek Zgoda http://jp

Re: Python and MySQL

2005-11-02 Thread Steve Holden
Aquarius wrote: > 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 > to be compiled. The reason for this, is that I want to

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

2005-11-02 Thread [EMAIL PROTECTED]
I should not response here but just to show what would be the consequence. If you send me a private mail instead of posting here, there would be two less post for this thread, and if I didn't post, it would be three less. That is, only response privately to people responding to a troll would reduc

Re: Importing Modules

2005-11-02 Thread Terry Hancock
On Wednesday 02 November 2005 07:23 am, Peter Hansen wrote: > Walter Brunswick wrote: > > The purpose is rather irrelevant. > > The purpose of something is not only relevant but essential when someone > asks for the "best" way to do it. > > For example, without knowing anything of your purpose,

Re: Spambayes modifications with web services

2005-11-02 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Thank you for the flippant remarks. Let's just say that I found them to > be unproductive. > > I would like to point out the process was not designed to be automatic > and I don't believe made such a statement. I should clarify that my > desire was to list each domain th

Re: Subprocess.Popen - passing args help

2005-11-02 Thread Fredrik Lundh
"Ernesto" wrote: > A nice person from another thread helped me... > > a = 'disable "@USB\VID_0403&PID_6010&MI_00\7&15E4F68&1&' > print a > disable "@USB\VID_0403&PID_6010&MI_00&15E4F68&1& > > \7 is the ASCII bell so your args may be different from what you think. > > > I thought the quote

Re: where to download md5.py?

2005-11-02 Thread Fredrik Lundh
"Bell, Kevin" wrote: > I've been looking around, but haven't found a place to download the > md5.py module. I need it to run the dupinator.py md5 is a standard Python module (written in C). it's been in Python since the early ages, so if you don't have it, your install is most likely broken (p

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

2005-11-02 Thread Benjamin Rutt
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() automatically since it goes out of scope): open('/home/rutt/.bashrc,'r').rea

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

2005-11-02 Thread Fredrik Lundh
Jarek Zgoda wrote: >>>And if anyone wants to take the responsibiblity to warn the general >>>public that it is troll so innocent readers may not be tempted into >>>one, at least do it privately >> >> huh? > > Don't fed the troll, don't give him any public audience. Easy. by sending private mail t

Re: subprocess module under Windows 98

2005-11-02 Thread Andreas Jung
--On 2. November 2005 08:48:24 -0800 Ernesto <[EMAIL PROTECTED]> wrote: This worked for me on XP... not sure for 98... http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409002 Thanks, this works! Andreas pgpeWK0kWa6KX.pgp Description: PGP signature -- http://mail.python.org/mailman

Re: Spambayes modifications with web services

2005-11-02 Thread Tim Williams (gmail)
On 02/11/05, Steve Holden <[EMAIL PROTECTED]> wrote: > Personally I didn't regard the reply as unhelpful, and I believe the > replier was honestly trying to get you to see that your rather naive > suggestion was most unlikely to make things better. > To the OP A tip for curing your own problem -

Re: Using Python to add thumbnails to Explorer

2005-11-02 Thread Roger Upole
Not sure how ctypes works, but with Pywin32 Pythoncom24.dll is actually registered as the shell extension dll, and it passes calls to methods of a Python class you create that implements the interface methods. Roger "c d saunter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECT

reading internet data to generate random numbers.

2005-11-02 Thread Levi Campbell
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? 2. how would I skip every 2nd, 3rd, or 4th byte to protect privacy? -- http://mail.python.org/mailman/listinfo/python-list

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

2005-11-02 Thread Fredrik Lundh
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() automatically since it goes out of scope): > >o

pyzeroconf on linux...

2005-11-02 Thread matt
Hey, has anyone out there tried pyzeroconf on Linux? I'm using Andrew's code from http://www.amk.ca/python/zeroconf to publish and discover services. The code works under Mac. But it doesn't under linux (FC4). I should clarify that, it appears that the publish code doesn't work under linux. Th

Re: reading internet data to generate random numbers.

2005-11-02 Thread Peter Hansen
Levi Campbell 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 internet is n

Re: reading internet data to generate random numbers.

2005-11-02 Thread Fredrik Lundh
Levi Campbell 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's an internet stream? -- http://mail.python.org/mailman/listinfo/python-list

Re: expanding dictionary to function arguments

2005-11-02 Thread Bengt Richter
On 1 Nov 2005 17:17:00 -0800, "Noah" <[EMAIL PROTECTED]> wrote: >I have a dictionary that I would like to expand to satisfy a >function's agument list. I can used the ** syntax to pass a dictionary, >but >this only works if each key in the dictionary matches an argument. >I cannot pass a dictionar

RE: where to download md5.py?

2005-11-02 Thread Bell, Kevin
"Bell, Kevin" wrote: > I've been looking around, but haven't found a place to download the > md5.py module. I need it to run the dupinator.py Fredick replied: md5 is a standard Python module (written in C). it's been in Python since the early ages, so if you d

question about urllib and parsing a page

2005-11-02 Thread nephish
hey there, i am using beautiful soup to parse a few pages (screen scraping) easy stuff. the issue i am having is with one particular web page that uses a javascript to display some numbers in tables. now if i open the file in mozilla and "save as" i get the numbers in the source. cool. but i click

Re: pyzeroconf on linux...

2005-11-02 Thread matt
Another (easier) example of it failing, is to just run "python Zeroconf.py": 1. Testing registration of a service... Registering service... Registration done. 2. Testing query of service information... Getting ZOE service: None Query done. 3. Testing query of own service... Getting s

Converting ip addr, port to unsigned Network Byte Order

2005-11-02 Thread DaBeef
I have an IP adress and a port # and I needed them in Network Byte Order. Socket.connect (( ipAddr , portNumber) - how would you do this with python, I am unsure of exactly how python data is stored. I know the bits must be equal to an unsigend int. HOw would you do this in Python?? Thanks for y

Re: where to download md5.py?

2005-11-02 Thread robert . dowell
So when you type this into an interactive session: >>> import sha >>> help(sha) You get an error? -- http://mail.python.org/mailman/listinfo/python-list

Re: question about urllib and parsing a page

2005-11-02 Thread matt
Yeah, this tends to be silly, but a workaround (for firefox at least) is to select the content and rather than saying view source, right click and click View Selection Source... -- http://mail.python.org/mailman/listinfo/python-list

Re: Most efficient way of storing 1024*1024 bits

2005-11-02 Thread Bengt Richter
On Wed, 2 Nov 2005 13:55:10 +0100, "Tor Erik Sønvisen" <[EMAIL PROTECTED]> wrote: >Hi > >I need a time and space efficient way of storing up to 6 million bits. Time >efficency is more important then space efficency as I'm going to do searches >through the bit-set. > Very dependent on what kind

Re: where to download md5.py?

2005-11-02 Thread Fredrik Lundh
"Bell, Kevin" wrote: > I don't have sha either, but my system administrators don't know a thing > about python. How would they block it? That is the dupinator that I'm > talking about. Where would md5 and sha be if they were there? > C:\Python24\Lib? if you're using 2.4 on Windows, they're inc

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

2005-11-02 Thread Simon Brunning
On 02/11/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > a version of Paint that works on a Mac, an obstreperous mentality, > and a sense of humour. what else do you need? Biscuits. You need biscuits. Treating-this-thread-as-seriously-as-it-deserves-ly y'rs, Simon B. -- http://mail.python.org/ma

Re: Python and MySQL

2005-11-02 Thread Magnus Lycka
Aquarius wrote: > 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 > to be compiled. The reason for this, is that I want to

Re: Forcing the position of scroll bars on a wxTextCtrl

2005-11-02 Thread Magnus Lycka
Someone who's probably not really called Clans Of Intrigue wrote: > Hello, this is my first post here so apologies if it's in the wrong > place, inappropriate or embarrassingly stupid - please let me know :) No, that's ok. The wxpython mailing list might give better answers though. > My problem s

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

2005-11-02 Thread Jarek Zgoda
Fredrik Lundh napisał(a): And if anyone wants to take the responsibiblity to warn the general public that it is troll so innocent readers may not be tempted into one, at least do it privately >>> >>>huh? >> >>Don't fed the troll, don't give him any public audience. Easy. > > by sendin

Re: Forcing the position of scroll bars on a wxTextCtrl

2005-11-02 Thread Clans Of Intrigue
Thanks, that did the trick perfectly :) also got rid of the self._log member so the class is now just: class LogControl: """ Simple helper to redirect stdout to a panel in the GUI """ def __init__( self, textCtrl ): self._ctrl = textCtrl self.write( "Application Started...

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

2005-11-02 Thread The Eternal Squire
I like the Python website just fine. It has exactly what it needs to document and advocate Python, no more and no less. Plus, it loads quite fast. Two suggestions for the OP: 1) Go to Barnes and Noble or Amazon and read or buy the book "Web Sites That Suck". It is a fully detailed and annotat

Threading

2005-11-02 Thread Tuvas
I am trying to write a thread that will execute a function every 2 seconds until the program is close, in which case it will stop. I can write the program easy enough to execute the command every 2 seconds, the problem comes when I try to close the program. It won't close the thread. Any ideas as t

Filepath string manipulation help

2005-11-02 Thread mjakowlew
Hi, I'm trying to use some string manipulation from a file's path. filepath='c:\documents\web\zope\file.ext' I need to extract everthing after the last '\' and save it. I've looked around and have tried the sub, search, match commands, but I'm guessing '\' is set aside for switches. I need to kn

Re: Scanning a file

2005-11-02 Thread David Rasmussen
Steven D'Aprano wrote: > > 0x0100 is one of a number of unique start codes in the MPEG2 > standard. It is guaranteed to be unique in the video stream, however > when searching for codes within the video stream, make sure you're in > the video stream! > I know I am in the cases I am intere

Re: question about urllib and parsing a page

2005-11-02 Thread nephish
thats cool, but i want to do this automatically with python. what can i do to have urllib download the source with the numbers in it? ok, not necessarily urllib, whatever one is best for the occation thanks shawn -- http://mail.python.org/mailman/listinfo/python-list

Re: Filepath string manipulation help

2005-11-02 Thread robert . dowell
import os print os.path.basename(filepath) -- http://mail.python.org/mailman/listinfo/python-list

Re: question about urllib and parsing a page

2005-11-02 Thread David Wahler
[EMAIL PROTECTED] wrote: > hey there, > i am using beautiful soup to parse a few pages (screen scraping) > easy stuff. > the issue i am having is with one particular web page that uses a > javascript to display some numbers in tables. > > now if i open the file in mozilla and "save as" i get the nu

Re: Filepath string manipulation help

2005-11-02 Thread Fredrik Lundh
"mjakowlew"wrote: > filepath='c:\documents\web\zope\file.ext' > > I need to extract everthing after the last '\' and save it. that string doesn't contain what you think it does: >>> filepath='c:\documents\web\zope\file.ext' >>> filepath 'c:\\documents\\web\\zope\x0cile.ext' >>> print filepath c:

Re: Threading

2005-11-02 Thread Dave Brueck
Tuvas wrote: > I am trying to write a thread that will execute a function every 2 > seconds until the program is close, in which case it will stop. I can > write the program easy enough to execute the command every 2 seconds, > the problem comes when I try to close the program. It won't close the >

Re: Threading

2005-11-02 Thread [EMAIL PROTECTED]
How do you use threads? With threading.Thread objects? Then this recipe might help, it did it for me. For further assistance please post your code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Forcing the position of scroll bars on a wxTextCtrl

2005-11-02 Thread Andrea Gavana
Hello Clans, as a first suggestion, it is usually recommended that you post a small *working* sample, in order to help others in understanding the problem and also to give others the possibility to test your code. Noting that I am not able to run your code as it is, I can just speculate one su

Re: Threading

2005-11-02 Thread [EMAIL PROTECTED]
Ooops, forgot this link to the recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448 -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading

2005-11-02 Thread Tuvas
That helps alot with the Daemon and recipe! Thanks for the help! -- http://mail.python.org/mailman/listinfo/python-list

Re: pyzeroconf on linux...

2005-11-02 Thread matt
I think I've figured it out. It appears to be a misconfiguration on my part. In my /etc/hosts file I had the loopback address pointing to my machine name. I made 127.0.0.1 only point to localhost and I can now publish services! -- http://mail.python.org/mailman/listinfo/python-list

RE: where to download md5.py?

2005-11-02 Thread Bell, Kevin
I guess I do have it. I was looking in LIB for it, because that's where I've typically imported other modules from, like os, etc... >> import md5 >> help(md5) Gives me the help like you'd expect. I was getting an error in the dupinator that I mistakenly attributed to not being able to see md

Suggestion for (re)try statement

2005-11-02 Thread Sori Schwimmer
0) Sorry, I don't know how to post a reply in the same thread. 1) Grant Edwards wrote: > The "i += 1" line is almost certainly wrong. You're certainly write, as I acknowledged in a follow up "suggestion for (re)try statement - correction' 2) Rocco Morreti wrote: > What is so repugnant about the equ

Re: question about urllib and parsing a page

2005-11-02 Thread nephish
well, i think thats the case, looking at the code, there is a long string of math functions in page, java math functions. h. i guess i'm up that famous creek. thanks for the info, though shawn -- http://mail.python.org/mailman/listinfo/python-list

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

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

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

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

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

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: 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: > 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 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: 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

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: 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

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 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: 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

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: 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

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: 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

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: 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: 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: 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 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: 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: 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: 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 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: 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 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: 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,

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

<    1   2   3   >