Discussion:
[BitPim-devel] getting started question
Sandy Patterson
2007-08-13 20:56:51 UTC
Permalink
Hi,

I'm interesting in helping to add support for my samsung m500 phone.
I'm having a little trouble getting started however.

I followed the directions in dev-doc/phonespec.html, but got confused
To make your phone appear in the list of supported phones edit guiwidgets.py. Find the
ConfigDialog class (~ln 340) and add your new phone to the list, the second field in the list
is the filename of the new file you just created without the extension.
I added the two files (com_samsungsphm500.py and p_samsungsphm500.p
and changed the model names in the files), generated the third for the
phone, then I couldn't figure out what to do about the above line, so
I went into __init__.py and created an entry for the phone there. This
added the phone to the list in the settings dialog, but I get an
exception when it tries load the module.
import phones.com_samsungsphm500
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\home\aiv\phonestuff\bitpim\src\phones\com_samsungsphm500.py",
line 30, in <module>
class Phone(com_samsungsphm500.Phone):
NameError: name 'com_samsungsphm500' is not defined


Is there someplace I need to define this? am I missing something? is
the how-to file out of date? I feel like I'm doing something stupid.
I'm afraid I'm new to python :( but know other languages.

Thanks,
Sandy
Nathan Hjelm
2007-08-13 21:10:49 UTC
Permalink
It looks to me like your Phone class is inheriting from itself which is a problem. Your phone module should inherit from com_phone.Phone or the module for a phone that is similar to yours. Welcome to python hell ;)

As for adding the phone, __init__.py is the proper file to add the phone to.

-Nathan
Post by Sandy Patterson
Hi,
I'm interesting in helping to add support for my samsung m500 phone.
I'm having a little trouble getting started however.
I followed the directions in dev-doc/phonespec.html, but got confused
To make your phone appear in the list of supported phones edit guiwidgets.py. Find the
ConfigDialog class (~ln 340) and add your new phone to the list, the second field in the list
is the filename of the new file you just created without the extension.
I added the two files (com_samsungsphm500.py and p_samsungsphm500.p
and changed the model names in the files), generated the third for the
phone, then I couldn't figure out what to do about the above line, so
I went into __init__.py and created an entry for the phone there. This
added the phone to the list in the settings dialog, but I get an
exception when it tries load the module.
import phones.com_samsungsphm500
File "<input>", line 1, in <module>
File "C:\home\aiv\phonestuff\bitpim\src\phones\com_samsungsphm500.py",
line 30, in <module>
NameError: name 'com_samsungsphm500' is not defined
Is there someplace I need to define this? am I missing something? is
the how-to file out of date? I feel like I'm doing something stupid.
I'm afraid I'm new to python :( but know other languages.
Thanks,
Sandy
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
BitPim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Sandy Patterson
2007-08-13 21:21:44 UTC
Permalink
Great thanks, I had mistaken the inherited phone for the phone i was
replacing in the file.

Sandy
Post by Nathan Hjelm
It looks to me like your Phone class is inheriting from itself which is a problem. Your phone module should inherit from com_phone.Phone or the module for a phone that is similar to yours. Welcome to python hell ;)
As for adding the phone, __init__.py is the proper file to add the phone to.
-Nathan
Post by Sandy Patterson
Hi,
I'm interesting in helping to add support for my samsung m500 phone.
I'm having a little trouble getting started however.
I followed the directions in dev-doc/phonespec.html, but got confused
To make your phone appear in the list of supported phones edit guiwidgets.py. Find the
ConfigDialog class (~ln 340) and add your new phone to the list, the second field in the list
is the filename of the new file you just created without the extension.
I added the two files (com_samsungsphm500.py and p_samsungsphm500.p
and changed the model names in the files), generated the third for the
phone, then I couldn't figure out what to do about the above line, so
I went into __init__.py and created an entry for the phone there. This
added the phone to the list in the settings dialog, but I get an
exception when it tries load the module.
import phones.com_samsungsphm500
File "<input>", line 1, in <module>
File "C:\home\aiv\phonestuff\bitpim\src\phones\com_samsungsphm500.py",
line 30, in <module>
NameError: name 'com_samsungsphm500' is not defined
Is there someplace I need to define this? am I missing something? is
the how-to file out of date? I feel like I'm doing something stupid.
I'm afraid I'm new to python :( but know other languages.
Thanks,
Sandy
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
BitPim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
BitPim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Joe Pham
2007-08-15 00:13:03 UTC
Permalink
Post by Sandy Patterson
I followed the directions in dev-doc/phonespec.html, but got
The doc is outdated. I'll update it in the next release. Thanks for pointing it out.

-Joe Pham




_____________________________________________________________________
Send your friends personalized video messages!
Sign up for a FREE NetZero account and start sending Video Mail today!
http://track.netzero.net/s/lc?u=http://account.netzero.net/s/cart?action=addToCart%26offerId=freeVideo%26sep=ssc%26group=freeVideo%26mailType=video%26refcd=NZEML0707VDO
Loading...