Re: Printing plain text with exact positioning on Windows

2010-01-06 Thread KvS
On Jan 5, 7:16 pm, Nobody wrote: > On Tue, 05 Jan 2010 04:40:14 -0800, KvS wrote: > >> Did you mean borderless printing? > >> Every printer needs his margins, some more some less. Some printers have > >> the > >> ability to do borderless printing but usualy

Re: Printing plain text with exact positioning on Windows

2010-01-05 Thread KvS
On Jan 5, 12:56 pm, Chris Gonnerman wrote: > KvS wrote: > > ... can I adjust the options normally appearing in > > the Printing Dialog through Python? > > Yes, if you use my method or my module, as I gave in my previous post.   > If you use Adobe Reader to print, I'm

Re: Printing plain text with exact positioning on Windows

2010-01-05 Thread KvS
On Jan 5, 12:56 pm, Chris Gonnerman wrote: > KvS wrote: > > ... can I adjust the options normally appearing in > > the Printing Dialog through Python? > > Yes, if you use my method or my module, as I gave in my previous post.   > If you use Adobe Reader to print, I'm

Re: Printing plain text with exact positioning on Windows

2010-01-05 Thread KvS
On Jan 5, 12:56 pm, Chris Gonnerman wrote: > KvS wrote: > > ... can I adjust the options normally appearing in > > the Printing Dialog through Python? > > Yes, if you use my method or my module, as I gave in my previous post.   > If you use Adobe Reader to print, I'm

Re: Printing plain text with exact positioning on Windows

2010-01-05 Thread KvS
On Jan 5, 9:21 am, "alejandro" wrote: > Did you mean borderless printing? > Every printer needs his margins, some more some less. Some printers have the > ability to do borderless printing but usualy they can do it only on special > or photo paper. So you can adjust the pdf as you wish, even with

Re: Printing plain text with exact positioning on Windows

2010-01-04 Thread KvS
ariables instead the absolute positioning.. > > i think that reportlab has some methods that alow you to position > text/photos from the left top corner instead the normal positioning. > > Don't know if I helped you in any way... > > Good luck! > > "KvS" wrote

Re: Printing plain text with exact positioning on Windows

2010-01-04 Thread KvS
On Jan 4, 11:58 pm, "alejandro" wrote: > I think the easyest way for printing text is with ReportLab. Just few lines > of code and you have a nice pdf... Ok, thanks. In that scenario I would also need to be able to programatically adjust the printing margins in Acrobat reader, i.e. automate it to

Printing plain text with exact positioning on Windows

2010-01-04 Thread KvS
cured that I wasn't able to solve so far (seemingly random crashes, probably due to an update to IE 8, I've posted about this problem before: http://groups.google.com/group/comp.lang.python/browse_thread/thread/3922fdfa4db31ffe/ba8dc24c2b85252c?lnk=gst&q=KvS#ba8dc24c2b85252c but unfor

win32com calling IE: OLE error 0x800704a6

2009-11-26 Thread KvS
Dear all, I have written a Python script that runs on Windows XP with Python 2.5 and uses Internet Explorer to 'pretty print' some HTML output. This has been working perfectly fine for a few years until recently IE was upgraded to version 8. Now occasionally Python throws an error that originates

Replacement in unicodestrings?

2008-10-04 Thread KvS
Dear all, could somebody please just put an end to the unicode mysery I'm in, men... The situation is that I have a Tkinter program that let's the user enter data in some Entries and this data needs to be transformed to the encoding compatible with an .rtf-file. In fact I only need to do some of t

Re: Short questions wrt Python & Unicode

2006-06-09 Thread KvS
John Machin wrote: > On 9/06/2006 10:04 PM, KvS wrote: > > > 2) How do I get a representation of a unic. object in terms of Unicode > > code points? repr() doesn't do that, it sometimes parses or encodes the > > code points right: > > > >|>>> s

Short questions wrt Python & Unicode

2006-06-09 Thread KvS
Hi all, I've been reading about unicode in general and using it in Python in particular lately as this turns out to be not so straightforward actually. I wanted to aks two questions: 1) I'm writing a program that interacts with the user through wxPython (unicode build) and stores & retrieves data

wxPython: changing entries of a HtmlListBox

2006-05-24 Thread KvS
Hi all, a question wrt renewing the entries in a wx.HtmlListBox, I don't understand how to do it. I have some global variable containing a list: gl_NAWList=["Bet","Dik"] then I create a subclass of wx.HtmlListBox as described in the wxPython demo: class MyHtmlListBox(wx.HtmlListBox): d

Re: Beautiful parse joy - Oh what fun

2006-05-17 Thread KvS
Maybe a more robust approach is just to walk through the string counting the (increments) of the number of brackets "<" and ">" as you know that all the relevant text occurs right after a ">" has occured that sets your counter to 0 (meaning you're at the "highest level"). There's no relevant text i

Re: Thanks from the Java Developer

2006-04-19 Thread KvS
Well then I'll also take the opportunity to put in my 2 cts. In the past I've tried several times to master Java as I at that time understood it to be *the* hype wrt programming but never really succeeded in getting beyond "Hello world" :D. Also got bored with all the technicalities pretty much eac

Re: Call for a cooperation

2005-12-06 Thread KvS
Hi Nico, as a Dutch PhD researcher in maths also (although the field is financ. maths & the place Frankfurt am Main at the moment) I feel obliged to answer ;). Had a quick look at your page and it seems all pretty straightforward, at least at first sight. And as Jeremiah pointed out, Python is eas

Re: sending all key events to wx.panel?

2005-11-25 Thread KvS
I've tried, by setting self.Bind(wx.EVT_CHAR, self.handleKeybEv, self) in the top level frame, but still this only works if the panel has focus and not if e.g. a button on the panel has focus while a key is pressed... In the meantime I found this: "In some cases, it might be desired by the prog

sending all key events to wx.panel?

2005-11-24 Thread KvS
Hi all, I have a wxPython GUI consisting of a wxWindow -> wxPanel -> set of widgets. I need to catch pressed keys no matter which widget has focus, so I've attached an event handler to the panel but I can't seem to find a way to do some kind of collective "sending through" of the key event from al

Re: Confused about namespaces

2005-11-19 Thread KvS
Thanks a lot for all the answers. After rereading everything said here today it's become more clear to me what you guys are telling me and I'll actively try to forget about "from ... import *" ;). -- http://mail.python.org/mailman/listinfo/python-list

Re: Confused about namespaces

2005-11-18 Thread KvS
> There's no reason not to just "import wx" if you want that. Yes, that's clear. But if you would make some huge application that has a large number of nested modules, each importing the former one, then avoiding the use of "from ... import *" would mean that you have to use long references like f

Re: Confused about namespaces

2005-11-18 Thread KvS
Hmm. But actually I was doing this import from GUIclasses with exactly this in mind, namely that it would make wx also available at top level. I (in my naive understanding) see this as "natural" and actually desirable, how could this cause confusing bugs? Do you mean multiple "from ... import *"'s

Re: Confused about namespaces

2005-11-18 Thread KvS
Ok, makes sense but didn't seem "natural" to me, although it is an obvious consequence of what you just pointed out, namely that modules are evaluated in their own namespace, something to keep in mind... On the other hand it does apparently work recursively "the other way around" since I didn't exp

Confused about namespaces

2005-11-18 Thread KvS
Hi all, to start with, excuse me, I'm still learning programming alltogether, probably I'm making some fundamental mistake here... I have the files settings.py, GUIclasses.py and main.py in the same directory. In the file main.py are the statements: import settings from GUIclasses import * clas

Re: wxPython: updating style of StaticText from event generated by button

2005-11-02 Thread KvS
> I would suggest you to take a look to the wxPython "custom" buttons; you can > find them in the demo, under "Custom Controls" ==> "GenericButtons". There > you will find "old style" buttons, that can be simple buttons or toggle > buttons (with "up" and "down" states). I have XP, and they look li

Re: wxPython: updating style of StaticText from event generated by button

2005-11-01 Thread KvS
Thanks :), I'll give both of your hints a try. What I basically want to do is have something like an "old style" button in win xp that's either "up" or "down", since I couldn't find a more straightforward method I thought taking a text widget and adjusting the border at mouse click would be the bes

wxPython: updating style of StaticText from event generated by button

2005-11-01 Thread KvS
Hi all, I'm pretty new to (wx)Python so plz. don't shoot me if I've missed something obvious ;). I have a panel inside a frame, on which a Button and a StaticText is placed: self.panel = wx.Panel(self,-1) self.button = wx.Button(self.panel,-1,"Klikkerdeklik") self.button.SetPosition((200,40)) sel