comp.lang.python - 26 new messages in 5 topics - digest
comp.lang.python
http://groups.google.com/group/comp.lang.python?hl=en
comp.lang.python@googlegroups.com
Today's topics:
* To whoever hacked into my Database - 14 messages, 6 authors
http://groups.google.com/group/comp.lang.python/t/1459c9bdf9ab0ada?hl=en
* Talking to a 'C' program - 7 messages, 5 authors
http://groups.google.com/group/comp.lang.python/t/22a552fc2a9a5973?hl=en
* pywin32 programming error on Win7 with shell.SHGetDesktopFolder, desktop.
BindToObject, desktop.GetDisplayNameOf - 2 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/65acf69c88845011?hl=en
* Algorithm that makes maximum compression of completly diffused data. - 2
messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/cf4b4e4ba592ec63?hl=en
* OT: How to tell an HTTP client to limit parallel connections? - 1 messages,
1 author
http://groups.google.com/group/comp.lang.python/t/a27aeccbb4cdfc08?hl=en
==============================================================================
TOPIC: To whoever hacked into my Database
http://groups.google.com/group/comp.lang.python/t/1459c9bdf9ab0ada?hl=en
==============================================================================
== 1 of 14 ==
Date: Fri, Nov 8 2013 6:09 am
From: Mark Lawrence
On 08/11/2013 13:57, Νίκος Αλεξόπουλος wrote:
> It was more of a supreise that it didn't return back any data.
You're still surprised that *YOUR* crap code doesn't return data,
funnier by the minute.
"Here Nikos have some code and a database design that works".
"No I'm doing it my way".
Your one saving grace is that if someone decides to sue you there's not
much evidence. Apart from a few threads that you've started here, of
course.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
== 2 of 14 ==
Date: Fri, Nov 8 2013 6:44 am
From: Antoon Pardon
Op 08-11-13 14:57, Νίκος Αλεξόπουλος schreef:
> Στις 8/11/2013 3:30 μμ, ο/η Mark Lawrence έγραψε:
>> On 08/11/2013 10:00, Νίκος Αλεξόπουλος wrote:
>>>
>>>
>>> I have never exposed my client's data. Prove otherwise.
>>
>> If your site has successfully been hacked *TWICE* then by definition
>> your clients data has been exposed. Didn't you also hand out your
>> password, that's really secure, isn't it?
>>
>>>
>>> The only legal action that will happen will take place in your
>>> Asperger's Syndrome sick imagination.
>>
>> I must be winning as you've now had to resort to insults. I assume that
>> you're jealous because my "Asperger Syndrome sick" mind knows what
>> "TypeError: 'NoneType' object is not iterable" actually means. You
>> couldn't work it out despite Steven D'Aprano literally spelling it out
>> in words of one syllable or less.
>>
>
>
> Of course i know what it means. It says it clearly.
>
> An object returned None as a result, and None is not something we can
> iterate upon. My question was actually referring to the reason of that
> object being empty instead of holding value(s) within it. It was more of
> a supreise that it didn't return back any data.
Yet reading the documentation of fetchone, would have informed you of
the reason and removed the surprise. Reading that documentation would
also have taken a minute at most. Yet instead of reading the
documentation and be informed within five minutes, you chose to waste
your time by repeatly coming here in the hope that someone would
spoon feed you. Even when you should know by now that people here
are getting less and less inclined to do so.
The way you behave looks like you are doing it purposeful in a way that
is least likely to be fruitful.
--
Antoon Pardon.
== 3 of 14 ==
Date: Fri, Nov 8 2013 7:15 am
From: Νίκος Αλεξόπουλος
Στις 8/11/2013 4:02 μμ, ο/η Mark Lawrence έγραψε:
> On 08/11/2013 10:09, Chris Angelico wrote:
>> On Fri, Nov 8, 2013 at 9:00 PM, Mark Lawrence
>> <breamoreboy@yahoo.co.uk> wrote:
>>> On 08/11/2013 09:52, Chris Angelico wrote:
>>>> Mar-Kal El-awrence! Able to leap tall bridges in a single bound, more
>>>> powerful than a steaming (and fuming) Greek webmaster, the Man of
>>>> Silicon, BREAMOREBOY!
>>>
>>> Thank you for shouting out the name of the village that's at *THE*
>>> center of
>>> *THE* universe :)
>>
>> I've no idea where that village is - or even that it's a village - all
>> I did was take your superhero name from your email address. :)
>>
>> ChrisA
>>
>
> Poor old Nikos wouldn't even qualify as Bicycle Repair Man. In fact I
> doubt that he can ride a bike, or even a trike for that matter :)
>
If one of us were to feel sorry about himself, that would be you because
of suffering of Autism disorder.
You have demonstrated significant difficulties in social interaction and
behavior.
Seek help ASAP!
== 4 of 14 ==
Date: Fri, Nov 8 2013 8:06 am
From: Mark Lawrence
On 08/11/2013 15:15, Νίκος Αλεξόπουλος wrote:
> Στις 8/11/2013 4:02 μμ, ο/η Mark Lawrence έγραψε:
>> On 08/11/2013 10:09, Chris Angelico wrote:
>>> On Fri, Nov 8, 2013 at 9:00 PM, Mark Lawrence
>>> <breamoreboy@yahoo.co.uk> wrote:
>>>> On 08/11/2013 09:52, Chris Angelico wrote:
>>>>> Mar-Kal El-awrence! Able to leap tall bridges in a single bound, more
>>>>> powerful than a steaming (and fuming) Greek webmaster, the Man of
>>>>> Silicon, BREAMOREBOY!
>>>>
>>>> Thank you for shouting out the name of the village that's at *THE*
>>>> center of
>>>> *THE* universe :)
>>>
>>> I've no idea where that village is - or even that it's a village - all
>>> I did was take your superhero name from your email address. :)
>>>
>>> ChrisA
>>>
>>
>> Poor old Nikos wouldn't even qualify as Bicycle Repair Man. In fact I
>> doubt that he can ride a bike, or even a trike for that matter :)
>>
>
>
> If one of us were to feel sorry about himself, that would be you because
> of suffering of Autism disorder.
I haven't felt better in years so why should I feel sorry for myself?
Besides humour is a great thing, and with such a wonderful comedian as
yourself to boost my feelings, what more could I ask for?
>
> You have demonstrated significant difficulties in social interaction and
> behavior.
>
> Seek help ASAP!
I don't need help thank you as I've already had it. You on the other
hand are past help.
But let's not waste any more time on this. Please get back to checking
your web site. She might have been hacking again. Or little fingers
from one of my highly paid contractors might have been up to no good.
Oh but I forgot, you've made it hacker proof now. You'll sleep much
better knowing your site is safe. Or is it?
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
== 5 of 14 ==
Date: Fri, Nov 8 2013 8:10 am
From: unknown
>
> You have demonstrated significant difficulties in social interaction and
> behavior.
Pot - Kettle
== 6 of 14 ==
Date: Fri, Nov 8 2013 7:46 am
From: Antoon Pardon
Op 08-11-13 16:15, Νίκος Αλεξόπουλος schreef:
> Στις 8/11/2013 4:02 μμ, ο/η Mark Lawrence έγραψε:
>> On 08/11/2013 10:09, Chris Angelico wrote:
>>> On Fri, Nov 8, 2013 at 9:00 PM, Mark Lawrence
>>> <breamoreboy@yahoo.co.uk> wrote:
>>>> On 08/11/2013 09:52, Chris Angelico wrote:
>>>>> Mar-Kal El-awrence! Able to leap tall bridges in a single bound, more
>>>>> powerful than a steaming (and fuming) Greek webmaster, the Man of
>>>>> Silicon, BREAMOREBOY!
>>>>
>>>> Thank you for shouting out the name of the village that's at *THE*
>>>> center of
>>>> *THE* universe :)
>>>
>>> I've no idea where that village is - or even that it's a village - all
>>> I did was take your superhero name from your email address. :)
>>>
>>> ChrisA
>>>
>>
>> Poor old Nikos wouldn't even qualify as Bicycle Repair Man. In fact I
>> doubt that he can ride a bike, or even a trike for that matter :)
>>
>
>
> If one of us were to feel sorry about himself, that would be you because
> of suffering of Autism disorder.
>
> You have demonstrated significant difficulties in social interaction and
> behavior.
I don't think so. As far as I am concerned the person demonstrating
significant difficulties in social interaction and behaviour is you.
Mark may demonstrate he has difficulties in interacting with people
who demonstrate difficulties in social interaction and behaviour to
a larger degree as usual but I have less problems with his behaviour
than I have with yours.
--
Antoon Pardon
== 7 of 14 ==
Date: Fri, Nov 8 2013 8:28 am
From: Νίκος Αλεξόπουλος
Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε:
> But let's not waste any more time on this. Please get back to checking
> your web site. She might have been hacking again. Or little fingers
> from one of my highly paid contractors might have been up to no good. Oh
> but I forgot, you've made it hacker proof now. You'll sleep much better
> knowing your site is safe. Or is it?
>
Many visitors per hour in my website.
They didn't manage to mess with the db again or the variables i'm utilizing.
The hacker maybe a blondie and she cant get a workaround after my changes.
At least lest hope she is a pretty hacker wannabe :-)
== 8 of 14 ==
Date: Fri, Nov 8 2013 8:48 am
From: unknown
On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote:
> Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε:
>
>> But let's not waste any more time on this. Please get back to checking
>> your web site. She might have been hacking again. Or little fingers
>> from one of my highly paid contractors might have been up to no good.
>> Oh but I forgot, you've made it hacker proof now. You'll sleep much
>> better knowing your site is safe. Or is it?
>>
>>
>
> Many visitors per hour in my website.
> They didn't manage to mess with the db again or the variables i'm
> utilizing.
>
> The hacker maybe a blondie and she cant get a workaround after my
> changes.
>
> At least lest hope she is a pretty hacker wannabe :-)
let me get this straight
You have no aptitude for programming,
your database skills are non-existent,
you have no clue regarding even basic debugging techniques,
you an an incompetent system administrator,
you cannot even follow basic instructions when you ask for assistance Yet
you feel you can make blond jokes and belittle someone who has
demonstrated the flaws in your set-up multiple times?
I have not laughed so much in years. You really should be on the stage,
there is one leaving in 10 minutes.
== 9 of 14 ==
Date: Fri, Nov 8 2013 8:57 am
From: Νίκος Αλεξόπουλος
Στις 8/11/2013 6:48 μμ, ο/η unknown έγραψε:
> On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote:
>
>> Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε:
>>
>>> But let's not waste any more time on this. Please get back to checking
>>> your web site. She might have been hacking again. Or little fingers
>>> from one of my highly paid contractors might have been up to no good.
>>> Oh but I forgot, you've made it hacker proof now. You'll sleep much
>>> better knowing your site is safe. Or is it?
>>>
>>>
>>
>> Many visitors per hour in my website.
>> They didn't manage to mess with the db again or the variables i'm
>> utilizing.
>>
>> The hacker maybe a blondie and she cant get a workaround after my
>> changes.
>>
>> At least lest hope she is a pretty hacker wannabe :-)
>
> let me get this straight
>
> You have no aptitude for programming,
> your database skills are non-existent,
> you have no clue regarding even basic debugging techniques,
> you an an incompetent system administrator,
> you cannot even follow basic instructions when you ask for assistance Yet
> you feel you can make blond jokes and belittle someone who has
> demonstrated the flaws in your set-up multiple times?
>
> I have not laughed so much in years. You really should be on the stage,
> there is one leaving in 10 minutes.
>
I have all of the above characteristics in a small degree.
If the mighty hacker is so good and i'm so bad in programming and
securing my script why cant she break bad again?
And why are you posting under your real name but as "unknown" instead?
== 10 of 14 ==
Date: Fri, Nov 8 2013 9:01 am
From: unknown
On Fri, 08 Nov 2013 18:57:21 +0200, Νίκος Αλεξόπουλος wrote:
> Στις 8/11/2013 6:48 μμ, ο/η unknown έγραψε:
>> On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote:
>>
>>> Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε:
>>>
>>>> But let's not waste any more time on this. Please get back to
>>>> checking your web site. She might have been hacking again. Or
>>>> little fingers from one of my highly paid contractors might have been
>>>> up to no good. Oh but I forgot, you've made it hacker proof now.
>>>> You'll sleep much better knowing your site is safe. Or is it?
>>>>
>>>>
>>>>
>>> Many visitors per hour in my website.
>>> They didn't manage to mess with the db again or the variables i'm
>>> utilizing.
>>>
>>> The hacker maybe a blondie and she cant get a workaround after my
>>> changes.
>>>
>>> At least lest hope she is a pretty hacker wannabe :-)
>>
>> let me get this straight
>>
>> You have no aptitude for programming,
>> your database skills are non-existent,
>> you have no clue regarding even basic debugging techniques,
>> you an an incompetent system administrator,
>> you cannot even follow basic instructions when you ask for assistance
>> Yet you feel you can make blond jokes and belittle someone who has
>> demonstrated the flaws in your set-up multiple times?
>>
>> I have not laughed so much in years. You really should be on the stage,
>> there is one leaving in 10 minutes.
>>
>>
>
> I have all of the above characteristics in a small degree.
>
> If the mighty hacker is so good and i'm so bad in programming and
> securing my script why cant she break bad again?
>
> And why are you posting under your real name but as "unknown" instead?
Because I do not want a twit like you sending me direct emails.
== 11 of 14 ==
Date: Fri, Nov 8 2013 9:09 am
From: Νίκος Αλεξόπουλος
Στις 8/11/2013 7:01 μμ, ο/η unknown έγραψε:
> On Fri, 08 Nov 2013 18:57:21 +0200, Νίκος Αλεξόπουλος wrote:
>
>> Στις 8/11/2013 6:48 μμ, ο/η unknown έγραψε:
>>> On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote:
>>>
>>>> Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε:
>>>>
>>>>> But let's not waste any more time on this. Please get back to
>>>>> checking your web site. She might have been hacking again. Or
>>>>> little fingers from one of my highly paid contractors might have been
>>>>> up to no good. Oh but I forgot, you've made it hacker proof now.
>>>>> You'll sleep much better knowing your site is safe. Or is it?
>>>>>
>>>>>
>>>>>
>>>> Many visitors per hour in my website.
>>>> They didn't manage to mess with the db again or the variables i'm
>>>> utilizing.
>>>>
>>>> The hacker maybe a blondie and she cant get a workaround after my
>>>> changes.
>>>>
>>>> At least lest hope she is a pretty hacker wannabe :-)
>>>
>>> let me get this straight
>>>
>>> You have no aptitude for programming,
>>> your database skills are non-existent,
>>> you have no clue regarding even basic debugging techniques,
>>> you an an incompetent system administrator,
>>> you cannot even follow basic instructions when you ask for assistance
>>> Yet you feel you can make blond jokes and belittle someone who has
>>> demonstrated the flaws in your set-up multiple times?
>>>
>>> I have not laughed so much in years. You really should be on the stage,
>>> there is one leaving in 10 minutes.
>>>
>>>
>>
>> I have all of the above characteristics in a small degree.
>>
>> If the mighty hacker is so good and i'm so bad in programming and
>> securing my script why cant she break bad again?
>>
>> And why are you posting under your real name but as "unknown" instead?
>
> Because I do not want a twit like you sending me direct emails.
>
Like i was in the mood of sending mail to a twat like youself.
== 12 of 14 ==
Date: Fri, Nov 8 2013 9:11 am
From: rurpy@yahoo.com
On 11/08/2013 03:05 AM, Νίκος Αλεξόπουλος wrote:
> I never ignore advices.
> I read all answers as carefully as i can.
> But nevertheless sometimes i feel things should have been better
> implemented using my way.
>
> Not of course that i know better, but thats better suited for me in the
> level iam.
Most of the "advice" I've seen posted here has, as far
as I can tell, not intended to be useful but to serve
as a way to telling you are incompetent are in other ways
insulting or useless. I think you are quite right to
ignore it (or tell the poster to get lost.)
Long before you showed up here, I noticed the tendency
to not answer questions directly but to jerk people off
by giving hints or telling them to do something other
than they want to do.
Often that is good because the original request was
for something that the OP really didn't want to do.
But sometimes the OP knows they want to do (but doesn't
want or is unable to clearly explain why) and when
they clearly state that, yes, they do want to do it
their way, their question should be answered in good
faith or, for those who just can't tell how to do
something "wrong", ignored.
Instead the response is typically a lot of hostility
directed at them for not "taking advice". In other
words, the advice here is not free advice, but come
with the price that you are expected to except it
gratefully whether it was what you asked for or not.
I think you are quite right to reject advice that does
not do what you want and ask again for advice that does.
FWIW, I am quite sure there are other readers of this
group who feel the same way, but most people aren't
willing to subject themselves to the bullying that
will be directed at anyone who publicly agrees with you.
It is the same way in real life too as I'm sure
you know.
Just wanted to let you know that not everybody here
is an asshole. It is just that assholes, by their
nature, are the loudest.
== 13 of 14 ==
Date: Fri, Nov 8 2013 9:05 am
From: Joel Goldstick
On Fri, Nov 8, 2013 at 8:48 AM, Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com> wrote:
> Στις 8/11/2013 3:12 μμ, ο/η Tim Delaney έγραψε:
>>
>> On 8 November 2013 21:00, Νίκος Αλεξόπουλος <nikos.gr33k@gmail.com
>> <mailto:nikos.gr33k@gmail.com>> wrote:
>>
>> I have never exposed my client's data. Prove otherwise.
>>
>>
>> https://mail.python.org/pipermail/python-list/2013-June/648550.html
>>
>> Or don't you consider giving the root password for a server containing
>> client data to a complete stranger to be "exposing" that data?
>>
>> Tim Delaney
>
>
>
> I gave the root password to Chris because i was under the false(as proven)
> impression that he was gonna actually help my code.
>
> If i knew, that this wasn't his intention i would not give it away.
http://www.youtube.com/watch?v=WeYsTmIzjkw
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com
== 14 of 14 ==
Date: Fri, Nov 8 2013 9:16 am
From: Joel Goldstick
twit is I think ok to say. The other word is pretty rude
On Fri, Nov 8, 2013 at 12:09 PM, Νίκος Αλεξόπουλος
<nikos.gr33k@gmail.com> wrote:
> Στις 8/11/2013 7:01 μμ, ο/η unknown έγραψε:
>>
>> On Fri, 08 Nov 2013 18:57:21 +0200, Νίκος Αλεξόπουλος wrote:
>>
>>> Στις 8/11/2013 6:48 μμ, ο/η unknown έγραψε:
>>>>
>>>> On Fri, 08 Nov 2013 18:28:39 +0200, Νίκος Αλεξόπουλος wrote:
>>>>
>>>>> Στις 8/11/2013 6:06 μμ, ο/η Mark Lawrence έγραψε:
>>>>>
>>>>>> But let's not waste any more time on this. Please get back to
>>>>>> checking your web site. She might have been hacking again. Or
>>>>>> little fingers from one of my highly paid contractors might have been
>>>>>> up to no good. Oh but I forgot, you've made it hacker proof now.
>>>>>> You'll sleep much better knowing your site is safe. Or is it?
>>>>>>
>>>>>>
>>>>>>
>>>>> Many visitors per hour in my website.
>>>>> They didn't manage to mess with the db again or the variables i'm
>>>>> utilizing.
>>>>>
>>>>> The hacker maybe a blondie and she cant get a workaround after my
>>>>> changes.
>>>>>
>>>>> At least lest hope she is a pretty hacker wannabe :-)
>>>>
>>>>
>>>> let me get this straight
>>>>
>>>> You have no aptitude for programming,
>>>> your database skills are non-existent,
>>>> you have no clue regarding even basic debugging techniques,
>>>> you an an incompetent system administrator,
>>>> you cannot even follow basic instructions when you ask for assistance
>>>> Yet you feel you can make blond jokes and belittle someone who has
>>>> demonstrated the flaws in your set-up multiple times?
>>>>
>>>> I have not laughed so much in years. You really should be on the stage,
>>>> there is one leaving in 10 minutes.
>>>>
>>>>
>>>
>>> I have all of the above characteristics in a small degree.
>>>
>>> If the mighty hacker is so good and i'm so bad in programming and
>>> securing my script why cant she break bad again?
>>>
>>> And why are you posting under your real name but as "unknown" instead?
>>
>>
>> Because I do not want a twit like you sending me direct emails.
>>
>
>
> Like i was in the mood of sending mail to a twat like youself.
> --
> https://mail.python.org/mailman/listinfo/python-list
--
Joel Goldstick
http://joelgoldstick.com
==============================================================================
TOPIC: Talking to a 'C' program
http://groups.google.com/group/comp.lang.python/t/22a552fc2a9a5973?hl=en
==============================================================================
== 1 of 7 ==
Date: Fri, Nov 8 2013 6:23 am
From: John Pote
Hi all,
I have the task of testing some embedded 'C' code for a small micro-controller. Thought it would be a good idea to test it on the PC first to make sure the algorithm is correct then perhaps test it on the controller via RS232 and an appropriate wrapper round the 'C' functions.
On the PC I can use Python's unit test library module and logging to create a nice and easy to use environment (I like Python). So my question is how to communicate from Python to the C module on the PC. What I'd like is simplicity and ease of setting up. All I can think of myself is to use sockets.
Any ideas on how to do this would be gratefully appreciated.
Also as I don't have any microsoft offerings of a C compiler any suggestions as to a suitable C compiler for a PC appreciated as well. llvm? mingw? gcc?
Thanks a lot everyone,
John
== 2 of 7 ==
Date: Fri, Nov 8 2013 6:37 am
From: Oscar Benjamin
On 8 November 2013 14:23, John Pote <johnhpote@o2.co.uk> wrote:
> Hi all,
>
> I have the task of testing some embedded 'C' code for a small micro-controller. Thought it would be a good idea to test it on the PC first to make sure the algorithm is correct then perhaps test it on the controller via RS232 and an appropriate wrapper round the 'C' functions.
>
> On the PC I can use Python's unit test library module and logging to create a nice and easy to use environment (I like Python). So my question is how to communicate from Python to the C module on the PC. What I'd like is simplicity and ease of setting up. All I can think of myself is to use sockets.
>
> Any ideas on how to do this would be gratefully appreciated.
Have a look at Cython:
http://cython.org/
This enables you to call C code from Python code within the same process.
> Also as I don't have any microsoft offerings of a C compiler any suggestions as to a suitable C compiler for a PC appreciated as well. llvm? mingw? gcc?
I assume that by "PC" you mean Windows in which case mingw is a fine
choice and is officially supported by Cython.
Oscar
== 3 of 7 ==
Date: Fri, Nov 8 2013 6:39 am
From: Mark Barton
On 11/8/13 9:23 AM, John Pote wrote:
> Hi all,
>
> I have the task of testing some embedded 'C' code for a small micro-controller. Thought it would be a good idea to test it on the PC first to make sure the algorithm is correct then perhaps test it on the controller via RS232 and an appropriate wrapper round the 'C' functions.
>
> On the PC I can use Python's unit test library module and logging to create a nice and easy to use environment (I like Python). So my question is how to communicate from Python to the C module on the PC. What I'd like is simplicity and ease of setting up. All I can think of myself is to use sockets.
>
> Any ideas on how to do this would be gratefully appreciated.
>
> Also as I don't have any microsoft offerings of a C compiler any suggestions as to a suitable C compiler for a PC appreciated as well. llvm? mingw? gcc?
>
> Thanks a lot everyone,
> John
Hi John,
I know this is not answering you question, but
have you considered using one of the many "C" unit
test programs that are available for testing the
embedded code? I would hazard to guess that it
would be much easier to use something that is
specifically C friendly that trying to adapt
Python unit test. You can however still use Python
as a wrapper or even a slick GUI for invoking the
C unit test using a subprocess and getting the
results. I have used CUnit in the past and I know
that it has several different methods for
returning the results. I'm sure other C unit test
programs are similar.
Mark
== 4 of 7 ==
Date: Fri, Nov 8 2013 6:52 am
From: Mark Lawrence
On 08/11/2013 14:23, John Pote wrote:
> Hi all,
>
> Also as I don't have any microsoft offerings of a C compiler any suggestions as to a suitable C compiler for a PC appreciated as well. llvm? mingw? gcc?
>
> Thanks a lot everyone,
> John
>
Visual Express C++ is fine, provided that its version matches your
version of Python. Failing that mingw is gcc for windows, then perhaps
cygwin. I know nothing about llvm.
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
== 5 of 7 ==
Date: Fri, Nov 8 2013 7:00 am
From: Grant Edwards
On 2013-11-08, John Pote <johnhpote@o2.co.uk> wrote:
> Hi all,
>
> I have the task of testing some embedded 'C' code for a small
> micro-controller. Thought it would be a good idea to test it on the
> PC first to make sure the algorithm is correct then perhaps test it
> on the controller via RS232 and an appropriate wrapper round the 'C'
> functions.
>
> On the PC I can use Python's unit test library module and logging to
> create a nice and easy to use environment (I like Python). So my
> question is how to communicate from Python to the C module on the PC.
> What I'd like is simplicity and ease of setting up. All I can think
> of myself is to use sockets.
Sockets are nice and simple. Depending on what you're doing,
stdin/stdout may be even simpler.
For the RS232 part of the problem, don't forget about pyserial:
http://pyserial.sourceforge.net/pyserial.html
> Any ideas on how to do this would be gratefully appreciated.
>
> Also as I don't have any microsoft offerings of a C compiler any
> suggestions as to a suitable C compiler for a PC appreciated as well.
> llvm? mingw? gcc?
I've occasionaly used mingw (which _is_ gcc), and it worked well.
Cygwin (also gcc) works well, but it's a bit more involved.
I do all my embedded development on a Linux host. I find Linux to be
far more suitable for the task -- the entire Unix system basically
evolved as a software development platform. I've yet to figure out
what MS-Windows is suited for other than lining Bill Gates' pockets.
Before Linux, I used Solaris/SunOS, and before that I used Unix V7.
Everytime I've been involved in a Microsoft-hosted embedded
development project, I just end up walking a way afterwards shaking my
head in puzzlement.
--
Grant Edwards grant.b.edwards Yow! I'm having a
at tax-deductible experience!
gmail.com I need an energy crunch!!
== 6 of 7 ==
Date: Fri, Nov 8 2013 7:04 am
From: Grant Edwards
On 2013-11-08, Oscar Benjamin <oscar.j.benjamin@gmail.com> wrote:
> On 8 November 2013 14:23, John Pote <johnhpote@o2.co.uk> wrote:
>> Hi all,
>>
>> I have the task of testing some embedded 'C' code for a small
>> micro-controller. Thought it would be a good idea to test it on the
>> PC first to make sure the algorithm is correct then perhaps test it
>> on the controller via RS232 and an appropriate wrapper round the 'C'
>> functions.
>>
>> On the PC I can use Python's unit test library module and logging to
>> create a nice and easy to use environment (I like Python). So my
>> question is how to communicate from Python to the C module on the PC.
>> What I'd like is simplicity and ease of setting up. All I can think
>> of myself is to use sockets.
>>
>> Any ideas on how to do this would be gratefully appreciated.
>
> Have a look at Cython:
> http://cython.org/
>
> This enables you to call C code from Python code within the same
> process.
You can also use c-types for that
http://docs.python.org/2/library/ctypes.html#module-ctypes
I've used Python/ctypes to exercise libraries written in C, but I've
never done it under Windows. However, others have:
http://hakantiftikci.wordpress.com/2009/11/14/generating-dll-using-mingw-and-using-them-in-python-via-ctypes/
--
Grant Edwards grant.b.edwards Yow! Give them RADAR-GUIDED
at SKEE-BALL LANES and
gmail.com VELVEETA BURRITOS!!
== 7 of 7 ==
Date: Fri, Nov 8 2013 8:08 am
From: John Pote
Thanks everyone for the advice, some good ideas to keep me busy. Will try and look at over weekend/next week as tied up the rest of today.
I've used pyserial several times - many thanks to Chris Liechti for that module
Hmmmmm must be loosing it, forgot about stdin/out!
I've also used CUnit before and it's nice an easy and small. Problem is I've only 500 bytes code space left on the micro-controller so by the time CUnit gone in with the various tests I'm gonna run of room. I have to keep the RS232 driver in as well as it's the only way to talk to the controller.
Python + pyserial enables me to run the tests with the C compiled and run on the PC as well as compiled to run on the micro-controller. Python is a great environment for doing this sort of thing and, as has been mentioned, a GUI can be added easily (time permitting).
Thanks again all,
John
On 8 Nov 2013, at 15:00, Grant Edwards <invalid@invalid.invalid> wrote:
> On 2013-11-08, John Pote <johnhpote@o2.co.uk> wrote:
>> Hi all,
>>
>> I have the task of testing some embedded 'C' code for a small
>> micro-controller. Thought it would be a good idea to test it on the
>> PC first to make sure the algorithm is correct then perhaps test it
>> on the controller via RS232 and an appropriate wrapper round the 'C'
>> functions.
>>
>> On the PC I can use Python's unit test library module and logging to
>> create a nice and easy to use environment (I like Python). So my
>> question is how to communicate from Python to the C module on the PC.
>> What I'd like is simplicity and ease of setting up. All I can think
>> of myself is to use sockets.
>
> Sockets are nice and simple. Depending on what you're doing,
> stdin/stdout may be even simpler.
>
> For the RS232 part of the problem, don't forget about pyserial:
>
> http://pyserial.sourceforge.net/pyserial.html
>
>> Any ideas on how to do this would be gratefully appreciated.
>>
>> Also as I don't have any microsoft offerings of a C compiler any
>> suggestions as to a suitable C compiler for a PC appreciated as well.
>> llvm? mingw? gcc?
>
> I've occasionaly used mingw (which _is_ gcc), and it worked well.
> Cygwin (also gcc) works well, but it's a bit more involved.
>
> I do all my embedded development on a Linux host. I find Linux to be
> far more suitable for the task -- the entire Unix system basically
> evolved as a software development platform. I've yet to figure out
> what MS-Windows is suited for other than lining Bill Gates' pockets.
>
> Before Linux, I used Solaris/SunOS, and before that I used Unix V7.
> Everytime I've been involved in a Microsoft-hosted embedded
> development project, I just end up walking a way afterwards shaking my
> head in puzzlement.
>
> --
> Grant Edwards grant.b.edwards Yow! I'm having a
> at tax-deductible experience!
> gmail.com I need an energy crunch!!
> --
> https://mail.python.org/mailman/listinfo/python-list
==============================================================================
TOPIC: pywin32 programming error on Win7 with shell.SHGetDesktopFolder,
desktop.BindToObject, desktop.GetDisplayNameOf
http://groups.google.com/group/comp.lang.python/t/65acf69c88845011?hl=en
==============================================================================
== 1 of 2 ==
Date: Fri, Nov 8 2013 7:28 am
From: iMath
在 2013年11月8日星期五UTC+8下午5时47分43秒,Tim Golden写道:
> On 08/11/2013 03:30, iMath wrote:
>
> >
>
> > When running the following code on WinXP , all is fine ,
>
> > --------------------------------------------------------------
>
> > from win32com.shell import shell
>
> >
>
> > def launch_file_explorer(path, files):
>
> >
>
> > folder_pidl = shell.SHILCreateFromPath(path,0)[0]
>
> > desktop = shell.SHGetDesktopFolder()
>
> > shell_folder = desktop.BindToObject(folder_pidl, None,shell.IID_IShellFolder)
>
> > name_to_item_mapping = dict([(desktop.GetDisplayNameOf(item, 0), item) for item in shell_folder])
>
> > to_show = []
>
> > for file in files:
>
> > if file not in name_to_item_mapping:
>
> > raise Exception('File: "{}" not found in "{}"'.format(file, path))
>
> > to_show.append(name_to_item_mapping[file])
>
> > shell.SHOpenFolderAndSelectItems(folder_pidl, to_show, 0)
>
> > import os
>
> >
>
> >
>
> > p=r'E:\aa'
>
> > print(os.listdir(p))
>
> > launch_file_explorer(p, os.listdir(p))
>
>
>
>
>
> Did you mean to call .GetDisplayNameOf against the desktop folder? I
>
> would have thought you wanted shell_folder.GetDisplayNameOf(item, 0).
>
>
>
> TJG
I mainly want to use shell.SHOpenFolderAndSelectItems()
== 2 of 2 ==
Date: Fri, Nov 8 2013 7:28 am
From: iMath
在 2013年11月8日星期五UTC+8下午5时47分43秒,Tim Golden写道:
> On 08/11/2013 03:30, iMath wrote:
>
> >
>
> > When running the following code on WinXP , all is fine ,
>
> > --------------------------------------------------------------
>
> > from win32com.shell import shell
>
> >
>
> > def launch_file_explorer(path, files):
>
> >
>
> > folder_pidl = shell.SHILCreateFromPath(path,0)[0]
>
> > desktop = shell.SHGetDesktopFolder()
>
> > shell_folder = desktop.BindToObject(folder_pidl, None,shell.IID_IShellFolder)
>
> > name_to_item_mapping = dict([(desktop.GetDisplayNameOf(item, 0), item) for item in shell_folder])
>
> > to_show = []
>
> > for file in files:
>
> > if file not in name_to_item_mapping:
>
> > raise Exception('File: "{}" not found in "{}"'.format(file, path))
>
> > to_show.append(name_to_item_mapping[file])
>
> > shell.SHOpenFolderAndSelectItems(folder_pidl, to_show, 0)
>
> > import os
>
> >
>
> >
>
> > p=r'E:\aa'
>
> > print(os.listdir(p))
>
> > launch_file_explorer(p, os.listdir(p))
>
>
>
>
>
> Did you mean to call .GetDisplayNameOf against the desktop folder? I
>
> would have thought you wanted shell_folder.GetDisplayNameOf(item, 0).
>
>
>
> TJG
I mainly want to use shell.SHOpenFolderAndSelectItems()
==============================================================================
TOPIC: Algorithm that makes maximum compression of completly diffused data.
http://groups.google.com/group/comp.lang.python/t/cf4b4e4ba592ec63?hl=en
==============================================================================
== 1 of 2 ==
Date: Fri, Nov 8 2013 7:48 am
From: jonas.thornvall@gmail.com
Den fredagen den 8:e november 2013 kl. 03:43:17 UTC+1 skrev zipher:
> >> I am not sure if it is just stupidness or laziness that prevent you from seeing that 4^8=65536.
>
> >
>
> > I can see that 4^8 = 65536. Now how are you going to render 65537? You
>
> > claimed that you could render *any* number efficiently. What you've
>
> > proven is that a small subset of numbers can be rendered efficiently.
>
>
>
> I think the idea would be to find the prime factorization for a given
>
> number, which has been proven to be available (and unique) for any and
>
> every number. Most numbers can compress given this technique. Prime
>
> numbers, of course, would not be compressed.
>
>
>
> --
>
> MarkJ
>
> Tacoma, Washington
3^2-2^2=5
== 2 of 2 ==
Date: Fri, Nov 8 2013 7:57 am
From: rusi
On Friday, November 8, 2013 9:18:05 PM UTC+5:30, jonas.t...@gmail.com wrote:
> Den fredagen den 8:e november 2013 kl. 03:43:17 UTC+1 skrev zipher:
> > >> I am not sure if it is just stupidness or laziness that prevent you from seeing that 4^8=65536.
> > > I can see that 4^8 = 65536. Now how are you going to render 65537? You
> > > claimed that you could render *any* number efficiently. What you've
> > > proven is that a small subset of numbers can be rendered efficiently.
> > I think the idea would be to find the prime factorization for a given
> > number, which has been proven to be available (and unique) for any and
> > every number. Most numbers can compress given this technique. Prime
> > numbers, of course, would not be compressed.
> 3^2-2^2=5
Oh my! What a profound insight!!
==============================================================================
TOPIC: OT: How to tell an HTTP client to limit parallel connections?
http://groups.google.com/group/comp.lang.python/t/a27aeccbb4cdfc08?hl=en
==============================================================================
== 1 of 1 ==
Date: Fri, Nov 8 2013 9:25 am
From: Grant Edwards
Yes, this off-topic, but after a fair amount of Googling and searching
in the "right" places, I'm running out of ideas.
I've got a very feeble web server. The crypto handshaking involved in
opening an https: connection takes 2-3 seconds. That would be fine if
a browser opened a single connection and then sent a series of
requests on that connection to load the various elements on a page.
But that's not what browsers do. They all seem to open whole handful
of connections (often as many as 8-10) and try to load all the page's
elements in parallel. That turns what would be a 3-4 second page load
time (using a single connection) into a 20-30 second page load time.
Even with plaintext http: connections, the multi-connection page load
time is slower than the single-connection load time, but not by as
large a factor.
Some browsers have user-preference settings that limit the max number
of simultaneous connections to a single server (IIRC the RFCs suggest
a max of 4, but most browsers seem to default to a max of 8-16).
What I really need is an HTTP header or meta-tag or something that I
can use to tell clients to limit themselves to a single connection.
I haven't been able to find such a thing, but I'm hoping I've
overlooked something...
--
Grant Edwards grant.b.edwards Yow! INSIDE, I have the
at same personality disorder
gmail.com as LUCY RICARDO!!
==============================================================================
You received this message because you are subscribed to the Google Groups "comp.lang.python"
group.
To post to this group, visit http://groups.google.com/group/comp.lang.python?hl=en
To unsubscribe from this group, send email to comp.lang.python+unsubscribe@googlegroups.com
To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.python/subscribe?hl=en
To report abuse, send email explaining the problem to abuse@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com/?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home