Doug wrote:
Hi!
I am trying to write a UTF-8 file of UNICODE strings with a carriage
return at the end of each line (code below).
filOpen = codecs.open("c:\\temp\\unicode.txt",'w','utf-8')
str1 = u'This is a test.'
str2 = u'This is the second line.'
str3 = u'This is the third line.'
strCR = u
On Thu, 19 Nov 2009 10:56:35 +1100, Ben Finney wrote:
> Wells writes:
>
>> Is it... pythonic, then, to have these lines of tabs/spaces to support
>> code collapsing? Is it proper, improper, or irrelevant?
>
> It's quite improper (though syntactically null, in Python) to have
> trailing whitespa
On Nov 18, 4:58 pm, Phlip wrote:
> Python:
>
> I have a quaint combinatorics problem. Before I solve it, or find a
> solution among "generators", I thought y'all might like to show off
> any solutions.
>
> Given an array like this...
>
> [0, 4, 3]
>
> Produce an array like this:
>
> [
> [0
On Wed, 18 Nov 2009 15:58:24 -0800, Steve Howell wrote:
> On Nov 18, 2:22 pm, Steven D'Aprano
> wrote:
>> On Wed, 18 Nov 2009 02:06:49 -0800, Steve Howell wrote:
>> > P.S. The underscores before the method names might look a little
>> > funny for inner methods, but it's the nature of the code..._
On Nov 18, 3:02 pm, Steven D'Aprano
wrote:
> Lexical duplication is one of the weakest code smells around, because it
> is so prone to false negatives. You often can't avoid referring to the
> same lexical element multiple times:
>
> def sinc(x):
> if x != 0:
> return sin(x)/x
> re
Hello,
I am a newbie both in Scrapy and Python. When I create a project with
Scrapy I get these errors:
C:\Python26\lib\site-packages\twisted\python\filepath.py:12:
DeprecationWarning: the sha module is deprecated; use the hashlib
module instead import sha
C:\Python26\lib\site-packages\twisted\sp
On Nov 18, 5:13 pm, Steven D'Aprano
wrote:
> On Wed, 18 Nov 2009 15:58:24 -0800, Steve Howell wrote:
> > On Nov 18, 2:22 pm, Steven D'Aprano
> > wrote:
> >> On Wed, 18 Nov 2009 02:06:49 -0800, Steve Howell wrote:
> >> > P.S. The underscores before the method names might look a little
> >> > funny
Steven D'Aprano writes:
> On Thu, 19 Nov 2009 10:56:35 +1100, Ben Finney wrote:
>
> > It's quite improper (though syntactically null, in Python) to have
> > trailing whitespace on lines. That includes blank lines.
>
> Blank lines are far from improper in Python, they're recommended by
> PEP 8.
I
On Wed, 18 Nov 2009 17:14:27 -0800, Steve Howell wrote:
> In my rewritten code, here is the smell:
>
> dispatches = {
> 'dict': _dict,
> 'list': _list,
> 'attr': _attr,
> 'key': _key,
> 'as': _as,
> 'call': _call,
>
Hi,
sth == something :) sorry for the abbreviation. I'm talking about the
shallow copy, still it's a copy. Unnecessary in my case and the worst part
in my scenario is the creation (allocation) and deletion of a very large
number of lists of moderate size (a few hundred objects) generated due to
sl
On Nov 18, 5:27 pm, Steven D'Aprano
wrote:
> On Wed, 18 Nov 2009 18:28:11 +1300, greg wrote:
> > r wrote:
> >> I think the syntax was chosen because the alternatives are even worse
> >> AND since assignment is SO common in programming, would you *really*
> >> rather type two chars instead of one?
On Wed, Nov 18, 2009 at 5:23 PM, Zeynel wrote:
> Hello,
>
> I am a newbie both in Scrapy and Python. When I create a project with
> Scrapy I get these errors:
>
> C:\Python26\lib\site-packages\twisted\python\filepath.py:12:
> DeprecationWarning: the sha module is deprecated; use the hashlib
> modu
http://www.python.org/dev/peps/pep-0008/
The above webpage states the following naming convention. Such a
variable can be an internal variable in a class. I'm wondering what is
the naming convention for the method that access such variable.
- _single_leading_underscore: weak "internal use" in
On Nov 18, 5:42 pm, Steven D'Aprano
wrote:
> On Wed, 18 Nov 2009 17:14:27 -0800, Steve Howell wrote:
> > In my rewritten code, here is the smell:
>
> > dispatches = {
> > 'dict': _dict,
> > 'list': _list,
> > 'attr': _attr,
> > 'key': _key,
> >
List,
I want to input hex number instead of int number. in type="int" in following,
parser.add_option("-F", "--forcemcs", dest="force_mcs", type="int", default=0,
help="index of 11n mcs table. Default: 0.")
How can I do it?
Thanks.
--henry
--
http://mail.python.org/mailman/listinfo/p
On Wed, Nov 18, 2009 at 4:58 PM, Phlip wrote:
> Python:
>
> I have a quaint combinatorics problem. Before I solve it, or find a
> solution among "generators", I thought y'all might like to show off
> any solutions.
>
> Given an array like this...
>
> [0, 4, 3]
>
> Produce an array like this:
>
>
On Wed, Nov 18, 2009 at 2:22 PM, Themis Bourdenas <
t.bourdena...@imperial.ac.uk> wrote:
> It's nothing in the library that completely imitates the slice without the
> copies, right?
You might be interested in my blist extension type (link below).
Syntactically, using a blist is just like using
On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu wrote:
> http://www.python.org/dev/peps/pep-0008/
>
> The above webpage states the following naming convention. Such a
> variable can be an internal variable in a class. I'm wondering what is
> the naming convention for the method that access such variable.
LinkedIn
Jim Qiu requested to add you as a connection on LinkedIn:
--
Jaime,
I'd like to add you to my professional network on LinkedIn.
- Jim
Accept invitation from Jim Qiu
http://www.linkedin.com/e/I2LlXdLlWUhFABKmxVOlgGLlWUhFAfhMPPF/blk/I
On Wed, Nov 18, 2009 at 9:27 PM, Peng Yu wrote:
> http://www.python.org/dev/peps/pep-0008/
>
> The above webpage states the following naming convention. Such a
> variable can be an internal variable in a class. I'm wondering what is
> the naming convention for the method that access such variable.
There are many special characters listed on
http://docs.python.org/library/re.html
I'm wondering if there is a convenient function that can readily
convert a string with the special characters to its corresponding
regex. For example,
"some.thing" => "some\.thing"
--
http://mail.python.org/mailma
On Wednesday 18 November 2009 17:47:09 tbour...@doc.ic.ac.uk wrote:
> Hi,
>
> sth == something :) sorry for the abbreviation. I'm talking about the
> shallow copy, still it's a copy.
I'm not sure you're understanding the point others have been making. A
list item is merely another reference to
On Wed, Nov 18, 2009 at 8:50 PM, Benjamin Kaplan
wrote:
> On Wed, Nov 18, 2009 at 9:27 PM, Peng Yu wrote:
>> http://www.python.org/dev/peps/pep-0008/
>>
>> The above webpage states the following naming convention. Such a
>> variable can be an internal variable in a class. I'm wondering what is
>>
On Wed, Nov 18, 2009 at 6:16 PM, Jim Qiu wrote:
>
> LinkedIn
>
> Jim Qiu requested to add you as a connection on LinkedIn:
>
> Jaime,
>
> I'd like to add you to my professional network on LinkedIn.
>
> - Jim
>
>
> Accept View invitation from Jim Qiu
>
>
> WHY MIGHT CONNECTING WITH JIM QIU BE A GOO
On Wed, Nov 18, 2009 at 8:47 PM, Chris Rebert wrote:
> On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu wrote:
>> http://www.python.org/dev/peps/pep-0008/
>>
>> The above webpage states the following naming convention. Such a
>> variable can be an internal variable in a class. I'm wondering what is
>> th
Peng Yu writes:
> The above webpage states the following naming convention. Such a
> variable can be an internal variable in a class. I'm wondering what is
> the naming convention for the method that access such variable.
A property http://docs.python.org/library/functions.html#property>
named w
On Wed, Nov 18, 2009 at 6:51 PM, Peng Yu wrote:
> There are many special characters listed on
> http://docs.python.org/library/re.html
>
> I'm wondering if there is a convenient function that can readily
> convert a string with the special characters to its corresponding
> regex. For example,
>
>
There are many special characters listed on
http://docs.python.org/library/re.html
I'm wondering if there is a convenient function that can readily
convert a string with the special characters to its corresponding
regex. For example,
"some.thing" => "some\.thing"
Did you try bothering to *read
On Wed, Nov 18, 2009 at 9:12 PM, Tim Chase
wrote:
>> There are many special characters listed on
>> http://docs.python.org/library/re.html
>>
>> I'm wondering if there is a convenient function that can readily
>> convert a string with the special characters to its corresponding
>> regex. For examp
On Wed, Nov 18, 2009 at 7:04 PM, Peng Yu wrote:
> On Wed, Nov 18, 2009 at 8:47 PM, Chris Rebert wrote:
>> On Wed, Nov 18, 2009 at 6:27 PM, Peng Yu wrote:
>>> http://www.python.org/dev/peps/pep-0008/
>>>
>>> The above webpage states the following naming convention. Such a
>>> variable can be an i
Hi Guys,
I am trying to get the choice made by the user on Python Qt with
radiobutton.
QtCore.QObject.connect(self.radioButton1,
QtCore.SIGNAL("toggled()"),self.radio_activateInput)
QtCore.QObject.connect(self.radioButton2,
QtCore.SIGNAL("toggled()"),self.radio_activateInput)
and that
QtCore.QO
Hello
I'm making auto-login script by use mechanize python.
Before I was used mechanize with no problem, but http://www.gmarket.co.kr in
this site I couldn't make it .
whenever i try to login always login page was returned even with correct
gmarket id , pass, i can't login and I saw some suspic
Yes, it shows as empty string. But I learned about Scrapy and now I am
studying the tutorial. I like it better than BeautifulSoup. For
beginners it is better, I think.
On Nov 18, 11:50 am, Peter Pearson wrote:
> On Tue, 17 Nov 2009 14:38:55 -0800 (PST), Zeynel wrote:
>
> [snip]
>
> from Bea
Thanks. I tried the suppress it but no success. I need to read the
documentation more carefully. But since this is not error, I will
ignore them for now.
On Nov 18, 9:12 pm, Chris Rebert wrote:
> On Wed, Nov 18, 2009 at 5:23 PM, Zeynel wrote:
> > Hello,
>
> > I am a newbie both in Scrapy and Py
FIX message is the "Financial information Exchange" protocol
messages...
any 3rd libs we have?
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 19, 3:21 pm, "Stephen.Wu" <54wut...@gmail.com> wrote:
> FIX message is the "Financial information Exchange" protocol
> messages...
> any 3rd libs we have?
You mean like this one that was the first result when I googled
'python "financial information exchange"'?
http://www.quickfixengine.or
hong zhang wrote:
"cont_x --" doesn't work. So the above can't be the
actual code.
You never want to post the actual code you're
running. That would make it too easy for people to help.
It is typo.
To avoid typos, copy and paste, as has been suggested many times.
--
http://mail.python.
Hi!
You forget to write "urwid" do not run under Windows.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
You forget to write "urwid" do not run under Windows.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
You forget to write "urwid" do not run under Windows.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Here is my situation:
I'm using the command line, as in, I'm not starting gnome or kde (I'm on
linux.)
I have a string of text attached to a variable,. So I need to use one of
the browsers on linux, that run under the command line, eg. lynx,
elinks, links, links2 and do the following.
1. Open
101 - 141 of 141 matches
Mail list logo