RE: Xml File Error

2019-07-30 Thread David Raymond
e You can check if your path is ok using either os.path.exists() or os.path.isfile() before trying to actually open it to see if it is already there. -Original Message- From: Python-list On Behalf Of Dipangi Shah Sent: Tuesday, July 30, 2019 3:20 AM To: python-list@python.org Subject

Xml File Error

2019-07-30 Thread Dipangi Shah
Hi, import os from xml.etree import ElementTree file_name = 'Users.xml' full_file = os.path.abspath(os.path.join('data', file_name)) print(full_file) with above code, path is successfully printed as "C:\Users\Evosys\PycharmProjects\Python Level1\data\Users.xml" but when I add below 2 lines, there

Re: Distribution file error

2018-06-08 Thread Cameron Simpson
On 08Jun2018 07:52, Tamara Berger wrote: I’m trying to create a distribution file for my module, but got an error message. The module, including the setup and read me files, are contained within the folder “mymodules.” I typed this command (per instructions from my workbook) from within mymodu

Distribution file error

2018-06-08 Thread T Berger
Hi, I really need help here. I’m trying to create a distribution file for my module, but got an error message. The module, including the setup and read me files, are contained within the folder “mymodules.” I typed this command (per instructions from my workbook) from within mymodules folder:

Re: Python 2.6 SSL module: Fails on key file error, with Errno 336265225, without a key file.

2010-04-19 Thread John Nagle
Antoine Pitrou wrote: Perhaps you are using the wrong parameters and looking for ca_certs instead: That's right. Thanks. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.6 SSL module: Fails on key file error, with Errno 336265225, without a key file.

2010-04-19 Thread Antoine Pitrou
Le Sun, 18 Apr 2010 22:37:30 -0700, John Nagle a écrit : > > The cert file is the same PEM file I use with M2Crypto, and it's derived > from Firefox's cert file. > > Why am I getting a "private key" related error? I'm not submitting a > keyfile, just a cert file. I'm not an expert but this is w

Python 2.6 SSL module: Fails on key file error, with Errno 336265225, without a key file.

2010-04-18 Thread John Nagle
I'm starting to convert from M2Crypto to Python 2.6's SSL module. So I tried a trivial test: import ssl import socket certs = "d:/projects/sitetruth/certificates/cacert.pem" sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ssk = ssl.wrap_socket(sk, certfile=certs, cert_reqs=ssl.CERT_NON

Re: file Error

2007-05-03 Thread Gabriel Genellina
En Thu, 03 May 2007 10:15:52 -0300, <[EMAIL PROTECTED]> escribió: > Thanks for the replyHow do i accept the filename is a > parameter and avoid the error.Can you elaborate. To get the arguments passed to the script, use sys.argv[] Most introductory texts should cover it, like the Python t

Re: file Error

2007-05-03 Thread saif . shakeel
On May 3, 6:09 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 03 May 2007 09:39:37 -0300, <[EMAIL PROTECTED]> escribió: > > > Hi, > > I am parsing an xml file,and using raw_input command to ask the > > user to enter the file name.Ex > > > Enter The ODX File Path: > > > Suppose my

Re: file Error

2007-05-03 Thread Gabriel Genellina
En Thu, 03 May 2007 09:39:37 -0300, <[EMAIL PROTECTED]> escribió: > Hi, > I am parsing an xml file,and using raw_input command to ask the > user to enter the file name.Ex > > Enter The ODX File Path: > > Suppose my code does not work properly,then in the python idle window > it shows some

file Error

2007-05-03 Thread saif . shakeel
Hi, I am parsing an xml file,and using raw_input command to ask the user to enter the file name.Ex >>> Enter The ODX File Path: Suppose my code does not work properly,then in the python idle window it shows something like this: >>> C:\Projects\ODX Import\Sample Files\MiscFiles \CIM_A3300_diag

Re: Reading in external file - error checking and line numbers...

2005-09-07 Thread Hugh Macdonald
Thankyou! That was much easier than I expected. One more thing on a similar note. When raising exceptions, is it possible to remove a few items from the top of the stack trace? My stack trace is looking something like: File "ripple", line 160, in ? File "ripple", line 94, in executeR

Re: Reading in external file - error checking and line numbers...

2005-09-07 Thread Fredrik Lundh
Hugh Macdonald wrote: > I'm writing a tool at the moment that reads in an external file (which > can use any Python syntax) > > At the moment, I'm reading the file in using: > > scriptLines = open(baseRippleScript).read() > exec scriptLines > > However, if I raise an exception in my main code, in

Reading in external file - error checking and line numbers...

2005-09-07 Thread Hugh Macdonald
I'm writing a tool at the moment that reads in an external file (which can use any Python syntax) At the moment, I'm reading the file in using: scriptLines = open(baseRippleScript).read() exec scriptLines However, if I raise an exception in my main code, in a function that is cal