how to truncate to get the 1st 5 chars from a string

2009-09-23 Thread MacRules
s="1234abcd" s.range(0..4) 1234a Is there a string function like this? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: python profiling for a XML parser program

2009-09-19 Thread MacRules
Paul Boddie wrote: On 19 Sep, 21:19, MacRules wrote: Is there a python profiler just like for C program? And tell me which functions or modules take a long time. Can you show me URL or link on doing this task? Having already looked at combining Python profilers with KCachegrind (as

python profiling for a XML parser program

2009-09-19 Thread MacRules
I have a python program doing XML data prasing and write the result to 2 data files; which will be loaded to MySQL. I ran this. $ python dealmaker.py ... read data loop through records ... XML parsing ... write to file1.dat ... write to file2.date done Is there a python profiler just like for

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-04 Thread MacRules
Dennis Lee Bieber wrote: On Thu, 03 Sep 2009 14:43:40 -0400, MacRules declaimed the following in gmane.comp.python.general: Oracle DB in data center 1 (LA, west coast) MSSQL DB in data center 2 (DC, east coast) Note that your thread subject line states MySQL... There is a big

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread MacRules
Martin P. Hellwig wrote: MacRules wrote: What I am looking for is this. Oracle DB in data center 1 (LA, west coast) MSSQL DB in data center 2 (DC, east coast) So network bandwidth is an issue, I prefer to have gzip fist and deliver the data. If bandwidth is really an issue, you should send

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread MacRules
Ben Finney wrote: MacRules writes: Are you a Python expert? This group has many Python experts, and even more people who can no doubt help you if you are able to articulate what you need help with. To help dispel a possible misunderstanding: Don't expect to have a one-on-one convers

Re: python daemon - compress data and load data into MySQL by pyodbc

2009-09-03 Thread MacRules
Sean DiZazzo wrote: On Sep 2, 8:36 pm, MacRules wrote: Hi, I installed Python daemon, pyodbc module to access the back-end DB server. My setup is like this load data job -> Python Daemon A, port 6000 -> Python Daemon B, port 7000 -> MySQL Daemon A will perform data compression

python daemon - compress data and load data into MySQL by pyodbc

2009-09-02 Thread MacRules
Hi, I installed Python daemon, pyodbc module to access the back-end DB server. My setup is like this load data job -> Python Daemon A, port 6000 -> Python Daemon B, port 7000 -> MySQL Daemon A will perform data compression, such as GZIP, and send over data to Daemon B. Daemon B will perform

Python - insert image / pdf / blob files to MySQL, MSSQL

2009-08-22 Thread MacRules
Where to find code examples? Or someone can post sample codes here. Thanks -- http://mail.python.org/mailman/listinfo/python-list