eclipse, pydev and wxpython - standard output redirection ?

2005-06-14 Thread Grzegorz
Hello, I'm using eclipse with pydev plugin, I'm working on a program using wxpython . When I'm executing that application standard error output does not show in eclipse console window - wxpython seems to redirect standard output to some another window , and closes that window immediately, so I

Re: eclipse, pydev and wxpython - standard output redirection ?

2005-06-15 Thread Grzegorz
Uzytkownik "Philippe C. Martin" <[EMAIL PROTECTED]> napisal w wiadomosci news:[EMAIL PROTECTED] > app = MyApp(False) > app.MainLoop() > > will keep wxWidgets from using its own window. > > that's it ! Thanks a lot :) -- http://mail.python.org/mailman/listinfo/python-list

Data mining/pattern recogniton software in Python?

2012-03-23 Thread Grzegorz Staniak
of 15 readings and ring a bell when the data in buffer form a specific pattern (a spike, a trough, whatever)? I'll be grateful for a push in the right direction. Thanks, GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: Data mining/pattern recogniton software in Python?

2012-03-23 Thread Grzegorz Staniak
g/ > [2] http://statsmodels.sourceforge.net/ > [3] http://docs.python.org/library/queue.html > [4] > http://www.laurentluce.com/posts/python-threads-synchronization-locks-rlocks-semaphores-conditions-events-and-queues/ Thanks for the suggestions. GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: random number

2012-03-26 Thread Grzegorz Staniak
t the OP requested, i.e. "6 digit random number *from a given number*"? That is, a random permutation of the set of its digits? GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Gotcha's?

2012-04-05 Thread Grzegorz Staniak
kes is to start playing with generating JSON without the use of specialized JSON libraries/functions. For testing, for fun, out of curiosity... GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Gotcha's?

2012-04-05 Thread Grzegorz Staniak
ocol specs and follow them. Sure, sure. But it still may raise a few eyebrows as people start to play along while still reading the spces. It's just not something that I'd expect (yes, I learnt Perl before I discovered Python). GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Gotcha's?

2012-04-06 Thread Grzegorz Staniak
s, but 'that' is 'that' like 'this'> ... with 'qq' providing the version with inerpolation. I could always find an arbitrary character for quoting that was _not_ present in the string, and so, most of the time, avoid quoting altogether. It was perhaps a bit too magical, but pruced very readable strings. GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Gotcha's?

2012-04-06 Thread Grzegorz Staniak
gt;> >> Yes, that's what you said already. My reasoning was in the part you stripped >> from my quote. *shrug* > > Multiple symmetric quote characters breaks one of python's own zen > rules: > > There should be one-- and preferably only one --obvious way t

Re: Framework for a beginner

2012-04-19 Thread Grzegorz Staniak
just don't work well with your neurons. And you may still call the former "my languages". GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Python and Lotus Notes

2005-11-02 Thread Grzegorz Ślusarek
Hello everyone. I have to get data from Lotus Notes and i curious is it possible doing it with Python. I heard that Lotus Notes using COM, so the Python does so maybe it can be done? Anyone have any experiences doing that? Ane help will by apreciated Gregor -- http://mail.python.org/mailman/lis

Re: Python and Lotus Notes

2005-11-02 Thread Grzegorz Ślusarek
thank you Graham Now I know how to get it thru And i have last question is it possible send mail from Lotus via Python/COM? Once Again Thanks -- http://mail.python.org/mailman/listinfo/python-list

Static freeze

2005-08-31 Thread Grzegorz Dostatni
option. I'm sure that in a day or two I can figure out the Makefile it generates and perhaps substitute the object files to create what I need, but I'm hoping there is someone out there who can help me (or at least save me a lot of time). Thanks a lot, Grzegorz -- http://mail.python.o

Python dtrace

2005-04-19 Thread Grzegorz Dostatni
I am wondering if there is anyone else as excited about Sun's dtrace as I am. Having seen it in action, and actually used it a couple of times I am really impressed. Still, this is not meant as an advert for Sun. I am considering doing some work at adding Dtrace probes into python. That would onl

Re: Python for Embedded Systems?

2006-07-14 Thread Grzegorz Makarewicz
Jack wrote: > Is there a Python packaging that is specifically for > embedded systems? ie, very small and configurable so the > user gets to select what modules to install? > > For Linux-based embedded systems in particular? > > I'm thinking of running it on the Linksys's Linux-based open > source

Re: 2.5 updates for syntax file

2006-09-26 Thread Grzegorz Makarewicz
r important things to add for highlight. >> > > Great :) > > - Two new built-in functions, any() and all() > - A new warning, UnicodeWarning > > Who is using FAR and isn't happy ? Grzegorz Makarewicz -- http://mail.python.org/mailman/listinfo/python-list

trying to get hash from os.urandom

2006-01-23 Thread Grzegorz Smith
Hi all I'm writing small python module which will be a password generator. I read that python can use system random generator on machine whit *nix os. So i start using os.urandom and when i generate random string i get something like this: urandom(8) -> '\xec2a\xe2\xe2\xeb_\n',"\x9f\\]'\xad|\xe6\x

decorator and function local variable

2006-02-20 Thread Grzegorz Smith
Hi all. I have got situation that I need make parameter injection into function and I want that parametet be a local variable of that function. eg. something like def decorator(): @decorator def myfun(): a = 20 and in myfun i can use b wariable like that: b = "ok it's working" I try to

CGI and Redirect

2006-02-21 Thread Grzegorz Ślusarek
Hi All. I need to redirect user in my CGI script, i Try to use prin "Location: "+url but this is not working. Can anyone tell me what I'm doing wrong? Any thanks will be apreciated Gregor -- http://mail.python.org/mailman/listinfo/python-list

how to write file with cp1250 encodings?

2006-02-26 Thread Grzegorz Smith
Hi all. I have got situation: i load data from database(MSSQL) wchich are encoded cp1250 and I fill template with that data (Cheetah Template), after all i want to save template to file on disk. I'm using newfile = open("template.html",w") newfile.write(str(template)) newfile.close() But data enco

Re: converting currency using locals

2007-04-18 Thread Grzegorz Ślusarek
Dnia Wed, 18 Apr 2007 19:38:26 +0100, Michael Hoffman napisał(a): > Grzegorz Ślusarek wrote: >> Hi all. I have situation that I have value that holds price and I must show >> this price using national specification(e.g. thousands_sep). Any idea how >> this can be done unde

A question on plugin design

2007-08-05 Thread Grzegorz Słodkowicz
I'm working on my little project (an IM client) which I wanted to support plugins. My idea was that the core program would by itself do virtually nothing but manage plugins and all functionality would be provided by the plugins themselves (including protocol handling and UI. My first attempt wa

Re: A question on plugin design

2007-08-08 Thread Grzegorz Słodkowicz
Very insightful, thank you for your replies. I was initially thinking it would be simpler to implement my own system but perhaps using a ready-made one will be more elegant and potential plugin makers would find it more familiar. Cheers, Greg. -- http://mail.python.org/mailman/listinfo/python-

Re: Puzzled by "is"

2007-08-09 Thread Grzegorz Słodkowicz
> > Why? Because. > > Seriously, it's just an optimization by the implementers. There is no > need for more than one empty tuple, since tuples can never be modified > once created. > > But they decided not to create (1, ) in advance. They probably knew that > hardly anybody would want to create

Re: So what exactly is a complex number?

2007-09-01 Thread Grzegorz Słodkowicz
> Here is a simple explanation (and it is not complete by a long shot). > > A number by itself is called a "scalar". For example, when I say, > "I have 23 apples", the "23" is a scalar that just represents an > amount in this case. > > One of the most common uses for Complex Numbers is in what ar

Re: So what exactly is a complex number?

2007-09-03 Thread Grzegorz Słodkowicz
> I was trying to motivate the idea by means of analogy. This is a > legitimate thing to do. It helps lead people to a conceptual > understanding long before they understand the minutae. You're mixing terms again. Analogy is saying 'something is like something else.' What you are saying is 'S

Re: So what exactly is a complex number?

2007-09-05 Thread Grzegorz Słodkowicz
>> In fact, a proper vector in physics has 4 features: point of >> application, magnitude, direction and sense. >> > > so whats the "point of application" of the sum of two vectors? Do > tell. I believe vectors can only be added if they have the same point of application. The result is then

Re: So what exactly is a complex number?

2007-09-06 Thread Grzegorz Słodkowicz
>> In fact, a proper vector in physics has 4 features: point of >> application, magnitude, direction and sense. >> > > No -- a vector has the properties "magnitude" and direction. > Although not everything that has magnitude and direction is a > vector. > > It's very unusual to have a fixed p

Re: So what exactly is a complex number?

2007-09-06 Thread Grzegorz Słodkowicz
Gabriel Genellina wrote: > En Wed, 05 Sep 2007 06:45:29 -0300, Grzegorz Słodkowicz <[EMAIL PROTECTED]> > escribi�: > > >> I believe vectors can only be added if they have the same point of >> application. The result is then applied to the same point. >>

[OT] Re: So what exactly is a complex number?

2007-09-09 Thread Grzegorz Słodkowicz
>> Interesting. It appears that we are ran into a mathematical >> cultural difference. Were I come from vectors *are* defined as >> having four properties that I enumerated. After some research I >> found that English sources (Wikipedia) indeed give the definition >> you supplied. >> > Indee

converting currency using locals

2007-04-18 Thread Grzegorz Ślusarek
Hi all. I have situation that I have value that holds price and I must show this price using national specification(e.g. thousands_sep). Any idea how this can be done under python 2.4.4? I saw that function format from module locals can format value with national specification, but this could be do

sgmlop - xmlrpclib - bang

2007-10-30 Thread Grzegorz Makarewicz
simple data for simple test - my version fails after 10 loops after removing sgmlop.pyd from DLLs - everything is working as expected mak #python data='''\ mws.ScannerLogout 7 ''' import xmlrpclib def main(): i = 1 while 1: print i

Python and Soap protocol

2007-01-16 Thread Grzegorz Smith
Hi folks I must write webb application that will comunicate with delphi desktop application by SOAP protocol. Can you recommend any Python Soap Libary? I founded: SOAPpy and Zolera SOAP Infrastructure (ZSI). Any tip which is better to use? Thanks for any help Gregor -- http://mail.python.org/mailm

ZSI and WSDL schema

2007-02-01 Thread Grzegorz Smith
Hi all. I have problem with ZSI and WSDL schema.I generate from WSDL by wsdl2py client method for webservice. I made soap call and something goes wrong. Doeas anyone know hot to create some server code by ZSI from WSDL?? I just suspectes that my return data from webservice is in incorrect envelope

Re: ZSI and WSDL schema

2007-02-01 Thread Grzegorz Smith
o be proper response. Any help? Please Gregor Thanks Simon On 1 Lut, 12:42, "Simon Brunning" <[EMAIL PROTECTED]> wrote: > On 1 Feb 2007 03:14:14 -0800, Grzegorz Smith <[EMAIL PROTECTED]> wrote: > > > Hi all. I have problem with ZSI and WSDL schema.I generate fr

simple SOAP method doesn't work,

2007-02-02 Thread Grzegorz Smith
Hi All. I 'm learning ZSI to use SOAP and I desperately need help. I'm working on example from tutorial -> (examples/server/send_response/ simple/wsdl/). Here are my wsdl files -> http://pastebin.com/873488. I made wsdl2py wsdl2py --complexType --file=binding.wsdl and get Example_services.py and Ex

formEncode and validation depended on forms field

2006-05-17 Thread Grzegorz Ślusarek
Hi all. I'm using formEncode to validate my forms, and I'm stopped on how to do a complicated validation that depened on what forms element was filled. I mean in my code (without formEncode) i have: if form.select is checked: #if select is checked then I checked for others fields on form #i

Re: Beta testers needed for a high performance Python application server

2008-03-26 Thread Grzegorz Słodkowicz
> Why not just put it on the net somewhere and tell us where it is? > People aren't generally going to want to help or even look at it if > you treat it like a proprietary application. So, put the documentation > and code up somewhere for all to see. > http://www.yieldserver.com:8081/ -- http:

Workflow engine?

2008-11-08 Thread Grzegorz Staniak
tell), itools.workflow, spiff (AFAIK tied to a CMS), but not much else. I don't think I'll have enough time to get acquinted with Plone and its offer of products. Has anyone here tried any such code? What would you recommend? TIA, GS -- Grzegorz Staniak Nocturnal Infiltration and Accurate

Re: Workflow engine?

2008-11-08 Thread Grzegorz Staniak
dea to start writing another one? I'd much prefer an existing workflow project that I could use, test, and contribute to, just as I decided on TG for the web thing. GS -- Grzegorz Staniak Nocturnal Infiltration and Accurate Killing -- http://mail.python.org/mailman/listinfo/python-list

Re: Workflow engine?

2008-11-08 Thread Grzegorz Staniak
framework. > > http://www.google.de/search?q=python+state+machine To be exact, I used the words "engine/library", not "a whole framework". Thanks for the link, I've googled for articles and recipes myself and as I said, I more or less know what to do - I just thought it might be a good idea to ask whether perhaps the wheel has already been invented. Apparently I was wrong. GS -- Grzegorz Staniak Nocturnal Infiltration and Accurate Killing -- http://mail.python.org/mailman/listinfo/python-list

Re: Workflow engine?

2008-11-08 Thread Grzegorz Staniak
tion was pretty specific: could you comment on/recommend an open source python workflow engine/module (implied: to go with a web app). Sharepoint doesn't match the description. I think one could assume that if I'm asking about wheels, I need a pointer to a wheel shop, and I'm not

Re: Workflow engine?

2008-11-09 Thread Grzegorz Staniak
ied any such code? What would you recommend? > > There are some packages for zope on pypi: > Products.DCWorkflow - zope2, cmf > hurry.workflow and some extensions - zope3 > zope.wfmc - zope3 (not many dependencies on zope3) Thanks, I'll have a look at them. GS -- Grzegorz Sta

Re: Workflow engine?

2008-11-09 Thread Grzegorz Staniak
or _any_ suggestions or comments. Most of them happened to be along the lines of "phew, that's too easy, go bother yourself with the rest of the stuff". > The common denonimator of a workflow (state engine) is so simple, the > only complexity comes from the environment it

Re: wildcard match with list.index()

2008-11-10 Thread Grzegorz Staniak
s thinking about something like: > > mylist.index('no*') > > Of course this doesn't work. I guess there's a way to use the glob module in this situation, but for the specific case I think you can use: start_with_no = (i for i in mylist if i.startswith("no")) GS

Re: Where to locate existing standard encodings in python

2008-11-11 Thread Grzegorz Staniak
f editing, e.g. pasting part of an "Alias" at the end of the line for "AddDefaultCharset" or sth like this. GS -- Grzegorz Staniak Nocturnal Infiltration and Accurate Killing -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 new integer division

2008-04-08 Thread Grzegorz Słodkowicz
> If you want precision with fractions, you should be using the Decimal > type, which uses a rational. A rational, if you recall from your math > classes, is one integer divided by another. > Isn't Decimal a BCD implementation? -- http://mail.python.org/mailman/listinfo/python-list

Re: Java or C++?

2008-04-14 Thread Grzegorz Słodkowicz
> Hello, I was hoping to get some opinions on a subject. I've been > programming Python for almost two years now. Recently I learned Perl, > but frankly I'm not very comfortable with it. Now I want to move on > two either Java or C++, but I'm not sure which. Which one do you think > is a softer tr

Re: Java or C++?

2008-04-15 Thread Grzegorz Słodkowicz
> You must be joking - better designed? C++ was a botch to an already poor > language. > Although I'm relatively new to the concept that C++ is too difficult to use, I would concede that with certain mindset and priorities Java may be a valid choice. Not so if one is willing to expand know

Re: like a "for loop" for a string

2008-08-17 Thread Grzegorz Staniak
ething like "count and return all occurences of the substring 'abc' in foo"? Looks like you should use the re module. GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: like a "for loop" for a string

2008-08-17 Thread Grzegorz Staniak
t;no" and I want > all of "text5+more Text" because it is after "yes". It is like the yeses are > bullet points and I want all the info after them. However, all in one > string. I guess this can be done with regular expressions: http://www.python.org/doc/current/lib/module-re.html Read about groups, then write an appropriate regex. GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: ??????: How to use win32com to convert a MS WORD doc to HTML ?

2008-08-20 Thread Grzegorz Staniak
.. Very sorry, but I just couldn't resist. GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: simple Question about using BeautifulSoup

2008-08-20 Thread Grzegorz Staniak
') > > but the file extension doesn't work. So how do I open one? Have you tried the local file URL, like "file:///home/user/file.html"? GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: Total No. of "Records" in a File?

2008-08-23 Thread Grzegorz Staniak
ase the length of "os.listdir()" could suffice, but then you might need to filter out sub-directories, or maybe count files in them too using "os.walk()". GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalents of Ruby's "!" methods?

2008-08-25 Thread Grzegorz Staniak
an iterator? GS -- Grzegorz Staniak -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP's str_replace ?

2008-09-10 Thread Grzegorz Staniak
re some equivalent in Python ? The .translate() method of strings? >>> import string >>> mystr = "This is just a test" >>> transtable = string.maketrans("aeiouy","--") >>> mystr.translate(transtable) 'Th-s -s j-st - t-st' GS -- Grzegorz Staniak Nocturnal Infiltration and Accurate Killing -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP's str_replace ?

2008-09-10 Thread Grzegorz Staniak
Is there some equivalent in Python ? The .translate() method of strings? >>> import string >>> mystr = "This is just a test" >>> transtable = string.maketrans("aeiouy","--") >>> mystr.translate(transtable) 'Th-s -s j-st - t-st' GS -- Grzegorz Staniak Nocturnal Infiltration and Accurate Killing -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP's str_replace ?

2008-09-10 Thread Grzegorz Staniak
ink this here is an example where even str_replace > in Python wouldn't have worked well. What about mystring.translate(transtable)? GS -- Grzegorz Staniak Nocturnal Infiltration and Accurate Killing -- http://mail.python.org/mailman/listinfo/python-list

Re: A bit weird dictionary behavior

2008-09-22 Thread Grzegorz Staniak
; And some would argue that it was wrong to have such a wide definition > for the truth value of an expression in the first place... Just out of idle curiosity, what could be the alternatives? Not to evaluate e.g. strings to "true"? Aren't such conventions as "whatever is

MySQLDB - return strange type of variable

2006-03-25 Thread Grzegorz Smith
Hi all. I'm trying get data from text field in MySQl 5.0 with my National characters. Data are stored in utf8 encodings. Here is the script: import MySQLdb, MySQLdb.cursors conn = MySQLdb.connect(host='localhost', user='root', passwd='123456', db='profile_locale') c = conn.cursor(MySQLdb.cursors.Di

how to match n- lists for a common elements.

2006-04-13 Thread Grzegorz Ślusarek
o get common objects of this list. How to do it? Grzegorz -- http://mail.python.org/mailman/listinfo/python-list

sending email with charset utf-8 but subject is not coded properly

2006-04-14 Thread Grzegorz Ślusarek
Hi all. I sending email using standard python modules smtplib, email, coding email in utf but subject of message is not coded properly. In subject i use my national characters (polish) and after send i get XX in place these characters. Here is the code Message = email.message_from_string(pMessa

Python unicode utf-8 characters and MySQL unicode utf-8 characters

2011-01-18 Thread Grzegorz Śliwiński
Hello, Recently I tried to insert some unicode object in utf-8 encoding into MySQL using MySQLdb, and got MySQL warnings on characters like: 𐎲𐎠𐎥𐎠 i found somewhere in my data. I can't even read them. MySQL seems to cut the whole string after that characters off, so I get incomplete data. After a li

Re: Python unicode utf-8 characters and MySQL unicode utf-8 characters

2011-01-18 Thread Grzegorz Śliwiński
On 18 Sty, 18:15, Kushal Kumaran wrote: > 2011/1/18 Grzegorz Śliwiński : > > > Hello, > > Recently I tried to insert some unicode object in utf-8 encoding into > > MySQL using MySQLdb, and got MySQL warnings on characters like: > > 𐎲𐎠𐎥𐎠 i found somewhere in m

Re: Pyallegro status (is it dead?). What about pygame.

2005-02-28 Thread Grzegorz Adam Hankiewicz
On 2005-02-27, Przemys?aw Ró?ycki <[EMAIL PROTECTED]> wrote: > Has anyone used pyallegro? - I want to give allegro library a > chance - but it seems that python bindings for this library are > not maintained anymore. They aren't if you look at the web page. If you look at the CVS activity you will

Looking for source preservation features in XML libs

2004-12-28 Thread Grzegorz Adam Hankiewicz
Hi. I'm looking for two specific features in XML libraries. One is two be able to tell which source file line a tag starts and ends. Say, tag is located on line 34 column 7, and the matching three lines later on column 56. Another feature is to be able to save the processed XML code in a way th