file access in jythonc

Jeremy Jones zanesdad at bellsouth.net
Wed Sep 1 18:34:46 EDT 2004


John Howard wrote:

>Alan Kennedy <alanmk at hotmail.com> wrote in message news:<iQkZc.26276$Z14.8357 at news.indigo.ie>...
>  
>
>>[John Howard]
>>    
>>
>>>So does that mean that a jre does not have to be on the local pc?
>>>      
>>>
>>No: there *must* be a JRE on the local PC: how could the java/jython run 
>>at all without an execution environment?
>>
>>The JRE on the local PC is the very thing that is preventing you from 
>>reading files from local drives.
>>
>>If you want to, you can permit any and all applet to load files from 
>>your local drive. In Internet Explorer, select 
>>"Tools->Options"->Security->Custom Level->Microsoft VM->Java 
>>Permissions->Custom->Java Custom Settings.
>>
>>In that control panel you can disable all of the protections that your 
>>browser puts in place to protect you from hostile applets on the 
>>Internet at large. Feel free to dismantle those security barriers, at 
>>your own risk: by doing so you're opening the contents of your hard-disk 
>>to the world. I Hope you're not storing any private or sensitive 
>>information on there.
>>
>>    
>>
>>>The local pc does not have to set policies, etc. 
>>>      
>>>
>>No, that's precisely where you set policies. Where else could they be set?
>>
>>Alternatively, as others have pointed out multiple times, you can 
>>digitally sign your applets so that they can be recognized and thus 
>>given more permissions than unknown applets.
>>    
>>
> 
>I said jre, but meant jvm. But your answer is revealing also! From
>what you are saying, it is NOT possible to have a html page that can
>access a local file unless at least a jre is present. Again, not good.
>I think I'll just write the whole project in C. Forget jython!
>  
>
I've gone back to re-read the thread to see if I can figure out what 
you're trying to do and have been unsuccessful.  The only thing I can 
tell is you want to send a file pointer to the server or something like 
that.  Are you just trying to upload a file to a server?  If so, I 
believe you can do that with just plain HTML with an <input> tag.  I'll 
leave the details between you and Google.  One caveat with this is that 
the person hitting the webpage will have to browser for the file and 
then hit the submit button.  If you're wanting it done automatically (or 
without the user's knowledge/permission), you may want to find an 
alternative solution that isn't so concerned with unimportant things 
like security - you could give MS Internet Explorer and ActiveX a spin :-)

I'd like to see the C code you come up with.  If you can write a C 
program that will run on a server, access a client machine, easily snag 
a file and pull it back to the server without having a willing and 
compliant process (say, a JVM, JRE, XMLRPC server, a Microsoft operating 
system full of exploits) running on the client machine, then I am sure 
there are a number of folks on alt.2600 that would love to see your source.

Again, it goes back to, What exactly are you trying to accomplish here?

And just one more tip for you - you would do well to watch the "tone of 
voice" you are using in your postings.  While the folks on c.l.p. are 
extremely kind, generous and tolerant, you will get farther if you 
didn't come off quite so abrasive.  Such statements as:

It seems to me that for jythonc to have any use in
development of "practical" products, programs have to be able to
access local files easily. If not, then this, in my opinion, is going
to be a MAJOR issue for jython!!

and

So...are you saying it can be done? That is, a IE can access a local
file (assuming it's there, of course) using a jythonc product?
Question is -- HOW???

and

 From what you are saying, it is NOT possible to have a html page that can
access a local file unless at least a jre is present. Again, not good.
I think I'll just write the whole project in C. Forget jython!

are not going to make people eager to help you out.  Taking a peek at 
http://www.catb.org/~esr/faqs/smart-questions.html might help you out.


Jeremy Jones
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040901/8758651c/attachment.html>


More information about the Python-list mailing list