pydc-devel Mailing List for pyDC
Status: Beta
Brought to you by:
aborder
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Anakim B. <ab...@us...> - 2004-03-15 14:07:05
|
> http://pydc.sourceforge.net/pydc/rc2.html Typo. The correct address is: http://pydc.sourceforge.net/rc2.html -- Anakim Border ab...@us... http://pydc.sourceforge.net |
From: Anakim B. <ab...@us...> - 2004-03-15 14:01:17
|
In the last two weeks I've made a number of changes to pyDC sources. Here's the list: pyDClib/AsyncSocket.py: added unrecv() method; pyDClib/AsyncSocket.py: added getsockname() method; pyDClib/AsyncSocket.py: some speed optimizations; pyDClib/AsyncSocket.py: use lambda function to avoid memory leak; pyDClib/bloom.py: initial import; pyDClib/Channel.py: added ChannelEventListener; pyDClib/Channel.py: added onChannelClosed event notification; pyDClib/DCChannel.py: avoid loosing commands when changing handler (call sock.unrecv()); pyDClib/DCChannel.py: replaced deprecated apply(); pyDClib/DCChannel.py: some speed optimizations; pyDClib/DCChannel.py: new calling scheme for command handlers; pyDClib/DCDownload.py: support for segmented zlib-compressed downloads; pyDClib/DCDownload.py: support for new removeSource() signature; pyDClib/DCFileList.py: no longer needed; pyDClib/DCHub.py: match new DCLocalList interface; pyDClib/DCHub.py: avoid memory leaks by using class.method instead of self.method references; pyDClib/DCHub.py: better PM parsing; pyDClib/DCHub.py: fixed registerListener signature; pyDClib/DCHub.py: cleanup of socket event handlers; pyDClib/DCHubEventListener.py: now subclass of ChannelEventListener; pyDClib/DCItem.py: __slots__ to reduce memory consumption; pyDClib/DCLocalList.py: full rewrite; pyDClib/DCLocalList.py: Bloom filter support; pyDClib/DCLocalListWriter.py: match DCLocalList changes; pyDClib/DCQueue.py: new addItem() signature; pyDClib/DCQueue.py: upper limit to the number of queue items processed by single poll() calls; pyDClib/DCQueueItem.py: full rewrite; pyDClib/DCQueueItem.py: new removeSource() signature; pyDClib/DCSearchResult.py: __slots__ to reduce memory consumption; pyDClib/DCSettings.py: moved default values to class constants; pyDClib/DCUpload.py: support for segmented zlib-compressed uploads; pyDClib/DCUpload.py: avoid memory leaks by using class.method instead of self.method references; pyDClib/DCUser.py: __slots__ to reduce memory consumption; pyDClib/DCUserList.py: DCUserList is no longer a Job; pyDClib/DCUserList.py: removeSource() dequeues item; pyDClib/DCUserList.py: moved UserDir and UserFile from DCFileList.py; pyDClib/DCUserList.py: delete downloaded list after parsing; pyDClib/DCUserList.py: new removeSource() signature; pyDClib/DCWorker.py: call DCLocalList.freeze(); pyDClib/DCWorker.py: experimental IP change detection; pyDClib/DCXfer.py: support for segmented zlib-compressed xfers; pyDClib/DCXfer.py: avoid memory leaks by using class.method instead of self.method references; pyDClib/DCXferWorker.py: xferBandwidth() returns 0 to signal unlimited bandwidth; pyDClib/DNS.py: improved /etc/resolve.conf parsing; pyDClib/DNS.py: avoid memory leak by using lambda functions; ChatViewer.py: multirow message support; FileListViewer.py: removed DCFileList references; FileListViewer.py: support for delayed queue refresh; HubViewer.py: added 'Copy nick' and 'Remove user from queue' commands; HubViewer.py: support for multirow messages; HubViewer.py: match DCUserList changes; HubViewer.py: sendMsg displays error messages in main chat view; HubsPanel.py: listen for Channel events; HubsPanel.py: handle onChannelClosed instead of onHubDisconnection; HubsPanel.py: bugfix: call deregisterListener() to free resources; MainWnd.py: bugfix: searchChat is no longer messing with viewer stack; MainWnd.py: removed DCFileList references; MainWnd.py: added enableQueueRefresh() method; MultirowMessage.py: initial import; QueuePanel.py: match DCQueueItem changes; QueuePanel.py: identify user lists by user nick; QueuePanel.py: experimental support for delayed refresh; SearchesPanel.py: call deregisterListener() to free resources; SearchViewer.py: match DCUserList changes; Settings.py: use default values from DCSettings; XfersPanel.py: 3:2 ratio for downloads/uploads lists; XfersPanel.py: added popup menu; XfersPanel.py: '*' to signal zlib-compressed xfers; XfersPanel.py: '!' to signal multi-source downloads; pydc.py: catch all queue errors; pydc.py: clear clipboard on exit to avoid segfaults; pydc.py: don't try to save malformed settings; ------------------- pyDC now supports the 'GetZBlock' protocol extension, thus allowing segmented zlib-compressed file transfers. To get the most, I rewrote the queue item manager from scratch. The new code is able to deal with segments of variable size and to rearrange them on the fly; each segment is independent from the others and that means that pyDC can download a single item from multiple sources at once. Since most hub owners forbid multidownloads, the feature is disabled by default: if you are allowed to and want to try it out, simply enter the following command in the Python interpreter: DCQueue.MAX_CONCURRENT_DOWNLOADS=5 You may change the value depending on your needs, but keep it low (since your bandwidth is limited, setting it to 8 or to 100 yields no difference; in fact bigger values also means bigger overhead, so 100 may even be *worse* than 8). Resetting MAX_CONCURRENT_DOWNLOADS to 1 will disable multidownloads (0 will stop downloads at all :-) ). The GUI has been updated to inform you about the extrension: a '*' mark before the filename in the Xfers panel means that the xfer is using the zlib compression; a '!' means that the download refers to part of a multidownloaded item. The other important area I've been working on is the search engine (the piece of code handling search request from other peers to you). Believe it or not, this is the place where pyDC spends most of its time; it is crucial to make "local" searches as fast as possibile. The old code seemed fast; it was also severely bugged (it never returned results to queries containing more than one search term). As a first task I wrote a new generic search engine; by replacing objects with tuples and by using a smarter algorithm, I was able to make the new code twice as fast. Then I moved to size-constrained searches (you know: at least 1MB / at most 1GB); measurements showed me that around 85% of all searches fall into this category. One can exploit that constraints to avoid filename pattern searches (slow) on files outside size limits; that reduces the search space and, hopefully, makes the search engine faster. The algorithm I used is the following: when the file list is initially created, maximum and minimum file size are noted. At that point all files are placed into one of two big lists, depending on their size: [ all files with size below (max-min)/2 + min, all files above ] The process continues by splitting each of those two lists in the same way; at the end all files will be grouped into classes having a fixed size range. When a search request with size constraints comes in, the search engine finds the first class matching the limits; only at that poing filename pattern search starts. The last improvement is also the biggest. It is based on the genial idea that goes under the name of "Bloom filter". I won't cover the details here, since a number of guides on the subject already exist on the web (google is your friend) and since the implementation is straightforward (take a look at pyDClib/bloom.py). As a last note I'd like to give you an idea of the impact of the optimizations. On my Athlon 1800 server, having 293 indexed files, the percentage of CPU usage by pyDC as reported by top before the changes was fluctuating around 15%; now it's around 0.7%. As always you can get all the changes using CVS or you may download the packages from: http://pydc.sourceforge.net/pydc/rc2.html -- Anakim Border ab...@us... http://pydc.sourceforge.net |
From: Anakim B. <ab...@us...> - 2004-02-25 10:38:33
|
pyDClib/DCDownload.py: use new DCQueueItemSource.getPath format; pyDClib/DCHub.py: raise ValueError when sending PM to unknown user; pyDClib/DCLocalListWriter.py: static methods; pyDClib/DCLocalListWriter.py: bz2 compression support; pyDClib/DCLocalListWriter.py: new cleanup() function; pyDClib/DCQueueItem.py: new DCQueueItemSource.getPath prototype; pyDClib/DCUpload.py: support for bz2 lists; pyDClib/DCUserList.py: support for bz2 lists; pyDClib/DCSettings.py: bugfix: accept favorite with None nick and password; pyDClib/DCWorker.py: bugfix: send MyInfo on refresh settings; pyDClib/DCWorker.py: use DCLocalList.cleanup(); pyDClib/DCWorker.py: new FILELIST_{HE3,BZ2} symbols; pyDClib/DCXfer.py: proper support for protocol extensions; ChatViewer.py: new timestamp format ('[stamp]') for better readability; ChatViewer.py: disable away mode when sending message; ChatViewer.py: different colors for incoming and outcoming messages; HubViewer.py: new timestamp format ('[stamp]') for better readability; HubViewer.py: chat textbox must be init differently when using GTK and Windows; HubViewer.py: another scroll fix; HubViewer.py: catch ValueError raised by DCHub.sendMsg(); HublistPanel.py: bugfix: addFavorite call; HublistPanel.py: bugfix: GetNextItem call with named args; MainWnd.py: added safeMode machinery; QueuePanel.py: ask confirmation before removing item if in safeMode Util.py: added boolFilter method; XfersPanel.py: ask confirmation before stopping xfer if in safeMode; pydc.py: bugfix: set showTimestamp on first run; pydc.py: safeMode support. ----------------- In a few hours I'll update RC1 packages. Bye -- Anakim Border ab...@us... http://pydc.sourceforge.net |
From: Anakim B. <ab...@us...> - 2004-02-20 21:16:24
|
pyDClib/DCSettings.py: added custom properties support; ChatViewer.py: bugfix: removed 'time' parameter from various functions; ChatViewer.py: bugfix: added parent constructor to ChatViewerInfo; ChatViewer.py: using custom properties; HubsPanel.py: message text is now in row[2]; HubViewer.py: using custom properties; MainWnd.py: set showTimestamps value inside setupViewer(); MainWnd.py: added 'Away' menu; MainWnd.py: using custom properties; QueuePanel.py: ask to delete incomplete items when dequeuing; pydc.py: setup custom properties; pydc.py: code cleanup. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2004-02-18 22:32:18
|
pyDClib/DCFileList.py: added userNick property; pyDClib/DCHub.py: added timestamps to log rows; pyDClib/DCHub.py: log invalid messages to chat; pyDClib/DCQueueItem.py: fixed variable name; ChatViewer.py: added timestamp support; FileListViewer.py: fixed alternate source loop; HubViewer.py: added timestamp support; MainWnd.py: added timestamp support. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2004-02-17 20:43:02
|
pyDClib/he3/Makefile: cleanup; pyDClib/DCHub.py: handle $HubName after login phase; pyDClib/DCLocalList.py: keep track of scanned paths; pyDClib/DCSettings.py: added isValid() member; pyDClib/DCWorker.py: added PYDCLIB_DCPP_VERSION symbol; pyDClib/DCWorker.py: refreshSettings will rebuild local file list only when really needed; pyDClib/DCWorker.py: save valid settings only; HubViewer.py: fixed chat text initial scrolling problem; MainWnd.py: fixed addFavorite call; Settings.py: detect socket errors; pydc.py: load settings only once; pydc.py: code cleanup; pydc.py: fixed import paths order. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2004-02-15 11:44:49
|
pyDClib/DCLocalList.py: keep track of scanned paths; pyDClib/DCWorker.py: added PYDCLIB_DCPP_VERSION symbol; pyDClib/DCWorker.py: refreshSettings will rebuild local file list only when really needed; MainWnd.py: fixed addFavorite call. I've updated the rc1 packages to match these changes. I've also added a webpage with links: http://pydc.sourceforge.net/rc1.html Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2004-02-10 22:13:02
|
pyDClib/he3/he3.py: code cleanup; pyDClib/AsyncSocket.py: code cleanup; pyDClib/Channel.py: unicode support; pyDClib/DCChannel.py: code cleanup; pyDClib/DCChannel.py: flushCmd replaced by onDisconnection handler; pyDClib/DCDownload.py: remove source on command error; pyDClib/DCHub.py: cache password; pyDClib/DCHub.py: block duplicate password requests; pyDClib/DCHub.py: specify nick when starting DCXfers; pyDClib/DCHub.py: nick and password as constructor args; pyDClib/DCHub.py: call DCChannel.onDisconnection; pyDClib/DCHublistRetriever.py: handle empty lists; pyDClib/DCSettings.py: support for nick and password in favorites; pyDClib/DCSettings.py: nick length limit set to 32 chars; pyDClib/DCWorker.py: use PYDCLIB_ID and PYDCLIB_VERSION symbols when building description tags; pyDClib/DCWorker.py: support different nicks on different hubs; pyDClib/DCXfer.py: support for multiple nicks; ChatViewer.py: get user nick from hub object, not from settings; Favorite.py: initial import; Favorite.py: set initial autoconnect value; HubViewer.py: another attempt to fix user list sync; HubViewer.py: clearAll is called through a wxPython event; HubViewer.py: faster sorting algorithm; HubViewer.py: fixed race condition; HubViewer.py: (re)inserted user deletion code lost in last commit; HublistPanel.py: new layout; HublistPanel.py: validateFavorite requires 3 args; JobViewer.py: notify viewer closure before Yielding; JobViewer.py: catch PyAssertionError raise by nested Yield() calls; MainWnd.py: bugfix: added self.viewer == viewer check in two event handlers; MainWnd.py: support for automatic favorite hub authentication; MainWnd.py: added JobInfos.remove(); MainWnd.py: center settings dialog before display; pydc.py: added missing DCWorker.stop() call; pydc.py: updated version banner; pydc.py: added "#!/usr/bin/env python"; pydc.py: commented out debug code; pydc.py: call wnd.Close() instead of returning False from OnInit(); pydc.py: center settings dialog before showing it. ---------------------- Since pyDC seems quite stable, I've prepared some packages (release candidate 1). Here's the list: http://pydc.sf.net/pydc-0.7-rc1-win.zip http://pydc.sf.net/pydc-0.7-rc1-linux.tar.bz2 http://pydc.sf.net/pydc-0.7-rc1-src.zip http://pydc.sf.net/pydc-0.7-rc1-src.tar.bz2 The first two are binary packages: this means they contain everything needed to run pyDC, including the Python interpreter. If you try them, please let me know what happens. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2004-01-11 13:06:28
|
pyDClib/AsyncSocket.py: added missing Job import statement; pyDClib/DCChannel.py: recvCommand renamed recvCmd for consistency; pyDClib/DCChannel.py: bugfix: do not ignore KeyErrors raised by command handlers; pyDClib/DCChannel.py: flush command queue on exceptions; pyDClib/DCHub.py: LogedIn requires 1 parameter; pyDClib/DCHub.py: added consistency check inside LogedIn handler; pyDClib/DCHub.py: do not reconnect if we detect a password error; pyDClib/DCXferWorker.py: ignore exceptions raised by listeners; ChatViewer.py: don't send away message to ourselves; HubViewer.py: experimental code probably fixing userlist out-of-sync bug. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Luca M. <cb...@in...> - 2004-01-11 12:49:58
|
Anakim Border wrote: : Ciao e Buon anno ! Le ultime modifiche mi danno questo errore... [tlu@localhost pydc]$ python pydc.py Gdk-WARNING **: locale not supported by C library Traceback (most recent call last): File "pydc.py", line 14, in ? from MainWnd import * File "/u2/svil/python/pyDC/pydc/MainWnd.py", line 7, in ? from Settings import * File "/u2/svil/python/pyDC/pydc/Settings.py", line 12, in ? import DCWorker File "pyDClib/DCWorker.py", line 16, in ? from DCHub import * File "pyDClib/DCHub.py", line 12, in ? from DCChannel import * File "pyDClib/DCChannel.py", line 6, in ? from Channel import * File "pyDClib/Channel.py", line 6, in ? from AsyncSocket import * File "pyDClib/AsyncSocket.py", line 13, in ? class AsyncSocket(object, Job): NameError: name 'Job' is not defined Ho iniziato ad usare python al lavoro, questo mi permettera' di poterti dare una mano in seguito. luca |
From: Anakim B. <ab...@us...> - 2004-01-08 22:20:59
|
pyDClib/AsyncSocket.py: more informative DNS error messages pyDClib/DCHub.py: update info after logout pyDClib/DCHub.py: more informative socket error messages pyDClib/DCHublistRetriever.py: support for bz2-compressed lists pyDClib/DCQueue.py: addQueueItem() accepts a 'priority' flag pyDClib/DCQueue.py: avoid alternate source search for corrupted items pyDClib/DCQueueItem.py: detect possible item corruption pyDClib/DCUserList.py: use high priority queueing pyDClib/DCWorker.py: signal upload banwidth limit via description tags pyDClib/DCWorker.py: getLocalList() is now thread safe pyDClib/DCXfer.py: minimal extended protocol support (makes happy many bots) pyDClib/DCXfer.py: code cleanup pyDClib/DNS.py: major rewrite; better error recovery using secondary nameservers pyDClib/EventGenerator.py: use weakrefs to keep track of listeners pyDClib/win32dns.py: many big fixes pyDClib/win32dns.py: code cleanup ChatViewer.py: support for away mode HubViewer.py: fixed scrolling problems for Windows systems HubViewer.py: fixed command processing MainWnd.py: set focus to viewer when activating it MainWnd.py: support for away messages QueuePanel.py: status description table no longer needed SearchViewer.py: setup combo box default value Settings.py: accept bz2-compressed hublists Settings.py: added various default values Settings.py: bugfix: ip field must be enabled only if 'ForceIP' is true Settings.py: refresh worker settings only when needed XfersPanel.py: handle gracefully xfers with null item XfersPanel.py: code cleanup pydc.py: fix import path pydc.py: handle IP detection failure pyDC.sh: removed pyDC.bat: removed -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2003-12-13 14:24:56
|
I finally found some time to start describing pyDC internals :-) As I said before, don't exitate to tell me if you find something unclear. ------------------------------------------------------------------ As I've already mentioned, pyDC is composed of three parts: * pyDClib; * cli; * gui. In this message I'll talk about the first one. ==> pyDClib <== pyDClib is a standalone library providing an API to access the Direct Connect P2P network. It's not meant to be directly used by the end user; scripters, on the other side, can access it to extend pyDC. - Low level job model The greatest part of networking apps that has been written use one of the following approaches when dealing with sockets: 1) use asynchronous sockets, calling select() or poll() to sleep 'till there's something to read or write; 2) use blocking sockets, creating as many threads as needed to handle open streams. pyDClib uses neither of them. The first solution is perfectly suited to stateless protocols such as HTTP: each request-reply sequence is completely independent of other ones and it only lasts a few seconds; the goal here is to serve content as soon as a request arrives (low delay). pyDClib deals with a completely different model: connection lifetimes are measured in hours (possibly days) and the priority goes to throughput (downloads/uploads) and conservative CPU usage (hubs commands). There's no point in processing hub messages conveying user state info as soon as they arrive; a much more efficient solution is to buffer them and to go through an entire buch in a single run. Approach 2, though probably the easiest to code, has its own drawbacks. As the number of threads increases, the system spends more and more time bookkeeping; published tests show that once you reach a certain number of threads, the net effect of adding a new one is not to increase, but to reduce the total throughput! pyDClib uses state machines to mimic threads without paying their full cost. To understand what I mean, start by taking a look at Job.py. As you may notice the file define a single interface (the class Job provides no implementation); "real" jobs subclass it. Now suppose you want to implement a Job whose only task is to send data through an open socket. A naive implementation is the following: class EasyJob(Job): def __init__(self, source, sock): self.source = source self.sock = sock #store for later usage def poll(self): data = self.source.read(1024) if len(data) == 0: return True self.sock.send(data) return False The key point here is the following: every time poll() is called, it executes part of the task the class has been written to achieve. Since poll() will be called many times, its execution time can be reduced to a fraction of a second (by subdividing the job in small parts). Now take take a pool of jobs and call their poll() methods in sequence (as JobPool [JobPools.py] does) and you'll get something similar to a multithreaded program (in fact this *is* non-preemptive multithreading, the one win 3.x used). And now some details: - poll returns True when it has nothing more to do; this way JobPools can detect completed jobs and remove them from their internal list; - JobPools are used in a single place: inside DCWorker [DCWorker.py]. When DCWorker.start() is called a new thread is created (the only "real" one) and DCWorker.run() is executed. From that point on pyDClib lives inside a loop, alternating job execution [line 98 and following] and sleep [line 101]; - Jobs must implement other 2 methods: isAlive() and stop() (doing obvious things). Please note that after you call stop() you still need to call poll() 'till it returns True; this way Jobs can complete their cleanups. ------------------------------------------------------------------ Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2003-12-09 13:28:00
|
pyDClib/he3/Makefile: better cleanup; pyDClib/DCHub.py: support for registered users; pyDClib/DCHub.py: send search requests only after login; pyDClib/DCHub.py: support for size-limited searches; pyDClib/DCHub.py: mark users as zombies on disconnection; pyDClib/DCQueue.py: send item requests after lock has been released; pyDClib/DCQueue.py: code cleanup; pyDClib/DCQueueItem.py: bugfix: getPattern() method always returning None; pyDClib/DCSearch.py: added getSizeLimit() method; pyDClib/DCSearch.py: code cleanup; pyDClib/DCSourceSearch.py: using size-limited searches; pyDClib/DCWorker.py: support for registered users; ChatViewer.py: removed some init code & viewerHide() method (new JobViewer paradigm); ChatViewer.py: simplified ChatViewerInfo class (new JobViewerInfo paradigm); EmptyViewer.py: removed viewerHide() method (new JobViewer paradigm); FileListViewer.py: removed some init code & viewerHide() method (new JobViewer paradigm); FileListViewer.py: simplified FileListViewerInfo class (new JobViewerInfo paradigm); FileListViewer.py: bugfix: import basename() from Util, not from os.path FileListViewer.py: case-insensitive pattern search; HubViewer.py: removed some init code & viewerHide() method (new JobViewer paradigm); HubViewer.py: password request moved to HubsPanel; HubViewer.py: code cleanup; HubsPanel.py: password request moved from HubViewer; HubsPanel.py: list hubs establishing a new connection; JobViewer.py: removed viewerHide() method; JobViewerInfo.py: added viewer member and getViewer() method; MainWnd.py: hide viewers instead of destroying them (faster switch); SearchViewer.py: removed some init code & viewerHide() method (new JobViewer paradigm); SearchViewer.py: simplified SearchViewerInfo class (new JobViewerInfo paradigm); SearchViewer.py: added GUI elements to impose size limits; Settings.py: bugfix: member name is slotNum, not slots. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2003-12-04 08:21:11
|
Before we start looking at the code, some auxiliary informations. First of all the Direct Connect protocol. You can find a document describing it at: http://www.1stleg.com/1stleg/Download/Documents/DCProtocol/Introduction.html To be sincere, the current protocol is somewhat confused. A problem, for example, is the fact that field separator isn't always the same (sometimes is '$', sometimes '$ $' or even '\5'). Having noted the limitations of current specs, the community of DC software writers has started discussing new ones. We're still far from a complete replacement, still things are getting interesting ;-) And now back to pyDC. Here I've collected a list of all the things that I'd like to implement / fix before the release of version 0.7: * DNS: the code can parse an arbitrary large number of DNS servers (from /etc/resolve.conf or from registry), still resolution only makes use of the first one. When pyDC fails resolving an address using server n in the list, it should switch to server n+1; * searches (a): users should be able to specify size limits (max and min size); * searches (b): when pyDC receives a search request from a remote client, it scans its local list for matches. The current algo is somewhat slow; since 80% of search requests have a size limit, a way to improve performances is to index local files by their size; * viewers: when switching from one hub viewer to the other, the replaced one is destroyed. If the user switches back, the viewer has to be rebuilt from scratch. This tends to be slow (expecially when the hub log contains 1000+ rows): a better approach would be that of avoiding destructions (using hide()/show() pairs instead); * Makefiles: the he3 codec, as you know, it's written with C++ and requires compilation: this can be done on *NIX systems using a Makefile. I went through extreme pain when trying do to the same for Windows, using VC++ nmake (it's flexible as a block of stone and, even worse, documentation is inexistent). I suspect Python' distutils module can be of help, still I don't know it well... That's all. Mike, do you think you can help me resolving any of this? Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2003-12-02 21:45:38
|
pyDClib/DCHub.py: accept whitespaces in nicknames; pyDClib/DCHub.py: improved MyINFO parsing; FileListViewer.py: added search mode; HubViewer.py: use showErrorMessage(); HublistPanel.py: use showErrorMessage(); MainWnd.py: use showErrorMessage(); QueuePanel.py: use showErrorMessage(); SearchViewer.py: use showErrorMessage(); Settings.py: Moved to the wx namespace; Settings.py: use showErrorMessage(); Util.py: added showErrorMessage() function; Util.py: removed deprecated functions; pydc.py: use showErrorMessage(). -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2003-12-01 17:31:18
|
> I tried to commit my changes using TortoiseCVS. Tortoise said it worked but I don't see my change on the CVS. What do you think? I can see your changes in the CVS repository :-) I think your problem is caused by the fact that you're still using the anonymous CVS access to update your local files, but the ssh-based one to commit changes. Please do a complete pyDC checkout in a new directory using the ssh access; that way the problem should disappear. (AFAIK SourceForge manages public and ssh access to CVS on two different systems that are synchronized only at fixed intervals: the public one is usually lagging behind the private). Please let me know. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Michael L. <mik...@ly...> - 2003-12-01 16:13:43
|
Hi, I tried to commit my changes using TortoiseCVS. Tortoise said it worked but I don't see my change on the CVS. What do you think? Mike From TortoiseCVS: In C:\Documents and Settings\mike\My Documents\sandbox: cvs commit -m "Check for DHCP Name Server in Registry" pydc/pyDClib/win32dns.py CVSROOT=:ext:mik...@cv...:/cvsroot/pydc Checking in pydc/pyDClib/win32dns.py; /cvsroot/pydc/pydc/pyDClib/win32dns.py,v <-- win32dns.py new revision: 1.3; previous revision: 1.2 done Success, CVS operation completed -- --------- Original Message --------- DATE: Sat, 29 Nov 2003 10:38:23 From: Anakim Border <ab...@us...> To: pyd...@li... Cc: >Mike, could you please test your account by committing the changes you've made >to the DNS code? > ____________________________________________________________ Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005 |
From: Anakim B. <ab...@us...> - 2003-11-30 21:14:12
|
> What about to make a global generic rountine/class ShowErrorMessage or similar ? Done; will update CVS asap. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2003-11-30 20:01:00
|
> When I start a new search pressing CTRL+S the focus is not anymore on the edit field > like the previous version. This has been solved in CVS. Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Luca M. <cb...@in...> - 2003-11-30 18:32:58
|
Hi! When I start a new search pressing CTRL+S the focus is not anymore on the edit field like the previous version. |
From: Luca M. <cb...@in...> - 2003-11-30 18:19:47
|
The error message when I try to download an item already queued is not modal against the main application window. Searching the source of the problem I've found 3 different ways to display an error message : 1) wx.MessageDialog 2) wxMessageDialog 3) dialog = wx.MessageDialog What about to make a global generic rountine/class ShowErrorMessage or similar ? egrep -ri MessageDialog * FileListViewer.py: wx.MessageDialog(self, 'Source is not matching.', 'Error', wx.ICON_ERROR).ShowModal() FileListViewer.py: wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR).ShowModal() FileListViewer.py: wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR).ShowModal() Binary file FileListViewer.pyc matches HubViewer.py: dialog = wx.MessageDialog(self, "Invalid private chat text.", "Error", wx.ICON_ERROR) HubViewer.py: dialog = wx.MessageDialog(self, "No user with that nick.", "Error", wx.ICON_ERROR) HubViewer.py: wx.MessageDialog(self, 'No such user.', 'Error', wx.ICON_ERROR).ShowModal() Binary file HubViewer.pyc matches HublistPanel.py: wx.MessageDialog(self, 'You must specify an address.', 'Address error', wx.OK | wx.ICON_ERROR).ShowModal() HublistPanel.py: wx.MessageDialog(self, 'Invalid address.', 'Address error', wx.OK | wx.ICON_ERROR).ShowModal() HublistPanel.py: wx.MessageDialog(self, 'Address already in favorite list.', 'Address error', wx.OK | wx.ICON_ERROR).ShowModal() Binary file HublistPanel.pyc matches MainWnd.py: wx.MessageDialog(self, 'Invalid hub address: \'%s\'.' % addr, 'Address error', wx.OK | wx.ICON_ERROR).ShowModal() Binary file MainWnd.pyc matches QueuePanel.py: dialog = wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR) Binary file QueuePanel.pyc matches SearchViewer.py: dialog = wx.MessageDialog(self, 'No pattern present.', 'Search error', wx.OK | wx.ICON_ERROR) SearchViewer.py: dialog = wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR) SearchViewer.py: wx.MessageDialog(self, 'No such user.', 'Error', wx.ICON_ERROR).ShowModal() SearchViewer.py: wx.MessageDialog(self, 'Source is not matching.', 'Error', wx.ICON_ERROR).ShowModal() SearchViewer.py: wx.MessageDialog(self, 'Item already queued.', 'Error', wx.ICON_ERROR).ShowModal() Binary file SearchViewer.pyc matches Settings.py: wxMessageDialog(self, 'Error: %s.' % str(e), 'Settings error', wxOK | wxICON_ERROR).ShowModal() Settings.py: wxMessageDialog(self, 'Error: %s.' % msg, 'List address error', wxOK | wxICON_ERROR).ShowModal() Settings.py: wxMessageDialog(self, 'Error: %s.' % msg, 'Share directory error', wxOK | wxICON_ERROR).ShowModal() Binary file Settings.pyc matches pydc.py: wx.MessageDialog(None, 'The file \'queue.pk\' is corrupted. Please remove it and restart pyDC.', 'Queue error', wx.OK | wx.ICON_ERROR).ShowModal() pydc.py: wx.MessageDialog(wnd, str(e), 'Configuration error', wxOK | wxICON_ERROR).ShowModal() pydc.py: wx.MessageDialog(wnd, msg, 'Socket error', wxOK | wxICON_ERROR).ShowModal() pydc.py: wx.MessageDialog(wnd, 'pyDC won\'t start if not properly configured.', 'Settings error', wx.OK | wx.ICON_ERROR).ShowModal() |
From: Luca M. <cb...@in...> - 2003-11-30 18:10:03
|
Anakim Border wrote: : > If I remember well Luca was working on a pure-Python he3 codec. I'd like to > add it to pyDC as a fallback option in case the C++ extension is missing. Can > I be of any help? : Hi! I've just on hold on this, playing with bits it's not that funny in python for me ;) I've collected a number of huffman python implementation but he3 it's more than that :( Right now I'm feeeling more like a beta tester than a developer due to lack of time, sorry |
From: Anakim B. <ab...@us...> - 2003-11-29 09:37:55
|
I've been spending the last two days fighting with wxWindows. After many tests I've come to the conclusion that wxEvtHandler.AddPendingEvent() method is not working as described in the manual: it sometimes process the event immediately, thus causing pyDC to get trapped in a deadlock. The solution I've found consists in adding a pair of wxYield() calls at the beginning of viewer*** methods in JobViewer.py; this seems to force AddPendingEvent() to queue the event for later processing. Since the number of tests I've done on the new code is not that big, please let me know if you experience any pyDC freeze. And now something else. I've just updated your profiles on sf.net; as pyDC developers you should now have read & write access to CVS repository. Mike, could you please test your account by committing the changes you've made to the DNS code? If I remember well Luca was working on a pure-Python he3 codec. I'd like to add it to pyDC as a fallback option in case the C++ extension is missing. Can I be of any help? Bye -- Anakim Border ab...@us... http://pydc.sf.net |
From: Anakim B. <ab...@us...> - 2003-11-26 21:31:26
|
Welcome to pydc-devel. This mailing list will be used to discuss topics regarding pyDC source code. Right now there are two subscribers (not including me): Luca Montecchiani and Michael Lynch. The both of you expressed the desire to have more informations about pyDC internals; unfortunately right now there is no documentation. As a result, I intend to post here a number of messages explaining pyDC basic building blocks. I'll ask you to signal confused or uncomplete explanations; the same goes for design patterns you believe wrong or if you find something better to replace them. At the end we could collect the material and call it 'pyDC Developer's Manual'. That's the plan. Let me know what you think about it ;-) Bye -- Anakim Border ab...@us... http://pydc.sf.net |