Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-09 Thread ilya
> - There is no way (I know of) to start a python script
>  from the command line with the debugger active;
>  I always have to modify the source to insert a
 > pdb.set_trace().

With python 2.4 you can do
python -m pdb.py yourscript arg1 arg2 

Ilya

-- 
http://mail.python.org/mailman/listinfo/python-list


Automatically restore virtualenv in Terminal.app on macOS (zsh, bash)

2017-01-12 Thread Ilya Kulakov
Today I discovered that one can customize session restoration in Terminal.app
by defining the shell_session_save_user_state function.

Here is a script that restores active virtualenv, e.g. after you reboot your 
machine:

https://gist.github.com/Kentzo/185e4eab382bbcf1f0a9738a28128dce

It's written for ZSH, but it's fairly simple to port it to bash: you don't even 
need plugin,
since session management is supported out of the box.

Here is a plugin for oh-my-zsh:

https://github.com/Kentzo/oh-my-zsh/tree/master/plugins/session
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: High level SNMP

2004-12-16 Thread Ilya Etingof
Jeremy Sanders <[EMAIL PROTECTED]> wrote:
> On Thu, 09 Dec 2004 15:34:14 +0200, Petri Laakso wrote:

[skipped]

> The old versions of PySNMP (version 2.XX), seem to be a lot simpler to
> use than later ones, so I might do that. That's if I can work out how to

Recent versions tend to be more complex because they're following SNMPv3
model, which is complex. However, a simplistic high-level layer is
scheduled for implementation.

> convert the random string it produces to a floating point number. Somehow
> it manages to gain 3 bytes over a float...

Basic SNMP types don't seem to include floating point numbers. Maybe you're
decoding something defined by a TEXTUAL-CONVENTION at a MIB? The protocol
(for packing floating point value into some native SNMP type) might be 
specified by the TC then.

If you provide more details I'm willing to help.

-ilya
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Portable general timestamp format, not 2038-limited

2007-07-05 Thread Ilya Zakharevich
[A complimentary Cc of this posting was sent to
James Harris 
<[EMAIL PROTECTED]>], who wrote in article <[EMAIL PROTECTED]>:
> On 5 Jul, 02:53, greg <[EMAIL PROTECTED]> wrote:
> > James Harris wrote:
> > > With that the time would range to +/- 9000
> > > quintillion years (18 digits)
> >
> > Use the Big Bang as the epoch, and you won't have
> > to worry about negative timestamps.

In pedantic mode: negative timestamps make sense with Big Bang as the
epoch as well.  (AFAIU, the current way of thinking is that it was
"just too hot" before the big bang, it is not that "there was
nothing".)

Hope this helps,
Ilya
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Portable general timestamp format, not 2038-limited

2007-07-10 Thread Ilya Zakharevich
[A complimentary Cc of this posting was sent to
greg 
<[EMAIL PROTECTED]>], who wrote in article <[EMAIL PROTECTED]>:
> Ilya Zakharevich wrote:
> > In pedantic mode: negative timestamps make sense with Big Bang as the
> > epoch as well.  (AFAIU, the current way of thinking is that it was
> > "just too hot" before the big bang, it is not that "there was
> > nothing".)
> 
> If Stephen Hawking is right, the shape of the universe
> is such that there isn't any time "before" the big bang
> at all. It's like asking what's north of the North Pole.

I do not remember any statement like this - even from 70s...  Could
you provide a reference?  There were conjectures about "initial
singularity", but I do not recollect them related to SH.

> Of course, this may have been replaced with some other
> equally bizarre idea by now...

Nothing as bizzare as the "initial singularity".  There was a hot soup
not very far from a phase transition point; stochastically, some
micro-regions (bubbles) cool a little bit, and are subject to a phase
transition; due to transition, the metric in them grows (inflation),
so the "size" after transition [as seen from inside] is (hundreds?
thousands? millions? - I do not remember) orders of magnitude larger
than before transition - you get the universe-as-we-know-it as what sits
inside a "visible horizon" in such a babble.  Wiki for "inflation".

> Another thought: If the cosmologists ever decide if
> and when the Big Crunch is going to happen, we may be
> able to figure out once and for all how many bits we
> need in the timestamp.

In the "hot soup", it is very hard to construct a watch.  There may be
even some quantum-mechanical restrictions on bit storage in so hot a
matter (but I do not recollect seeing this).  If so, then indeed,
"nothing measurable" happens before and after inflation/collapse of
the universe-as-we-know-it; so timestamp would be restricted to the
interval between the bangs.

Hope this helps,
Ilya
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Portable general timestamp format, not 2038-limited

2007-07-10 Thread Ilya Zakharevich
[A complimentary Cc of this posting was sent to
Martin Gregorie 
<[EMAIL PROTECTED]>], who wrote in article <[EMAIL PROTECTED]>:
> >> If Stephen Hawking is right, the shape of the universe
> >> is such that there isn't any time "before" the big bang
> >> at all. It's like asking what's north of the North Pole.

> > I do not remember any statement like this - even from 70s...  Could
> > you provide a reference?  There were conjectures about "initial
> > singularity", but I do not recollect them related to SH.

> Its in "A Short History of Time". Sorry I can't quote chapter or page, 
> but a friend borrowed my copy and lent me Dawkins "Climbing Mount 
> Improbable" before vanishing, never to be seen since. Not an equal 
> exchange: I preferred ASHOT to CMI.

I would prefer a reference to a peer-reviewed paper.  ;-)

Thanks,
Ilya
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Portable general timestamp format, not 2038-limited

2007-07-11 Thread Ilya Zakharevich
[A complimentary Cc of this posting was sent to
Martin Gregorie 
<[EMAIL PROTECTED]>], who wrote in article <[EMAIL PROTECTED]>:
> >> Its in "A Short History of Time". Sorry I can't quote chapter or page, 
> >> but a friend borrowed my copy and lent me Dawkins "Climbing Mount 
> >> Improbable" before vanishing, never to be seen since. Not an equal 
> >> exchange: I preferred ASHOT to CMI.

> Oops - I should have written "A Brief History of Time". It was the first 
> edition, so I don't know if it was altered/edited out of later versions.

> > I would prefer a reference to a peer-reviewed paper.  ;-)

> Sure, but I don't think you'll find one. It was in a descriptive, rather 
> than rigorous, passage. But then, the book famously had only one 
> equation in it.

[I've heard about this book.]

My point is that attributing something to SH due to it appearing in
ABHoT is like attributing it to you since it was mentioned in your
post...

Hope this helps,
Ilya
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Portable general timestamp format, not 2038-limited

2007-07-11 Thread Ilya Zakharevich
[A complimentary Cc of this posting was sent to
Martin Gregorie 
<[EMAIL PROTECTED]>], who wrote in article <[EMAIL PROTECTED]>:
> Ilya Zakharevich wrote:
> > My point is that attributing something to SH due to it appearing in
> > ABHoT is like attributing it to you since it was mentioned in your
> > post...

> OK, so who should it be attributed to?

*This* was my question; and with kitchentop book, one cannot expect to
find such an answer.  If interested, Wiki looks like a good place to
look it up.

Given how obsolete this conjecture is (it contradicts the now known
data about uniformity of background radiation), I have no interest in
looking it up.  :-(

Sorry,
Ilya


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: regular expression negate a word (not character)

2008-01-26 Thread Ilya Zakharevich
[A complimentary Cc of this posting was sent to
Summercool 
<[EMAIL PROTECTED]>], who wrote in article <[EMAIL PROTECTED]>:
> so for example, it will grep for
> 
>   winter tire
>   tire
>   retire
>   tired
> 
> but will not grep for
> 
>   snow tire
>   snow   tire
>   some snowtires

This does not describe the problem completely.  What about

  thisnow tire
  snow; tire

etc?  Anyway, one of the obvious modifications of

   (^ | \b(?!snow) \w+ ) \W* tire

should work.

Hope this helps,
Ilya

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: The penis is way too delicate for masturbation

2005-09-01 Thread Ilya the Recusant
In a not so bright galaxy nowhere near intelligent space, "Eve S."
<[EMAIL PROTECTED]> wrote:
>
><[EMAIL PROTECTED]> schreef in bericht
>news:[EMAIL PROTECTED]
>> .
>>
>
>A decent amount of gentle sucking on the other hand never goes amiss.

Must...not...make...joke...


Ilya the Recusant
-
"Asshole" has a special place in my childhood, the point at which I
first learned that typical Americans were assholes.
 - C&J
-- 
http://mail.python.org/mailman/listinfo/python-list