Hi,
I am trying to decode a string I took from file:
file = open ("./Downloads/lamp-post.csv", 'r')
data = file.readlines()
data[0]
'\xff\xfeK\x00e\x00y\x00w\x00o\x00r\x00d\x00\t\x00C\x00o\x00m\x00p\x00e\x00t\x00i\x00t\x00i\x00o\x00n\x00\t\x00G\x00l\x00o\x00b\x00a\x00l\x00
\x00M\x00o\x00n\x00t\x
Hi!
I want to try to use a command line script with my python application. The
task is the following, my database stores some initial data for the script
and
I need to execute a command line application in a following way:
$ application -parameter1 -file1
where file 1 is a file which contains my
Hi!
I have the following list
l= [ a, b, c]
Where a,b,c are objects created from one class, e.g. each has title
attribute.
What I want to have is a list of titles, e.g. [a.title, b.title, c.title]
Is there a quick way to do it? Or I should use loops (looping through each
element, and generating
On Thu, Sep 10, 2009 at 12:43 PM, Alan Gauld wrote:
> "Oleg Oltar" wrote
>
> I want to create simple load test for my web application.
>> Consider the following script:
>>
>> while 1:
>> urllib2.urlopen("www.example.com")
>>
>
&g
Hi!
I have a question.
I want to create simple load test for my web application.
Consider the following script:
while 1:
urllib2.urlopen("www.example.com")
How can I make it running in several threads?
___
Tutor maillist - Tutor@python.org
To un
Hi!
One of my tests returned following text ()
The test:
from django.test.client import Client
c = Client()
resp = c.get("/")
resp.content
In [25]: resp.content
Out[25]: '\r\n\r\n\r\nhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>\r\n\r\nhttp://www.w3.org/1999/xhtml";>\r\n \r\n\r\n
\r
Hi!
I need to open about 1200 urls from my database. And to check that those
urls are really exists.
I used urllib2.urlopen for it. But it's a little bit slow. I thought that
it's might be a good idea to do it in a threads. So it can add some
performance to my code.
Unfortunately I can't get sta
They want me to do one test runner which runs any test... And ideally it
should work on any platform
When I added something to $PYTHONPATH, they told me to remove it...
On Mon, Jul 21, 2008 at 12:11 PM, arsyed <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 21, 2008 at 4:46 AM, O
If I am adding, __init__.py it still doesn't import anything.
Do I have add the import (from sampletest import EmailWithoutA) in my init
file?
On Mon, Jul 21, 2008 at 1:28 AM, arsyed <[EMAIL PROTECTED]> wrote:
> On Sun, Jul 20, 2008 at 12:46 PM, Oleg Oltar <[EMAIL PROTECTED]&
Hi
I need to import several modules from many folders which has subfolders
~/folder/tests/sampletest.py
~/folder/suites/samplesuit.py
a suit uses tests from tests folder. I need to import them somehow from
tests folder. I added ~/folder to PYTHONPATH in my test_runner:
import sys
import os
sys
днÑе доменÑ: ffoobar foobar.foobar foofoo
fofo\n[]\n';
On Thu, Jul 17, 2008 at 10:01 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
> beryl:~ oleg$ env
> MANPATH=/usr/share/man:/usr/local/share/man:/usr/X11/man
> TERM_PROGRAM=Apple_Terminal
> TERM=xterm-color
> SHELL=/
SECURITYSESSIONID=a206d0
On Thu, Jul 17, 2008 at 9:58 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
> See previous message (sent it few seconds ago)
>
>
> On Thu, Jul 17, 2008 at 9:55 AM, Mark Tolonen <[EMAIL PROTECTED]<[EMAIL
> PROTECTED]>>
> wrote:
>
>> OK, y
p.info/software/HTMLTestRunner.html)
On Thu, Jul 17, 2008 at 9:33 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
>
> And in case:
> # coding: utf-8
>
> import traceback
> try:
> raise Exception(u'Зрегиться')
> except Exception,e:
> print trace
(most recent call last):
File "./wish/newaccount/reg.py", line 5, in
raise Exception(u'?')
Exception:
My console settings:
In [1]: import sys
In [2]: sys.getdefaultencoding()
Out[2]: 'ascii'
In [3]: sys.stdout.encoding
Out[3]: 'US-ASCII'
On
_username_block").decode('cp-1252')
sel.type("id_password2", self.name)
sel.click(u"//[EMAIL PROTECTED]'Зарегистрироваться']")
sel.wait_for_page_to_load("7")
if config.debugMode is True:
time.sl
In [1]: import sys
In [2]: sys.getdefaultencoding()
Out[2]: 'ascii'
In [3]: sys.stdout.encoding
Out[3]: 'US-ASCII'
On Thu, Jul 17, 2008 at 6:29 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
> Seems need help there. Start getting
>
> Traceback (most recent
ers in position 0-4:
ordinal not in range(128)
when trying to get the text of one of the elements.
How to solve it?
On Thu, Jul 17, 2008 at 5:11 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
> OK,
>
> I just run the program from terminal. OS: OS X, IDLE = Emacs:).
>
> Yep use
Hi I am using unittest framework with selenium.
When I tried this code (my verification point)
self.assertEqual(True, sel.is_text_present(u"Извените пароли не
совпадают"), "System didn't give a correct warning about the password
misstype")
Where u"Извените пароли не совпадают" is russian
Is that possible to run test cases independently (without unittest.main) and
how to do it
E.g. I tried it this way:
import random
import unittest
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
self.seq = range(10)
def testshuffle(self):
# make sure the
Introduction into CGI in Russian
http://www.intuit.ru/department/internet/cgi/
Please give alternative link on English variant
On Fri, Apr 18, 2008 at 10:53 AM, Alan Gauld <[EMAIL PROTECTED]>
wrote:
>
> "Che M" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > I was kind of hop
Hi Che!
Use django, don't use Zope and everything will be fine. Django is a new very
powerful web framework. Many cool web applications was created using django!
e.g. you can take a look on our project: www.mydeco.com
Use django and let the Power be with you :)
Thanks,
Oleg
On Fri, Apr 18, 2008
OK. take a look on the pages:
1. http://www.djangobook.com/
2. Official docs on http://www.djangoproject.com/
3. Dive into python (http://diveintopython.org/)
4. And the last one (but the best) showmedo: http://showmedo.com/
On Fri, Apr 18, 2008 at 6:20 AM, Che M <[EMAIL PROTECTED]> wrote:
>
I am trying to parse an html page. Have following error while doing that
src = sel.get_html_source()
links = re.findall(r'', src)
for link in links:
print link
==
ERROR: test_new (__main__.NewTest)
-- Forwarded message --
From: Oleg Oltar <[EMAIL PROTECTED]>
Date: Fri, Apr 4, 2008 at 2:49 PM
Subject: Re: [Tutor] Unittest traceback
To: Kent Johnson <[EMAIL PROTECTED]>
Yes! Tried in command line. works fine there. Not sure howto customize my
IDE correctly.
Hi!
I am trying to use unittest in python first time. But have a strange
traceback each time I run my sample tests.
Can you please explain why I have it. No info about it in the doc.
e.g. the code is
import unittest
import squaren
class TestCases(unittest.TestCase):
def setUp(self):
p
25 matches
Mail list logo