Re: Is PEP-8 a Code or More of a Guideline?

2007-05-31 Thread kc
"Joe Riopel" <[EMAIL PROTECTED]> writes:

> Using camel case instead of the under_score means less typing. I am lazy.
>
> fooBar
> foo_bar
Each requires exactly the same number of key strokes when I do the
math. (Too lazy to explain further...)
-- 
http://mail.python.org/mailman/listinfo/python-list


urllib and bypass proxy

2008-04-04 Thread kc
Under MS Windows, I encountered a problem with the proxy bypass
specification. In windows, the bypass specification for the proxy
uses semi-colons to delimit entries. Mine happens to have two
semi-colons back-to-back. Internet explorer handles this just fine but
urllib equates this with ALWAYS bypass the proxy. (I'm using Python
2.5.2) 

This is caused because the double semi-colon is turned into an empty
string entry and at the bottom of urllib.py, and empty string can
always be found in a host name. Therefore it always chooses to bypass
the proxy. 

Of course the fix is to get rid of the double colon in the bypass
settings in internet explorer (which I did). But it took me an hour to
track this down (first time using urllib). Perhaps a better fix
would be to test for the empty string and continue the loop in that
case. From urllib.py: 

# now check if we match one of the registry values.
for test in proxyOverride:
if test == "": continue
test = test.replace(".", r"\.") # mask dots

This is not really a bug but rather a way to be more consistent with
internet explorer. If this has value, do I submit a bug report or does
someone else? 
-- 
http://mail.python.org/mailman/listinfo/python-list


Check to see if the script has been previously used?

2014-05-27 Thread KC Sparks
Hi,

I was wondering if there was an extension or way that would allow me to
print instructions if it is the first the the user has used the script.

Thanks,
KC
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: win32com.client .Cells

2015-10-12 Thread pupsik kc
Very Thanks Irmen!
It's helped me.
-- 
https://mail.python.org/mailman/listinfo/python-list


[python] PYSVN [https] [callback_ssl_server_trust_prompt]

2015-10-12 Thread pupsik kc
Hi Guys,

I need get update of files through SVN, that is called from python-script.
could you show me example https connection ? :)
i searched in google, but without success :(

i had tried do next:

import pysvn
def get_login(username, save, password,retcode):
return retcode, username, password, save
def ssl_server_trust_prompt(trust_dict):
return True, 0, True
client = pysvn.Client()
client.callback_ssl_server_trust_prompt = ssl_server_trust_prompt
client.callback_get_login = 
get_login(username='USER',save=False,retcode=True,password='passwd')

Traceback (most recent call last):
  File "D:/WebPython/SVN_test.py", line 13, in 
client.callback_get_login = 
get_login(username='USER',save=False,retcode=True,password='passwd')
AttributeError: expecting None or a callable object
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-20 Thread Bikal KC
Ingo Menger wrote:
> On 20 Aug., 01:56, Xah Lee <[EMAIL PROTECTED]> wrote:
> 
>> (for you math illiterates out there: ...
>> (for you mathematicians out there: ...
> 
> Please, Xah Lee, could you possibly stop to "explain" things that are
> absolutely trivial? If somebody has doubts about the etymology of a
> word, he may use the dictionary, or he could ask.
> 
> 

I used usenet years ago then stopped for couple of years. I remember
seeing him/her on c.l.perl I believe doing the same thing he/she is
doing atm. I'd say the ultimate usenet superstar. Wow!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IDE for Python

2007-08-21 Thread Bikal KC
Joel Andres Granados wrote:
> Hello list:
> 
> I have tried various times to use an IDE for python put have always been
> disapointed.
> I haven't revisited the idea in about a year and was wondering what the
> python people
> use.
> I have also found http://pida.co.uk/main as a possible solution.  Anyone
> tried it yet?

Free -
DrPython, Pydev extension to Eclipse, IDLE.

Show me the money -
Komodo, IntelliJ IDEA, Visual Python, Wing Python

Do your homework and Google for them now. :-)


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


Re: C# and Python

2007-08-21 Thread Bikal KC
subeen wrote:

> When the user clicks Quick Sort button, the quicksort.py will be
> called and it will sort the numbers.

One way to do this:
In your C# app, have the mouse click event handler call python
interpreter "/path/to/python /path/to/quicksort.py". Make quicksort.py
write to a file the result. After the quicksort.py finishes, read the
file from your normal C# app.

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


Re: C# and Python

2007-08-21 Thread Bikal KC
>From Eric CHAO [accidently sent to me]:

Maybe you could try IronPython. It's another implement in .NET
platform. Not 100% compatible but for sorting, that's ok. I think it's
a better way to use GUI that .NET provide.

And if you download VS 2005 SDK, there is many demo projects about
IronPython.

On 8/21/07, Bikal KC <[EMAIL PROTECTED]> wrote:
> > subeen wrote:
> >
>> > > When the user clicks Quick Sort button, the quicksort.py will be
>> > > called and it will sort the numbers.
> >
> > One way to do this:
> > In your C# app, have the mouse click event handler call python
> > interpreter "/path/to/python /path/to/quicksort.py". Make quicksort.py
> > write to a file the result. After the quicksort.py finishes, read the
> > file from your normal C# app.
> >
> > Cheers.
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >


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


Re: Fast socket write

2007-08-21 Thread Bikal KC
Greg Copeland wrote:
> I'm having a brain cramp right now.  I can't see to recall the name of

Is your cramp gone now ? :P

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