how to add socks proxy feature to script based on requests module?

2013-02-12 Thread xliiv
Hi! I've go a script which uses python requests (http://docs.python-requests.org/en/latest/). I need to add to it socks proxy feature. AFAIK requests doesn't support socks proxy (http://stackoverflow.com/questions/12601316/how-to-make-python-requests-work-via-socks-proxy) so i was about to sw

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread xliiv
On Friday, September 21, 2012 3:04:02 PM UTC+2, Tarek Ziadé wrote: > On 9/21/12 2:14 PM, xliiv wrote: > > > > > > Python Paste is probably what you are looking for - see > > > > > > http://lucasmanual.com/mywiki/PythonPaste for example > > > I

Re: Does python have built command for package skeleton creation?

2012-09-21 Thread xliiv
On Friday, September 21, 2012 1:08:23 PM UTC+2, Tarek Ziadé wrote: > On 9/21/12 12:07 PM, xliiv wrote: > > > Like the topic.. . I found this: > > > > > > http://learnpythonthehardway.org/book/ex46.html > > > > > > it seems fine, but s

Re: What's wrong with my arc tangens calculation?

2012-09-14 Thread xliiv
On Friday, September 14, 2012 12:55:06 PM UTC+2, Laszlo Nagy wrote: > > but when i lookup tg in a paper table (last decade math book) i've got > > these values: > > > > > > tg(63'10'') = 1.9768 > > > tg(63'20'') = 1.9912 > > > tg(63'30'') = 2.0057 > > > > > > For me python should return some

What's wrong with my arc tangens calculation?

2012-09-14 Thread xliiv
I do some math with python: import math as m m.degrees(m.atan(2)) >>> 63.43494882292201 but when i lookup tg in a paper table (last decade math book) i've got these values: tg(63'10'') = 1.9768 tg(63'20'') = 1.9912 tg(63'30'') = 2.0057 For me python should return something more like 63'2x'' th

Re: How to hide console with Popen on Windows?

2012-05-22 Thread xliiv
On Tuesday, May 22, 2012 2:45:11 AM UTC+2, alex23 wrote: > On May 22, 3:00 am, xliiv wrote: > > Now I know that my 'solution' is not a solution and problem still bugs me. > > Any ideas how to deal with it? > > I haven't tried it but this thread talks about be

Re: How to hide console with Popen on Windows?

2012-05-21 Thread xliiv
On Monday, May 21, 2012 6:38:34 AM UTC+2, alex23 wrote: > On May 18, 6:22 pm, xliiv wrote: > > Like the topic, more details in followed links.. > > http://stackoverflow.com/questions/10637450/how-to-hide-console-with-... > > Try replacing all of your code with something sim

Re: Is it technically possible to give Python option of naming process of running script?

2012-03-16 Thread xliiv
> > Seems like an awfully obtuse way of doing things -- I don't really > > want to have 15 different copies of Python (or even links), and it > > requires root privleges every time you want to run a Python program > > with the "correct" name. > > Why do you need root? Can't you copy / link into y

Re: Is it technically possible to give Python option of naming process of running script?

2012-03-15 Thread xliiv
> >> Like the topic.. . > >> I use Python a lot, both Windows and Linux, and it's little weird to have > >> many python process without fast distinction which is what. > > > > I've no idea if it's even possible on Windows. On Linux, what you want > > is the prctl function, which (AFAIK) isn't dire

Re: Is it technically possible to give Python option of naming process of running script?

2012-03-15 Thread xliiv
> >> Like the topic.. . > >> I use Python a lot, both Windows and Linux, and it's little weird to have > >> many python process without fast distinction which is what. > > > > I've no idea if it's even possible on Windows. On Linux, what you want > > is the prctl function, which (AFAIK) isn't dire

Is it technically possible to give Python option of naming process of running script?

2012-03-14 Thread xliiv
Like the topic.. . I use Python a lot, both Windows and Linux, and it's little weird to have many python process without fast distinction which is what. -- http://mail.python.org/mailman/listinfo/python-list

Python packaging usabilty (distutils) - automatic downloading required packages

2012-02-25 Thread XLiIV
There is many packaging solutions for python. I was confused about that but it's nothing. I had to pick one of them. I picked distutils because it's part of standard python since 3.3, am i right? My goal is to write setup.py with this feature: 'download required package if not installed already, li

Re: confused by HTMLParser class

2008-05-27 Thread XLiIV
On May 28, 3:20 am, globalrev <[EMAIL PROTECTED]> wrote: > tried all kinds of combos to get this to work. > > http://docs.python.org/lib/module-HTMLParser.html > > from HTMLParser import HTMLParser > > class MyHTMLParser(HTMLParser): > >     def handle_starttag(self, tag, attrs): >         print "E

Re: Is using range() in for loops really Pythonic?

2008-05-11 Thread XLiIV
On May 11, 4:19 am, John Salerno <[EMAIL PROTECTED]> wrote: > I know it's popular and very handy, but I'm curious if there are purists > out there who think that using something like: > > for x in range(10): >     #do something 10 times > > is unPythonic. The reason I ask is because the structure o

Re: the lvalue curse? let's play with this crazy idea ;)

2008-05-09 Thread XLiIV
On May 9, 11:52 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > Maybe it's also harder to read than this:: > >   print '-'.join(map(str, time.localtime()[:3])) I like this concept, it's so, .. ziped :) > Of course, if you don't mind the extra padding zeroes in day and month:: > >   prin

the lvalue curse? let's play with this crazy idea ;)

2008-05-09 Thread XLiIV
I started playing with Python and love it since the very beginning, programming using Python is so ...human-like? but one thing returns to me almost everytime when I see/write the code Let's take a look at two ways of thinking... the standard one which is well-known and loved by almost everyone :