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
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
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
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:
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
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
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
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
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
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
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
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
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
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
14 matches
Mail list logo