Re: Using logging module to log into flash drive

2009-06-10 Thread Krzysztof Retel
On Jun 9, 7:57 pm, Carl Banks wrote: > On Jun 9, 8:57 am, kretel wrote: > > > > > Hi All, > > > I am trying to implement the following functionality: > > 1. log messages to the flash drive > > 2. if the flash drive is not available, switch handler to the > > BufferringHandler and log into buffer,

Re: Using logging module to log into flash drive

2009-06-09 Thread Krzysztof Retel
> > Anyway there's a TimedRotatingFileHandler handler in the logging package: > > you can derive from it and change the emit/doRollover pair to hold the > > records > > until a device is not ready. > > Hm, that might be the way to go. Will have a try. I had another look at the logging package. Th

Re: Using logging module to log into flash drive

2009-06-09 Thread Krzysztof Retel
On Jun 9, 6:10 pm, "A. Cavallo" wrote: > Hi, > the problem screams for a separate thread. I was thinking about that, as mentioned in the first post. Although, I was wonder if there is another way to tackle the problem. > Anyway there's a TimedRotatingFileHandler handler in the logging package:

Re: TracShell 0.1 released

2009-02-12 Thread Krzysztof Retel
On 12 Feb, 14:06, J Kenneth King wrote: > I tend to work a lot with Trac for project management and have always > found the browser interface to be a productivity killer. I always > wanted a simple command-line interface to Trac, but having never found > one I found a little free time and got off

Re: ANN: Python 2.6 Quick Reference available

2009-02-12 Thread Krzysztof Retel
On Feb 12, 12:54 am, pyt...@bdurham.com wrote: > Richard, > > An excellent tool. Great job!!! > > Thank you for sharing this with the Python community. > > Regards, > Malcolm Many thanks Richard and Josh. I've just started my adventure with Python, and this document will help me a lot. Cheers, K

Network packets processor advice

2009-02-09 Thread Krzysztof Retel
Hi, I am wrting a network packet processor. The processor listens on a specific port for incomming UDP or TCP packets. When the packet arrives it has to parse it, store in DB and if this succeed it has to acknowledge the packet to the client. Now the problem is that I want to have a control over p

Re: Skipping bytes while reading a binary file?

2009-02-06 Thread Krzysztof Retel
On Feb 5, 11:51 pm, Lionel wrote: > On Feb 5, 3:35 pm, Lionel wrote: > > > > > On Feb 5, 2:56 pm, Lionel wrote: > > > > On Feb 5, 2:48 pm, MRAB wrote: > > > > > Lionel wrote: > > > > >  > Hello, > > > >  > I have data stored in binary files. Some of these files are > > > >  > huge...upwards of

Re: Problem with writing fast UDP server

2008-11-25 Thread Krzysztof Retel
On Nov 21, 6:55 pm, Greg Copeland <[EMAIL PROTECTED]> wrote: > On Nov 21, 11:05 am, Krzysztof Retel <[EMAIL PROTECTED]> > wrote: > > > > > On Nov 21, 4:48 pm, Peter Pearson <[EMAIL PROTECTED]> wrote: > > > > On Fri, 21 Nov 2008 08:14:19 -0800

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 4:48 pm, Peter Pearson <[EMAIL PROTECTED]> wrote: > On Fri, 21 Nov 2008 08:14:19 -0800 (PST), Krzysztof Retel wrote: > > I am not sure what do you mean by CPU-bound? How can I find out if I > > run it on CPU-bound? > > CPU-bound is the state in which pe

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 5:49 am, Greg Copeland <[EMAIL PROTECTED]> wrote: > On Nov 20, 9:03 am, Krzysztof Retel <[EMAIL PROTECTED]> > wrote: > > > > > Hi guys, > > > I am struggling writing fast UDP server. It has to handle around 1 > > UDP packets per s

Re: Problem with writing fast UDP server

2008-11-21 Thread Krzysztof Retel
On Nov 21, 3:52 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > >Start the server before the client. > > If you want to try this program out on POSIX, make sure you change the > time.clock() calls to time.time() calls instead, otherwise the results > aren't very meaningful. > > I gave this a

Re: Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
On Nov 20, 4:00 pm, [EMAIL PROTECTED] wrote: > On 20 Nov, 16:03, Krzysztof Retel <[EMAIL PROTECTED]> > wrote: > > > > > Hi guys, > > > I am struggling writing fast UDP server. It has to handle around 1 > > UDP packets per second. I started building tha

Re: Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
On Nov 20, 3:34 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Krzysztof Retel <[EMAIL PROTECTED]> writes: > > But the server only handles 700 -- 870 packets, when it is non- > > blocking, and only 670 – 700 received with blocking sockets. > > What are your other t

Problem with writing fast UDP server

2008-11-20 Thread Krzysztof Retel
Hi guys, I am struggling writing fast UDP server. It has to handle around 1 UDP packets per second. I started building that with non blocking socket and threads. Unfortunately my approach does not work at all. I wrote a simple case test: client and server. The client sends 2200 packets within