*** dcmwai has quit IRC *** lxf has joined #gnuenterprise *** konijn has joined #gnuenterprise hello al I have unicode problems and absolutely no clue how to fix them :( anyone has some experience with that ? *** lxf has quit IRC *** _florin_ has joined #gnuenterprise <_florin_> good morning 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 hello 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?) 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? Yeah. <_florin_> thanks <_florin_> :-) *** jamest has joined #gnuenterprise *** johnf has joined #gnuenterprise HI all <_florin_> hi johnf *** sjc has joined #gnuenterprise 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? johnf: Mmm. irc's not usually the best for pure newbie questions, since people will usually tell you to read the docs first. johnf: If you join #python, there's some links to some FAQs. johnf: The docs on the python site are very good once you figure out which ones you should looka t. 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. 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? BTW I'm asking here because I intend to use the gnue framework. 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... johnf: In my web-based apps I never close the connection. =) 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... OK that makes sense to me - the over head of opening the connect is only one time. BTW I'm coming from a visual foxpro background - where I never had to worry about a connection (open or closed) OK let's say I have the connect open and my program crashs. What happens to the connection. Will the DB timeout or something? TCP reset or socket reset will let the server know. Don't worry about it - it'll take care of itself. Very cool! 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) 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")) 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... we don't use wxpython for printing gnue isn't ties to wxpython. Ignore me, listen to james. He's the God On Duty right now. gnue doesn't tie itself to anything widget specific (forms, anyway) gnue reports outputs a raw xml stream which is sends thru various filters hi ppl those filters output things like HTML, pdf, ps, or whatever you want but you're not required to use that Oh maybe I'm mistaken - does not gnue use wxpthon for forms? that is one of the UI drivers forms supports jamest: If you're willing to write the driver, it'll tattoo the output on Derek's ass. it also has a QT driver, a gtk2 driver, native win32 driver I've been considering raising the money to fund that. ummm Convincing the device to go and find Derek has been a bit of a technical challenge. jbailey: but who in their right mind would want to check the output? jamest: That's why it needs funding. =) jamest: I think I can find volunteers for the rest of it. =) The tattoo driver or Derek johnf: *exactly* *** johnf has quit IRC hi all hi jamest: can you try tis rpm http://www.gnuenterprise.org/~btami/GNUe-Common-0.5.4.99-1.noarch.rpm it was produced with common's setup.py bdist_rpm after fixing some issues in it but i have no rpm based distros around yeah i'll have to reboot bbiab cool *** jamest has left #gnuenterprise *** jamest has joined #gnuenterprise btami, what was the url again my download is corrupted http://www.gnuenterprise.org/~btami/GNUe-Common-0.5.4.99-1.noarch.rpm *** johnf has joined #gnuenterprise Lost my internet connection - who knows why? So If someone answered by question the GUI lib could they repeat. btami, installed fedora core 1 but..... So If someone answered by question the on GUI lib could they repeat. it put in /usr/lib/python2.3/site-packages/gnue.pth and core 1 seems to have python2.2 instead ah not sure how a person would ever get that one ironed out as I imagine depending upon the distro it could be various pythons is that all you needed? yes thanks np back to debian! :) *** jamest has quit IRC Isn't there a way to determine the name of the python directory? 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). the default is wx, you can set it in gnue.conf or use -u wx/gtk2/win32 *** jamest has joined #gnuenterprise Thanks for the info - I understand. i should spend more time not in debian testing gnue jamest: the .deb files contains python23/site-packages too i have no 2.2 on my distro so when it builds rpm's if finds 2.3 if it's a setup build then nothing would stop me from building python2.2 debs er rpms on one of the other distros ah, ok 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 Somebody remind me where gnue.conf is located /usr/local/gnue/etc jamest: i'v just find that distutils can produce rpm format too, so i'v played with it a bit Thanks I got it = "default gui =wx" with other available. i will consult with reinhard later abut my patches to our setup system i haven't been following the patches had a shitload of work dumped on me last week not committed yet So for cross platform stuff I have to set the default right? Or does gnue see the platform and picks the default? johnf: you have to set it, btami builds the windows exes to use the win32 driver by default though I think btami is the gnue windows god yes no!!! :9 :) without him i doubt we'd be anywhere near as functional as we are on win32 :) Thanks! download a different version - I should have realized!!! bbl *** btami has quit IRC 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 did anyone see my mail on the [GNUe] list about my unicode problem ? *** siesel has joined #gnuenterprise jan! hi Daniel :) howdy btw. do you know a good presentation about GPG? ummm what do you mean? 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"? cw: something to present GPG in 3-4 slides for non-tekies _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 IMHO there is no gnue-forms inner loop hi siesel :) how are you? there is only a main loop of the UI driver (like wx,gtk2..) 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... yes, that's what I wanted to say. 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 GFApp.py's MainLoop... and this is calling the UI mainloop 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 _florin_ I'm not quite shure what kind of idle event you mean. How do you want to use it? Hi 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 :-) 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... :) 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 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. 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 after looking at ncurses manpages, I think that curses probably has no mainloop so it could be in gnue-common/src/cursing :) _florin_: the inner loop you are searching is in: gnue-common/src/cursing/ScreenContainer.py 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) _florin_: having a IDLE event trigger would be nice IMHO 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. 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... :-) ok, got it. 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 :-) 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. 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 :-) 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. cool. 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 hi btami siesel: have you seen the latest classrepository.gfd in appserver samples? so your tree is doing aggregation of values? <_florin_> what is aggregation of values? btami: haven't looked at it yet? btami: /?/./ there is a multi line field for procedures, but it, hmm... what do you think about your Component widget is it able to handle som scintilla like in designer for editing triggers scintilla would be another kind of widget, but we could use f.e. gedit or the like _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 :-) 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 hi all siesel! * ajmitch spots a jbailey in the house hi ajmitch _florin_: in the normal case you do, some basic aggregation every night 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... yes. that's my understanding but the whole stuff is quite difficult, as some calculations should be done at once. 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... 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? yes, I don't know free software ones, but datawarehouse tools do the aggregation (how much money income per month) and the drill down: how much sales per month by employee Y 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 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