Re: Python Bluetooth

2011-06-27 Thread Daniel Kluev
. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Python basic program problem

2011-06-27 Thread Daniel Kluev
, please include full tracebacks and python version info. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Rant on web browsers

2011-06-21 Thread Daniel Kluev
from it. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Run Python script from JS

2011-06-17 Thread Daniel Kluev
://www.skulpt.org/ -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-31 Thread Daniel Kluev
needed result and preserves function signatures. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlalchemy and Unicode strings: errormessage

2011-05-31 Thread Daniel Kluev
. A_record = A_class('BUM', 'Bäumer') If this is python2.x, use u'Bäumer' instead. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-31 Thread Daniel Kluev
pass to your decorator, so it does not matter what names you used for args in decorator itself. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters

2011-05-30 Thread Daniel Kluev
On Mon, May 30, 2011 at 6:12 PM, Laurent Claessens moky.m...@gmail.com wrote: Could you give an example of an object that has no name ? I've missed something ... object() object object at 0xb73d04d8 -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-30 Thread Daniel Kluev
is referenced by obj1, and calls append method of this list, which modifies itself in place global obj1 obj1 = [] # 'a' still references to original list, which is [1] now, it have no relation to obj1 at all somefunc(obj1) -- With best regards, Daniel Kluev -- http://mail.python.org/mailman

Re: scope of function parameters (take two)

2011-05-30 Thread Daniel Kluev
. On a sidenote, I wonder what is the reason to keep word 'variable' in python documentation at all. I believe word 'name' represents concept better, and those, who come from other languages, would be less likely to associate wrong definitions with it. -- With best regards, Daniel Kluev -- http

Re: scope of function parameters (take two)

2011-05-30 Thread Daniel Kluev
on). -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: scope of function parameters (take two)

2011-05-30 Thread Daniel Kluev
/getitem can modify object too if class overrides them). Obviously it would not save you from functions which use global/globals() or some other ways to change state outside their scope. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: GIL in alternative implementations

2011-05-27 Thread Daniel Kluev
and other implementations with GIL at least give you some safety margin. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-26 Thread Daniel Kluev
. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-24 Thread Daniel Kluev
. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
this is what I wanted to highlight - you cannot simply state that Perl offers more advanced modules and libraries which are not available for Python if you don't have reasonable experience with according Python modules. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
in stdlib. As for can't do: a = [1,2] dict([a]) {1: 2} a = (1,2) dict([a]) {1: 2} -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
On Mon, May 23, 2011 at 8:41 PM, Octavian Rasnita orasn...@gmail.com wrote: From: Daniel Kluev dan.kl...@gmail.com As I said, that ORM is not able to do those SQL constructs without using literal SQL code, but only Python variables and data structures... An ORM is usually prefered exactly

Re: Python 2.6 and timezones

2011-05-23 Thread Daniel Kluev
#tzinfo-objects -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
On Mon, May 23, 2011 at 10:17 PM, Octavian Rasnita orasn...@gmail.com wrote: From: Daniel Kluev dan.kl...@gmail.com Aha, so with other words that ORM doesn't have that feature. DBIX::Class also use the DateTime module, but it can use it directly, without needing to write more code

Re: Python 2.6 and timezones

2011-05-23 Thread Daniel Kluev
(): now = datetime.now(local_tz) now datetime.datetime(2011, 5, 23, 22, 41, 48, 398685, tzinfo=pytz.FixedOffset(600)) now.astimezone(remote_tz) datetime.datetime(2011, 5, 23, 7, 41, 48, 398685, tzinfo=StaticTzInfo 'EST') -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo

Re: Why did Quora choose Python for its development?

2011-05-23 Thread Daniel Kluev
, as it does in python: dict([[1,2], [3,4]]).keys() [1, 3] This is yet another example that you are just trolling here, making silly and unbacked claims, and ignoring any valid arguments you receive. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Why did Quora choose Python for its development?

2011-05-22 Thread Daniel Kluev
them which cannot be done in python. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Abandoning Python

2011-05-22 Thread Daniel Kluev
On Mon, May 23, 2011 at 4:33 AM, John Lee j...@pobox.com wrote: Pylint?  Does it provide some kind of guessed-at-type that has been integrated with IDEs? WingIDE Pro has both Pylint integration and advanced type-guessing. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman

Re: Why did Quora choose Python for its development?

2011-05-22 Thread Daniel Kluev
On Sun, May 22, 2011 at 11:47 PM, Octavian Rasnita orasn...@gmail.com wrote: From: Daniel Kluev dan.kl...@gmail.com I am talking about that flexibility which was criticized in the previous messages telling that this flexibility allows any programmer to use his own way. Perl doesn't force

Re: Overuse of try/except/else?

2011-05-21 Thread Daniel Kluev
. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Abandoning Python

2011-05-21 Thread Daniel Kluev
, expecting some language to acquire even larger user base is hopeless. Also, most of these complaints could be solved by using correct python dialect for particular task - RPython, Cython and so on. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Abandoning Python

2011-05-21 Thread Daniel Kluev
On Sun, May 22, 2011 at 12:25 PM, Daniel Kluev dan.kl...@gmail.com wrote: According to all language popularity indexes [1-10], C# and Forgot to include references, although everyone probably already knows them, [1] https://www.ohloh.net/languages?query=sort=projects [2] http://www.tiobe.com

Re: Python 3.2 Vectors.py module

2011-05-15 Thread Daniel Kluev
be better if you pack it in separate package and upload to PyPI. You can find good tutorial on packaging here: http://diveintopython3.org/packaging.html - NumPy/SciPy has pretty fair support for vectors. Would be good if you pointed out the differences to begin with. -- With best regards, Daniel

Re: threads with gtk gui problem

2011-05-15 Thread Daniel Kluev
You can also use multiprocessing module instead of threads. Use pipe and gobject.idle_add(somefunc) to process data from other thread. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: obviscating python code for distribution

2011-05-15 Thread Daniel Kluev
parts you want to hide in C/C++/Cython and distribute them as .so/.dll -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a set into list

2011-05-15 Thread Daniel Kluev
setset is still marginally faster. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: How best to convert a string list to a python list

2011-05-14 Thread Daniel Kluev
On Sat, May 14, 2011 at 7:41 PM, Nobody nob...@nowhere.com wrote: to use a regular expression to match everything up to the next delimiter, and do this in a loop to extract the individual items. re.findall() should let you match all items at once, without loop. -- With best regards, Daniel

Re: Why do directly imported variables behave differently than those attached to imported module?

2011-05-03 Thread Daniel Kluev
are immutable, when you do `var = 1` you create new object of type int, and re-assign `var` name to point to new object. `foo.var`, on other hand, is a way to access `foo`'s own namespace, so its exactly same name as globals()['var'] of `foo`. -- With best regards, Daniel Kluev -- http

Re: Why do directly imported variables behave differently than those attached to imported module?

2011-05-03 Thread Daniel Kluev
().__getattribute__(attr) def __repr__(self): return self.__get().__repr__() def __str__(self): return self.__get().__str__() a = 1 b = SymbolicReference(globals(), 'a') b 1 a = 10 b 10 -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Comparing VCS tools (was Development tools and practices for Pythonistas)

2011-04-29 Thread Daniel Kluev
We were looking for some simple integrated SCM, issue tracker and wiki in our university for software design and software testing courses, and fossil seems to be perfect match, thanks for sharing. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] VCS tools

2011-04-28 Thread Daniel Kluev
was expecting it to, and was overall very easy to learn. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: use of index (beginner's question)

2011-04-28 Thread Daniel Kluev
. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Function __defaults__

2011-04-24 Thread Daniel Kluev
-- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Function __defaults__

2011-04-24 Thread Daniel Kluev
,) test() 456 -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: When is PEP necessary?

2011-04-23 Thread Daniel Kluev
for pure-python modules, anything tied to C-API better be documented, or it becomes a nightmare to keep non-CPython version having identical interface. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Argument count mismatch

2011-04-22 Thread Daniel Kluev
, and usually cause no harm, since framework guarantees that these instances are bound to context of this particular http request. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a difference between one line and many lines

2011-04-21 Thread Daniel Kluev
regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Can you advice a Python library to query a lan subnet with SNMP and collect MAC addresses of nodes?

2011-04-18 Thread Daniel Kluev
Isn't it better to use subprocess.Popen and read stdout/stderr directly? Should be much more convenient than temporary files. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent code to the bool() built-in function

2011-04-17 Thread Daniel Kluev
, it just calls PyObject_IsTrue), it also provides needed comparison ops, repr and other magic methods for the type. You can check Objects/boolobject.c in python repository if its implementation is interesting for you. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python

Re: Equivalent code to the bool() built-in function

2011-04-17 Thread Daniel Kluev
technically these implementations are equivalent besides the fact that bool() is type rather than function. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Equivalent code to the bool() built-in function

2011-04-17 Thread Daniel Kluev
than the hack in OP. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE/text-editor

2011-04-16 Thread Daniel Kluev
. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: What people are using to access this mailing list

2010-11-03 Thread Daniel Kluev
I use gmail with according filters and labels, so each mailing list has its own label and is removed from inbox. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Would you recommend python as a first programming language?

2010-11-01 Thread Daniel Kluev
I was thinking of recommending this to a friend but what do you all think? Python is great language to learn programming. I've heard MIT switched from Scheme to Python as introductory language for their students. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo

Re: Discarding STDERR generated during subprocess.popen

2010-08-23 Thread Daniel Kluev
to the console. How can I disregard anything sent to stderr such that it doesn't appear on the console? Just add `stderr=subprocess.PIPE` keyword in the Popen call. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: path to data files

2010-08-19 Thread Daniel Kluev
(os.path.dirname(__file__), 'foo')) -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterative vs. Recursive coding

2010-08-19 Thread Daniel Kluev
needle over particular part of haystack. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list

Re: expression in an if statement

2010-08-18 Thread Daniel Kluev
, but this is what I expect the expression (set(a).union(b) == set(a)) has to do, in any conforming implementation of Python. Please correct me if I'm wrong. You can use dis module to let Python do compiling and explaining for you -- With best regards, Daniel Kluev -- http://mail.python.org/mailman

Re: String substitution VS proper mysql escaping

2010-08-17 Thread Daniel Kluev
injection, typically driver will stop it to happen when you provide 2 queries at once delimited by ';', so drop table would not work. However its possible to issue UNION's to retrieve sensitive data from your database. -- With best regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python

Re: Need to import stuff

2010-08-17 Thread Daniel Kluev
regards, Daniel Kluev -- http://mail.python.org/mailman/listinfo/python-list