On Monday, December 16, 2013 2:48:56 AM UTC-5, Mark wrote:
> On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote:
>
> > On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote:
>
> >
>
> > > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote:
>
> >
>
> > >
>
> >
>
On Monday, December 16, 2013 2:43:45 AM UTC-5, Mark wrote:
> On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote:
>
> > On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote:
>
> >
>
> > > On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano
>
> >
>
> > >
>
> >
>
> > >
On Mon, Dec 16, 2013 at 6:43 PM, Mark wrote:
> Syntax Error: invalid syntax
python twitch.py 10 10
>File " line 1
> python twitch.py 10 10
You're trying to run that from the interactive Python prompt. Run it
from the system - exit Python and run just this script.
ChrisA
--
https://
On Monday, December 16, 2013 2:09:38 AM UTC-5, Mark wrote:
> On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote:
>
> > On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano
>
> >
>
> > wrote:
>
> >
>
> > > Step 1: replace the modified version of the script with a known good cop
On Mon, Dec 16, 2013 at 6:09 PM, Mark wrote:
> Traceback (most recent call last):
> File "C:\Python27\Scripts\Twitch.py", line 9, in
> numberOfViewers = int(sys.argv[1])
> IndexError: list index out of range
>
> Is this where i would plug in the variables to make it work? I'm not quite
> s
On Sunday, December 15, 2013 9:33:17 PM UTC-5, Chris Angelico wrote:
> On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano
>
> wrote:
>
> > Step 1: replace the modified version of the script with a known good copy.
>
> >
>
>
>
> Actually, this might be where the problem is, unfortunately. Not
Chris Angelico writes:
> On Mon, Dec 16, 2013 at 3:50 PM, Ben Finney
> wrote:
> > Should we expect (ignoring pathological cases) the assertion
> > ‘type(obj) is obj.__class__’ to hold true? If not, under what
> > circumstances would it be sensible for those to differ?
>
> By "pathological cases
I need to replace all tag with after ■. But the result from
below is '■ D / '
Can you explain what I did wrong, please.
s = '■A B C D / '
soup = BeautifulSoup(s)
for i in soup.find_all(text='■'):
tag = soup.new_tag('span')
tag['style'] = 'REPLACE'
for i
On Sun, Dec 15, 2013 at 8:50 PM, Ben Finney wrote:
> Should we expect (ignoring pathological cases) the assertion
> ‘type(obj) is obj.__class__’ to hold true? If not, under what
> circumstances would it be sensible for those to differ?
They differ on old-style classes (in 2.x): the type will be e
On Monday, 16 December 2013 12:38:14 UTC+8, shengjie...@live.com wrote:
> Hi guys, I am trying to create a fixed list which would allow my values to be
> wrapped around it.
>
> For example i have 10 values : 0,1,2,3,4,5,6,7,8,9
>
> I need to create a list which contains 4 numbers and when the n
On Monday, 16 December 2013 13:10:22 UTC+8, Gary Herron wrote:
> On 12/15/2013 08:38 PM, shengjie.sheng...@live.com wrote:
>
> > Hi guys, I am trying to create a fixed list which would allow my values to
> > be wrapped around it.
>
> > For example i have 10 values : 0,1,2,3,4,5,6,7,8,9
>
> > I
On 12/15/2013 08:38 PM, shengjie.sheng...@live.com wrote:
Hi guys, I am trying to create a fixed list which would allow my values to be
wrapped around it.
For example i have 10 values : 0,1,2,3,4,5,6,7,8,9
I need to create a list which contains 4 numbers and when the number exceeds
the list, it
On Monday, 16 December 2013 13:07:46 UTC+8, shengjie...@live.com wrote:
> On Monday, 16 December 2013 12:59:32 UTC+8, Ben Finney wrote:
>
> > shengjie.sheng...@live.com writes:
>
> >
>
> >
>
> >
>
> > > Hi guys, I am trying to create a fixed list which would allow my
>
> >
>
> > > valu
On Mon, Dec 16, 2013 at 3:50 PM, Ben Finney wrote:
> Should we expect (ignoring pathological cases) the assertion
> ‘type(obj) is obj.__class__’ to hold true? If not, under what
> circumstances would it be sensible for those to differ?
By "pathological cases", do you mean arbitrarily changing
obj
On Monday, 16 December 2013 12:59:32 UTC+8, Ben Finney wrote:
> shengjie.sheng...@live.com writes:
>
>
>
> > Hi guys, I am trying to create a fixed list which would allow my
>
> > values to be wrapped around it.
>
>
>
> This doesn't make a lot of sense to me, but I assume you have a purpose
On Mon, Dec 16, 2013 at 3:51 PM, Michael Torrie wrote:
> I think Python is a great overall application development language,
> especially for the GUI. First-class functions for callbacks make it
> very nice compared to other languages. Python is fast enough for
> full-blown apps too. Slow part
On Mon, Dec 16, 2013 at 3:09 PM, Tamer Higazi wrote:
> I also believe in performance. An application written in C++, can be
> compiled easily on the target platform (like on windows systems) with it's
> native compiler.
> How would it be with wxPython ?!
It's going to spend more than 99% of its t
shengjie.sheng...@live.com writes:
> Hi guys, I am trying to create a fixed list which would allow my
> values to be wrapped around it.
This doesn't make a lot of sense to me, but I assume you have a purpose
in mind for this. What is the purpose? Perhaps it will help the
explanation if we know wh
On 12/15/2013 09:51 PM, Michael Torrie wrote:
> And all modern web apps are a combination of many languages and
> domains, most of which are "compiled" in the traditional sense.
Meant to say, *not* compiled.
--
https://mail.python.org/mailman/listinfo/p
On 12/15/2013 09:09 PM, Tamer Higazi wrote:
> However, I believe according wxWidgets it would be better coding in the
> native language the system had been developed.
> The other thing, specially if you would make a customer project, I don't
> know how to pack the app written in python in an inst
On 12/15/2013 05:34 PM, Tamer Higazi wrote:
> For wxPython there is a good book.
> You will feel convinient.
>
>
> But to be honest, I don't believe that Python is the best choice for GUI
> development, but it's only an opinion.
> Otherwise I would advise you going into C++ and code with wxWidge
Ned Batchelder writes:
> Generally, my answer would be, "You probably don't need the type as
> much as you think you do."
> […]
> Also, don't overlook isinstance().
Agreed.
> But when you do need it, type(x) is better than x.__class__, simply
> because we should always favor builtin functions
Hi Mark!
It is an advise, in which language somebody wants to code is of course
everybodys free choice.
However, I believe according wxWidgets it would be better coding in the
native language the system had been developed.
The other thing, specially if you would make a customer project, I don
Hi guys, I am trying to create a fixed list which would allow my values to be
wrapped around it.
For example i have 10 values : 0,1,2,3,4,5,6,7,8,9
I need to create a list which contains 4 numbers and when the number exceeds
the list, it would overwrite the first value.
[0,1,2,3]
[4,1,2,3]
[5,4,1
hey i am working on parsing like project .
so , i need some step to set proxy
so that my ip is not blocked by them
+=
i am using this method
proxy_support = urllib2.ProxyHandler({"http":"http://61.147.82.87:8000"})
opener = urllib2.build_opener(proxy_support)
u
Hi,
I have the same result even with:
sqlite3.connect(r'...')
Any other alternatives?
Thank you.
On Sun, Dec 15, 2013 at 4:58 PM, MRAB wrote:
> On 15/12/2013 22:46, Igor Korot wrote:
>>
>> Tim,
>>
>> On Sun, Dec 15, 2013 at 4:29 AM, Tim Chase
>> wrote:
>>>
>>> On 2013-12-15 06:17, Tim Chase
On Monday, December 16, 2013 9:27:11 AM UTC+5:30, Chris Angelico wrote:
> On Mon, Dec 16, 2013 at 2:30 PM, liuerfire Wang wrote:
> > TypeError: 'tuple' object does not support item assignment
> > In [5]: a
> > Out[5]: ([1, 1], [])
> > no problem, there is an exception. But a is still changed.
> >
On Mon, Dec 16, 2013 at 2:30 PM, liuerfire Wang wrote:
> TypeError: 'tuple' object does not support item assignment
>
> In [5]: a
> Out[5]: ([1, 1], [])
>
> no problem, there is an exception. But a is still changed.
>
> is this a bug, or could anyone explain it?
It's not a bug, but it's a bit con
Just like below:
In [1]: a = ([], [])
In [2]: a[0].append(1)
In [3]: a
Out[3]: ([1], [])
In [4]: a[0] += [1]
---
TypeError Traceback (most recent call last)
in ()
> 1 a[0] += [1]
TypeEr
On Monday, December 16, 2013 8:10:57 AM UTC+5:30, Roy Smith wrote:
> rusi wrote:
> > On Monday, December 16, 2013 7:29:31 AM UTC+5:30, alex23 wrote:
> > > > # Need to compare values of counter and reject in function/routine in
> > > > value in counter2 is higher then value in counter1 for a cur
On Mon, Dec 16, 2013 at 1:43 PM, Igor Korot wrote:
> So, how do I convert my string to one of those?
> I realized I can just do replace '/' to '\', but is there a better
> alternative?
The path is exactly the same, whether you use forward slashes or
backslashes, on Windows. Most of the world use
On Sun, 15 Dec 2013 18:43:53 -0800, Igor Korot
wrote:
On Sun, Dec 15, 2013 at 4:58 PM, MRAB
wrote:
> When writing paths on Windows, it's a good idea to use raw string
> literals or slashes instead of backslashes:
>
> conn = sqlite3.connect(r'c:\Documents and
> Settings\Igor.FORDANWORK
On 12/15/13 8:51 PM, Ben Finney wrote:
Howdy all,
What is the Pythonic way to determine the type of an object? Are there
multiple valid ways, and when should each be used?
We have ‘obj.__class__’, an attribute bound to the object's class. Or is
it? When is that true, and when should we not rely
In article <905d6e7e-6748-42dd-8b63-d80a4d175...@googlegroups.com>,
rusi wrote:
> On Monday, December 16, 2013 7:29:31 AM UTC+5:30, alex23 wrote:
> > > # Need to compare values of counter and reject in function/routine in
> > > value in counter2 is higher then value in counter1 for a current ke
Hi,
On Sun, Dec 15, 2013 at 4:58 PM, MRAB wrote:
> On 15/12/2013 22:46, Igor Korot wrote:
>>
>> Tim,
>>
>> On Sun, Dec 15, 2013 at 4:29 AM, Tim Chase
>> wrote:
>>>
>>> On 2013-12-15 06:17, Tim Chase wrote:
>
> conn = sqlite3.connect('x.sqlite',
>>
>> ... detect_types=sqli
On Mon, Dec 16, 2013 at 1:32 PM, rusi wrote:
> But 'counter' is a strange name -- after checking whether
> 'bag' and 'multiset' are there in the library, I would not think to
> check anything else.
Which is why we have this list. Question: Is there a way to do x, y,
and z, in Python? Answer: Chec
On Monday, December 16, 2013 7:29:31 AM UTC+5:30, alex23 wrote:
> > # Need to compare values of counter and reject in function/routine in value
> > in counter2 is higher then value in counter1 for a current key
> [(k,Counter2[k]) for k in Counter2 - Counter1]
Why not just?
Counter2 - Count
On Mon, Dec 16, 2013 at 12:37 PM, Steven D'Aprano
wrote:
> Step 1: replace the modified version of the script with a known good copy.
>
Actually, this might be where the problem is, unfortunately. Not the
OP's fault at all. I went and looked at the post linked to, and it has
buggy indentation. (Q
On 12/12/2013 5:49 PM, Amjad Syed wrote:
Hello,
I have 2 counters generated from list using Collections.counter()
I want to print only key,values in Counter2 which have values > then
corresponding value in Counter1.
E.g
Counter1={97:1,99:2,196:2,198:1}
Counter2={97:1 ,99:3, 196:1,198:1}
# O
Howdy all,
What is the Pythonic way to determine the type of an object? Are there
multiple valid ways, and when should each be used?
We have ‘obj.__class__’, an attribute bound to the object's class. Or is
it? When is that true, and when should we not rely on it?
We have ‘type(obj)’, calling the
On Sun, 15 Dec 2013 13:31:10 -0800, Mark wrote:
> I originally get an indent error on line 19, i delete the indent and i
> get
>
> ***'return outside function (Twitch.py, line 19)
>
> Thats where i am at. This is on version 2.7
Remember the bit where we asked you to copy and paste the entire e
On 16/12/2013 00:34, Tamer Higazi wrote:
But to be honest, I don't believe that Python is the best choice for GUI
development, but it's only an opinion.
Otherwise I would advise you going into C++ and code with wxWidgets.
Tamer
Can you state why you prefer C++ and wxWidgets over Python and w
For wxPython there is a good book.
You will feel convinient.
But to be honest, I don't believe that Python is the best choice for GUI
development, but it's only an opinion.
Otherwise I would advise you going into C++ and code with wxWidgets.
Tamer
On 14.12.2013 14:12, Jai wrote:
GUI:-want
On 15/12/2013 22:46, Igor Korot wrote:
Tim,
On Sun, Dec 15, 2013 at 4:29 AM, Tim Chase
wrote:
On 2013-12-15 06:17, Tim Chase wrote:
conn = sqlite3.connect('x.sqlite',
... detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
Your example code omitted this one crucial line. Do you s
On 2013-12-16 10:12, Cameron Simpson wrote:
> On 14Dec2013 10:15, Tim Chase wrote:
> Annoyingly, sqlite:
>
> + only lets one process access the db at a time, taking you back
> to a similar situation as with config files
Is this a Python limitation? According to the docs[1], it's not a
sqlite
On Mon, Dec 16, 2013 at 10:12 AM, Cameron Simpson wrote:
> + traditionally, sqlite is extreme fsync() happy; forces a disc
> level flush on each commit - extremely slow on busy databases,
> not to mention hard of drives
I'd say that's correct behaviour. A commit should be sync'd to disk
On 14Dec2013 10:15, Tim Chase wrote:
> On 2013-12-14 07:29, JL wrote:
> > I have a number of python processes which communicate with each
> > other through writing/reading config text files. The python
> > ConfigParser is used. I am wondering if it is more CPU-efficient to
> > switch to using sqli
On Mon, Dec 16, 2013 at 9:42 AM, Grant Edwards wrote:
> Good point -- I meant send(). I keep forgetting that the libc socket
> write() operation is missing in Python and only the send() call has
> been made visible. In C write() and send() are effectively the same
> thing (the parameters are arra
Tim,
On Sun, Dec 15, 2013 at 4:29 AM, Tim Chase
wrote:
> On 2013-12-15 06:17, Tim Chase wrote:
>>> conn = sqlite3.connect('x.sqlite',
... detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
>>
>> Your example code omitted this one crucial line. Do you specify the
>> detect_types
On 2013-12-15, Roy Smith wrote:
> In article ,
> Grant Edwards wrote:
>
>> UDP is a a _datagram_ service. Either all the bytes in a write()
>> should get sent or none of them. Sending a paritial datagram is _not_
>> a valid option.
>
> I would agree with the above if you said send() instead of
On Mon, Dec 16, 2013 at 8:31 AM, Mark wrote:
> I originally get an indent error on line 19, i delete the indent and i get
>
> ***'return outside function (Twitch.py, line 19)
Good point, someone's made a mistake in that file. What you need to do
is match the "output = ..." line and the "return ..
On Mon, Dec 16, 2013 at 4:01 AM, Steven D'Aprano
wrote:
> As I stated earlier, this is just the Interpreter design pattern, with
> the minor complication that the domain specific language happens to be an
> existing language, Tcl, with an interpreter that usually runs in a
> separate process, inst
On Sunday, December 15, 2013 4:19:47 PM UTC-5, Mark wrote:
> Thanks for the replies, I was hoping that one of you guys could actually try
> it for me, as it might be easier to correct? In the meantime i will install
> 2.7 instead of 3.3 and give it a try.
>
>
>
> Once again, i have very little
Thanks for the replies, I was hoping that one of you guys could actually try it
for me, as it might be easier to correct? In the meantime i will install 2.7
instead of 3.3 and give it a try.
Once again, i have very little experience in this, which is why i am looking
for help :) I am more worri
On Sun, Dec 15, 2013 at 7:35 AM, Jean Dubois wrote:
>> You can "svn checkout ". You might try Sliksvn if you're on
>> Windows, or if you're on Linux it's in synaptic or yum or whatever.
>> You can "wget ".
>> You can bring up the URL in a web browser and cut and paste.
> I'm using Linux, I did t
On 15/12/2013 20:25, arie.lake...@gmail.com wrote:
On Sunday, 15 December 2013 02:36:56 UTC, Chris Rebert wrote:
On Sat, Dec 14, 2013 at 5:31 PM, Dan Stromberg wrote:
Where does PySonar2 sit in the spectrum from pylint
(thorough/pedantic) to pyflakes (relaxed/few-false-positives)?
On Sunday, 15 December 2013 02:36:56 UTC, Chris Rebert wrote:
> On Sat, Dec 14, 2013 at 5:31 PM, Dan Stromberg wrote:
>
> > Where does PySonar2 sit in the spectrum from pylint
>
> > (thorough/pedantic) to pyflakes (relaxed/few-false-positives)?
>
> >
>
> > I use pylint and pyflakes a lot, and
On 15/12/2013 17:52, Chris “Kwpolska” Warrick wrote:
On Sun, Dec 15, 2013 at 4:33 PM, Wolfgang Keller wrote:
And besides, again, a commercially licensed PyQt itself isn't *that*
expensive.
The cost of a commercial PyQt license for a single developer is £350
(GBP). You may pay in either US Do
On Sun, Dec 15, 2013 at 4:33 PM, Wolfgang Keller wrote:
> And besides, again, a commercially licensed PyQt itself isn't *that*
> expensive.
> The cost of a commercial PyQt license for a single developer is £350
> (GBP). You may pay in either US Dollars, Euros or GBP.
(£420 incl. VAT for UK and s
In article ,
Chris Angelico wrote:
> On Mon, Dec 16, 2013 at 2:51 AM, Roy Smith wrote:
> > In article ,
> > Grant Edwards wrote:
> >
> >> UDP is a a _datagram_ service. Either all the bytes in a write()
> >> should get sent or none of them. Sending a paritial datagram is _not_
> >> a valid op
Pada Selasa, 28 Mei 2013 17:00:42 UTC+7, Debbie menulis:
> Hi there,
>
> I am new to Python, and wondering if you could help me with python based
> coding for the IPSA (Power system analysis software). I have a electrical
> distribution network with generators, buses and loads, on which I am
>
On 12/15/2013 08:33 AM, Wolfgang Keller wrote:
>> I think PyQt is slowly being pushed aside in favor of PySide, which is
>> more license-friendly for use in closed or open projects. I would
>> recommend using PySide unless PyQt is a requirement for your project.
>
> Except the issue that Pyside a
On Sun, 15 Dec 2013 14:53:45 +, Grant Edwards wrote:
> On 2013-12-14, Steven D'Aprano
> wrote:
>
>> But more seriously, 100% seriously in fact, I think that you'll find
>> that *every* GUI framework for Python ships with an entirely different
>> language under the hood, usually C.
>
> Name
On 14/12/2013 19:42, Peter Otten wrote:
Mark Lawrence wrote:
This method returns a list, the example from The Fine Docs being:-
>>> Counter('abracadabra').most_common(3)
[('a', 5), ('r', 2), ('b', 2)]
With the trend in Python being more and more towards methods returning
iterators, is there
Hello!
I'm pleased to announce version 1.5.1, the first bugfix release of branch
1.5 of SQLObject.
What's new in SQLObject
===
* SQLiteConnection.close() now closes and reopens a connection
to in-memory database.
Contributor for this release is Maciej (Matchek) Blizinski.
On Mon, Dec 16, 2013 at 2:51 AM, Roy Smith wrote:
> In article ,
> Grant Edwards wrote:
>
>> UDP is a a _datagram_ service. Either all the bytes in a write()
>> should get sent or none of them. Sending a paritial datagram is _not_
>> a valid option.
>
> I would agree with the above if you said s
In article ,
Grant Edwards wrote:
> UDP is a a _datagram_ service. Either all the bytes in a write()
> should get sent or none of them. Sending a paritial datagram is _not_
> a valid option.
I would agree with the above if you said send() instead of write().
Python socket objects don't have
On Mon, Dec 16, 2013 at 2:35 AM, Jean Dubois wrote:
> I'm using Linux, I did the following:
> svn checkout http://stromberg.dnsalias.org/svn/bufsock/
> which resulted in a directory 'bufsock' being added to my home-directory,
> Do I have to run further commands on the files in this directory?
> Ho
Op zondag 15 december 2013 02:03:14 UTC+1 schreef Dan Stromberg:
> On Sat, Dec 14, 2013 at 5:33 AM, Jean Dubois wrote:
> > Op vrijdag 13 december 2013 16:35:31 UTC+1 schreef Jean-Michel Pichavant:
> >> - Original Message -
> >> > I have an ethernet-rs232 adapter which allows me to connect
> I think PyQt is slowly being pushed aside in favor of PySide, which is
> more license-friendly for use in closed or open projects. I would
> recommend using PySide unless PyQt is a requirement for your project.
Except the issue that Pyside always seems to lag a bit behind Qt
releases, while PyQ
On Sat, 14 Dec 2013 20:51:59 -0800, Mark wrote:
> I have successfully installed python 3.3 for windows, pip and
> livestreamer that is needed for it to work. They are in my scripts
> folder. I either do not understand the script or it no longer works. It
> is more than likely my error. I get error
On 2013-12-15, Dan Stromberg wrote:
> On Fri, Dec 13, 2013 at 8:06 AM, Grant Edwards
> wrote:
>> On 2013-12-12, Dan Stromberg wrote:
Just to be pedantic: _TCP_ sockets reserve that right. UDP sockets
do not, and do in fact guarantee that each message is discrete. [It
appears t
On 2013-12-14, Steven D'Aprano wrote:
> But more seriously, 100% seriously in fact, I think that you'll find that
> *every* GUI framework for Python ships with an entirely different
> language under the hood, usually C.
Name one GUI framework that ships with a C implementation.
> Even if the
On 15/12/2013 04:48, Chris Angelico wrote:
On Sun, Dec 15, 2013 at 3:42 PM, rusi wrote:
To me all this GG complaining sounds like some elderly mom-pop-uncle
who weeps/coaxes/moans/pleads/grumbles/ about a fused light bulb,
rather than climbing on a stool and changing the bloody thing.
No, it'
On 2013-12-15 06:17, Tim Chase wrote:
>> conn = sqlite3.connect('x.sqlite',
>>>... detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
>
> Your example code omitted this one crucial line. Do you specify the
> detect_types parameter to connect()?
It's really the PARSE_DECLTYPES that
On 2013-12-14 23:49, Igor Korot wrote:
> Tim,
>
> On Sun, Dec 8, 2013 at 2:18 PM, Tim Chase wrote:
> conn = sqlite3.connect('x.sqlite',
>>... detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
Your example code omitted this one crucial line. Do you specify the
detect_types paramete
Le dimanche 15 décembre 2013 06:07:09 UTC+1, Terry Reedy a écrit :
> On 12/14/2013 9:39 PM, Steven D'Aprano wrote:
>
> > On Sat, 14 Dec 2013 13:43:41 -0500, Terry Reedy wrote:
>
> >
>
> >> This was reported by Victor Stinner as part of
>
> >> http://bugs.python.org/issue19914
>
> >> to explain
77 matches
Mail list logo