asyncio.sleep() returns you a Future. When you yield from a future,
your coroutine blocks, until the Future completes. In the meantime,
event loop continutes to execute other things that are waiting to be
executed. The Future returned from asyncio.sleep gets completed after
specified seconds.
2014
Hi,
I am trying to learn how to utilize aysncio module. In order to do
that, I wrote a class that checks http status codes for all the pages
on a given domain (unless there is no internal link pointing to it of
course).
Since it is too long to paste here, I uploaded it to my github repo,
you can
2014-07-22 1:19 GMT+03:00 Yaşar Arabacı :
> This program is supposed to give me status codes for web pages that
> are found on my sitemap.xml file. But program hangs as Tasks wait for
> getting something out of the Queue. I think it has something to do
> with how I am using asyncio.
I am trying to grasp how asyncio works today. Based on the examples
that I found on the docs, I write a simple program like this;
import asyncio
import urllib.request
import urllib.parse
@asyncio.coroutine
def print_status_code(url_q):
while True:
url = yield from url_q.get()
-- Forwarded message --
From: Yaşar Arabacı
Date: 2014-07-21 21:54 GMT+03:00
Subject: Re: Event loop documentation error
To: Chris Angelico
2014-07-21 21:45 GMT+03:00 Chris Angelico :
> SIGINT is a Unix signal. There is an equivalent for Windows, but it
> wouldn&#x
I was reading
https://docs.python.org/3/library/asyncio-eventloop.html#example-set-signal-handlers-for-sigint-and-sigterm
and wanted to test the example, however, I am getting this error when
I run the code;
Traceback (most recent call last):
File "C:/Users/gorki/Documents/Python Scripts/as-io.
This is a cross-post from stackoverflow:
http://stackoverflow.com/q/24841130/886669
I am not sure about cross-posting policies of python-list. I am sorry
if this is discouraged.
Here is my problem;
I want to create a start menu or Desktop shortcut for my Python
windows installer package. I am tr
ld
be separated with dashes.
2014-07-19 12:44 GMT+03:00 Chris “Kwpolska” Warrick :
> On Sat, Jul 19, 2014 at 9:19 AM, Yaşar Arabacı wrote:
>> Hi,
>>
>> I am trying to package my file, but I am having problems with
>> installing my Scripts. Here is my package:
>> h
Hi,
I am trying to package my file, but I am having problems with
installing my Scripts. Here is my package:
https://github.com/yasar11732/tklsystem
Here is my package's PyPi page: https://pypi.python.org/pypi/TkLsystem
The problem I face is that, when I run `python setup.py install` from
my dev
Hi,
I wrote a small program to draw L-system equations using tkinter. You
can find it on https://github.com/yasar11732/tklsystem
It is still under development, but seems to be working nice so far. I
could only try it on windows, but it should work on Linux too.
You will need Python 3.x to run it
2013/11/19 glen herrmannsfeldt :
> More recently, there are JIT systems which generate the intermediate
> code, but then at the appropriate time (Just In Time) compile that to
> machine code and execute it. This is common for Java, and more recently
> for languages like Matlab.
Is there a particul
2013/11/17 Georg Brandl :
> Let the barrage of posts continue for a few more days; if he doesn't get
> replies he will get fed up eventually.
My thoughts exactly.
--
http://ysar.net/
--
https://mail.python.org/mailman/listinfo/python-list
I am cross-posting from: http://stackoverflow.com/q/19990863/886669
I am following, [quant-econ](http://quant-econ.net/numpy.html)
tutorial. I am trying the exercise where I am supposed to implement a
[Empirical Cumulative Probability
Funcion](http://en.wikipedia.org/wiki/Empirical_distribution_fu
Hi,
I have a function that returns something like this;
[[[1, 5, 9], [2, 6, 7], [3, 4, 8]], [[1, 6, 8], [2, 4, 9], [3, 5, 7]]]
It is a list of list of lists. Each uppermost list is called a result.
I want to write a code that
shows that each elem in sublists of result on appears once in whole
su
I don't think it would be much problem. I can do that when I have spare time.
Yasar.
> Oh, I just noticed that the person using 2to3 wasn't the OP. My
> apologies, my language was aimed at the decorator's primary developer.
> Yasar, are you prepared to take on Python 3 support fully? If it's as
>
Hi,
while this:
a = "yaşar"
print a
prints "yaşar"
this:
a = ("yaşar",)
print a
prints ('ya\xfear',)
At first I tried decoding repr(a) with different encodings, but later
I realised there is actually 4 charaters \, x, f and e in return value
of repr.
Therefore, I wrote this:
def byte_repla
I didn't follow the thread, I am sorry if this is duplicate, but don't
catch all Exceptions, catch only the ones you expect, so that you can
identify unexpected errors:
cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] )
try:
cookieID = cookie['name'].value
except KeyErr
Hi people,
I wrote this decorator: https://gist.github.com/yasar11732/7163528
When this code executes:
@debugging
def myfunc(a, b, c, d = 48):
a = 129
return a + b
print myfunc(12,15,17)
This is printed:
function myfunc called
a 12
c 17
b 15
d 4
Hi Terry,
Thanks for pointing it out.matplotlib's hist function wasn't broken
after all :) I published non-parametric statistics here:
http://ysar.net/python/python-package-statistics-additions.html
2013/10/18 Terry Reedy :
> On 10/18/2013 8:41 AM, Yaşar Arabacı wrote:
>>
&g
Hi people,
I collected some data on PyPI and published some statistics about
packages on PyPI. I think you might find it an interesting read:
http://ysar.net/python/python-package-statistics.html
--
http://ysar.net/
--
https://mail.python.org/mailman/listinfo/python-list
You mean like this?
===
a = "I like {name}"
a.format(name="myself")
'I like myself'
Sat, 31 Dec 2011 20:44:08 +0200 tarihinde davidfx
şöyle yazmış:
Thanks for your response. I know the following code is not going to be
correct but I w
What exactly do you mean by putting .format into a variable? You mean like
this:
"{name} is very {adj}
{gender}".format(name="sandy",adj="diligent",gender="female")
Sat, 31 Dec 2011 20:19:34 +0200 tarihinde davidfx
şöyle yazmış:
Hello everyone,
I just have a quick question about .form
I am not sure if I understood your question correctly, but I would advice
checking this: http://docs.python.org/c-api/object.html#PyObject_Type
Sun, 25 Dec 2011 13:28:55 +0200 tarihinde Mrinalini Kulkarni
şöyle yazmış:
Hello,
I have embedded python into a vc++ app. I need to obtain typ
And by the way, I would advice asking these kinds of questions in
#python-dev IRC channel (Freenode). I believe you can get much better help
about your problems regarding C-api there.
2011/12/25 Mrinalini Kulkarni
> Hello,
>
> I have embedded python into a vc++ app. I need to obtain type of the
>>> import imp
>>> imp.find_module("os")
(,
'/usr/lib/python2.7/os.py', ('.py', 'U', 1))
>>>
2011/12/23 Gnarlodious
> Given a module's name, how do I get the file path without importing it?
> Searched all over, can't find any such info.
>
> Is it possible to ask if a named module exists before a
Hi,
I am looking for some recommendations about blogs that I may like to
follow. I am interested in Python (that goes without saying), django and
server side web development in general, linux tools, and git scm. I am
looking for blogs which shares short examples of codes, and hints about
various t
You can see my all code below, theoritically that code should work I guess.
But I keep getting this error:
[SUBWARNING/MainProcess] thread for sharing handles raised exception :
---
Traceback (most recent call last):
File "
And also, I higly recommend against using lists named list. That means
overwriting builtin list object.
2011/10/12 Andreas Perstinger
> On 2011-10-12 13:15, selahattin ay wrote:
>
>>
>> hi all, I wrote these codes but the program must write the prints to a
>> text file...
>> code = [100, 200, 3
Are you looking for something like this? http://www.sqlalchemy.org/
2011/10/11 Alec Taylor
> Good afternoon,
>
> I'm looking for a Python library for generating SQL queries [selects,
> alters, inserts and commits].
>
> I can write them by hand, but thought it would be more useful writing
> them
And also, I should recommend you to use Turkish speaking mail groups in
here:
python-programci...@googlegroups.com since your English is a little hard to
comprehend. There are less people there, but, still would be more helpful
for you.
11 Ekim 2011 17:11 tarihinde Yaşar Arabacı yazdı
your_final_list = [[str(i) + str(k) for i in range(len(liste))] for k in
range(len(code))]
--
http://yasar.serveblog.net/
--
http://yasar.serveblog.net/
--
http://mail.python.org/mailman/listinfo/python-list
I don't know about your problem, but did you compare numpy versions in
windows and other platforms? You may have newer/older version in Windows.
Otherwise, it looks like a platform spesific bug to me.
2011/10/9 Paolo Zaffino
> Hello,
> I wrote a function that works on a numpy matrix and it works
Hi,
Does anyone know a good tutorial about working with Spreadsheet files (e.g.
excel files) with Python. I have found xlutils, but there doesn't seem to be
any documentation or tutorial about it that I could find. So, any
suggestions?
--
http://yasar.serveblog.net/
--
http://mail.python.org/ma
Hi people,
Nowadays, I am trying to explore python source. I added a new keyword,
essentially doing same thing as 'continue' keyword to the interpreter,
mostly by following instructions in PEP 306. If anyone interested here is
the video about how I did it: http://www.youtube.com/watch?v=Ww7BeIdUb
Hi,
I'am trying to write a mass html downloader, and it processes files after it
downloaded them. I have problems with encodings, and decodings. Sometimes I
get UnicodeDecodeErrors, or
I get half-pages in after processing part. Or more generally, some things
don't feel right. Can you check my appr
Ok, nevermind. Appereantly there is such a thing as HTTPSConnection. I
thought httplib auto-handled https connections..
22 Eylül 2011 13:43 tarihinde Yaşar Arabacı yazdı:
> Hi,
>
> I wrote a function to get thorugh redirections and find a final page for a
> given web-page. B
Hi,
I wrote a function to get thorugh redirections and find a final page for a
given web-page. But following function gives maximum recursion error for any
https pages I tried. Do you know what might be the problem here?
def getHeadResponse(url,response_cache = {}):
try:
return respon
Hi,
I am using a simple sublclass of HTMLParser like this:
class LinkCollector(HTMLParser):
def reset(self):
self.links = []
HTMLParser.reset(self)
def handle_starttag(self,tag,attr):
if tag in ("a","link"):
key = "href"
elif tag in ("img","sc
I am trying to modify __getattribute__() method for an instance, as you may
already know,__getattirbute__ is read-only attribute in Python. What I have
in mind is, create a new object like this:
def create_new_instace(old_instance):
class temp(old_instance.__class__):
def __init__(self
-- Yönlendirilmiş ileti --
Kimden: Yaşar Arabacı
Tarih: 16 Eylül 2011 14:33
Konu: Re: why ps/fname of a python interpreter changes across platforms?
Kime: Steven D'Aprano
For example, in arch linux, I had 3 different interpreters named python,
python26 and python27 because
Hi,
I am a Turkish self-taught python user. Personally, I don't think I am in a
position to discuss a issue in this scale. But in my opinion, I think
pardus* developers should be invited to join to this discussion. As they are
using python heavily on most of their projects** I think they would hav
Hi,
I am new to profile module, so I am sorry if this is an absolute beginner
question. In order to my code to run, I need to add a directory to sys.path.
When I invole python -m profile myfile.py, my code won't work, saying that
the thing that is supposed to be in path, isn't. Code works fine wit
27;s instance,
instead of unicode's
31 Ağustos 2011 20:11 tarihinde Ian Kelly yazdı:
> 2011/8/31 Yaşar Arabacı :
> > I made a class like this (I shortened it just to show the point), what do
> > you think about it, do you think it is the python way of subclassing str
> (or
uk + u"ler")
return kelime(self._sozcuk + u"lar")
31 Ağustos 2011 14:43 tarihinde Yaşar Arabacı yazdı:
> Hİ,
>
> I originally posted my question to here:
> http://stackoverflow.com/q/7255655/886669 Could you people please look at
> it and enlighten me a little bit? I
Hİ,
I originally posted my question to here:
http://stackoverflow.com/q/7255655/886669 Could you people please look at it
and enlighten me a little bit? I would appreciate an answer either from here
or at stackoverflow. Thanks in advance.
--
http://yasar.serveblog.net/
--
http://mail.python.org
-- Yönlendirilmiş ileti --
Kimden: Yaşar Arabacı
Tarih: 28 Ağustos 2011 22:51
Konu: Re: Processing a large string
Kime: Paul Rudin
Are you getting Overflow error or memory error? If you don't know what those
means:
Overflow error occurs when your lists gets bigger
Hi,
I got confused about classes as an iterator. I saw something like this:
class foo():
__iter__(self):
return self
next(self):
return something
But then I saw a __next__ method on some code. So what is the deal, which
one should I use and what is the difference?
--
ht
I accidentally sent below mail only to roy. Resending to groups.
-- Yönlendirilmiş ileti --
Kimden: Yaşar Arabacı
Tarih: 23 Ağustos 2011 16:19
Konu: Re: is there any principle when writing python function
Kime: Roy Smith
I don't see myself a good python programmer or any
Hi,
I originally posted this question on stackoverflow, you can find it here:
http://stackoverflow.com/q/7133350/886669
I just want people check what I am doing and express their opinion about the
thing I am doing is acceptable, or are there some expects of it that could
change.
--
http://mail.p
49 matches
Mail list logo