Re: How convert a list string to a real list

2011-11-30 Thread Hidura
Why you don't make this ['1','2','3'].strip([]).split(',') work for me El nov 30, 2011 10:16 p.m., Terry Reedy tjre...@udel.edu escribió: On 11/30/2011 3:58 AM, Peter Otten wrote: Terry Reedy wrote: On 11/30/2011 1:20 AM, 郭军权 wrote: Good after I have a string liststr = '[,,ccc]'

Re: Benefits of xml.dom.minidom?

2011-10-20 Thread Hidura
I use minidom all the time and i don' t have that problem could you describe more of the process ? El oct 20, 2011 5:53 p.m., John Gordon gor...@panix.com escribió: I recently inherited some code that uses xml.dom.minidom to build a large XML document, and I noticed that it is quite slow and

Re: using python in web applications

2011-09-11 Thread hidura
-bounces+hidura=gmail@python.org Date: Sun, 11 Sep 2011 11:48:01 To: python-list@python.org Subject: Re: using python in web applications Littlefield, Tyler ty...@tysdomain.com wrote: I don't much care for PHP, but the thing that can be said for it is it's pretty quick. How does Python

Online payment

2011-06-25 Thread hidura
Hello i want to create a shopping cart for my web-site, to receive payments from credit cards, how can i do this? where i can start to investigate? I did all the web-site using Python-3. Thanks!!! -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Online payment

2011-06-25 Thread hidura
I don't use Django or Plone i use my own web-frameowork. Thanks for the advice! El , Florencio Cano florencio.c...@gmail.com escribió: Hello i want to create a shopping cart for my web-site, to receive payments from credit cards, how can i do this? where i can start to investigate? I

Re: python + php encrypt/decrypt

2011-06-04 Thread hidura
Use xml to pass the encrypt text. On , Peter Irbizon peterirbi...@gmail.com wrote: Hello, I would like to encrypt text in python and decrypt it in my PHP script. I tried to use pycrypto and some aes php scripts but the results are not the same. Please, is there any example (the best way

How to re import a module

2011-04-07 Thread hidura
Hello i want to know the best way to re import a module, because i have a web server with just one Apache session for all my domains and applications, and i if i need to make some changes on one application restart the server will affect the others, so i was thinking in 2 ways the first

How to conserve the integrity of the string from a database response using Python

2011-02-17 Thread Hidura
Hello, i am using py-postgresql as the driver the database, when make a select to a string with non-ASCII characters, the response replace the character with � what can i make to change this to the correct character? This is my code: codeclass decodify: def __init__(self): db =

Re: can't use multiprocessing with class factory?

2011-01-28 Thread Hidura
What is the output? 2011/1/28, Alan alan.is...@gmail.com: Can the below example be fixed to work? Thanks, Alan Isaac import multiprocessing as mp class Test(object): pass def class_factory(x): class ConcreteTest(Test): _x = x return ConcreteTest def f(cls):

Problems receiving arguments on a subprocess

2011-01-26 Thread hidura
of the script: Created By: hidura On Date: Jan 25, 2011 from xml.dom.minidom import parseString import os import sys class savCSS: This class has to save the changes on the css file. def __init__(self, args): document = parseString(args) request = document.firstChild address

Re: Problems receiving arguments on a subprocess

2011-01-26 Thread Hidura
= data[1].decode() print(dataOut) if car.returncode 1: return dataOut.split('\n') else: print(log) return log Here is the code of the script: Created By: hidura On Date: Jan 25, 2011 from xml.dom.minidom import parseString import os import sys class savCSS: This class has

Re: How to execute foreing code from Python

2011-01-25 Thread Hidura
('') car = Popen(shlex.split('python3.1 /home/hidura/webapps/karinapp/Suite/ForeingCode/saveCSS.py', stdin=args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) args.close() dataOut = car.stdout.read().decode() log = car.stderr.read

How to execute foreing code from Python

2011-01-23 Thread hidura
Hello i want to code from different languages using a Python script i know i can use os.system, but i don't know how to receive data or send arguments using that method if theres any another way to make it or there's a way to send arguments and receive data using os.system? Thanks in

Re: How to execute foreing code from Python

2011-01-23 Thread Hidura
Thanks to all for your fast responses. I will use this on a server running on Linux, so there is no problem with the OS and probably i will try to pipes and subprocess, but the pipes worry me because i can't stop the process using timeout or i don't found how to stop it... 2011/1/23, Dan

Re: Python Web App

2010-12-22 Thread Hidura
I am creating one, is on test, what kind of app do you want create? 2010/12/22, Sean secr...@gmail.com: Anybody know where I can find a Python Development Environment in the form of a web app for use with Chrome OS. I have been looking for a few days and all i have been able to find is some

Re: Python Web App

2010-12-22 Thread Hidura
Why grashtly? 2010/12/22, Tim Harig user...@ilthio.net: On 2010-12-22, Sean secr...@gmail.com wrote: Anybody know where I can find a Python Development Environment in the form of a web app for use with Chrome OS. I have been looking for a few days and all i have been able to find is some old

Re: Python Web App

2010-12-22 Thread Hidura
notebook at the same time so I need something that will atleast tell me if I have any syntax errors. Although the more features the better that way learning is an easier experience. On Dec 22, 7:05 pm, Hidura hid...@gmail.com wrote: I am creating one, is on test, what kind of app do you want

Re: Python Web App

2010-12-22 Thread Hidura
My framework let you store online on a hosting server that the same framework provide. 2010/12/22, Hidura hid...@gmail.com: Use editarea, that's the best option if you want something small, but as i said before i am developing a framework that allows you to create app's from the web

Re: Python Web App

2010-12-22 Thread Hidura
results, in my case i beleive that a web-based framework adjust better to the needs if you'll make a web-app, otherwise use eclipse or netbeans. 2010/12/22, Tim Harig user...@ilthio.net: [Reordered to preserve context in bottom posting] On 2010-12-23, Hidura hid...@gmail.com wrote: 2010/12/22, Tim

Re: Re: Python Web App

2010-12-22 Thread hidura
that, but the target of those OS are use the share resources of the pc, smartphone, etc and the server. On Dec 22, 2010 11:54pm, Tim Harig user...@ilthio.net wrote: On 2010-12-23, Hidura hid...@gmail.com wrote: Ok, but you are comparing a web-based framework with a native-based framework that use

Re: Sending XML to a WEB Service and Getting Response Back

2010-12-20 Thread Hidura
I recommend you use the urllib.request in the library of python says everything that you want to know. 2010/12/20, Anurag Chourasia anurag.choura...@gmail.com: Dear Python Mates, I have a requirement to send a XML Data to a WEB Service whose URL is of the form

Re: A web site using Python

2010-12-06 Thread Hidura
KarinApp will allow you to create an application without writing code, eg: you want to insert the information of a person in the DB, with all the current framework you will write a code that takes the data, and after you will write the insert, and if you want to send a response you will have to

Re: A web site using Python

2010-12-04 Thread hidura
I am working on a tool that can create an application like that without write server code, but the system is write in Python3.1 On Dec 4, 2010 9:32am, Virgil Stokes v...@it.uu.se wrote: I would like to design a web site that can be used to help people to find a cat that they can adopt.

Re: Printing from Web Page

2010-11-20 Thread Hidura
Explain better what you try to do. 2010/11/20, Victor Subervi victorsube...@gmail.com: Hi; I need to be able to print something from a Web page: not the entire page but what I specify. I am writing the page and the client is surfing to it. How do I do this? TIA, beno -- Enviado desde mi

Re: Objects versus dictionaries

2010-11-14 Thread Hidura
Use *kargs to pass all the informatio that you need if u want in the future extended this will be usefull 2010/11/14, Micah Carrick mi...@greentackle.com: I'm writing a little API that other people will use. There are up to 3 objects that get passed around. One of them has some validation

Re: parse xml

2010-10-15 Thread Hidura
First every element represents a node so you have to use value=n.childNodes[0].nodeValue with that you'll have the 5000 2010/10/15, kostia kostya.demc...@gmail.com: I have xml file: ?xml version=1.1 encoding=UTF-8? root n5/n /root I want to get the value of n (= 5) inside

Re: Re: Re: UTF-8 problem encoding and decoding in Python3

2010-10-14 Thread hidura
Finally did it, thank you all for your help, the code i will upload because can be used by Python 3 for handle the wsgi issue of the Bytes! Almar, sorry for the mails gmails sometimes sucks!! On Oct 14, 2010 1:00pm, hid...@gmail.com wrote: Finally did it, thank you all for your help, the code

Re: UTF-8 problem encoding and decoding in Python3

2010-10-12 Thread Hidura
2010 23:01, Hidura hid...@gmail.com wrote: I try to encode a binary file what was upload to a server and is extract from the wsgi.input of the environ and comes as an unicode string. Firstly, UTF-8 is not meant to encode arbitrary binary data. But I guess you could have a Unicode string

UTF-8 problem encoding and decoding in Python3

2010-10-10 Thread hidura
Hello everybody i am trying to encode a file string of an upload file and i am facing some problems with the first part of the file. When i open directly and try to decode the file the error is this: `UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: unexpected code

Re: UTF-8 problem encoding and decoding in Python3

2010-10-10 Thread Hidura
I try to encode a binary file what was upload to a server and is extract from the wsgi.input of the environ and comes as an unicode string. 2010/10/10, Almar Klein almar.kl...@gmail.com: Hi, please tell us what you are trying to do. Encoding (with UTF-8) is a method to convert a Unicode

Re: Re: [Web-SIG] Propouse code

2010-10-09 Thread hidura
- ___ Web-SIG mailing list web-...@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/hidura%40gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: unicode problem?

2010-10-09 Thread hidura
I had a similar problem but i can 't encode a byte to a file what has been uploaded, without damage the data if i used utf-8 to encode the file duplicates the size, and i try to change the codec to raw_unicode_escape and this barely give me the correct size but still damage the file, i used

Re: Re: Re: Re: How to save a binary file?

2010-10-09 Thread hidura
. If you can't fix that, you could turn the string into bytes using: data = bytes(ord(c) for c in str) or by carefully choosing an encoding which would give the same result: data = str.encode('latin-1') Then you can save it: s = open('/home/hidura

Re: Re: Re: How to save a binary file?

2010-10-06 Thread hidura
: Hello, how i can save a binary file, i read in the manual in the IO area but doesn' t show how to save it. Here is the code what i am using: s = open('/home/hidura/test.jpeg', 'wb') s.write(str.encode(formFields[5])) s.close() Why are you encoding

Re: Re: Re: Re: How to save a binary file?

2010-10-06 Thread hidura
in the IO area but doesn' t show how to save it. Here is the code what i am using: s = open('/home/hidura/test.jpeg', 'wb') s.write(str.encode(formFields[5])) s.close() Why are you encoding it? A JPEG file should contain the binary data, not a textual encoding

Re: Re: How to save a binary file?

2010-10-06 Thread hidura
= str.encode('latin-1') Then you can save it: s = open('/home/hidura/test.jpeg', 'wb') s.write(data) s.close() I asked you to look at the result of repr so that you could see more clearly what the data actually looked like, an instance of str or an instance of bytes. -- http

Re: Re: Re: How to save a binary file?

2010-10-06 Thread hidura
: data = str.encode('latin-1') Then you can save it: s = open('/home/hidura/test.jpeg', 'wb') s.write(data) s.close() I asked you to look at the result of repr so that you could see more clearly what the data actually looked like, an instance of str or an instance of bytes

How to save a binary file?

2010-10-05 Thread hidura
Hello, how i can save a binary file, i read in the manual in the IO area but doesn' t show how to save it. Here is the code what i am using: s = open('/home/hidura/test.jpeg', 'wb') s.write(str.encode(formFields[5])) s.close() If needs the binary code i could upload. -- http://mail.python.org

Re: Re: Re: How to save a binary file?

2010-10-05 Thread hidura
but doesn' t show how to save it. Here is the code what i am using: s = open('/home/hidura/test.jpeg', 'wb') s.write(str.encode(formFields[5])) s.close() So where's the problem? That code should work. Anyway, you want to have a look at with-statements. Jonas -- http

Re: Re: How to save a binary file?

2010-10-05 Thread hidura
but doesn' t show how to save it. Here is the code what i am using: s = open('/home/hidura/test.jpeg', 'wb') s.write(str.encode(formFields[5])) s.close() So where's the problem? That code should work. Anyway, you want to have a look

Re: Re: Re: Problem saving uploaded files in Python3

2010-10-04 Thread hidura
This is the code what i use to save the file. tmpData = str(rawData)[1:].strip(' ') tmp = tmpData.split('\\r') for piece in tmp: for slice in piece.split('\n'): if 'Content-Disposition' in slice: filename = slice.split(';')[2].split('=')[1] h = open('home/hidura/'+filename.strip(' '), 'wb') elif

Problem saving uploaded files in Python3

2010-10-02 Thread hidura
strip the single quotes dat = tmpData.split('\\r')#Then i split all the data in the '\\r' s = open('/home/hidura/test.png', 'w')#I open the test.png file. for cont in range(5,150):#Now beging in the 5th position to the 150th position s.write(dat[cont])#Insert the piece of the data in the file

Re: Re: Problem saving uploaded files in Python3

2010-10-02 Thread hidura
that represent the b and after i strip the single quotes dat = tmpData.split('\\r')#Then i split all the data in the '\\r' s = open('/home/hidura/test.png', 'w')#I open the test.png file. Where is the mistake? In believing that wsgi.input is a simple file that contains your

Re: WSGI by HTTP GET

2010-10-02 Thread Hidura
Be more specific but i recommend you, use a way in what you be very explicit eg:part='bussiness' a bool for 3 options it's very diffcult to handle. 2010/10/2, Niklasro nikla...@gmail.com: Hello Getting a web same page with 2 or more possible states eg business part, private part or all parts,

Problems with wsgi Python3

2010-09-30 Thread hidura
the os.environ.item() prints to me: ('LESSOPEN', '|/usr/bin/lesspipe.sh %s') ('SSH_CLIENT', '190.94.122.180 38415 22') ('CVS_RSH', 'ssh') ('LOGNAME', 'hidura') ('INPUTRC', '/etc/inputrc') ('HOME', '/home/hidura') ('PATH', '/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/dell/srvadmin/bin:/home/hidura

Re: Re: Problems with wsgi Python3

2010-09-30 Thread hidura
] 'DOCUMENT_ROOT': [Thu Sep 30 13:35:07 2010] [error] '/home/hidura/webapps/karinapp/Suite', [Thu Sep 30 13:35:07 2010] [error] 'GATEWAY_INTERFACE': [Thu Sep 30 13:35:07 2010] [error] 'CGI/1.1', [Thu Sep 30 13:35:07 2010] [error] 'HTTP_ACCEPT': [Thu Sep 30 13:35:07 2010] [error] 'text/html,application

Re: Re: Re: Problems with wsgi Python3

2010-09-30 Thread hidura
] 'multipart/form-data; boundary=---8905735096173894531259794847', [Thu Sep 30 13:35:07 2010] [error] 'DOCUMENT_ROOT': [Thu Sep 30 13:35:07 2010] [error] '/home/hidura/webapps/karinapp/Suite', [Thu Sep 30 13:35:07 2010] [error] 'GATEWAY_INTERFACE': [Thu Sep 30 13:35:07 2010

Re: Re: Problems with wsgi Python3

2010-09-30 Thread hidura
13:35:07 2010] [error] '/home/hidura/webapps/karinapp/Suite', [Thu Sep 30 13:35:07 2010] [error] 'GATEWAY_INTERFACE': [Thu Sep 30 13:35:07 2010] [error] 'CGI/1.1', [Thu Sep 30 13:35:07 2010] [error] 'HTTP_ACCEPT': [Thu Sep 30 13:35:07 2010] [error] 'text/html

Re: Re: Re: Problems with wsgi Python3

2010-09-30 Thread hidura
] [error] 'DOCUMENT_ROOT': [Thu Sep 30 13:35:07 2010] [error] '/home/hidura/webapps/karinapp/Suite', [Thu Sep 30 13:35:07 2010] [error] 'GATEWAY_INTERFACE': [Thu Sep 30 13:35:07 2010] [error] 'CGI/1.1', [Thu Sep 30 13:35:07 2010] [error] 'HTTP_ACCEPT': [Thu Sep 30 13:35:07 2010

Re: Re: Re: Re: Problems with wsgi Python3

2010-09-30 Thread hidura
:07 2010] [error] '/home/hidura/webapps/karinapp/Suite', [Thu Sep 30 13:35:07 2010] [error] 'GATEWAY_INTERFACE': [Thu Sep 30 13:35:07 2010] [error] 'CGI/1.1', [Thu Sep 30 13:35:07 2010] [error] 'HTTP_ACCEPT': [Thu Sep 30 13:35:07 2010] [error] 'text/html

Re: Re: Re: Upload files with wsgi

2010-09-29 Thread hidura
That is what i get: FieldStorage(None, None, []) On Sep 29, 2010 8:39am, hid...@gmail.com wrote: Python3k give me an error doing that. On Sep 29, 2010 3:55am, Richard Thomas chards...@gmail.com wrote: On Sep 28, 11:31 pm, Hidura hid...@gmail.com wrote: Hello, i have a project on Python3k

Re: Example or recomendation of a webserver

2010-09-29 Thread Hidura
I use Python3.1, TurboGears, webOb, CherryPy and the others don' t work on Python 3, please somebody recomend me a web framework for Python3.1 I AM DESPERATE On Wed, Sep 29, 2010 at 6:08 PM, Hidura hid...@gmail.com wrote: I use Python3.1, TurboGears, webOb, CherryPy and the others don' t work

Upload files with wsgi

2010-09-28 Thread Hidura
Hello, i have a project on Python3k, and i have a very big problem i don' t find how take an upload file i am using the wsgiref lib, and or theres any way to connect to the client in order to get the file by myself? Thank you Diego Hidalgo. -- Enviado desde mi dispositivo móvil Diego I.

Re: Upload files with wsgi

2010-09-28 Thread Hidura
and the responses. 2010/9/28, John Nagle na...@animats.com: On 9/28/2010 3:31 PM, Hidura wrote: Hello, i have a project on Python3k, and i have a very big problem i don' t find how take an upload file i am using the wsgiref lib, and or theres any way to connect to the client in order to get

Example or recomendation of a webserver

2010-09-28 Thread Hidura
I am working on a web project written on Py3k and using mod_wsgi on the Apache that have to recibes the request client via a xml structure and i am facing a lot of troubles with the upload files mainly because i can' t see where they are, so i' ve decide to write my own web server-django and the

Re: How to make a web services in python ???

2010-09-17 Thread Hidura
What kind of web-service you have in mind 2010/9/17, Ariel isaacr...@gmail.com: Hi everybody, I need some help to find documentation about how to implements web services in python, could you help me please ??? Regards Thanks in advance Ariel -- Enviado desde mi dispositivo móvil

Re: Financial time series data

2010-09-02 Thread Hidura
But what kind of data you want to download?, because the financial time it's basicly html code and you can work very well with a parser 2010/9/2, Virgil Stokes v...@it.uu.se: Has anyone written code or worked with Python software for downloading financial time series data (e.g. from Yahoo

Re: Re: Financial time series data

2010-09-02 Thread hidura
: On 09/02/2010 08:15 PM, Hidura wrote: But what kind of data you want to download?, because the financial time it's basicly html code and you can work very well with a parser 2010/9/2, Virgil stoke...@it.uu.se: Has anyone written code or worked with Python software for downloading

Re: Re: Fetch files from mail in python

2010-03-31 Thread hidura
Ok, I will take your advice and implemented in my project. Thank you all for your help. On Mar 31, 2010 3:03am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Wed, 31 Mar 2010 00:47:47 +, hid...@gmail.com declaimed the following in gmane.comp.python.general: I did that but i

Fetch files from mail in python

2010-03-30 Thread hidura
Hello list, i want to know how could i fetch a file from an email, what kind of library i have to use for that, actually i am working in the support of IMAP and POP3. Thanks. Diego I. Hidalgo D. -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Fetch files from mail in python

2010-03-30 Thread hidura
I did that but i want to know if i have a file inside the mail how could i download that file from my mail. On Mar 30, 2010 7:39pm, Chris Rebert c...@rebertia.com wrote: On Tue, Mar 30, 2010 at 4:33 PM, hid...@gmail.com wrote: Hello list, i want to know how could i fetch a file from an

Re: Web Hosting Python 3

2010-03-17 Thread Hidura
I've saw last night in the help area they support Python3.1, thanks anyway On Wed, Mar 17, 2010 at 9:22 AM, pyt...@bdurham.com wrote: Hidura, Hello list, i am in a project what need hosting, who give hosting to python3? Check out www.webfaction.com. I'm extremely pleased with this vendor

Web Hosting Python 3

2010-03-16 Thread hidura
Hello list, i am in a project what need hosting, who give hosting to python3? -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: Problem with __init__.py in Python3.1

2010-02-22 Thread hidura
For finnished the subject i resolve the problem using the PEP-328, i was using the old kind of imports :s On Feb 4, 2010 10:10pm, Hidura hid...@gmail.com wrote: Thanks i middle resolve the problem, and i going to read the PEP-366 i've been read the 328, i will kept informed of the progresses

Re: Problem with __init__.py in Python3.1

2010-02-04 Thread Hidura
Genellina gagsl-...@yahoo.com.arwrote: En Thu, 04 Feb 2010 01:00:56 -0300, Hidura hid...@gmail.com escribió: Good evening list, I have a really big trouble with the imports in the 3.1 version(Notes: In the older 2.64 theres no problems), I have two packages, the first package Utilities who

Re: Problem with __init__.py in Python3.1

2010-02-04 Thread Hidura
of Man_, 1871 | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list -- Hidura 330.png-- http://mail.python.org/mailman/listinfo/python-list

Problem with __init__.py in Python3.1

2010-02-03 Thread Hidura
Good evening list, I have a really big trouble with the imports in the 3.1 version(Notes: In the older 2.64 theres no problems), I have two packages, the first package Utilities who contains Writer the second package, Writers contain the module tagmanip(What is imported in the best way inside the