On Fri, 25 Jan 2013 07:55:06 +0100, F.R. wrote:
> The other day, for unfathomable reasons, I lost control over tables
> which I create. There was no concurrent change of anything on the
> machine, such as an update. So I have no suspect. Does the following
> action log suggest any recommendation t
The other day, for unfathomable reasons, I lost control over tables
which I create. There was no concurrent change of anything on the
machine, such as an update. So I have no suspect. Does the following
action log suggest any recommendation to experienced SQL programmers?
1. A table:
mysql>
Ignoring the fact that the Tkinter.Optionmenu is by far the worst widget in the
toolkit, not to mention that the whole idea of "Tkinter X_Variables" was a poor
attempt to reuse code at the expense destroying the simple and intuitive
interface of "get" and "set"; here is your answer:
## START
Hi,
I have a class ClientHandler(asyncore.dispatcher_with_send), it was running
fine without calling any of my own classes. But it got following exception when
I called my own class GetMyResponse inside the def handle_read(self). Not sure
why it causes disturbance to asyncore.dispatcher_with_se
On Fri, Jan 25, 2013 at 12:33 PM, Oscar Benjamin
wrote:
> I have solved similar situations with
> sorted(filenames, key=lambda s: (len(s), s))
> which is better than lexicographical ordering for sorting integer
> strings. It gets the _Int file wrong in this case (but I consider it
> luck that
I need to write a Python script to do the following:
- Connect to a URL and accept any certificate - self-signed or authoritative
- Provide login name/password credentials
- Fill in some presented fields
- Hit a "Submit" button
Why? Because I don't want to have to start a browser and do
On 25 January 2013 01:11, Chris Angelico wrote:
> On Fri, Jan 25, 2013 at 12:03 PM, Oscar Benjamin
> wrote:
>> On 24 January 2013 11:35, Chris Angelico wrote:
>>>
>>> It's usually fine to have int() complain about any non-numerics in the
>>> string, but I must confess, I do sometimes yearn for a
On Fri, Jan 25, 2013 at 12:03 PM, Oscar Benjamin
wrote:
> On 24 January 2013 11:35, Chris Angelico wrote:
>>
>> It's usually fine to have int() complain about any non-numerics in the
>> string, but I must confess, I do sometimes yearn for atoi() semantics:
>> atoi("123asd") == 123, and atoi("qqq"
On Fri, Jan 25, 2013 at 11:20 AM, Steven D'Aprano
wrote:
> Chris Angelico wrote:
>
>> It's usually fine to have int() complain about any non-numerics in the
>> string, but I must confess, I do sometimes yearn for atoi() semantics:
>> atoi("123asd") == 123, and atoi("qqq") == 0. I've not seen a
>>
On 24 January 2013 11:35, Chris Angelico wrote:
>
> It's usually fine to have int() complain about any non-numerics in the
> string, but I must confess, I do sometimes yearn for atoi() semantics:
> atoi("123asd") == 123, and atoi("qqq") == 0. I've not seen a
> convenient Python function for doing
On Fri, Jan 25, 2013 at 7:25 AM, Tim Chase
wrote:
> On 01/24/13 13:34, Leonard, Arah wrote:
>>>
>>> All true (especially the holy wars bit!). OP didn't (as far as
>>> I can see) even say which OS he is using. Anyway, my suggestion
>>> is generally that people use the editor with which they are
>>>
> >>> data = [{'a': 'xx', 'b': 'yy', 'c': 'zz'}, {'a': 'dd', 'b': 'ee', 'c':
> >>> 'ff'}]
> >>> {d["a"]: d["c"] for d in data}
> {'xx': 'zz', 'dd': 'ff'}
Priceless,
That is exactly what I needed, for which I certainly over complicated!
Thanks everyone!
jlc
--
http://mail.python.org/mailman/
On 24 January 2013 21:11, Oscar Benjamin wrote:
l = [{'a': 'xx', 'b': 'yy', 'c': 'zz'}, {'a': 'dd', 'b': 'ee', 'c': 'ff'}]
dict(d.values()[:2] for d in l)
> {'xx': 'zz', 'dd': 'ff'}
Python doesn't guarantee any ordering of items in a dictionary; {'a':
'xx', 'b': 'yy', 'c': 'zz'}.values(
> Hi,
> Slightly different take on an old problem, I have a list of dicts, I need to
> build one dict from this based on two values from each dict in the list. Each
> of the dicts in the list have similar key names, but values of course differ.
>
>
> [{'a': 'xx', 'b': 'yy', 'c': 'zz'}, {'a': '
Simply use Netbeans
On Thu, Jan 24, 2013 at 10:09 PM, llanitedave wrote:
> On Thursday, January 24, 2013 7:54:55 AM UTC-8, rusi wrote:
>
> >
> > [I personally use emacs. It would be sadistic to make that into a
> >
> > recommendation]
>
> Lol! That's just too true. It's also true for Eclipse, w
Joseph L. Casale wrote:
> Slightly different take on an old problem, I have a list of dicts, I need
> to build one dict from this based on two values from each dict in the
> list. Each of the dicts in the list have similar key names, but values of
> course differ.
>
>
> [{'a': 'xx', 'b': 'yy', '
On 01/24/2013 04:51 PM, John Gordon wrote:
In Sharwan Joram
writes:
use vim.
He said he wanted autocomplete. Does Vim have that?
Vim has everything, you just need a bunch of plugins.
I code mainly in python and django, and I use these plugins (among others):
powerline (status bar indi
On Thursday, January 24, 2013 7:54:55 AM UTC-8, rusi wrote:
>
> [I personally use emacs. It would be sadistic to make that into a
>
> recommendation]
Lol! That's just too true. It's also true for Eclipse, which I use very
comfortably on Windows 7, but has proven to be a nightmare to set up o
On 24 January 2013 20:58, Joseph L. Casale wrote:
> Hi,
> Slightly different take on an old problem, I have a list of dicts, I need to
> build one dict
> from this based on two values from each dict in the list. Each of the dicts
> in the list have
> similar key names, but values of course diffe
On 01/24/2013 03:58 PM, Joseph L. Casale wrote:
Hi,
Slightly different take on an old problem, I have a list of dicts, I need to
build one dict
from this based on two values from each dict in the list. Each of the dicts in
the list have
similar key names, but values of course differ.
[{'a': '
Hi,
Slightly different take on an old problem, I have a list of dicts, I need to
build one dict
from this based on two values from each dict in the list. Each of the dicts in
the list have
similar key names, but values of course differ.
[{'a': 'xx', 'b': 'yy', 'c': 'zz'}, {'a': 'dd', 'b': 'ee'
On 24/01/2013 20:01, Oscar Benjamin wrote:
On 24 January 2013 17:13, Tim Golden wrote:
A package-based module run via -m (python -m package.module) works
as described (including the implicit __main__ module, my
primary use-case).
Does it work in the "python -m package.module" case? It looks t
>> Sound advice. Most of the time I still use Visual Studio for editing
>> Python because I also use it for C++, so it's just what I'm used to.
>> No big deal, really. Whatever works is what works. It's just a text
>> file after all.
>>
>
> I assume you're using PyTools (http://pytools.code
On 01/24/13 13:34, Leonard, Arah wrote:
All true (especially the holy wars bit!). OP didn't (as far as
I can see) even say which OS he is using. Anyway, my suggestion
is generally that people use the editor with which they are
already comfortable.
Sound advice. [snip] Whatever works is what wo
On 2013-01-24, Tim Chase wrote:
> On 01/24/13 10:23, Thomas Heller wrote:
>> Am 24.01.2013 16:54, schrieb rusi:
>>> [I personally use emacs. It would be sadistic to make that into a
>>> recommendation]
>>>
>> It would be truly sadistic to force a long-time emacs user to any
>> other editor.
>
> I
On 2013-01-24, John Gordon wrote:
> In Sharwan Joram
> writes:
>
>> use vim.
>
> He said he wanted autocomplete. Does Vim have that?
Yes, you use its ctags support to get it working, I believe.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
Leonard, Arah bruker-axs.com> writes:
>
> > All true (especially the holy wars bit!). OP didn't (as far as I can see)
> >even say which OS he is using.
> Anyway, my suggestion is generally that people use the editor with which
> > they are already comfortable.
> >
>
> Sound advice. Most of
On 24 January 2013 17:13, Tim Golden wrote:
> On 24/01/2013 16:53, Oscar Benjamin wrote:
>>> Does it work if you use the -m option to run a module rather than a script?
>>
>> Sorry that was written incorrectly. I meant to say: does it work when
>> a module is directly on sys.path rather than as a
> All true (especially the holy wars bit!). OP didn't (as far as I can see)
> even say which OS he is using. Anyway, my suggestion is generally that people
> use the editor with which they are already comfortable.
>
Sound advice. Most of the time I still use Visual Studio for editing Python
b
On Jan 24, 3:31 pm, mikp...@gmail.com wrote:
> Dear all,
>
> I am asking for a design/strategy suggestion.
>
> What I have to do is to write a Python application that will send MIDI
> commands to an iPad application.
> All I know is that the iPad application can be connected to an external Midi
>
On Thu, 24 Jan 2013 22:10:21 +1100, Chris Angelico wrote:
> On Thu, Jan 24, 2013 at 8:43 PM, Hazard Seventyfour
> wrote:
>> Hello,
>>
>> I new in this python and decided to learn more about it, so i can make
>> an own script :),
>>
>> for all senior can you suggest me the best, friendly and easy
jilltoler.com is a web blog where you can find WHAT IS Search Engine
optimization, what is SEO Analytics, and how to you SEO tools and
Importance of SEO Rankings.
For more information please visit : http://www.jilltoler.com
--
http://mail.python.org/mailman/listinfo/python-list
moonhkt wrote:
> Data file
> V1
> V2
> V3
> V4
> V4
> V3
>
> How to using count number of data ?
>
> Output
> V1 = 1
> V2 = 1
> V3 =2
> V4 = 2
import collections
with open(data_file) as f:
print(collections.Counter(f.readlines()))
it's a start
--
ZeD
--
http://mail.python.org/mai
Τη Πέμπτη, 24 Ιανουαρίου 2013 5:39:54 μ.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε:
> UPDATE visitors
>
>SET visitors.hits=visitors.hits+1,
>
>visitors.useros=%s,
>
>visitors.browser=%s,
>
>visitors.date=%s
>
> WHERE visitors.pin=(SELECT counters.pin
>
>
Am 24.01.2013 18:06, schrieb tamn...@gmail.com:
Any suggestions for study?..: Is is possible to take a large
executable with GUI and real time data and images, to extract
modules, and it can run as if it looks like a monolithic application
(windows over main windows, or images over other images)
I am changing the font of an OptionMenu widget:
w = OptionMenu(master, variable, "one", "two", "three")
with
w.configure()
That changes the font of the widget but how can I change also the font (size)
of the menu that appears when the mouse clicks it?
Thanks in advandce,
A.
--
http://
On 01/24/2013 12:06 PM, tamn...@gmail.com wrote:
Any suggestions for study?..:
Is is possible to take a large executable with GUI and real time data and
images, to extract modules, and it can run as if it looks like a monolithic
application (windows over main windows, or images over other ima
I think PyCharm is ideal for you.
http://www.jetbrains.com/pycharm/
--
http://mail.python.org/mailman/listinfo/python-list
On 24/01/2013 16:53, Oscar Benjamin wrote:
>> Does it work if you use the -m option to run a module rather than a script?
>
> Sorry that was written incorrectly. I meant to say: does it work when
> a module is directly on sys.path rather than as a submodule of a
> package? In this case __package__
Any suggestions for study?..:
Is is possible to take a large executable with GUI and real time data and
images, to extract modules, and it can run as if it looks like a monolithic
application (windows over main windows, or images over other images) but is
various python script driven modules ca
On 01/24/13 10:23, Thomas Heller wrote:
Am 24.01.2013 16:54, schrieb rusi:
[I personally use emacs. It would be sadistic to make that into a
recommendation]
It would be truly sadistic to force a long-time emacs user to any
other editor.
I saw the recommendation for Vim elsewhere on the threa
On 24 January 2013 16:08, Oscar Benjamin wrote:
> On 24 January 2013 15:51, Tim Golden wrote:
>> On 24/01/2013 15:28, Oscar Benjamin wrote:
>>> On 24 January 2013 13:45, Tim Golden wrote:
On 24/01/2013 11:30, Oscar Benjamin wrote:
> I don't really understand what your spec is. Why do yo
Am 24.01.2013 16:54, schrieb rusi:
[I personally use emacs. It would be sadistic to make that into a
recommendation]
It would be truly sadistic to force a long-time emacs user to any
other editor.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list
On 24 January 2013 15:51, Tim Golden wrote:
> On 24/01/2013 15:28, Oscar Benjamin wrote:
>> On 24 January 2013 13:45, Tim Golden wrote:
>>> On 24/01/2013 11:30, Oscar Benjamin wrote:
I don't really understand what your spec is. Why do you need to
inspect this information from sys.argv?
In Sharwan Joram
writes:
> use vim.
He said he wanted autocomplete. Does Vim have that?
--
John Gordon A is for Amy, who fell down the stairs
gor...@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb
On Fri, Jan 25, 2013 at 2:54 AM, rusi wrote:
> - last expression with _ (underscore)
Small terminology quibble: That's not last expression, but last non-None result.
>>> 1+2
3
>>> _
3
>>> _,None
(3, None)
>>> _
(3, None)
>>> _[1]
>>> _
(3, None)
Otherwise, agree totally. Get to know the interac
On Jan 24, 2:43 pm, Hazard Seventyfour wrote:
> Hello,
>
> I new in this python and decided to learn more about it, so i can make an own
> script :),
>
> for all senior can you suggest me the best, friendly and easy use with nice
> GUI editor for me, and have many a good features such as auto co
On 24/01/2013 15:28, Oscar Benjamin wrote:
> On 24 January 2013 13:45, Tim Golden wrote:
>> On 24/01/2013 11:30, Oscar Benjamin wrote:
>>> I don't really understand what your spec is. Why do you need to
>>> inspect this information from sys.argv? Can you not just always use
>>> 'python -m pkg' as
Duncan Booth writes:
> I'm not MySQL expert, but something like this might work:
>
> cursor.execute('''UPDATE visitors,counter
> SET visitors.hits=visitors.hits+1, visitors.useros=%s,
> visitors.browser =%s, visitors.date=%s
> WHERE visitors.pin=counter.pin AND counter.page = %s
> AND v
On Thursday, January 24, 2013 8:42:19 PM UTC+5:30, John Gordon wrote:
> In Hazard Seventyfour
> writes:
>
>
>
> > Hello,
>
>
>
> > I new in this python and decided to learn more about it, so i can make
>
> > an own script :),
>
>
>
> > for all senior can you suggest me the best, friend
On 24 January 2013 13:45, Tim Golden wrote:
> On 24/01/2013 11:30, Oscar Benjamin wrote:
>> I don't really understand what your spec is. Why do you need to
>> inspect this information from sys.argv? Can you not just always use
>> 'python -m pkg' as your entry point?
>
[SNIP]
>
> For completeness,
On Fri, Jan 25, 2013 at 2:19 AM, Duncan Booth
wrote:
> Ferrous Cranus wrote:
>
>> I can do that but then i have to use that pin column's value in my
>> next statement.
>>
>> cursor.execute( '''UPDATE visitors SET hits = hits + 1, useros = %s,
>> browser = %s, date = %s WHERE pin = %s AND host = %
Ferrous Cranus wrote:
> I can do that but then i have to use that pin column's value in my
> next statement.
>
> cursor.execute( '''UPDATE visitors SET hits = hits + 1, useros = %s,
> browser = %s, date = %s WHERE pin = %s AND host = %s''', (useros,
> browser, date, pin, host))
I'm not MySQL
In Hazard Seventyfour
writes:
> Hello,
> I new in this python and decided to learn more about it, so i can make
> an own script :),
> for all senior can you suggest me the best, friendly and easy use with
> nice GUI editor for me, and have many a good features such as auto
> complete/auto cor
On Fri, Jan 25, 2013 at 1:25 AM, iMath wrote:
>
> anyone can make a Python bindings of VLC-Qt ?
> https://github.com/ntadej/vlc-qt
> accurately, can anyone make a PyQt bindings of VLC-Qt ?
Yes, someone can. Ideally, someone who knows C++, Python, VLC, and Qt,
and has the time to port the code
On Fri, Jan 25, 2013 at 12:31 AM, Ferrous Cranus wrote:
> Τη Πέμπτη, 24 Ιανουαρίου 2013 1:16:51 μ.μ. UTC+2, ο χρήστης Chris Angelico
> έγραψε:
>> Glad you've listened to at least some of what you've been told. But if
>> you want to be taken seriously on this list, I recommend going back to
>> you
Τη Πέμπτη, 24 Ιανουαρίου 2013 3:37:24 μ.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε:
> How? What's the error message/traceback?
REURNING is not a correct mysql syntax thats why it produces errors.
> If, as Chris said, MySQL does not support the “RETURNING” syntax, you
>
> cannot use that. I gave two
anyone can make a Python bindings of VLC-Qt ?
https://github.com/ntadej/vlc-qt
accurately, can anyone make a PyQt bindings of VLC-Qt ?
--
http://mail.python.org/mailman/listinfo/python-list
On 24/01/2013 11:30, Oscar Benjamin wrote:
> I don't really understand what your spec is. Why do you need to
> inspect this information from sys.argv? Can you not just always use
> 'python -m pkg' as your entry point?
Sorry about the confusion. I think my original point was simply one
of surprise
Ferrous Cranus writes:
> The following statement fails.
>
> [code]
> cursor.execute( '''INSERT INTO counters(page, hits) VALUES(%s, %s) RETURNING
> (pin)
> ON DUPLICATE KEY UPDATE hits = hits + 1''',
> (htmlpage, 1) )
> [/code]
How? What's the error message/traceback?
Τη Πέμπτη, 24 Ιανουαρίου 2013 1:16:51 μ.μ. UTC+2, ο χρήστης Chris Angelico
έγραψε:
> On Thu, Jan 24, 2013 at 10:04 PM, Ferrous Cranus
> wrote:
>
> > I;am now convinced the hash solution isn't reversible and also isn't unique.
>
> > I'am trying the database oriented solution.
>
>
>
> Glad yo
column 'pin' is an 5-digit integer auto_increment primary key.
What i want is to insert a new record or update the existing one, if 'pin'
column's value exist. The following statement fails.
[code]
cursor.execute( '''INSERT INTO counters(page, hits) VALUES(%s, %s) RETURNING
(pin)
On Thu, Jan 24, 2013 at 11:25 PM, wrote:
> I think I am not lucky :-(
>
> $ aplaymidi -l
> PortClient name Port name
> 14:0Midi Through Midi Through Port-0
>
> I get the same either the iPad is connected or not.
> So I guess is not recognized.
>
[..]
>
> > ~$ pmidi -p 128:0 No.19.mid
>
> > Could not open file No.19.mid
>
> >
>
> > Doesn't that mean that the iPad is not seen?
>
>
> Heya! That was just an example; I used track number 19 from the opera
>
> "Iolanthe" as my test file. Pick any other MIDI file you have handy.
This is
Thanks a lot people.. :).. :)
On Thu, Jan 24, 2013 at 1:10 PM, Tobias M. wrote:
> Am 24.01.2013 13:02, schrieb Chris Angelico:
>
> On Thu, Jan 24, 2013 at 10:58 PM, Tobias M. wrote:
>>
>>> Chris Angelico wrote:
>>>
I'd not consider the performance, but the correctness. If you're
ex
Ferrous Cranus writes:
> Τη Πέμπτη, 24 Ιανουαρίου 2013 1:25:20 μ.μ. UTC+2, ο χρήστης Lele Gaifax
> έγραψε:
Please, trim your response messages, cutting away useless details.
>
> I just tried this statement:
>
> ==
> cursor.execute( '''INSERT INTO counter
Am 24.01.2013 13:02, schrieb Chris Angelico:
On Thu, Jan 24, 2013 at 10:58 PM, Tobias M. wrote:
Chris Angelico wrote:
I'd not consider the performance, but the correctness. If you're
expecting them to be integers, just cast them, and specifically
_don't_ catch ValueError. Any non-integer value
On Thu, Jan 24, 2013 at 10:58 PM, Tobias M. wrote:
> Chris Angelico wrote:
>>
>> I'd not consider the performance, but the correctness. If you're
>> expecting them to be integers, just cast them, and specifically
>> _don't_ catch ValueError. Any non-integer value will then noisily
>> abort the scr
Τη Πέμπτη, 24 Ιανουαρίου 2013 1:25:20 μ.μ. UTC+2, ο χρήστης Lele Gaifax έγραψε:
> Ferrous Cranus writes:
>
>
>
> > I;am now convinced the hash solution isn't reversible and also isn't
>
> > unique.
>
>
>
> Great!
>
>
>
> > how is the mysql statement is going to find the 'pin' to update t
Chris Angelico wrote:
I'd not consider the performance, but the correctness. If you're
expecting them to be integers, just cast them, and specifically
_don't_ catch ValueError. Any non-integer value will then noisily
abort the script. (It may be worth checking for blank first, though,
depending o
On Thu, Jan 24, 2013 at 10:48 PM, wrote:
> Thanks for your help Chris!
> forgive my ignorance, but I am not sure what you mean.
> I've installed pmidi and what I get is:
>
> ~$ pmidi -p 128:0 No.19.mid
> Could not open file No.19.mid
>
> Doesn't that mean that the iPad is not seen?
Heya! That wa
On Thursday, January 24, 2013 10:44:47 AM UTC, Chris Angelico wrote:
[..]
>
> Are you able to hook into ALSA? I've had reasonable success driving a
>
> USB-MIDI cable using ALSA. See if you can do it with the inbuilt
>
> 'pmidi' app first:
>
>
>
> $ pmidi -p 128:0 No.19.mid
>
>
>
> (that u
On Thu, Jan 24, 2013 at 10:16 PM, Tobias M. wrote:
> Chris Angelico wrote:
>> The other thing you may want to consider, if the values are supposed
>> to be integers, is to convert them to Python integers before
>> comparing.
>
> I thought of this too and I wonder if there are any major differences
Rouslan Korneychuk wrote:
> I found the answer in Python's source code. When you execute a code
> object, PyFrame_New is called which gets 'bultins' from 'globals', but
> inside PyFrame_New (defined on line 596 of Objects/frameobject.c) is the
> following (line 613):
>
>builtins = PyDict_GetI
A quick question:
On xml.etree,
When I scan in a handwritten XML file, and there are mismatched tags --
it will throw an exception.
and the exception will contain a line number of the closing tag which
does not have a mate of the same kind.
Is there a way to get the line number of the earlier
On 24 January 2013 10:56, Tim Golden wrote:
> On 24/01/2013 10:06, Oscar Benjamin wrote:
>> On 24 January 2013 04:49, Steven D'Aprano
>> wrote:
>> [SNIP]
>>>
>>> Contrariwise, I don't believe that there is currently *any* way to
>>> distinguish between running a script with or without -m. That sh
On Thu, Jan 24, 2013 at 10:01 PM, inshu chauhan wrote:
> Yeah I tried printing, there were trailing white spaces, so i used strip()
> and IT Worked !!! :)
Awesome! Keep repr() in mind, it's a great way to check what's really there.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jan 24, 2013 at 10:25 PM, Lele Gaifax wrote:
> The simplest way is to execute a SELECT just after the insertion, doing
> a
>
> SELECT pin FROM counters WHERE page = %s
>
> I don't use MySQL, so I can't say if it supports "INSERT ... RETURNING ..."
> SQL syntax: should it, then you could
Chris Angelico wrote:
The other thing you may want to consider, if the values are supposed
to be integers, is to convert them to Python integers before
comparing. Currently, you're working with strings. Replace this:
if sp[9] == sp[10]:
with this:
if int(sp[9]) == int(sp[10]):
I thought of t
Ferrous Cranus writes:
> I;am now convinced the hash solution isn't reversible and also isn't
> unique.
Great!
> how is the mysql statement is going to find the 'pin' to update the
> specific record.
The simplest way is to execute a SELECT just after the insertion, doing
a
SELECT pin FROM c
On Thu, Jan 24, 2013 at 8:43 PM, Hazard Seventyfour
wrote:
> Hello,
>
> I new in this python and decided to learn more about it, so i can make an own
> script :),
>
> for all senior can you suggest me the best, friendly and easy use with nice
> GUI editor for me, and have many a good features su
On 24/01/2013 10:56, Tim Golden wrote:
> if the package which is reconstructing the command line the package
> which was the target of the original command line.
Sorry:
if the package which is reconstructing the command line *is not*
the package which was the target of the original command l
On Thu, Jan 24, 2013 at 10:04 PM, Ferrous Cranus wrote:
> I;am now convinced the hash solution isn't reversible and also isn't unique.
> I'am trying the database oriented solution.
Glad you've listened to at least some of what you've been told. But if
you want to be taken seriously on this list,
On Thu, Jan 24, 2013 at 11:55 AM, Tobias M. wrote:
> Hi,
>
> do a "print sp" after the split and you might see that the strings don't
> look as you expected. There might be leading or trailing whitespaces in the
> splitted strings and in sp[10] there probably is a line break "\n" at the
> end.
>
# insert new page record in table counters or update it if already exists
try:
cursor.execute( '''INSERT INTO counters(page, hits) VALUES(%s,
%s)
ON DUPLICATE
KEY UPDATE hits = hits + 1''', (htmlpage, 1) )
On Thu, Jan 24, 2013 at 9:37 PM, inshu chauhan wrote:
> For me I think the programme is logically correct, but its giving me results
> which are strange.
> It is Printing " Different Class" even when sp[9] is equal to sp[10] and
> "Same class" when sp[9] is not equal to sp[10]. and sp[9] and sp
On 24/01/2013 10:06, Oscar Benjamin wrote:
> On 24 January 2013 04:49, Steven D'Aprano
> wrote:
> [SNIP]
>>
>> Contrariwise, I don't believe that there is currently *any* way to
>> distinguish between running a script with or without -m. That should be
>> fixed.
>
> As I said earlier in the threa
Hi,
do a "print sp" after the split and you might see that the strings don't
look as you expected. There might be leading or trailing whitespaces in
the splitted strings and in sp[10] there probably is a line break "\n"
at the end.
To remove those unwanted characters you could use the strip()
Santosh Kumar wrote:
> But I can; see: http://pastebin.com/ZGGeZ71r
You have messed with your cat command -- it adds line numbers.
Therefore the output of
cat somefile | ./argpa.py
differs from
./argpa.py somefile
Try
./argpa.py < somefile
to confirm my analysis. As to why your capitalisati
On Thu, Jan 24, 2013 at 9:31 PM, wrote:
> What I have to do is to write a Python application that will send MIDI
> commands to an iPad application.
> All I know is that the iPad application can be connected to an external Midi
> deck through a usb cable and be controlled.
> So I think I would c
On Thursday, January 24, 2013 9:43:31 AM UTC, Hazard Seventyfour wrote:
> Hello,
>
>
>
> I new in this python and decided to learn more about it, so i can make an own
> script :),
>
>
>
> for all senior can you suggest me the best, friendly and easy use with nice
> GUI editor for me, and ha
Here I have a code which basically reads a csv file, tries to compare the
last 2 items in each line of the file.
f = open(r"Z:\modules\Feature_Vectors_300_Pclass.arff")
for l in f:
sp = l.split(",")
if len(sp) != 11:
print >> of, l,
else:
#print sp[9], sp[10]
i
Dear all,
I am asking for a design/strategy suggestion.
What I have to do is to write a Python application that will send MIDI commands
to an iPad application.
All I know is that the iPad application can be connected to an external Midi
deck through a usb cable and be controlled.
So I think I w
On 23 January 2013 17:33, Isaac Won wrote:
> On Wednesday, January 23, 2013 10:51:43 AM UTC-6, Oscar Benjamin wrote:
>> On 23 January 2013 14:57, Isaac Won wrote:
>>
>> > On Wednesday, January 23, 2013 8:40:54 AM UTC-6, Oscar Benjamin wrote:
>>
>> Unless I've misunderstood how this function is su
But I can; see: http://pastebin.com/ZGGeZ71r
On 1/24/13, Peter Otten <__pete...@web.de> wrote:
> Santosh Kumar wrote:
>
>> On 1/24/13, Peter Otten <__pete...@web.de> wrote:
>>> Santosh Kumar wrote:
>>>
Yes, Peter got it right.
Now, how can I replace:
script, givenfile
On 24 January 2013 04:49, Steven D'Aprano
wrote:
[SNIP]
>
> Contrariwise, I don't believe that there is currently *any* way to
> distinguish between running a script with or without -m. That should be
> fixed.
As I said earlier in the thread, the __package__ module global
distinguishes the two ca
Hello,
I new in this python and decided to learn more about it, so i can make an own
script :),
for all senior can you suggest me the best, friendly and easy use with nice GUI
editor for me, and have many a good features such as auto complete/auto correct.
any recommend? Thanks ^_^
--
http://
Santosh Kumar wrote:
> On 1/24/13, Peter Otten <__pete...@web.de> wrote:
>> Santosh Kumar wrote:
>>
>>> Yes, Peter got it right.
>>>
>>> Now, how can I replace:
>>>
>>> script, givenfile = argv
>>>
>>> with something better that takes argv[1] as input file as well as
>>> reads input from stdin
On 1/24/13, Peter Otten <__pete...@web.de> wrote:
> Santosh Kumar wrote:
>
>> Yes, Peter got it right.
>>
>> Now, how can I replace:
>>
>> script, givenfile = argv
>>
>> with something better that takes argv[1] as input file as well as
>> reads input from stdin.
>>
>> By input from stdin, I mea
Hello list!
I'm trying to figure out how to flatten a MIMEText message to bytes
using an 8bit Content-Transfer-Encoding in Python 3.3. Here's what
I've tried so far:
# -*- encoding: utf-8 -*-
import email.encoders
from email.charset import Charset
from email.generator import BytesGenerat
100 matches
Mail list logo