[Tutor] Consistant Overhead Byte Stuffing (COBS) algorithm help

2005-10-03 Thread Michael Cotherman
Hello, I am really new to python and really have not programmed much since college, I played with it a little now, and it seems to be a tool I feel comfortable implementing a personal project in. I wish to communicate via a serial port to a device that is using COBS. I wish to configure it and the

Re: [Tutor] icq library

2005-10-03 Thread Danny Yoo
On Mon, 3 Oct 2005 [EMAIL PROTECTED] wrote: > > Is there an library to communicate with an ICQ-server including the most > important features line sending and receiving messages? > > I have already searched with google but i am not really able to find > exactrly that what i'm looking for. The T

Re: [Tutor] Finding libraries

2005-10-03 Thread Oliver Maunder
On 10/3/05, Liam Clarke <[EMAIL PROTECTED]> wrote: I'd recommend http://www.python.org/pypi andhttp://www.vex.net/parnassus/ Thanks for those - they're both full of possibilities. Olly ___ Tutor maillist - Tutor@python.org http://mail.python.org/mail

Re: [Tutor] Load PDF

2005-10-03 Thread bob
I am moving this to the python-win32 list where we can better handle it. Please send further replies there. At 03:41 AM 10/3/2005, Pepe Pena wrote: >I am attempting to load a pdf file programatically within Adobe Reader >using the Adobe Acrobat 7.0 Browser Control Type Library. If I run this >c

Re: [Tutor] Finding libraries

2005-10-03 Thread Oliver Maunder
On 10/3/05, Kent Johnson <[EMAIL PROTECTED]> wrote: > Should be straightforward, but I don't> want to do it only to find there's a module with a> get_file_from_web(url, destination, progress_callback) function in it.That is spelled urllib.urlretrieve (url, destination, progress_callback) :-) Proves

Re: [Tutor] HTTP GET Request

2005-10-03 Thread Kent Johnson
Jerl Simpson wrote: > The plan was to not use a web server, but to write my own...which I did > with Python. > > Basically all I did was put a listen() into a while loop. Once I got > the connection, I created a thread to read the socket. Once I could > read the socket, I read the data in, pa

Re: [Tutor] HTTP GET Request

2005-10-03 Thread Jerl Simpson
I wanted to post a follow up to this thread. I figured out what I needed and Python was it. The plan was to not use a web server, but to write my own...which I did with Python. Basically all I did was put a listen() into a while loop.  Once I got the connection, I created a thread to read the so

[Tutor] Thanks, you prevented "Coder's Remorse"

2005-10-03 Thread Ron Phillips
Thanks to everyone who responded to my "Prevent Coder's Remorse" posting; the result of combining the ideas that you contributed is below. It's a little long, but I'm delighted with it so far, and maybe someone else can use it. It's nice for representing a sparse table, where all the records sha

[Tutor] icq library

2005-10-03 Thread webmeister8f
Is there an library to communicate with an ICQ-server including the most important features line sending and receiving messages? I have already searched with google but i am not really able to find exactrly that what i'm looking for. I hope you can help me, tobias. --- I hope my english is no

Re: [Tutor] Struct and UTF-16

2005-10-03 Thread Kent Johnson
Liam Clarke wrote: > So, using > > val = unicode(value) > self._slaveMap[attr].setPayload(value.encode("UTF-16")) > > I can stick normal strings in happily. Of course, as you mentioned, > Kent, this leaves me vulnerable if the string differs to > sys.getdefaultencoding(). > > Other than directly

Re: [Tutor] Struct and UTF-16

2005-10-03 Thread Liam Clarke
Hi Kent, > > return self.location > > def sLoc(self, value): > > #Need to coerce data into UTF-16 here > > self.mhod.payload = value.encode("UTF-16") > > I'm confused about what sLoc is supposed to do. Shouldn't it be setting > self.location? ISTM sLoc should parallel

[Tutor] Load PDF

2005-10-03 Thread Pepe Pena
Hello,   I am attempting to load a pdf file programatically within Adobe Reader using the Adobe Acrobat 7.0 Browser Control Type Library.  If I run this code PythonWin terminates abruptly, can anyone suggest any changes I should make to the following lines of code, thanks.   import win32com.clien

Re: [Tutor] Struct and UTF-16

2005-10-03 Thread Kent Johnson
Liam Clarke wrote: > I have a base object, which reads the unicode string as bytes like so, > this ignores all but important bits. > > class Mhod: > def __init__(self, f): > self.payload = struct.unpack("36s", f.read(36)) > > Which in turn, is utilised in a Song object, which works li

Re: [Tutor] Finding libraries

2005-10-03 Thread Kent Johnson
Oliver Maunder wrote: > Hi all > > I'm pretty new to Python - I've worked through Dive Into Python, but not > done a lot else. One thing I have realised is that pretty much whatever > you want to do in Python, someone else has already done it and stuck it > in a library. My question is, how do

Re: [Tutor] Struct and UTF-16

2005-10-03 Thread Liam Clarke
Hmm, looking at this, it seems I'm not the only one with this sort of problem. http://downloads.egenix.com/python/LSM2005-Developing-Unicode-aware-applications-in-Python.pdf Maybe I will just build a wall around these objects and declare "none but unicode shall pass." On 10/3/05, Liam Clarke <[EM

Re: [Tutor] Struct and UTF-16

2005-10-03 Thread Liam Clarke
OK, one last kick. So, using val = unicode(value) self._slaveMap[attr].setPayload(value.encode("UTF-16")) I can stick normal strings in happily. Of course, as you mentioned, Kent, this leaves me vulnerable if the string differs to sys.getdefaultencoding(). Other than directly from the user, the

Re: [Tutor] Struct and UTF-16

2005-10-03 Thread Kent Johnson
Liam Clarke wrote: > Basically, I have data which is coming straight from struct.unpack() > and it's an UTF-16 string, and I'm just trying to get my head around > dealing with the data coming in from struct, and putting my data out > through struct. > > It doesn't help overly that struct considers

Re: [Tutor] Finding libraries

2005-10-03 Thread Liam Clarke
Hi Olly, I'd recommend http://www.python.org/pypi and http://www.vex.net/parnassus/ Regards, Liam Clarke On 10/3/05, Oliver Maunder <[EMAIL PROTECTED]> wrote: > Hi all > > I'm pretty new to Python - I've worked through Dive Into Python, but not > done a lot else. One thing I have realised is t

Re: [Tutor] Struct and UTF-16

2005-10-03 Thread Liam Clarke
Hi, If I can just beat this horse one more time, can I just get confirmation that I'm going about this the right way? I have a base object, which reads the unicode string as bytes like so, this ignores all but important bits. class Mhod: def __init__(self, f): self.payload = struct.u

[Tutor] Finding libraries

2005-10-03 Thread Oliver Maunder
Hi all I'm pretty new to Python - I've worked through Dive Into Python, but not done a lot else. One thing I have realised is that pretty much whatever you want to do in Python, someone else has already done it and stuck it in a library. My question is, how do you find these libraries. Here's an

Re: [Tutor] Struct and UTF-16

2005-10-03 Thread Liam Clarke
Thanks Kent, My first time dealing with Python and unicode vs 'normal' strings, I do look forward to Python 3.0... at the moment I'm just trying to understand how to use UTF-16. Basically, I have data which is coming straight from struct.unpack() and it's an UTF-16 string, and I'm just trying to