*** dcmwai has quit IRC
*** lxf has joined #gnuenterprise
*** konijn has joined #gnuenterprise
<konijn> hello al
<konijn> I have unicode problems
<konijn> and absolutely no clue how to fix them :(
<konijn> anyone has some experience with that ?
*** lxf has quit IRC
*** _florin_ has joined #gnuenterprise
<_florin_> good morning
<konijn> good morning
*** dcmwai has joined #gnuenterprise
*** holycow has joined #gnuenterprise
*** lxf has joined #gnuenterprise
*** wayneg has quit IRC
*** konijn has quit IRC
*** gsoti_away has left #gnuenterprise
*** wayneg has joined #gnuenterprise
*** bddebian has joined #gnuenterprise
*** _florin_ has quit IRC
*** lekma has joined #gnuenterprise
<lekma> hello
<bddebian> Hello
*** _florin_ has joined #gnuenterprise
*** wayneg has quit IRC
*** dcmwai has quit IRC
*** wayneg has joined #gnuenterprise
*** jbailey has joined #gnuenterprise
*** lekma has quit IRC
<_florin_> does anybody know if it's possible to start iterating through a python-list with a random item (for example the 5th, instead of the 1st?)
<jbailey> Umm.  I thought I had done that one point.  The only thing that comes to mind is the foo[:5] notation.
<_florin_> where foo is the list, right?
<jbailey> Yeah.
<_florin_> thanks
<_florin_> :-)
*** jamest has joined #gnuenterprise
*** johnf has joined #gnuenterprise
<johnf> HI all
<_florin_> hi johnf
*** sjc has joined #gnuenterprise
<johnf> OK now that I have found IRC and it's wonders - is there a good place for a python newbie to ask questions via IRC?
<jbailey> johnf: Mmm.  irc's not usually the best for pure newbie questions, since people will usually tell you to read the docs first.
<jbailey> johnf: If you join #python, there's some links to some FAQs.
<jbailey> johnf: The docs on the python site are very good once you figure out which ones you should looka t.
<johnf> A little background:  I have read two books on python and have a few questions.  Maybe it's better to say I don't get the big picture.
<johnf> I.e.  In the books the connect to the DB is close() after every execute().  Is this because it best pactice to close() or because the examples was small?
<johnf> BTW I'm asking here because I intend to use the gnue framework.
<johnf> It's also because I want to understand how gnue does it and why?
<_florin_> i can't tell you about python, but i used to not close the connection back then, when i wrote c++ mysql apps...
<jbailey> johnf: In my web-based apps I never close the connection. =)
<johnf> That's what I thought - open the connection and then keep it open - right?
<_florin_> and i think gnue doesn't either (somebody correct me if i'm wrong, please :-) see gnue-designer for example: it will ask you for a password only the first time
<_florin_> so i suspect it only opens the connection, but never closes it/closes on exit...
<johnf> OK that makes sense to me - the over head of opening the connect is only one time.
<johnf> BTW I'm coming from a visual foxpro background - where I never had to worry about a connection (open or closed)
<johnf> OK let's say I have the connect open and my program crashs.  What happens to the connection.  Will the DB timeout or something?
<jbailey> TCP reset or socket reset will let the server know.  Don't worry about it - it'll take care of itself.
<johnf> Very cool!
<johnf> OK neither of the books discussed printing.  So is printing considered not part python (part of the OS)?
<_florin_> printing on unix systems is mostly reduced to ouput to a suitable format (PostScript or PDF)
<johnf> OK is there a module out there that assist in printing?
*** btami has joined #gnuenterprise
<_florin_> i don't know. you might want to try and search for a PS or PDF module.
<_florin_> and then you can use the os module to call the printing application (like exec("lpr document.ps"))
<johnf> I just checked google and discovered that wxpython has printing routines.  Of course that's beyond me at the moment but I bet that's what gnue is using (since it uses wxpython)
<_florin_> i don't know the internals of gnue well enough to answer that... but i think the report generator does the main part of printing. it might have nothing to do with wxPython... what i imagine is that gnue instead creates a document, and the user gets to print that one however he feels like...
<jamest> we don't use wxpython for printing
<jbailey> gnue isn't ties to wxpython.
<jbailey> Ignore me, listen to james.  He's the God On Duty right now.
<jamest> gnue doesn't tie itself to anything  widget specific 
<jbailey> (forms, anyway)
<jamest> gnue reports outputs a raw xml stream which is sends thru various filters
<chillywilly> hi ppl
<jamest> those filters output things like HTML, pdf, ps, or whatever you want
<jamest> but you're not required to use that 
<johnf> Oh maybe I'm mistaken - does not gnue use wxpthon for forms?
<jamest> that is one of the UI drivers forms supports
<jbailey> jamest: If you're willing to write the driver, it'll tattoo the output on Derek's ass.
<jamest> it also has a QT driver, a gtk2 driver, native win32 driver
<jbailey> I've been considering raising the money to fund that.
<chillywilly> ummm
<jbailey> Convincing the device to go and find Derek has been a bit of a technical challenge.
<jamest> jbailey: but who in their right mind would want to check the output?
<jbailey> jamest: That's why it needs funding. =)
<jbailey> jamest: I think I can find volunteers for the rest of it. =)
<johnf> The tattoo driver or Derek
<jbailey> johnf: *exactly*
*** johnf has quit IRC
<btami> hi all
<jamest> hi
<btami> jamest: can you try tis rpm http://www.gnuenterprise.org/~btami/GNUe-Common-0.5.4.99-1.noarch.rpm
<btami> it was produced with common's setup.py bdist_rpm after
<btami> fixing some issues in it
<btami> but i have no rpm based distros around
<jamest> yeah
<jamest> i'll have to reboot
<jamest> bbiab
<btami> cool
*** jamest has left #gnuenterprise
*** jamest has joined #gnuenterprise
<jamest> btami, what was the url again
<jamest> my download is corrupted
<btami> http://www.gnuenterprise.org/~btami/GNUe-Common-0.5.4.99-1.noarch.rpm
*** johnf has joined #gnuenterprise
<johnf> Lost my internet connection - who knows why?
<johnf> So If someone answered by question the GUI lib could they repeat. 
<jamest> btami, installed
<jamest> fedora core 1
<jamest> but.....
<johnf> So If someone answered by question the on GUI lib could they repeat. 
<jamest> it put in /usr/lib/python2.3/site-packages/gnue.pth
<jamest> and core 1 seems to have python2.2 instead
<btami> ah
<jamest> not sure how a person would ever get that one ironed out as I imagine depending upon the distro it could be various pythons
<jamest> is that all you needed?
<btami> yes
<btami> thanks
<jamest> np
<jamest> back to debian!
<jamest> :)
*** jamest has quit IRC
<johnf> Isn't there a way to determine the name of the python directory?
<johnf> If gnue can use different GUI lib's how do I know which lib it is using?  I.e. I just used it under SUSE 9.0 (after all the help of course).
<btami> the default is wx, you can set it in gnue.conf
<btami> or use -u wx/gtk2/win32
*** jamest has joined #gnuenterprise
<johnf> Thanks for the info - I understand.
<jamest> i should spend more time not in debian testing gnue 
<btami> jamest: the .deb files contains python23/site-packages too
<btami> i have no 2.2 on my distro
<btami> so when it builds rpm's if finds 2.3 
<jamest> if it's a setup build then nothing would stop me from building python2.2 debs 
<jamest> er
<jamest> rpms
<jamest> on one of the other distros
<btami> ah, ok
<jamest> i plan to test more on the other distros anyway but have had too much going on to do more than get the basics running
<johnf> Somebody remind me where gnue.conf is located
<jamest> /usr/local/gnue/etc
<btami> jamest: i'v just find that distutils can produce rpm format too, so i'v played with it a bit
<johnf> Thanks I got it = "default gui =wx" with other available.  
<btami> i will consult with reinhard later abut my patches to our setup system
<jamest> i haven't been following the patches
<jamest> had a shitload of work dumped on me last week
<btami> not committed yet
<johnf> So for cross platform stuff I have to set the default right?  Or does gnue see the platform and picks the default?
<jamest> johnf: you have to set it, btami builds the windows exes to use the win32 driver by default though I think
<jamest> btami is the gnue windows god
<btami> yes
<btami> no!!!
<btami> :9
<btami> :)
<jamest> without him i doubt we'd be anywhere near as functional as we are on win32
<jamest> :)
<johnf> Thanks! download a different version - I should have realized!!!
<btami> bbl
*** btami has quit IRC
<johnf> Still learning much and reading.  Just picked up python cook book.  But I hope it's not long when I'll be able to help.  bye all and thanks!!!!!!!!!1
*** johnf has quit IRC
*** konijn has joined #gnuenterprise
*** jbailey has quit IRC
<konijn> did anyone see my mail on the [GNUe] list about my unicode problem ?
*** siesel has joined #gnuenterprise
<chillywilly> jan!
<siesel> hi Daniel :)
<chillywilly> howdy
<siesel> btw. do you know a good presentation about GPG?
<chillywilly> ummm
<chillywilly> what do you mean?
<chillywilly> a good paper on GPG?
*** btami has joined #gnuenterprise
*** konijn has quit IRC
<_florin_> is there a gnue-forms god around who can tell me sth about the "inner loop"?
<siesel> cw: something to present GPG in 3-4 slides for non-tekies
<siesel> _florin_ what do you mean with "inner loop"?
*** siesel_ has joined #gnuenterprise
<_florin_> ahm... inner loop: the loop that kinda looks like: while true: getUiEvent() processUiEvent()
*** SachaS has joined #gnuenterprise
<siesel> IMHO there is no gnue-forms inner loop
<SachaS> hi siesel :)
<SachaS> how are you?
<siesel> there is only a main loop of the UI driver (like wx,gtk2..)
<siesel> Hi SachaS, I'm fine
<_florin_> siesel: there's always an inner loop, somewhere :-) but it might well be that gnue-forms uses the underlying UI-engine's inner loop...
<siesel> yes, that's what I wanted to say.
<siesel> Although gnue-forms has an event system, it doesn't have its own inner loop, as it uses the UI systems inner loop
<_florin_> i think i just found it: seems like the UIdriver.py files have it (and call GF<toolkit>App.py's MainLoop...
<siesel> and this is calling the UI mainloop
<siesel> have a look at: gnue-forms/src/uidrivers/gtk2/GFApp.py
<_florin_> what i'm trying to find out is whether there is something like an "idle event" in curses.
<_florin_> wx and qt have it, and i assume gtk has it too.
*** jbailey has joined #gnuenterprise
<siesel> _florin_ I'm not quite shure what kind of idle event you mean. How do you want to use it?
<siesel> Hi jbailey
<jbailey> Heya siesel
<_florin_> siesel: an "idle event" is an event generated by the UI subsystem whenever the main event loop is not busy (i.e. the user is not doing anything).
<_florin_> it can mostly be turned on/off some way or another, and can have several faces (Qt for example implements this facility in form of Timers with a NULL-timeout value)
<_florin_> the purpose of the event is to allow sb to do heavy computations while still keeping a snappy UI :-)
<siesel> I don't know if curses has something like this. But you can implement something like this with another thread
<_florin_> yes, but threading raises a handfull of problems related to synchronisation...
<siesel> :)
<siesel> For what do you need it?
<_florin_> it's for my tree.
<_florin_> i split the load-function (that's the function that populates the tree)
<_florin_> so that it has one init-part, one cleanup/cancel-part, and more load-parts.
<_florin_> so populating a tree node would be like: init load load load finish
<siesel> you speak of gnue-forms, curses version?
<_florin_> where each 'load' call happens in an idle event, and would be cheap enough for the UI not to freeze...
<_florin_> yes.
<siesel> ok, because gnue-forms startup time is too long, you want to split it up
<_florin_> yes, that's what i had in mind...
<_florin_> and i also have some triggers that can be used from .gfd in order to post-process the tree items (like adding/building averages over several columns) which might take longer... :-)
*** SachaS has quit IRC
<siesel> after looking at ncurses manpages, I think that curses probably has no mainloop
<siesel> so it could be in gnue-common/src/cursing :)
<siesel> _florin_: the inner loop you are searching is in: gnue-common/src/cursing/ScreenContainer.py
<siesel> Function Run.py
<_florin_> that sounds good. looks like they have there almost everything... expecially that Run()-function :-)
<_florin_> ok
<_florin_> all i need to know is that it's there :-)
<_florin_> i'll have to talk to jamest or other of the forms-gods about whether they would want to make IdleEvents available in gnue-forms
<_florin_> or whether i'll have to just use it for my tree (i.e. hide it from the rest of gnue-forms by catching idle events directly in the tree UI obj)
<siesel> _florin_: having a IDLE event trigger would be nice IMHO
<siesel> but spliting up the preprocessing of the GFD-file tree, seem a very big job to me. 
<_florin_> i think you got me wrong :-)
<_florin_> i don't want to split the preprocessing of the entire tree.
<_florin_> i just want now and then to be able to sign up for IDLE time and do my computations there.
<siesel> ok, sorry for misunderstanding
<_florin_> the GFD-file preprocessing would go on just like it does now. but instead
<_florin_> of calling proc_whatever() from within initialize() function of my object
<_florin_> i'd call proc_lightweight_whatever() from initialize(), which would just sign me up for idle-event
<_florin_> and do the actual processing after the GFD-tree has been build, the UI has been shown, things started rolling... :-)
<siesel> ok, got it.
<siesel> Seems to be a nice feature
<_florin_> there might be a lot of ways around it, but... somehow i happen to be the only person in the world who can't live without it :-)
<siesel> what time intensive stuff do you want to compute?
<_florin_> i have a block-representing widget (Tree) which uses several queries to populate itself.
<_florin_> right now it takes 1-2 seconds to build, and i have like... 20 items in 3 tables...
<_florin_> or maybe just 0.5-1 seconds...
<_florin_> but i expect the data amount to drastically increase (maybe sth like 10k entries?) which would definitely be too slow.
<siesel> ok, seems like there is no way around an IDLE function
<_florin_> well, in my case the way around it would be a different application design... :-)
<_florin_> (i.e. one without a tree with 10k items :-)
<siesel> yeah, what application are you writing?
<_florin_> ATM i'm just playing around with gnue... might become some useful mini-erp sometime (next year? :-)
<_florin_> the goal is a piece of management software for fincances/production/customers for my uncle's business in romania.
<siesel> cool. 
<btami> hi siesel, _florin_
<_florin_> that's why i wanted to have that tree -- i imagined it would be a great way to give a quick overview over the financial situation of the whole company
<_florin_> hi btami
<siesel> hi btami
<btami> siesel: have you seen the latest classrepository.gfd in appserver samples?
<siesel> so your tree is doing aggregation of values?
<_florin_> what is aggregation of values?
<siesel> btami: haven't looked at it yet?
<siesel> btami: /?/./
<btami> there is a multi line field for procedures, but it, hmm...
<btami> what do you think about your Component widget 
<btami> is it able to handle som scintilla 
<btami> like in designer for editing triggers
<siesel> scintilla would be another kind of widget, but we could use f.e. gedit or the like
<siesel> _florin_: aggregation = building sums. like total income per day, per month, per year ...
<_florin_> yes and no. the tree object itself doesn't, but it has calls a trigger every time the children of a given node have changed (for example on 'reload').
<_florin_> so the form designer can implement code for appropriate.. aggregation :-)
<_florin_> (will have to split that trigger in a way i can take advantage of IdleEvents, though :-)
<siesel> this aggregation stuff is the basic feature of datawarehouses. 
<_florin_> so how would i implement it, if not with a custom trigger?
*** btami has quit IRC
<ajmitch> hi all
<ajmitch> siesel!
* ajmitch spots a jbailey in the house
<siesel> hi ajmitch
<siesel> _florin_: in the normal case you do, some basic aggregation every night
<siesel> in a cron job f.e.
*** johnf has joined #gnuenterprise
<_florin_> siesel: but that's not a widget's job, is it? some external application would do this...
<siesel> yes. that's my understanding
<siesel> but the whole stuff is quite difficult, as some calculations should be done at once.
<siesel> because you can't calculate everything, just the most important parts.
<_florin_> yes you're right...
<_florin_> the most difficult part would probably be gather all the numbers from different tables...
<siesel> just one tip: look at datawarehouse tools, and then you can define what you need.
<_florin_> some sort of caching of the aggregated values (i.e. the TreeWidget talks back to the DB) would be nice...
<_florin_> datawarehouse tools?
<siesel> yes, I don't know free software ones, but datawarehouse tools do the aggregation (how much money income per month)
<siesel> and the drill down: how much sales per month by employee Y
<siesel> nevertheless, I'll need some sleep now. G'd night y all.
*** siesel has quit IRC
<_florin_> g night siesel
<_florin_> np
<_florin_> good night everybody
<jamest> nite
*** _florin_ has quit IRC
*** johnf has quit IRC
*** jbailey has quit IRC
*** holycow has quit IRC
*** holycow has joined #gnuenterprise
*** holycow has quit IRC
*** sjc has quit IRC
*** dcmwai has joined #gnuenterprise
*** dcmwai has quit IRC
*** dneighbo_ has joined #gnuenterprise
*** dneighbo has quit IRC
*** jamest has quit IRC
*** Amorphous has joined #gnuenterprise
*** Morphous has quit IRC
*** Vee2d2 has quit IRC
*** Vee2d2 has joined #gnuenterprise
*** bddebian has quit IRC
