Re: How to detect if a file is executable on Windows?

2019-02-19 Thread bryan rasmussen
Well, I used to know the answer to this question but I haven't done this
kind of thing since 2009, so hopefully what I suggest is not out of date,
so for everything I say here assume I put provisos in like it used to be or
whatever.

Anyway if the type of a file is executable , for example a file with
extension .xyz, is determined by the registry in windows
read here and google onward
https://docs.microsoft.com/en-us/windows/desktop/shell/app-registration#finding-an-application-executable

As I recall somewhere in PyWin32
http://timgolden.me.uk/pywin32-docs/contents.html there was a method to
find out if an individual file was an executable.

Hope it helps, because that means I still have some usable knowledge in
that area!

Best Regards,
Bryan Rasmussen



On Tue, Feb 19, 2019 at 2:49 PM Stephane Wirtel  wrote:

> And based on a determinist solution?
>
> Yes, you can check the extension but sometimes I prefer to be sure.
>
> For example, the API of Win32 has the GetTypeBinaryW function, this one
> could be used but I need to create a mapping, with CPython api, ctypes
> or CFFI.
>
> I could also use the 2 first bytes of a file and determine if the file
> is a binary because on Windows, the executable files start with b'MZ'.
>
> But I wanted an elegant and minimalist solution.
>
> Thank you for your proposal.
>
> Have a nice day,
>
> Stéphane
>
> On 02/18, Igor Korot wrote:
> >Hi,
> >
> >On Tue, Feb 19, 2019 at 7:26 AM Stephane Wirtel 
> wrote:
> >>
> >> Hi all,
> >>
> >> on Linux/Unix/BSD, we can detect if a file is an executable with
> >> os.access(path, os.X_OK) but this is not the case on Windows.
> >>
> >> Do you have an idea?
> >
> >Check file extension?
> >
> >Thank you.
> >
> >>
> >> Have a nice day,
> >>
> >> Stéphane
> >>
> >> --
> >> Stéphane Wirtel - https://wirtel.be - @matrixise
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
>
> --
> Stéphane Wirtel - https://wirtel.be - @matrixise
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Free seminar on domain-specific modeling

2005-09-21 Thread bryan rasmussen
I just wonder about that 5-10 times faster. that's a really wide range. :)


On 9/21/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Martijn Iseger wrote:
> 
> > >> Domain-specific modeling makes software development 5-10 times faster
> > >> than approaches based on UML or MDA. It accelerates development and
> > >> reduces complexity by automatically generating full code from
> > >> higher-abstraction design models.
> > >>
> > > Wow, look everyone!  A silver bullet!
> > >
> > Before slashing down in ignorance - educate yourself on www.dsmforum.org.
> > After that: feel free to comment.  I will make you look a lot more 
> > intelligent
> > Peter Hansen.
> 
> if you don't understand the "silver bullet" reference, you're not qualified 
> to use
> phrases like "makes software development 5-10 times faster".
> 
> 
> 
> 
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


python image library TIFF

2005-09-22 Thread bryan rasmussen
Hi
does anyone have any experience using the Python Image library  to
determine if a Tiff is in the G4 or G3 codec?
-- 
http://mail.python.org/mailman/listinfo/python-list


SimpleHTTPServer, queries unhandled?

2004-12-26 Thread Bryan Rasmussen
Hey just doing some preliminary testing with SimpleHTTPServer, and i noticed
that when i request a resource with a query string parameters that this was not
handled. 

is this correct, or is there a method to set query string handling?
-- 
Bryan Rasmussen





-- 
http://mail.python.org/mailman/listinfo/python-list


Re: One liners

2013-12-07 Thread bryan rasmussen
Someone was thinking in ruby there.



On Sat, Dec 7, 2013 at 1:14 AM, Dan Stromberg  wrote:

>
> On Fri, Dec 6, 2013 at 4:10 PM, Michael Torrie  wrote:
>
>> On 12/06/2013 04:54 PM, Dan Stromberg wrote:
>> > Does anyone else feel like Python is being dragged too far in the
>> direction
>> > of long, complex, multiline one-liners?  Or avoiding temporary variables
>> > with descriptive names?  Or using regex's for everything under the sun?
>> >
>> > What happened to using classes?  What happened to the beautiful
>> emphasis on
>> > readability?  What happened to debuggability (which is always harder
>> than
>> > writing things in the first place)?  And what happened to string
>> methods?
>> >
>> > I'm pleased to see Python getting more popular, but it feels like a lot
>> of
>> > newcomers are trying their best to turn Python into Perl or something,
>> > culturally speaking.
>>
>> I have not seen any evidence that this trend of yours is widespread.
>> The Python code I come across seems pretty normal to me.  Expressive and
>> readable.  Haven't seen any attempt to turn Python into Perl or that
>> sort of thing.  And I don't see that culture expressed on the list.
>> Maybe I'm just blind...
>
>
> I'm thinking mostly of stackoverflow, but here's an example I ran into (a
> lot of) on a job:
>
> somevar = some_complicated_thing(somevar) if
> some_other_complicated_thing(somevar) else somevar
>
> Would it really be so bad to just use an if statement?  Why are we
> assigning somevar to itself?  This sort of thing was strewn across 3 or 4
> physical lines at a time.
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Can post a code but afraid of plagiarism

2014-01-20 Thread bryan rasmussen
>When you take a course, you should be learning, not just passing. That
>means that getting someone else to do your work for you is completely
>wrong, so I won't help you.

I have decided to become an MBA.



On Mon, Jan 20, 2014 at 9:48 AM, Chris Angelico  wrote:

> On Mon, Jan 20, 2014 at 6:55 PM, indar kumar 
> wrote:
> > Actually, I tried to ask some questions but I was discouraged to do so
> saying that I was working on a project or some assignment. Truth be told I
> am stuck at one point and since I don't have experience with programming
> language, I have been working for it for two days but couldn't come up with
> some idea so posted some questions of the same format just to know whether
> there is particular method etc to do so. Hint would have been enough but I
> was strictly discouraged.
> >
>
> Here's my policy on homework. Others may vary, but you'll find a lot
> will be broadly similar.
>
> When you take a course, you should be learning, not just passing. That
> means that getting someone else to do your work for you is completely
> wrong, so I won't help you. But if you've put down some code and it's
> not working, then by all means, ask for help with the details; it's
> easy if you have an error message you don't understand (you might be
> able to get that by Googling it), but a lot harder if you're getting
> output you don't understand, and then it can help a LOT to have an
> expert look at your code. You would need to post your code and exactly
> what you're seeing as wrong (exception traceback, or "expected this
> output, got this instead"); and if you make it clear up-front that
> it's homework and you're looking for hints rather than an
> answer-on-a-plate, I'm happy to help.
>
> What you will find, though, is that most requests are more of the
> nature of "please do my homework for me", so people are more likely to
> be annoyed than helpful when they see what's obviously homework. So
> you have a bit of an uphill battle just to get heard. But if you can
> show that you're here to learn - and showing that you've already
> written most of the code is a good way to do that - you can get help,
> and often a lot of it.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


intercepting keypresses, mouse movements, joystick movements.

2006-10-09 Thread bryan rasmussen
Hi,

I've been looking at autohotkey to do some different usability hacks
for windows http://www.autohotkey.com/
one of the benefits of this language is it allows one to catch
keyboard usage, joystick usage, and mouse usage inputs very easily at
a global level or at application levels by watching applications for
events within the applications.

I was wondering if there were any python libraries that provided
similar functionality before I went ahead with the project though.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Sarcasm and irony (was: Dive Into Java?)

2006-10-10 Thread bryan rasmussen
> >
> > > E. g. [in Java there is] no operator overloading, but "+"
> > > concatenation of strings. What if you'd like to implement your own
> > > string-derived class? Ah, never mind. Operator overloading is
> > > bad(tm) ;) <= Irony, definitely
> >
> > Definitely? That one strikes me more as sarcasm.
>

Well irony originally started out as a very specific concept of the
Ancient Greek drama, this is what we nowadays refer to as Dramatic
Irony but it is the original irony. Irony then became a literary
concept for plot elements similar to Dramatic irony in books, or a
weaker type of the Dramatic irony found in the plays of Shakespeare.
People then noticed that life was at times ironic in the literary
manner. Nowadays the use of the word irony has degenerated to by
pretty much synonymous with sarcasm.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Sarcasm and irony

2006-10-10 Thread bryan rasmussen
On 10/10/06, Steve Holden <[EMAIL PROTECTED]> wrote:
> bryan rasmussen wrote:
> >>>>E. g. [in Java there is] no operator overloading, but "+"
> >>>>concatenation of strings. What if you'd like to implement your own
> >>>>string-derived class? Ah, never mind. Operator overloading is
> >>>>bad(tm) ;) <= Irony, definitely
> >>>
> >>>Definitely? That one strikes me more as sarcasm.
> >>
> >
> > Well irony originally started out as a very specific concept of the
> > Ancient Greek drama, this is what we nowadays refer to as Dramatic
> > Irony but it is the original irony. Irony then became a literary
> > concept for plot elements similar to Dramatic irony in books, or a
> > weaker type of the Dramatic irony found in the plays of Shakespeare.
> > People then noticed that life was at times ironic in the literary
> > manner. Nowadays the use of the word irony has degenerated to by
> > pretty much synonymous with sarcasm.
> >
> ... in America. It's well-known among Brits that Americans don't
> understand irony. They can be pretty oblique when it come to sarcasms
> too, for that matter.

is that 'in America' meant to be an addendum to what I said, as in
this is the situation in America and not elsewhere? If so I should
probably point out that I am writing from Denmark and was thinking
specifically of a situation where a dane told me they were being
'ironic' (when what they meant, obviously, was that they were being
ironical), when I asked what they meant by that they said "saying the
opposite of what I mean" I responded: "so, in other words, what you
mean by irony is 'sarcasm'" She responded "yes, that's what it means"

She had a degree in communications. I also know a few number of brits.
The quality of their wit is not as yet so rarified that I must strain
after its meaning.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Sarcasm and irony

2006-10-10 Thread bryan rasmussen
On 10/10/06, Max M <[EMAIL PROTECTED]> wrote:
> bryan rasmussen skrev:
> > On 10/10/06, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> >> ... in America. It's well-known among Brits that Americans don't
> >> understand irony. They can be pretty oblique when it come to sarcasms
> >> too, for that matter.
> >
> > is that 'in America' meant to be an addendum to what I said, as in
> > this is the situation in America and not elsewhere? If so I should
> > probably point out that I am writing from Denmark and was thinking
> > specifically of a situation where a dane told me they were being
> > 'ironic' (when what they meant, obviously, was that they were being
> > ironical), when I asked what they meant by that they said "saying the
> > opposite of what I mean" I responded: "so, in other words, what you
> > mean by irony is 'sarcasm'" She responded "yes, that's what it means"
>
>
> Are you an american?
>
> Irony does mean that one says the opposite of what one really means.
>
> If you do it for humor its irony, if you do it for mocking it is sarcasm.
>
> So now I see... americans really *do* understand irony.

To reiterate:

Well irony originally started out as a very specific concept of the
 Ancient Greek drama, this is what we nowadays refer to as Dramatic
 Irony but it is the original irony. Irony then became a literary
 concept for plot elements similar to Dramatic irony in books, or a
 weaker type of the Dramatic irony found in the plays of Shakespeare.
 People then noticed that life was at times ironic in the literary
 manner. Nowadays the use of the word irony has degenerated to by
 pretty much synonymous with sarcasm.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Sarcasm and irony

2006-10-10 Thread bryan rasmussen
> bryan rasmussen skrev:
>
> > Well irony originally started out as a very specific concept of the
> > Ancient Greek drama, this is what we nowadays refer to as Dramatic
> > Irony but it is the original irony. Irony then became a literary
> > concept for plot elements similar to Dramatic irony in books, or a
> > weaker type of the Dramatic irony found in the plays of Shakespeare.
> > People then noticed that life was at times ironic in the literary
> > manner.
>
> Yes and in Rome "salary" meant getting a bag of salt.

According to Answers.com it derives from a word for money given to
Roman soldiers for buying salt, hence salary is pertaining to salt.

> Concepts changes.

As was noted in my original statement the weak form of irony such as
understood by Danes and I suppose by Americans as well, since that is
what Steve was originally complaining about, is descended from the
concept of Dramatic Irony. If you do a dictionary lookup of irony
dramatic irony will probably be mentioned, also such more antiquated
usages as Socratic irony.

These other concepts of irony have not changed. You can use the word
irony in a technical manner to someone in the dramatic arts and have
the usage understood.

 The weak form of irony, verbal irony, is a pretty recent addition to
the concept of irony.

To take a wikipedia discussion of the subject:
http://en.wikipedia.org/wiki/Irony

let's quote:
"Verbal irony is traditionally defined as the use of words to convey
something other than, and especially the opposite of the literal
meaning of the words. One classic example is a speaker saying, "What
lovely weather we are having!" as she looks out at a rainstorm
intending to express her dissatisfaction with the weather."

I believe this answers to the concept of irony as used by Danes
(especially given  the example of the weather comment above which I
hear similar comments all the time.)

Given the wikipedia article and Steve Holden's description of
Americans as being clueless about irony for usages that you seem to
find correct I suppose that Americans are no more clueless or less apt
to understand Danish irony than Danes are. However, having been
exposed to Danish irony quite a bit I have to say that in my case I
understand it fine but it bores me, therefore when a Dane tells me
that Americans don't understand Danish irony I always secretly think
they probably wonder why looking out at a rainstorm and saying "What
lovely weather we are having" should be considered as a particularly
inspired use of the verbal ironical form. Also although I am not an
american I am often mistaken for one by Danes and when someone says
'What lovely weather we are having' (or similar) I will tend to be
rather ironical myself and pretend not to have understood their
comment as being ironical. And then they will try to explain irony to
me with very long and drawn out explanations. Fun stuff.


> > Nowadays the use of the word irony has degenerated to by
> > pretty much synonymous with sarcasm.
>
> As a Dane that is a Chronic Ironic, I beg to differ.
>
> In Denmark at least there is a lot of difference between irony and
> sarcasm. Irony is the main form of humor here, and danes takes to it
> easily. People being sarcastic we don't much like.
>
> But I guess that it can be hard to se the difference for someone not
> used to irony.

Yes, just what I was going to say.

I suppose that you will admit that the Danish Ironisk has the same
history as the English Irony, of course as the above mentioned
Wikipedia article mentions "Irony often requires a cultural backdrop
to be understood or noticed, and as with any culture-specific idiom,
irony often cannot be perfectly transplanted. " If you do so agree
then, as opposed to your example of 'salary', the current meaning of
irony being predominantly used to convey Verbal irony is rather
recent.


I may very well be missing some sort of meta-irony in someone saying
"What wonderful weather we're having" when its pouring in København's
Rådhusplads, as in a sort of self-ironical stance consisting of an
implicit statement of "what an idiot I must be for thinking it
worthwhile to comment ironically on the weather when everyone else
today has said the same damn thing. " but I don't know. The main point
is, I think, that verbal irony is understood as a meaning for irony
between various cultures and is not a unique invention of the Danes,
for unique linguistically defined concepts I think Denmark's best
strategy is still to push 'hygge'.

Now again, it may be somewhat old time fuddy-duddyism on my part to
insist on a stronger form of the word irony than verbal irony. I am
personally ready to use all the definitions of ironical forms
discussed in the Wikipedia article because they are technically
precise words and concepts for which we do not have words and concepts
other than them.



Med Venlig Hilsen,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Sarcasm and irony

2006-10-11 Thread bryan rasmussen
I believe they are reputed to have a sense of humor.

Cheers,
Bryan Rasmussen

On 10/11/06, Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
> "Steve Holden" <[EMAIL PROTECTED]> wrote:
>
> 8<
> > ... It's well-known among Brits that Americans don't
> > understand irony. They can be pretty oblique when it come to sarcasms
> > too, for that matter.
>
> *ducks to avoid the nuclear fall out*
>
> You should not do that Steve - they have no Sense of Humour either
>
> - Hendrik
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


crawlers in python with graphing?

2006-06-19 Thread bryan rasmussen
Hi

I'm wondering if there is a toolkit in python anywhere for doing at a
high level web crawling, dumping links to a data set that could be
imported into R relatively easy or used in python natively to generate
a graph over the website.


It should hopefully be as high level as Wget, not download the pages
but just follow the links, and output graphs.



Cheers
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: crawlers in python with graphing?

2006-06-20 Thread bryan rasmussen
Hi,

Sorry, was imprecise, I meant not save the downloaded page locally.
There probably isn't one though, so I should build one myself.
Probably just need a good crawler that can be set to dump all links
into dataset that I can analyse with R.

Cheers,
Bryan Rasmussen

On 6/19/06, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> In <[EMAIL PROTECTED]>, bryan rasmussen
> wrote:
>
> > It should hopefully be as high level as Wget, not download the pages
> > but just follow the links, and output graphs.
>
> How do you get at the links without downloading the page!?
>
> Ciao,
>Marc 'BlackJack' Rintsch
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: mobile phone app

2006-09-08 Thread bryan rasmussen
The S60 series of phones from nokia supports python
http://www.google.com/search?hl=en&q=s60+nokia

Cheers,
Bryan Rasmussen

On 9/8/06, Aravind <[EMAIL PROTECTED]> wrote:
> hi,
>
> Can anyone tell me if python can be used for developing mobile phone apps as
> Java ? If yes, any comparisons ? Also pls tell me where i can get the tools
> and tutorials for the same...
>
> Thanks in advance...
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: MI5 Persecution: Counter-surveillance sweep by Nationwide Investigations Group

2007-01-03 Thread bryan rasmussen
>As I said above, I don't know very much
> about these things, so I can't comment on the capabilities or otherwise of 
> this equipment. >But clearly the "watchers" are using
> technology which in 1994 was beyond the detection capabilities of a good 
> private detective >agency.
>

Lisp did that 20 years ago.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


checking for when a file or folder exists, typing problems?

2005-06-12 Thread Bryan Rasmussen
Hi 
I have a little program that is importing from os.path import exists, join,
isdir, normpath, isfile
at one point in my program I check if a file exists using
if exists("c:\projects"):

and that works fine.

If I change it to be
if exists(thepath):
where thepath is a commandline argument it does not work fine.

Note that the commandline is c:\projects and when I print thepath to check what
is going on it prints
c:\projects

The only thing I can assume is that there is some sort of typing problem going
on here, but then it should go ahead and give an error then if it's getting
something unexpected obviously. 

Any help on what this error is?

Thanks


-- 
Bryan Rasmussen





-- 
http://mail.python.org/mailman/listinfo/python-list


Re: checking for when a file or folder exists, typing

2005-06-12 Thread Bryan Rasmussen
>Hi Bryan,

>Here's a potential idea.  Try converting the variable to a string by
>using the following syntax:


>   thePath = str(thePathArg)


Actually it was a stupid thing, what happened was I was looping through the
commandline to build a file path in cases where there was more than one
commandline argument, such as when one passes c:/Documents and Settings/ 

only I was adding the space in the wrong place so I never had a proper
location.

Thanks though, it got me back to the problem and solved it.  

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: service for file monitoring

2007-04-22 Thread bryan rasmussen
use WMI event monitoring objWMIService.ExecNotificationQuery

http://msdn2.microsoft.com/en-us/library/aa393864.aspx

, then pass the event and the file starting the event to your
application via the command line, what I tend to do (so I keep one
monitor running that starts applications at event occurrence)

drawback but also a strength, the application cannot know for sure
that the event has actually happened - this is a possible strength
because then you can have other applications that redefine the
occasion of the event on a file just by starting your application for
handling that event and passing it a file asserted as having been the
object receiving the event (probably too loosely coupled for lots of
people or scenarios though, if this can be a security problem for your
application have to protect against it etc. )

if you absolutely need monitoring and application tightly coupled then
use Python and WMI to do it, using the same method.

http://tgolden.sc.sabren.com/python/wmi.html


Cheers,
Bryan Rasmussen

On 4/21/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > well i tried reading that but that way i'll have to make the program
> > monitor each and every directory.
> > when a file is created or deleted or filename modified , a call must
> > be made to the os kernel .
> > isn't there any way i can utilize that with any api or package
> > functions so that i can monitor the whole filesystem but at lesser
> > expense of cpu n memory
>
> On Windows W2k+, you can use the USN journal:
>
> http://msdn2.microsoft.com/en-us/library/aa364586.aspx
>
> You may have to use ctypes or write an extension module to access that
> journal.
>
> Regards,
> Martin
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Slightly OT: Why all the spam?

2007-05-22 Thread bryan rasmussen
Well two things I would suppose:

1. relative popularity and volume of the group leads spammers to put
more resources towards spamming the group.

2. I seem to remember that python-list is also a usenet group?
non-moderated, meaning it is tough to ban people?

Actually, it would be nice to know if anybody has any good filters
worked up that will work in Gmail for reading python-list.


Cheers,
Bryan Rasmussen



On 5/22/07, Joel Hedlund <[EMAIL PROTECTED]> wrote:
> Does anyone know why we get so much spam to this group? It's starting to
> get embarrasing to read at work and that's just not how it should be.
>
> Cheers!
> /Joel
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: problem at installing phyton on windows

2007-03-26 Thread bryan rasmussen
>
> Obviously, "Phyton" will never be defined.
>

Indeed I remember in the climactic showdown between Phyton and the
rest of the gamma ranger FooDroids and he kept doing the mega kick
move. and I was thinking wow Phyton will never be defined, he will
just keep kicking ass.

I hear they're gonna make a Phyton Commandant movie.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Yank Bastards KILLED THEIR OWN PEOPLE to stage 911 DRAMA

2007-01-27 Thread bryan rasmussen
See, if the python list mail server was written in Lisp Paul Graham
would already have been able to write up a spam filter to ban this
guy.

Seriously though,  shouldn't Thermate be banned by now.

Cheers,
Bryan Rasmussen

On 26 Jan 2007 10:56:44 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> There is a million dollar reward for ANY fascist bastard to disprove
> this assertion by giving a consistent theory of ALL the major observed
> effects on that day about the related events.
>
> Dick faced Cheney sprayed his own lawyer with BB's.
>
> See the video by Alex Jones on the Forensics, why the claims of
> distance and mistake were such a big lie ...
>
> 911 TRUTH BACK WITH VIGOR AND NEW SITE
> Now it has two sites under
> www.st911.org
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: BYU Physics Prof Finds Thermate in WTC Physical Samples, Building Collapses an Inside Job

2007-01-31 Thread bryan rasmussen
I think he meant that the body of Thermate was found among WTC
physical samples, the conclusion is that Thermate was responsible for
collapsing the WTC. The further conclusion is that Thermate is or was
in possession of time travel technology, he has obviously recently
gone back in time to attack the WTC and been killed. This would
explain why trolling duties have been recently taken up by
[EMAIL PROTECTED] on this list.

Cheers,
Bryan Rasmussen

On 1/31/07, soutjhyDin <[EMAIL PROTECTED]> wrote:
>
> <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > http://portland.indymedia.org/en/2006/06/341238.shtml
> >
> > BYU Physics Prof Finds Thermate in WTC Physical Samples, Building
> > Collapses an Inside Job
> > author: Jacob Hamblin
> > Based on chemical analysis of WTC structural steel residue, a Brigham
> > Young University physics professor has identified the material as
> > Thermate. Thermate is the controlled demolition explosive thermite
> > plus sulfur.
>
> WRONG!  you must make this stuff up as you go along.
>
> Thermate and thermite have nothing to do with "controlled demolition",
> moron.
>
> What is the prime ingredient of both?  Rust.
>
> The Iron Oxide(s), dummy.
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


string.find returns -1 when string evidently in source file

2007-02-18 Thread bryan rasmussen
;Num Enter"
1d  "Right Ctrl"
35  "Num /"
37  "Prnt Scrn"
38  "Right Alt"
45  "Num Lock"
46  Break
47  Home
48  Up
49  "Page Up"
4b  Left
4d  Right
4f  End
50  Down
51  "Page Down"
52  Insert
53  Delete
54  <00>
56  Help
5b  "Left Windows"
5c  "Right Windows"
5d  Application

KEYNAME_DEAD

00b4"ACUTE ACCENT"
00a8"DIAERESIS"
007e"TILDE"
00b0"DEGREE SIGN"


ENDKBD


the encoding of the file is Unicode, I am able to return instances of
individual characters but not whole words.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list

write iso 9660 with python

2007-11-17 Thread bryan rasmussen
Hi,

I need to read in a system of files and write them to an iso 9660, any
libraries suited to this task that are up to date? Python 2.4 or 2.5
should be assumed.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


sys.arg whitespace problem

2007-11-18 Thread bryan rasmussen
Hi,

Basically I want to get sys.argv[1: ] but the problem is that actually
the argument should maintain whitespace. Thus if the arguments are
something something with only one space between them, or something
something with three spaces between them I should be able to maintain
the exact whitespace between arguments.

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Die, thread! Die! (Was Re: "Python" is not a good name)

2007-12-04 Thread bryan rasmussen
Could we name Stackless Die, microthread! Die! then?

Cheers,
Bryan Rasmussen

On Dec 4, 2007 4:04 PM, Shane Geiger <[EMAIL PROTECTED]> wrote:
> Die, thread! Die!
>
>
>
> grflanagan wrote:
> > On Dec 4, 11:53 am, [EMAIL PROTECTED] wrote:
> >
> >> On Dec 4, 11:36 am, MarkE <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>> Ithon
> >>>
> >> Pie - Fun
> >>
> >
> > Pie-a-thon?
> >
> > http://montypython.tribe.net/thread/fd519910-25e3-4102-b898-8815d6ece32a
> >
> > http://www.flickr.com/photos/kirstywombat/1862165664/
> >
>
>
> --
> Shane Geiger
> IT Director
> National Council on Economic Education
> [EMAIL PROTECTED]  |  402-438-8958  |  http://www.ncee.net
>
> Leading the Campaign for Economic and Financial Literacy
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Unicode Regular Expressions

2007-12-23 Thread bryan rasmussen
Hi,

I'm writing a program that requires specifically Unicode regular
expressions http://unicode.org/reports/tr18/ to be loaded in from an
external file and then interpreted against the data.  if I use Python
Regular expressions is there a flag I can set to specify that the
regular expressions that are loaded from the file conform to Unicode
regular expressions. What problems can be expected using Unicode Regex
with Python, is there a library I should be using?

Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pythoncard question

2006-05-04 Thread bryan rasmussen
Hi, I'm doing a sort of symbolic linking app in Windows for my own
enjoyment, and figured I would do it in python for the same reason +
learning the language.

The following functions could obviously do with some refactoring. One
obvious thing would be to make wordsetter and wordsforfolder more
generic, and just pass a few extra parameters. But that seems sort of
stupid.

Any suggestions on refactoring here? other improvements?


def getwordslist(word):
  thisword = wordpath + word + ".xml"
  if exists(thisword):
doc =  xml.dom.minidom.parse(thisword)
loc =  doc.childNodes[0]
for i in range(0, len(loc.childNodes)):
  if (loc.childNodes[i].firstChild.data == thispath):
break
  else:
wordsetter(thisword,doc,loc)


  else :
doc = xml.dom.minidom.Document()
loc = doc.createElementNS("", "locations")
doc.appendChild(loc)
wordsetter(thisword,doc,loc)

  return None

def getfolderwords(word):

  if exists(normpath(folderwords)):
doc =  xml.dom.minidom.parse(folderwords)
loc =  doc.childNodes[0]
wordsforfolder(word,doc,loc)


  else :

doc = xml.dom.minidom.Document()
loc = doc.createElementNS("", "wordlist")
doc.appendChild(loc)
xml.dom.ext.PrettyPrint(doc, open(normpath(folderwords), "w"))
wordsforfolder(word,doc,loc)

  return None


def wordsetter(word,doc,loc):
thisloc = doc.createElementNS("", "location")
xexpr= "//location[.='" + thispath + "']"

xp = Evaluate(xexpr,doc.documentElement)
if len(xp) < 1:

loc.appendChild(thisloc)
text = doc.createTextNode(thispath)
thisloc.appendChild(text)
fi = open(word, "w")
fi.write(doc.toxml())


def wordsforfolder(word,doc,loc):
thisloc = doc.createElementNS("", "word")
xexpr= "//word[.='" + word + "']"

xp = Evaluate(xexpr,doc.documentElement)
if len(xp) < 1:

loc.appendChild(thisloc)
    text = doc.createTextNode(word)
thisloc.appendChild(text)
fi = open(folderwords, "w")
fi.write(doc.toxml())


Cheers,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


refactoring question

2006-05-04 Thread bryan rasmussen
Hi, I'm doing a sort of symbolic linking app in Windows for my own
enjoyment, and figured I would do it in python for the same reason +
learning the language.

The following functions could obviously do with some refactoring. One
obvious thing would be to make wordsetter and wordsforfolder more
generic, and just pass a few extra parameters. But that seems sort of
stupid.

Any suggestions on refactoring here? other improvements?


def getwordslist(word):
 thisword = wordpath + word + ".xml"
 if exists(thisword):
   doc =  xml.dom.minidom.parse(thisword)
   loc =  doc.childNodes[0]
   for i in range(0, len(loc.childNodes)):
 if (loc.childNodes[i].firstChild.data == thispath):
   break
 else:
   wordsetter(thisword,doc,loc)


 else :
   doc = xml.dom.minidom.Document()
   loc = doc.createElementNS("", "locations")
   doc.appendChild(loc)
   wordsetter(thisword,doc,loc)

 return None

def getfolderwords(word):

 if exists(normpath(folderwords)):
   doc =  xml.dom.minidom.parse(folderwords)
   loc =  doc.childNodes[0]
   wordsforfolder(word,doc,loc)


 else :

   doc = xml.dom.minidom.Document()
   loc = doc.createElementNS("", "wordlist")
   doc.appendChild(loc)
   xml.dom.ext.PrettyPrint(doc, open(normpath(folderwords), "w"))
   wordsforfolder(word,doc,loc)

 return None


def wordsetter(word,doc,loc):
   thisloc = doc.createElementNS("", "location")
   xexpr= "//location[.='" + thispath + "']"

   xp = Evaluate(xexpr,doc.documentElement)
   if len(xp) < 1:

   loc.appendChild(thisloc)
   text = doc.createTextNode(thispath)
   thisloc.appendChild(text)
   fi = open(word, "w")
   fi.write(doc.toxml())


def wordsforfolder(word,doc,loc):
   thisloc = doc.createElementNS("", "word")
   xexpr= "//word[.='" + word + "']"

   xp = Evaluate(xexpr,doc.documentElement)
   if len(xp) < 1:

   loc.appendChild(thisloc)
       text = doc.createTextNode(word)
   thisloc.appendChild(text)
   fi = open(folderwords, "w")
   fi.write(doc.toxml())


Cheers,

Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pythoncard question

2006-05-04 Thread bryan rasmussen
oops, sorry about that. I copied the message over in gmail but forgot
to change the subject.


Sorry,
Bryan Rasmussen
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SOAP access to SharePoint

2008-03-11 Thread bryan rasmussen
It's usually not a totally mind destroying process if you hand craft
your SOAP messages going off of examples from the service (if you're
lucky enough they have ones) and reading their XML Schemas/WSDLs to
see what they actually expect. Since it's MS do tests on your hand
rolled xml with Microsoft XML Schema validation, this may seem tedious
but it is likely to be less tedious than relying on any APIs to agree
in the wide wonderful world of Soap based WebServices.

Cheers,
Bryan Rasmussen

On Tue, Mar 11, 2008 at 10:38 PM, Paul Watson
<[EMAIL PROTECTED]> wrote:
> Has anyone successfully accessed a Microsoft SharePoint WSS using
>  Python?  No, not IronPython.  I need for this to be able to run on all
>  machines the customer might choose.
>
>  Which libs are you using?  ZSI, SOAPpy, soaplib, ???
>
>  http://wiki.python.org/moin/WebServices
>
>  --
>  http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


fcgi.py on windows?

2008-10-16 Thread bryan rasmussen
As per the subject, anyone know of a version of fcgi.py out there
somewhere that works on windows yet.

Best Regards,
Bryan Rasmussen
--
http://mail.python.org/mailman/listinfo/python-list


c.Win32_OperatingSystem question.

2009-02-28 Thread bryan rasmussen
Maybe there's a more specific list I should ask this question on but I
don't know what it is. I'm using Tim Golden's wmi stuff, and putting
my output into an XML document.

I have the following bit of code


  root = et.Element("locations")
ComputerInfo = et.SubElement(root, "ComputerInfo")
ComputerName = et.SubElement(ComputerInfo,"ComputerName")
ComputerDomain = et.SubElement(ComputerInfo,"Domain")

location = et.SubElement(root, "location")
locationpath = et.SubElement(location, "locationpath")
locationtype = et.SubElement(location, "locationtype")
currenttime = et.SubElement(location,"time")

currenttimeZone = et.SubElement(ComputerInfo,"timeZone")
BootDevice = et.SubElement(ComputerInfo,"BootDevice")
BuildNumber = et.SubElement(ComputerInfo,"BuildNumber")
BuildType = et.SubElement(ComputerInfo,"BuildType")
Caption = et.SubElement(ComputerInfo,"Caption")
CodeSet = et.SubElement(ComputerInfo,"CodeSet")
CountryCode = et.SubElement(ComputerInfo,"CountryCode")
Description = et.SubElement(ComputerInfo,"ComputerDescription")
FreePhysicalMemory = et.SubElement(ComputerInfo,"FreeMemory")
LocalDateTime = et.SubElement(ComputerInfo,"LocalDateTime")
Locale = et.SubElement(ComputerInfo,"Locale")
Manufacturer = et.SubElement(ComputerInfo,"Manufacturer")
Organization = et.SubElement(ComputerInfo,"ComputerOrganization")


OSType = et.SubElement(ComputerInfo,"OperatingSystem")
WindowsDirectory = et.SubElement(ComputerInfo,"WindowsDirectory")

# print  "ok"
# time.sleep(3)


for oper in c.Win32_OperatingSystem():
  # print "here"
  # time.sleep(3)
  ComputerName.text = str(oper.Name)
  ComputerDomain.text = str(oper.Domain)
  currenttimeZone.text = str(oper.CurrentTimeZone)
  try:
currenttime.text = str(datetime.datetime.utcnow())
BootDevice.text = str(oper.BootDevice)
BuildNumber = et.SubElement(oper.BuildNumber)
BuildType.text = str(oper.BuildType)
Caption.text = str(oper.Caption)
CodeSet.text = str(oper.CodeSet)
CountryCode.text = str(oper.CountryCode)
Description.text = str(oper.ComputerDescription)
FreePhysicalMemory.text = str(oper.FreeMemory)
LocalDateTime.text = str(oper.LocalDateTime)
Locale.text = str(oper.Locale)
Manufacturer.text = str(oper.Manufacturer)
Organization.text = str(oper.ComputerOrganization)


OSType.text = str(oper.OperatingSystem)
WindowsDirectory.text = str(oper.WindowsDirectory)


At the end of that thhe only text node thaht comes out is
ComputerName, WMI is running - Am I using the wrong names for things
here? When I try to get the same values using WScript and WQL to
extract from Win32_OperatingSystem I get all the values.

Best Regards,
Bryan Rasmussen
--
http://mail.python.org/mailman/listinfo/python-list


Re: c.Win32_OperatingSystem question.

2009-02-28 Thread bryan rasmussen
oh I noticed the problem with the
BuildNumber = et.SubElement(oper.BuildNumber)
instead of
BuildNumber = str(oper.BuildNumber)

and fixed it. No improvement in results however.

Best Regards,
Bryan Rasmussen

On Sat, Feb 28, 2009 at 6:38 PM, bryan rasmussen
 wrote:
> Maybe there's a more specific list I should ask this question on but I
> don't know what it is. I'm using Tim Golden's wmi stuff, and putting
> my output into an XML document.
>
> I have the following bit of code
>
>
>  root = et.Element("locations")
>        ComputerInfo = et.SubElement(root, "ComputerInfo")
>        ComputerName = et.SubElement(ComputerInfo,"ComputerName")
>        ComputerDomain = et.SubElement(ComputerInfo,"Domain")
>
>        location = et.SubElement(root, "location")
>        locationpath = et.SubElement(location, "locationpath")
>        locationtype = et.SubElement(location, "locationtype")
>        currenttime = et.SubElement(location,"time")
>
>        currenttimeZone = et.SubElement(ComputerInfo,"timeZone")
>        BootDevice = et.SubElement(ComputerInfo,"BootDevice")
>        BuildNumber = et.SubElement(ComputerInfo,"BuildNumber")
>        BuildType = et.SubElement(ComputerInfo,"BuildType")
>        Caption = et.SubElement(ComputerInfo,"Caption")
>        CodeSet = et.SubElement(ComputerInfo,"CodeSet")
>        CountryCode = et.SubElement(ComputerInfo,"CountryCode")
>        Description = et.SubElement(ComputerInfo,"ComputerDescription")
>        FreePhysicalMemory = et.SubElement(ComputerInfo,"FreeMemory")
>        LocalDateTime = et.SubElement(ComputerInfo,"LocalDateTime")
>        Locale = et.SubElement(ComputerInfo,"Locale")
>        Manufacturer = et.SubElement(ComputerInfo,"Manufacturer")
>        Organization = et.SubElement(ComputerInfo,"ComputerOrganization")
>
>
>        OSType = et.SubElement(ComputerInfo,"OperatingSystem")
>        WindowsDirectory = et.SubElement(ComputerInfo,"WindowsDirectory")
>
>        # print  "ok"
>        # time.sleep(3)
>
>
>        for oper in c.Win32_OperatingSystem():
>          # print "here"
>          # time.sleep(3)
>          ComputerName.text = str(oper.Name)
>          ComputerDomain.text = str(oper.Domain)
>          currenttimeZone.text = str(oper.CurrentTimeZone)
>          try:
>            currenttime.text = str(datetime.datetime.utcnow())
>            BootDevice.text = str(oper.BootDevice)
>            BuildNumber = et.SubElement(oper.BuildNumber)
>            BuildType.text = str(oper.BuildType)
>            Caption.text = str(oper.Caption)
>            CodeSet.text = str(oper.CodeSet)
>            CountryCode.text = str(oper.CountryCode)
>            Description.text = str(oper.ComputerDescription)
>            FreePhysicalMemory.text = str(oper.FreeMemory)
>            LocalDateTime.text = str(oper.LocalDateTime)
>            Locale.text = str(oper.Locale)
>            Manufacturer.text = str(oper.Manufacturer)
>            Organization.text = str(oper.ComputerOrganization)
>
>
>            OSType.text = str(oper.OperatingSystem)
>            WindowsDirectory.text = str(oper.WindowsDirectory)
>
>
> At the end of that thhe only text node thaht comes out is
> ComputerName, WMI is running - Am I using the wrong names for things
> here? When I try to get the same values using WScript and WQL to
> extract from Win32_OperatingSystem I get all the values.
>
> Best Regards,
> Bryan Rasmussen
>
--
http://mail.python.org/mailman/listinfo/python-list


Re: c.Win32_OperatingSystem question.

2009-03-12 Thread bryan rasmussen
Hi,

well coming back to the project and looking over it I realized I had
somehow messed up the names for some Win32 Operating System properties
- for example ComputerOrganization instead of Organization. Not sure
where I got the values from cause I've just be copying the properties
I want from scriptomatic output.




Cheers,
Bryan Rasmussen

On Sat, Feb 28, 2009 at 8:15 PM, Tim Golden  wrote:
> bryan rasmussen wrote:
>>
>> Maybe there's a more specific list I should ask this question on but I
>> don't know what it is. I'm using Tim Golden's wmi stuff, and putting
>> my output into an XML document.
>>
>> I have the following bit of code
>>
> [.. snip ...]
>>
>> At the end of that thhe only text node thaht comes out is
>> ComputerName, WMI is running - Am I using the wrong names for things
>> here? When I try to get the same values using WScript and WQL to
>> extract from Win32_OperatingSystem I get all the values.
>
>
> I'd love to help here, but you're not making it easy. I'm not
> clear if you're suggesting there's a problem with WMI or with
> ElementTree or with something else. Can you narrow down, please
> so I don't have to invent a code wrapper for your code fragment.
> Try producing an instantly-runnable piece of code which demonstrates
> the problem and I'll happily have a look from the WMI perspective at
> least.
>
> TJG
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list


Re: don't make it worse! - was Re: SPAM

2008-06-20 Thread bryan rasmussen
I guess it didn't because I was reading through Google Mail, and it
wasn't filtered.

Best Regards,
Bryan Rasmussen

On Fri, Jun 20, 2008 at 9:42 AM, Aspersieman <[EMAIL PROTECTED]> wrote:
> Michael Torrie wrote:
>
> Aspersieman wrote:
>
>
> SPAM
>
>
> Obviously.  Please refrain from replying to the SPAM on this list.  It
> just makes the problem worse.
>
> Thanks.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
>
> ErrrOk.
>
> I read somewhere that replying to potential spam with 'SPAM' in subject will
> add it (the message sender you are replying to) to google's spam filters.
> Can't find the link now though.
>
> Sorry though, if doing this didn't help - or made it worse. :)
>
> Nicol
>
> --
>
> The three things to remember about Llamas:
> 1) They are harmless
> 2) They are deadly
> 3) They are made of lava, and thus nice to cuddle.
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list


Re: convert xhtml back to html

2008-04-24 Thread bryan rasmussen
I'll second the recommendation to use xsl-t, set the output to html.


The code for an XSL-T to do it would be basically:
http://www.w3.org/1999/XSL/Transform"; version="1.0">




you would probably want to do other stuff than just  copy it out but
that's another case.

Also, from my recollection the solution in CHM to make XHTML br
elements behave correctly was  as opposed to , at any rate
I've done projects generating CHM and my output markup was well formed
XML at all occasions.

Cheers,
Bryan Rasmussen

On Thu, Apr 24, 2008 at 5:34 PM, Tim Arnold <[EMAIL PROTECTED]> wrote:
> hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to
>  create  CHM files. That application really hates xhtml, so I need to convert
>  self-ending tags (e.g. ) to plain html (e.g. ).
>
>  Seems simple enough, but I'm having some trouble with it. regexps trip up
>  because I also have to take into account 'img', 'meta', 'link' tags, not
>  just the simple 'br' and 'hr' tags. Well, maybe there's a simple way to do
>  that with regexps, but my simpleminded )]+/> doesn't work. I'm not
>  enough of a regexp pro to figure out that lookahead stuff.
>
>  I'm not sure where to start now; I looked at BeautifulSoup and
>  BeautifulStoneSoup, but I can't see how to modify the actual tag.
>
>  thanks,
>  --Tim Arnold
>
>
>  --
>  http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list


Re: convert xhtml back to html

2008-04-24 Thread bryan rasmussen
wow, that's pretty nice there.

 Just to know: what's the performance like on XML instances of 1 GB?

Cheers,
Bryan Rasmussen


On Thu, Apr 24, 2008 at 9:55 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> Tim Arnold wrote:
>  > hi, I've got lots of xhtml pages that need to be fed to MS HTML Workshop to
>  > create  CHM files. That application really hates xhtml, so I need to 
> convert
>  > self-ending tags (e.g. ) to plain html (e.g. ).
>
>  This should do the job in lxml 2.x:
>
> from lxml import etree
>
> tree = etree.parse("thefile.xhtml")
> tree.write("thefile.html", method="html")
>
>  http://codespeak.net/lxml
>
>  Stefan
>
>
> --
>  http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list