PyCon PL 2015 - Call for Proposal is waiting for you

2015-07-09 Thread piotr
Python Hackers, PyCon PL 2015 is pleased to announce that its Call for Proposals will be closed soon! We encourage you all to come and share experience with a varied audience of ethusiastic Pythonistas that the conference attracts each year. Talks and workshops from all Python-related areas ar

PyCon PL 2015 - Został niecały tydzień dla Call for Proposals

2015-07-09 Thread piotr
Cześć Polska Społeczności Pythona! Jakiś czas temu uruchomiono PyCon PL 2015 - Call for Proposals, czyli nabór na propozycje prelekcji, warsztatów, paneli dyskusyjnych oraz innych aktywności konferencyjnych. Zaakceptowani prowadzący, którzy spełnią warunki Call for Proposals, otrzymają darmowy

Re: Convert Python 3 ResourceWarnings into exception

2014-07-31 Thread Piotr Dobrogost
Terry Reedy udel.edu> writes: > > python -W error ... > "Raise an exception instead of printing a warning message." > > You can also turn this on with the warnings module. Assuming that this > works for ResourceWarning, which is should, please correct the SO record. Thanks for taking time to

Convert Python 3 ResourceWarnings into exception

2014-07-30 Thread Piotr Dobrogost
Hi! Recently A. Jesse Jiryu Davis asked at Stackoverflow (http://stackoverflow.com/q/24717027/95735) if there is "a way to force a Python 3 unittest to fail, rather than simply print a warning to stderr, if it causes any ResourceWarning?" Daniel Harding, in the accepted answer, states it's not pos

Fwd: Basic asyncio usage

2014-03-26 Thread Piotr Husiatyński
Hi, I have posted the same question to python-tutor list *, but I'm trying my luck here as advised. I'm trying to get more familiar with asyncio library. Using python 3.4, I wrote simple echo server (see attachement for the code). I know that instead of using bare bone send/recv I could use some o

Re: Cross-platform way to get default directory for binary files like console scripts?

2014-02-21 Thread Piotr Dobrogost
On Thursday, February 20, 2014 4:34:25 PM UTC+1, Piotr Dobrogost wrote: > > I'm wondering if there's some API to get this info as what you showed is > really roundabout way to achieve the goal... Turns out there is API for this - see thread on distutils-sig mai

Re: Cross-platform way to get default directory for binary files like console scripts?

2014-02-20 Thread Piotr Dobrogost
On Thursday, February 20, 2014 4:42:54 PM UTC+1, Ned Batchelder wrote: > > As roundabout and advanced as that code is, it doesn't give the right > answer for me. It returns None. Indeed. I tried on Linux and got None both inside and outside virtualenv :( Regards, P

Re: Cross-platform way to get default directory for binary files like console scripts?

2014-02-20 Thread Piotr Dobrogost
#x27;/usr/local/bin' I think this is pretty much what I'm after, thanks. I'm wondering if there's some API to get this info as what you showed is really roundabout way to achieve the goal... Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list

Cross-platform way to get default directory for binary files like console scripts?

2014-02-20 Thread Piotr Dobrogost
rocess and we would like to make sure we run tools that accompany Python's interpreter used to run this script. Please note that the script may be run from within virtualenv which had not been activated - ./venv/bin/python our_script.py Regards, Piotr Dobrogost -- https://mail.python.org/m

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-06 Thread Piotr Dobrogost
On Friday, December 6, 2013 3:07:51 PM UTC+1, Neil Cerutti wrote: > On 2013-12-04, Piotr Dobrogost > > wrote: > > > On Wednesday, December 4, 2013 10:41:49 PM UTC+1, Neil Cerutti > > wrote: > > >> not something to do commonly. Your proposed syntax leaves th

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Piotr Dobrogost
think we could use some unique Unicode character for this instead hyphen as long as Python allows any alphanumeric Unicode character inside identifiers which I think it does... Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Piotr Dobrogost
ch to global function to access attribute in case its name is known only at run time is very awkward both when writing and reading code. > It would also be the case that "obj.'value' is obj.value", so the > proposal *would* add duplication. This is not a big deal and that's what you get when someone had already decided that in expression a.b, b is treated literally. Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Piotr Dobrogost
On Wednesday, December 4, 2013 10:41:49 PM UTC+1, Neil Cerutti wrote: > On 2013-12-04, Piotr Dobrogost <> wrote: > > > Right. If there's already a way to have attributes with these > > "non-standard" names (which is a good thing) > > At best its a

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Piotr Dobrogost
On Tuesday, December 3, 2013 6:48:38 PM UTC+1, Dave Angel wrote: > On Tue, 3 Dec 2013 09:14:49 -0800 (PST), Piotr Dobrogost > > wrote: > > > What is the reason there's no "natural" syntax allowing to access > > attributes with names not being valid Pyth

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Piotr Dobrogost
way the getattr and setattr do. Taking into account that obj.'x' would be equivalent to obj.x any attribute can be accessed with the new syntax. I don't see how this is not unified access compared to using getattr instead dot... Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Piotr Dobrogost
On Wednesday, December 4, 2013 2:23:24 PM UTC+1, Roy Smith wrote: > In article <17gt99hg615jfm7bdid26185884d2pf...@4ax.com>, > > Tim Roberts <> wrote: > > > Piotr Dobrogost <> wrote: > > > >Attribute access syntax being very concise is very often

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Piotr Dobrogost
s with these "non-standard" names (which is a good thing) then for uniformity with dot access to attributes with "standard" names there should be a variant of dot access allowing to access these "non-standard" named attributes, too. Regards, Piotr -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Piotr Dobrogost
unny you use this argument against my idea as this idea comes from following this rule whereas getattr goes against it. Using dot is the main syntax to access attributes. Following this, the syntax I'm proposing is much more in line with this primary syntax than getattr is. If there ought to be

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Piotr Dobrogost
On Tuesday, December 3, 2013 6:31:58 PM UTC+1, Ethan Furman wrote: > > When would you have attribute names that are not valid identifiers? > See my answer to rand's post. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Piotr Dobrogost
On Tuesday, December 3, 2013 7:03:41 PM UTC+1, rand...@fastmail.us wrote: > On Tue, Dec 3, 2013, at 12:14, Piotr Dobrogost wrote: > > > Hi! > > > I find global getattr() function awkward when reading code. > > What is the reason there's no "natural" syn

Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-03 Thread Piotr Dobrogost
tribute-name-but-not-valid-identifier'? Regards, Piotr Dobrogost -- https://mail.python.org/mailman/listinfo/python-list

Why is str(None) == 'None' and not an empty string?

2013-08-28 Thread Piotr Dobrogost
Hi! Having repr(None) == 'None' is sure the right thing but why does str(None) == 'None'? Wouldn't it be more correct if it was an empty string? Regards Piotr Dobrogost -- http://mail.python.org/mailman/listinfo/python-list

Re: Python pdb bug, followed by bug in bugs.python.org

2013-04-13 Thread Piotr Dobrogost
On Thursday, April 11, 2013 5:12:53 PM UTC+2, donald...@gmail.com wrote: > > I just submitted a bug report on the pdb issue. It would be nice of you to share the link to this issue. -- http://mail.python.org/mailman/listinfo/python-list

Re: SimpleHTTPRequestHandler used with HTTP/1.1 hangs after the second resource on a page.

2013-04-13 Thread Piotr Dobrogost
On Saturday, April 13, 2013 12:21:33 AM UTC+2, Terry Jan Reedy wrote: > I find the doc slightly confusing. The SO code uses BaseHTTPServer. The > doc says "Usually, this module isn’t used directly," On the other hand, > SimpleHTTPServer only defines a request handler and not a server itself. Tha

SimpleHTTPRequestHandler used with HTTP/1.1 hangs after the second resource on a page.

2013-04-12 Thread Piotr Dobrogost
hon/file/d9893d13c628/Lib/http/server.py#l370) but I can't see what's wrong. Any ideas? Best regards, Piotr Dobrogost -- http://mail.python.org/mailman/listinfo/python-list

backporting PEP 3134 "Exception Chaining and Embedded Tracebacks" to Python 2.7

2013-02-19 Thread Piotr Dobrogost
Hi! What is a chance of backporting PEP 3134 "Exception Chaining and Embedded Tracebacks" to Python 2.7? Regards, Piotr Dobrogost -- http://mail.python.org/mailman/listinfo/python-list

DLLs folder on Windows

2013-01-16 Thread Piotr Dobrogost
lled for all users." (https://github.com/pypa/virtualenv/issues/87). Regards, Piotr Dobrogost ps. This was originaly posted to python-devel see http://thread.gmane.org/gmane.comp.python.devel/136821 -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is pylaucher in Python 3.3 being installed in Windows folder?

2012-10-04 Thread Piotr Dobrogost
On Oct 4, 6:30 am, Chris Rebert wrote: > Presumably because Program Files isn't part of the > $PATH.http://superuser.com/questions/124239/what-is-the-default-path-enviro... > Contrast (from the PEP): "However, the Windows directory is always on the > path." I guess that's the reason indeed. >

Why is pylaucher in Python 3.3 being installed in Windows folder?

2012-10-03 Thread Piotr Dobrogost
Why is pylauncher in Python 3.3 being installed in Windows folder and not in Program Files folder? Installing into Windows folder was maybe acceptable 10 years ago but not now... -- http://mail.python.org/mailman/listinfo/python-list

Re: Abandoning Python

2011-05-30 Thread Piotr Kamiński
I'm sorry, I wanted to send the message below to the list and instead I sent it to just one user. Piotr Dnia 23-05-2011 o 10:29:24 Piotr Kamiński napisał(a): Dnia 23-05-2011 o 00:58:55 Brendan Simon (eTRIX) napisał(a): ... Take a look at Cobra. http://cobra-language.com

Re: the official way of printing unicode strings

2008-12-14 Thread Piotr Sobolewski
Marc 'BlackJack' Rintsch wrote: > I'd make that first line: > sys.stdout = codecs.getwriter('utf-8')(sys.stdout) > > Why is it even more cumbersome to execute that line *once* instead > encoding at every ``print`` statement? Oh, maybe it's not cumbersome, but a little bit strange - but sure, I c

the official way of printing unicode strings

2008-12-13 Thread Piotr Sobolewski
Hello, in Python (contrary to Perl, for instance) there is one way to do common tasks. Could somebody explain me what is the official python way of printing unicode strings? I tried to do this such way: s = u"Stanisław Lem" print u.encode('utf-8') This works, but is very cumbersome. Then I tried

Re: Workflow engine?

2008-11-08 Thread Piotr Chamera
Grzegorz Staniak pisze: Hi, In a couple of weeks I'm starting a medium-size project (using a web framework) involving a workflow implementation. Are you aware of any open source workflow engines/libraries that I could base the project on? Google returns hist for GoFlow (Django only, from what

Re: I want to release the GIL

2008-10-21 Thread Piotr Sobolewski
Thanks for answers. But what about my main question? Is it possible to release GIL without sleeping? I know that in this example situation I can achieve my goals without that - I can just move sleep outside of locked block. But I just want to know it for future - can I just do something like thread

I want to release the GIL

2008-10-20 Thread Piotr Sobolewski
Hello, I have such program: import time import thread def f():     global lock     while True:         lock.acquire()         print thread.get_ident()         time.sleep(1)         lock.release() lock=thread.allocate_lock() thread.start_new_thread(f,()) thread.start_new_thread(f,()) time.sleep(60)

Re: how can I use a callable object as a method

2008-09-23 Thread Piotr Sobolewski
Hrvoje Niksic wrote: >> However, the second version does not work. I think I understand >> why. That's because "a" inside f1 is not a function (but an object). > > An object that defines __call__ is perfectly usable as a function. > Your problem is that it doesn't know how to convert itself to a

how can I use a callable object as a method

2008-09-18 Thread Piotr Sobolewski
Hello, I would like to use a callable object as a method of a class. So, when I have such normal class: class f: version = 17 def a(self): return self.version f1 = f() print f1.a() I want to change it to something like that: class add: def __call__(self

Re: functools's partial and update_wrapper does not work together

2008-08-21 Thread piotr . findeisen
> If not already done by someone else, it might be worth filling a ticket > - generic decorators should work with any callable, not only with > functions (well, IMHO at least). you're right. it's already there http://bugs.python.org/issue3445 regards! -- http://mail.python.org/mailman/listinfo/p

functools's partial and update_wrapper does not work together

2008-08-21 Thread piotr . findeisen
) + " is too little") never_throw(partial(foo, 3)) However this fails with an exception saying AttributeError: 'functools.partial' object has no attribute '__module__'. How can I use generic wrapper (never_throw) around partials? Thank you, Piotr -- http://mail.python.org/mailman/listinfo/python-list

Re: Storing objects in relational database

2008-05-24 Thread Piotr Chamera
[EMAIL PROTECTED] pisze: I don't know if you'd label it 'elegant', but as far as I'm concerned, storing serialized objects as blobs in a relational database is mostly non-sense. If I use a relational database, it's because it is a *relational* database. If you want an OODB, then we have the ZODB,

Re: variable scope in list comprehensions

2008-04-04 Thread Piotr Sobolewski
Duncan Booth wrote: > For the OP, in some languages (e.g. C) 'for' loops typically calculate > the value of the loop control variable based on some expression > involving the previous value. Python isn't like that. In Python the data > used to compute the next value is stored internally: you canno

variable scope in list comprehensions

2008-04-03 Thread Piotr Sobolewski
Hello, there is something I don't understand about list comprehensions. I understand how does this work: print [[y for x in range(8)] for y in range(8)] However I don't understand why this one works: print [[y for y in range(8)] for y in range(8)] In this second example I have one loop nested i

Re: readline() - problem

2007-10-02 Thread piotr
7;w') > > for line in f: > > s= f.readline() > > Your line object is already bound to the 'line' name in each > iteration. You need to use that, not attempt to read yet another line > each time. > Of course, it helped. Many thanks for all. piotr -- http://mail.python.org/mailman/listinfo/python-list

readline() - problem

2007-10-02 Thread piotr
t.asc','r') o=open('/test/out.asc','w') for line in f: s= f.readline() if s[15]=='1' : o.write(s) o.close() f.close() Why it doesn't work ('s' contains ' ' )? piotr -- http://mail.python.org/mailman/listinfo/python-list

enabling IPv6 in python

2007-09-24 Thread Piotr Dula (pdula)
es and I got a lot of parse errors (many pages of errors similar to the ones below) In file included from /root/Piotr/Python-2.5.1/Modules/_tkinter.c:67: /usr/include/tk.h:581: parse error before "Bool" /usr/include/tk.h:583: parse error before "event" /usr/include/tk.h:584:

IPv6 in python

2007-09-24 Thread Piotr Dula (pdula)
this below) In file included from /root/Piotr/Python-2.5.1/Modules/_tkinter.c:67: /usr/include/tk.h:581: parse error before "Bool" /usr/include/tk.h:583: parse error before "event" /usr/include/tk.h:584: parse error before "root" /usr/include/tk.h:585: parse error

testing with coverage.py problem

2007-07-16 Thread Piotr Hrebieniuk
How to do that with coverage.py? Where i should put the code that runs the tests? -- Regards Piotr Hrebieniuk -- http://mail.python.org/mailman/listinfo/python-list

Re: template engine

2007-01-13 Thread piotr
On Sat, 13 Jan 2007 16:42:16 -0200, Jorge Godoy wrote: > Take a look at Kid (http://www.kid-templating.org/) and Genshi > (http://genshi.edgewall.org/). I've already done a short look at kid, but to be honest I don't like it's XML/Python syntax. I strongly prefer idea from SimpleTAL or HTMLTempla

template engine

2007-01-13 Thread piotr
Hi, I'm looking for a template engine that can give me names of required variables in parse time. Calculation of a value for a specific variable name could be possibly done in specified callback function. For example: $title #if user hello $user/name #else hello guest #endif

Re: merits of Lisp vs Python

2006-12-11 Thread Piotr
list comprehension, iterators, etc. I tend to avoid such constructs; usually there is a more natural way to do the same and it's just too easy to get the indices wrong. Piotr -- http://mail.python.org/mailman/listinfo/python-list

[ANN] RuPy 2007 - Python & Ruby Conference

2006-09-05 Thread Jakub Piotr Nowak
RuPy 2007 Python & Ruby Conference Poznan, Poland April 7-8, 2007 RuPy is a Python & Ruby conference. It will be held at Adam Mickiewicz University, in Poznan, Poland, so it is relatively accessible from both the East and the West of Europe. The philosophy of RuPy is to put together Python & Rub

is a wiki engine based on a cvs/svn a good idea?

2006-05-31 Thread piotr maliński
I'm planning to wite a fully featured wiki in Python in one of frameworks. I've seen some notes about wiki/documentation management scripts that use SVN as a data storage/versioning. I've been using SVN a bit but I don't know if it's a good idea to use it in a wiki engine. Pro: versioning / diffs,

Re: Does anybody know how to install PythonMagick?

2006-05-21 Thread piotr maliński
python imaging library is more advanced and up to date :) try using this one. -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi subprocess, cannot get output

2006-04-26 Thread Jakub Piotr Nowak
Dnia 26.04.2006 James Stroud <[EMAIL PROTECTED]> napisa³/a: } Jakub Piotr Nowak wrote: }> Hello, }> }> In the following cgi program, I cannot get subprocess output. }> I print the header, flush stdout to prepare it to new content, }> but variable 'o' is always empty

cgi subprocess, cannot get output

2006-04-25 Thread Jakub Piotr Nowak
Hello, In the following cgi program, I cannot get subprocess output. I print the header, flush stdout to prepare it to new content, but variable 'o' is always empty. Could somebody help me with that? def main(): print "Content-type: text/html\n\n" sys.stdout.flush() if form.has_key('sent

MyghtyBoard 0.0.1

2006-03-25 Thread piotr maliński
MyghtyBoard 0.0.1 alfa have been released. It's a forum script written in python/myghty/hk_classes. Download: http://sourceforge.net/project/showfiles.php?group_id=163611&package_id=185021&release_id=404570 Few old screens: http://www.fotosik.pl/pokaz_obrazek/q0pq9tc1i6aphwc4.html http://www.fot

creating website script in Myghty

2006-03-21 Thread piotr maliński
I'm learning Myghty from few weeks and now I'm making a simple forum script ;) and I have problem finding few things in python that I need: - how to strip all HTML tags leaving the text / strip all code (python/other) from a string? - how to highlight a python/html/other code (result in HTML code)?

is hk_classes python interface good?

2006-03-13 Thread piotr maliński
Ive found hk_classes a C++/Python library/module for accesing databases. It works nice for me but I wonder if someone used hk_classes in a project, is this module good, etc. -- http://mail.python.org/mailman/listinfo/python-list

converting binary data

2006-02-27 Thread piotr maliński
I have a game file described here: http://iesdp.gibberlings3.net/ieformats/itm_v1.htm and I'm trying to read all the data: plik = open('bow08.itm', 'rb') try:         tekst = plik.read() finally:         plik.close() # char array - works print tekst[0x0004:0x0004

Python, GUI, and GTK+

2006-02-05 Thread Piotr Husiatynski
Hi, I'm new at GUI programming. I've heard about Gazpacho but I couldn't find any tutorial about it on Internet (even on the gazpacho page). Becouse of that fact, I've installed Glaze, but there's probably no tutorials for python too. Can anyone point me an introdutory tutorial on how to implement