Skip to content

Content Tagged "python"

Page 4 of 5

Content Tagged "python"

Use Oracle's RegisterSchema with Large Schemas (from Python)

April 1, 2014Category: Software
An important note when loading XSDs in Oracle is that DBMS XMLSCHEMA.registerSchema() requires the actual content of the _ xsd is loaded in a string. A side effect is that strings in Oracle have limits and schemas can exceed those limits. Therefore, such strings must be fragmented. In this case…

Drop an Oracle-Loaded XSD in Python

March 31, 2014Category: Software
A loaded schema can be dropped if: No other schema depends on it No data using the schema is loaded I think you may force unloading schemas even if there is data loaded but I haven't tried that. The code to drop a schema is: You can use it if e.g. schema is updated or we don't need it anymore. The…

Loading Dependent XSDs in Oracle through Python

March 31, 2014Category: Software
One essential feature is that schemas can refer to other schemas. Oracle supports it via the schemaURL parameter. In other words, the url of the referred schema must be the same as the schemaURL parameter used to register the referred schema. One consequence of this feature is the necessity to…

UPSERT (update or insert) in Oracle with Python

March 24, 2014Category: Software
One of the things I had to do is to build a script to upload data (e.g. the content of a list of files) into a database with a single table. My table has 3 columns: ID - a 20-character string identifier with PK properties (unique) ARTICLE - an XMLType element with the article details CITEDBY - an…

Install NumPy in a Virtual Environment on Windows

March 13, 2014Category: Software
Someone told me they use a custom python install named Anaconda on windows because it contains a set of math packages which are difficult to install. In fairness, they're right because any python module with native dependencies is a mess to install from sources (e.g. because you need the same…

Memory dump: Work with XMLField in Oracle (part 3)

March 6, 2014Category: Software
TL;DR: Here I present how to insert data with python in the table created at the previous step. Table of Contents Part 1 - Prerequisites Part 2 - Create a table and perform a SELECT Part 3 - User Python to insert data Part 4 - references In the previous entry, I've finished by creating the table…

Easy django applications with cookiecutter

February 20, 2014Category: Software
Now I'm trying to create a bunch of django applications and I've got tired of creating everything from scratch. So, here are the steps I'm using to easy create a new django app: Create a new virtual environment . This is vital. It allows you to set up your own versions, not pollute the default…

Make pyflakes/pylint ignore unused imports

February 12, 2014Category: Software
Sometimes, you need to add an import without explicitly using it, just to have stuff defined. In such cases, both pyflakes and pylint generate messages, which can be annoying. For example django-appconf has a class-based configuration like so: If I'm using the file like this, then I'll end up…

Connect PyCharm to SQLite on Windows

January 25, 2014Category: Software
To connect to a SQLite database on PyCharm you have two options: Manual connection and Automatic connection . Manual connection Use the following steps to perform the manual connection: Open the Database tab in PyCharm (usually on the right hand side) Right-click and select the New > Data…

Install lxml on windows (on a virtualenv)

January 22, 2014Category: Software
Lxml is a nice python library for XML processing. ETree is really quick, which makes things interesting if you have a large amount of XML files (or a bigger one) to process. Installation on linux/mac is painless (OK, you need homebrew on mac to make int painless, but you get my point...). The…
PreviousNext

All tags