Re: [concordance-devel] congruity (libconcord GUI) version 6 released

2008-04-13 Thread Phil Dibowitz
Stephen Warren wrote:
> Yes, ctypes became part of core Python in 2.5.
> 
> However, many distros package the ctypes module as part of their Python
> installation (or as an add-on) in older versions of Python too. For
> example, I think Fedora has had it for many releases (I did check some
> time, and convinced myself it'd been available for a while, but I forget
> how far back).

Ah. No, debian has a package for it.

Works like a charm now, assuming I use your updated version.

Sweet.
-- 
Phil Dibowitz [EMAIL PROTECTED]
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming




signature.asc
Description: OpenPGP digital signature
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] congruity (libconcord GUI) version 6 released

2008-04-13 Thread Stephen Warren
Phil Dibowitz wrote:
> Stephen Warren wrote:
>> Phil Dibowitz wrote:
>>> Stephen Warren wrote:
 Version 6 of congruity is released.

 congruity is a Python/wxPython-based GUI for libconcord. It is intended
 to handle downloads from the Harmony website, program the remote, and
 communicate results back to the website - i.e. provide an open-source
 replacement for the website interaction portion of the existing
 proprietary GUI application.
>>> I'm getting a syntax error - though I have made no attempt to debug it:
>>>
>>>   [EMAIL PROTECTED] congruity-6]$ congruity
>>> File "/usr/bin/congruity", line 58
>>>   finally:
>>> ^
>>>   SyntaxError: invalid syntax
>> Try the attached congruity script. I may have been relying on Python 2.5
>> syntax (I guess I should test with an older Python version sometime...)
> 
> No sir:
> 
> Traceback (most recent call last):
>   File "/usr/bin/congruity", line 6, in ?
> from ctypes import *
> ImportError: No module named ctypes

Yes, ctypes became part of core Python in 2.5.

However, many distros package the ctypes module as part of their Python
installation (or as an add-on) in older versions of Python too. For
example, I think Fedora has had it for many releases (I did check some
time, and convinced myself it'd been available for a while, but I forget
how far back).

I think you can get it here:
http://sourceforge.net/projects/ctypes/

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] congruity (libconcord GUI) version 6 released

2008-04-13 Thread Phil Dibowitz
Stephen Warren wrote:
> Phil Dibowitz wrote:
>> Stephen Warren wrote:
>>> Version 6 of congruity is released.
>>>
>>> congruity is a Python/wxPython-based GUI for libconcord. It is intended
>>> to handle downloads from the Harmony website, program the remote, and
>>> communicate results back to the website - i.e. provide an open-source
>>> replacement for the website interaction portion of the existing
>>> proprietary GUI application.
>> I'm getting a syntax error - though I have made no attempt to debug it:
>>
>>   [EMAIL PROTECTED] congruity-6]$ congruity
>> File "/usr/bin/congruity", line 58
>>   finally:
>> ^
>>   SyntaxError: invalid syntax
> 
> Try the attached congruity script. I may have been relying on Python 2.5
> syntax (I guess I should test with an older Python version sometime...)

No sir:

Traceback (most recent call last):
  File "/usr/bin/congruity", line 6, in ?
from ctypes import *
ImportError: No module named ctypes

BTW:
  python 2.4.4-6

-- 
Phil Dibowitz [EMAIL PROTECTED]
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming




signature.asc
Description: OpenPGP digital signature
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] congruity (libconcord GUI) version 6 released

2008-04-13 Thread Stephen Warren
Phil Dibowitz wrote:
> Stephen Warren wrote:
>> Version 6 of congruity is released.
>>
>> congruity is a Python/wxPython-based GUI for libconcord. It is intended
>> to handle downloads from the Harmony website, program the remote, and
>> communicate results back to the website - i.e. provide an open-source
>> replacement for the website interaction portion of the existing
>> proprietary GUI application.
> 
> I'm getting a syntax error - though I have made no attempt to debug it:
> 
>   [EMAIL PROTECTED] congruity-6]$ congruity
> File "/usr/bin/congruity", line 58
>   finally:
> ^
>   SyntaxError: invalid syntax

Try the attached congruity script. I may have been relying on Python 2.5
syntax (I guess I should test with an older Python version sometime...)
#!/usr/bin/python

# This code NOT copyright Stephen Warren <[EMAIL PROTECTED]>
# This code is released into the public domain.

from ctypes import *
import os
import os.path
import sys
import thread
import time
import traceback
import wx
import wx.lib.dialogs

import libconcord

version = "6+"

def program_callback_imp(count, current, total, cb_func):
if not cb_func:
return

try:
cb_func(False, (current * 100) / total)
except:
print
traceback.print_exc()

def exception_message():
msg = ''
if type(sys.exc_value) == libconcord.LibConcordException:
msg += sys.exc_value.result_str + '\n\n'
msg += traceback.format_exc()
return msg

def program(type, xml, xml_size, handler):
action_func = {
libconcord.LC_FILE_TYPE_CONNECTIVITY:  program_body_connectivity,
libconcord.LC_FILE_TYPE_CONFIGURATION: program_body_configuration,
libconcord.LC_FILE_TYPE_FIRMWARE:  program_body_firmware
}[type]

need_deinit = [False]

try:
try:
program_callback = libconcord.callback_type(program_callback_imp)

program_body_connect(program_callback, handler, need_deinit)
set_time = action_func(xml, xml_size, program_callback, handler)
need_deinit[0] = False
program_body_disconnect(program_callback, handler)
if set_time:
program_body_reconnect_set_time(program_callback, handler, 
need_deinit)
handler.on_final_status(True, '')
except:
handler.on_final_status(False, exception_message())
finally:
try:
if need_de_init[0]:
program_disconnect(handler)
except:
pass

def program_body_connect(program_callback, handler, need_deinit):
if handler:
handler.on_requesting_id(False, 0)

libconcord.init_concord()
need_deinit[0] = True

if handler:
handler_f = py_object(handler.on_requesting_id)
else:
handler_f = None
libconcord.get_identity(
program_callback,
handler_f
)
sys.stdout.flush()

if handler:
handler.on_requesting_id(True, 100)

def program_body_connectivity(xml, xml_size, program_callback, handler):
handler.on_web_notify_final(False, 0)
libconcord.post_connect_test_success(xml, xml_size)
handler.on_web_notify_final(True, 100)
return False

def program_body_configuration(xml, xml_size, program_callback, handler):
handler.on_web_notify_init(False, 0)
libconcord.post_preconfig(xml, xml_size)
handler.on_web_notify_init(True, 100)

handler.on_prepare(False, 0)

bin_data = POINTER(c_ubyte)()
bin_size = c_uint()
libconcord.find_config_binary(
xml,
xml_size,
byref(bin_data),
byref(bin_size)
)

handler.on_prepare(False, 50)
libconcord.invalidate_flash()
handler.on_prepare(True, 100)

handler.on_erasing_flash(False, 0)
libconcord.erase_config(
bin_size,
program_callback,
py_object(handler.on_erasing_flash)
)
handler.on_erasing_flash(True, 100)

handler.on_writing_config(False, 0)
libconcord.write_config_to_remote(
bin_data,
bin_size,
program_callback,
py_object(handler.on_writing_config)
)
handler.on_writing_config(True, 100)

handler.on_verifying_config(False, 0)
libconcord.verify_remote_config(
bin_data,
bin_size,
program_callback,
py_object(handler.on_verifying_config)
)
handler.on_verifying_config(True, 100)

handler.on_web_notify_final(False, 0)
libconcord.post_postconfig(xml, xml_size)
handler.on_web_notify_final(True, 100)

libconcord.reset_remote()

return True

def program_body_firmware(xml, xml_size, program_callback, handler):
handler.on_prepare(False, 0)

# is_fw_update_supported returns error code; 0 OK, otherwise failure
if not libconcord.is_fw_update_supported(0):
is_direct = False
elif not libconcord.is_fw_update_supported(1):
is_direct = True
else:
raise Exception('Firmware update not supported on this rem

Re: [concordance-devel] congruity (libconcord GUI) version 6 released

2008-04-13 Thread Phil Dibowitz
Phil Dibowitz wrote:
> Also, attached is a Makefile for ya.

That Makefile was a bit flawed. There one is better.

-- 
Phil Dibowitz [EMAIL PROTECTED]
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming

PREFIX?=/usr
BIN=bin
BINDIR=$(PREFIX)/$(BIN)
SHAREDIR=$(PREFIX)/share
INSTALL?=/usr/bin/install
STRIP?=/usr/bin/strip

all:
@echo "Nothing to build, run 'make install' as root"

install:
$(INSTALL) -D --mode=755 congruity $(BINDIR)/congruity
mkdir -p $(SHAREDIR)/congruity
$(INSTALL) -D --mode=644 *.png $(SHAREDIR)/congruity

uninstall:
/bin/rm -f $(BINDIR)/congruity
/bin/rm -rf $(SHAREDIR)/congruity



signature.asc
Description: OpenPGP digital signature
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] congruity (libconcord GUI) version 6 released

2008-04-13 Thread Phil Dibowitz
Stephen Warren wrote:
> Version 6 of congruity is released.
> 
> congruity is a Python/wxPython-based GUI for libconcord. It is intended
> to handle downloads from the Harmony website, program the remote, and
> communicate results back to the website - i.e. provide an open-source
> replacement for the website interaction portion of the existing
> proprietary GUI application.

I'm getting a syntax error - though I have made no attempt to debug it:

  [EMAIL PROTECTED] congruity-6]$ congruity
File "/usr/bin/congruity", line 58
  finally:
^
  SyntaxError: invalid syntax


Also, attached is a Makefile for ya.

-- 
Phil Dibowitz [EMAIL PROTECTED]
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming

PREFIX?=/usr
BIN=bin
BINDIR=$(PREFIX)/$(BIN)
SHAREDIR=$(PREFIX)/share
INSTALL?=/usr/bin/install
STRIP?=/usr/bin/strip

install:
$(INSTALL) -D --mode=755 congruity $(BINDIR)/congruity
mkdir -p $(SHAREDIR)
$(INSTALL) -D --mode=644 icon-complete.png icon-in-progress.png \
remote.png icon-failed.png icon-unstarted.png \
$(SHAREDIR)/congruity

uninstall:
/bin/rm -f $(BINDIR)/congruity
/bin/rm -rf $(SHAREDIR)/congruity



signature.asc
Description: OpenPGP digital signature
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


[concordance-devel] congruity (libconcord GUI) version 6 released

2008-04-13 Thread Stephen Warren
Version 6 of congruity is released.

congruity is a Python/wxPython-based GUI for libconcord. It is intended
to handle downloads from the Harmony website, program the remote, and
communicate results back to the website - i.e. provide an open-source
replacement for the website interaction portion of the existing
proprietary GUI application.

The download is available from:

http://www.wwwdotorg.org/downloads/congruity/congruity-6.tar.bz2

NOTE: This release of congruity depends on libconcord release 0.20.

The changes are as follows:

* 2008-04-13 Stephen Warren <[EMAIL PROTECTED]> - congruity-6
- Search for images in /usr/share/congruity, the source directory, then
  CWD. This should allow easy system-wide installation of congruity.
- libconcord.py is no longer distributed with congruity; it is now part
  of libconcord itself (see libconcord/bindings/python/).
- Apparently forgot to release LICENSE.txt before.

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


[concordance-devel] Version 0.20 Released!

2008-04-13 Thread Phil Dibowitz
Concordance 0.20 is officially released! It's a very major release for the
Concordance project! A slew of new features have been added including:
firmware updates on some remotes, significantly improved auto-detection
mode, support for more platforms, better handling of failure modes, better
windows build support, and better learn-IR support.

In addition, Concordance's core functionality is now contained in a shared
library called libconcord which has a documented API as well as perl and
python bindings. Several clients already exist.

Finally there have been a slew of bug fixes, documentation updates,
efficiency improvements and stability updates. We've moved to
autoconf/automake for consistency, have significant code cleanup, and more.

I'd like to thank all of the people who helped make this release possible,
as you can see from the Changelog, this release had a lot of contributors!
Thanks to you all!
-- 
Phil Dibowitz [EMAIL PROTECTED]
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming




signature.asc
Description: OpenPGP digital signature
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel


Re: [concordance-devel] Your remote failed the Connectivity Check

2008-04-13 Thread Phil Dibowitz
Bill LaGrue wrote:
> On Sat, 29 Mar 2008 15:06:51 -0700
> Phil Dibowitz <[EMAIL PROTECTED]> wrote:
> 
>> Phil Dibowitz wrote:
>>> So what I'll probably do is if we're arch 9, I'll pass a flag in
>>> that says "add CookieKeyVal"...
>> Bill,
>>
>> Please update to the latest CVS, and then apply the attached patch,
>> and let me know if things work for you.
>>
> Hi Phil
> Sorry I haven't got back sooner, things have been a tad hectic. I will
> sit down this weekend and try it out.

I went ahead and merged this. I'm pretty sure it'll work for you. 0.20 has
been released with this change, and I've closed the bug.

-- 
Phil Dibowitz [EMAIL PROTECTED]
Open Source software and tech docsInsanity Palace of Metallica
http://www.phildev.net/   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming




signature.asc
Description: OpenPGP digital signature
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel