ldap search and Tuple

2017-04-11 Thread Alejandro Decchi
Dear, I am writing to ask you which is the most profitable way, to get the last uidNumber. With ldap search create a tuple with a lot of values as follows: ('dc=xxx,dc=xxx,dc=xx', {'uid': ['pepe'], 'objectClass': ['inetOrgPerson', 'mailUser', 'shadowAccount', 'amavisAccount', 'shell', 'wiki'],'uid

Bug!

2015-08-21 Thread Miguel Alejandro Fernandez
hello, python3.5rc1 when trying to install , the installer did not show the button to start installing , to click in the middle he started ; after installing I thought that everything would work fine but I could never run it, telling me ' this is not a valid Win32 application ' *use a computer

Package data distribution and installation

2010-10-17 Thread Alejandro Dubrovsky
I've got a script that is an executable and it reads template files that should be packaged with the script. How do I tell the script where to find the templates? In distutils, there's a package_data option, but that installs the templates under the /usr/lib/pythonX.XX/... directory, which se

Re: Need help from someone that have PIL installed

2010-08-07 Thread alejandro
> > Is the file, which you claim is UTF-8 encoded, actually UTF-8 encoded? > If you're not sure, explicitly tell your text editor to save the file as > UTF-8, and then try again. I feel like an idiot... haven't used Python for some time... my editor was set for utf-8 on PHP projects and other...

Re: Need help from someone that have PIL installed

2010-08-06 Thread alejandro
> > Make sure that > > # encoding:utf-8 > > is the first line of your script, details and fineprint here: > > http://www.python.org/dev/peps/pep-0263/ > > Peter Tryed that... What was the output of my script on your computer? -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help from someone that have PIL installed

2010-08-06 Thread alejandro
> # the last tuple is the background color > img = Image.new("RGBA",(300, 50), (0, 0, 0, 0)) Thank you for this > # I think that the PIL can cope with unicode, so add a u-prefix here: > text = u"proba test ¾æèð¹" > draw.text((20,8), text ,font=arial, fill="red") Nope i gives: SyntaxError: (u

Need help from someone that have PIL installed

2010-08-06 Thread alejandro
Can please someone run this little script that should output characters like ¾æè¹ð in an image. If it does it correctly can you tell me what OS, python version & PIL version you have? Or better if someone can tell me why this is not working properly on my PC? (Win XP, PIL 1.1.6., Python 2.6...)

Re: Printing plain text with exact positioning on Windows

2010-01-05 Thread alejandro
Did you mean borderless printing? Every printer needs his margins, some more some less. Some printers have the ability to do borderless printing but usualy they can do it only on special or photo paper. So you can adjust the pdf as you wish, even with no margins, and then try to find under prin

Re: Printing plain text with exact positioning on Windows

2010-01-04 Thread alejandro
I think the easyest way for printing text is with ReportLab. Just few lines of code and you have a nice pdf... -- http://mail.python.org/mailman/listinfo/python-list

Re: mechanize module problem

2010-01-04 Thread alejandro
resolved! don't know why or how but it is... just restared eclipse for the fourth time "alejandro" wrote in message news:hhu38i$h2...@ss408.t-com.hr... > When I inport it wia python command line it all looks fine but if i try to > run it from eclipse it gives me an e

mechanize module problem

2010-01-04 Thread alejandro
When I inport it wia python command line it all looks fine but if i try to run it from eclipse it gives me an error that there is no package mechanize. Have anybody had this situation? win XP python26 -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing plain text with exact positioning on Windows

2010-01-04 Thread alejandro
you to position text/photos from the left top corner instead the normal positioning. Don't know if I helped you in any way... Good luck! "KvS" wrote in message news:54eb4786-5db3-453d-971a-a4b359fc2...@f5g2000yqh.googlegroups.com... On Jan 4, 11:58 pm, "alejandro" wrote

Re: Got undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString on OpenSuSE 11.1

2009-09-25 Thread Alejandro Valdez
this function /home/mailstat/Python-2.6.2/Modules/_cursesmodule.c:1766: warning: ‘x’ may be used uninitialized in this function On Fri, Sep 25, 2009 at 3:56 PM, Mark Dickinson wrote: > On Sep 25, 7:05 pm, Alejandro Valdez > wrote: >> Hello I sent this e-mail to the python-help

Got undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString on OpenSuSE 11.1

2009-09-25 Thread Alejandro Valdez
Hello I sent this e-mail to the python-help list but I'm not sure if that list is active... so I post it again here: I'm trying to build Python 2.6.2 from the sources downloaded from the python official site on OpenSuSE 11.1 (32 bit). After installation the python command line interpreter seems to

Re: Natural Language Processing in Python

2009-08-15 Thread Alejandro E. Ciniglio
nltk is a good start, we used it in my Computational Linguistics course in school. www.nltk.org --Alejandro -- http://mail.python.org/mailman/listinfo/python-list

Is there any module for sea tides?

2009-05-31 Thread alejandro
I found some in C but could not find in Python -- http://mail.python.org/mailman/listinfo/python-list

WinAppDbg module v1.1 is out!

2009-05-15 Thread Mario Alejandro Vilas Jerez
What is WinAppDbg? == The WinAppDbg python module allows developers to quickly code instrumentation scripts in Python under a Windows environment. It uses ctypes to wrap many Win32 API calls related to debugging, and provides an object-oriented abstraction layer to manipulate thre

Re: stuck with PyOBEX

2009-05-05 Thread alejandro
Ejla! I have sent you a mail (in case you check it often like me :-)) "David Boddie" wrote in message news:gtkhdr$ob...@get-news01.get.basefarm.net... > On Sunday 03 May 2009 10:33, alejandro wrote: > >> Yes! >> >>> I'll send you an updated version t

Re: stuck with PyOBEX

2009-05-03 Thread alejandro
Yes! > I haven't tried to run it under Windows. I just assumed that > BluetoothSocket > would have the same API on both Linux and Windows. > > Looking around, it seems that this is something we can work around: > > http://svn.navi.cx/misc/trunk/laserprop/client/BluetoothConduit.py > > I'll send y

Re: stuck with PyOBEX

2009-05-02 Thread alejandro
I am having problems with connect() it says that it doesn't have sendall atribute. Error: Traceback (most recent call last): File "novi_pokusaj.py", line 25, in client.connect() File "C:\Python25\lib\PyOBEX\client.py", line 356, in connect return Client.connect(self, header_list = [

Re: stuck with PyOBEX

2009-04-28 Thread alejandro
So I should connect trough pybluez and send with obex?? "David Boddie" wrote in message news:gt80qd$mb...@get-news01.get.basefarm.net... > On Tuesday 28 April 2009 18:34, Diez B. Roggisch wrote: > >>> This module asks the socket module for AF_BLUETOOTH... in the socket >>> module there is no suc

Re: stuck with PyOBEX

2009-04-28 Thread alejandro
The problem with Pybluez is that the module serves only to get the addresses, ports, protocols... that the device uses but can't send or recive files. So I am stuck again :-( Maybe I should use dll-s and again another thing to learn... :-) -- http://mail.python.org/mailman/listinfo/python-

Re: stuck with PyOBEX

2009-04-28 Thread alejandro
Can you tell me what is it? Maybe I can search it and pass it in another way... if it is an address or protocol name > AF_BLUETOOTH seems to be specific to *nix-systems. At least under debian > and > ubuntu, I've got it defined. > > So it seems it is not supported under windows - you should

stuck with PyOBEX

2009-04-28 Thread alejandro
So I installed the module and tryed to make it work but... It gave me: Traceback (most recent call last): File "first.py", line 24, in client2.connect() File "C:\Python25\lib\PyOBEX\client.py", line 359, in connect return Client.connect(self, header_list = [headers.Target(uuid)]) Fi

Python winappdbg module v1.0 is out!

2009-04-21 Thread Mario Alejandro Vilas Jerez
What is winappdbg? == The winappdbg python module allows developers to quickly code instrumentation scripts in Python under a Windows environment. It uses ctypes to wrap many Win32 API calls related to debugging, and provides an object-oriented abstraction layer to manipulate thre

Re: How to create an unclosed dialog in wxPython?

2009-04-18 Thread alejandro
Don't press alt+f4? "??" wrote in message news:719e6773-bad0-46ff-9842-a7ade2ced...@f41g2000pra.googlegroups.com... > In wxPython, after I create a wx.Frame, I want to create a modeless > and unclosed dialog. Here is my step: > > app = wx.PySimpleApp() > f = wx.Frame(None, -1, "Test") > d = wx.D

Re: show PDF in wxPython?

2009-04-15 Thread alejandro
Thank you both! -- http://mail.python.org/mailman/listinfo/python-list

show PDF in wxPython?

2009-04-14 Thread alejandro
I would like to import a pdf in a wxPython widget, but didn't find any solution. The imported PDF should work like if it were open in IE or Mozilla... Sugestions? Solutions? P.S. I would like to thank Dennis Lee Bieber for the help about parallel ports... I forgot to do it :-( -- http://ma

Re: Anyone mannaged to access parallel port on windows xp?

2009-04-07 Thread alejandro
Now it doesn't throw exceptions but it doesn't work. I tryed to connect a LED light to the port and it wan't glow. Do you know a way to check if the port work? -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyone mannaged to access parallel port on windows xp?

2009-04-07 Thread alejandro
Yes that module is the one to blame for my headache! :-)) > Have you tried http://pyserial.wiki.sourceforge.net/pyParallel ? > > Cheers, > Daniel > > -- > Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyone mannaged to access parallel port on windows xp?

2009-04-07 Thread alejandro
I have a PC at work and at home. I wanted to write the errors it throws out when i try to use the module but now it work on this PC(the one at work). I don't get it?!?! I tryed so many things and now I can't remember what I have done :-))) This is worse than before! I will post the errors when i

Anyone mannaged to access parallel port on windows xp?

2009-04-06 Thread alejandro
I have a switch that I should connect to the parallel port, but had no luck with it. Tha guy that made it for me told me that it would be easyer to connect via parallel instead the USB So did anyone have success? I only get suckess!! :-)) tryed giveio.sys but it doesn't wort (can't figure ou

control device via USB or Parallel

2009-03-27 Thread alejandro
Some guy will make switches that can be controlled via USB or parallel, he told me that I can chose which connection I want. So, are there any modules for Python that will allow me to control some switches via USB or parallel? -- http://mail.python.org/mailman/listinfo/python-list

Re: control device via USB or Parallel

2009-03-26 Thread alejandro
I just cant install it. Here is 1 in the morning. Do I have to do all that it says on the webpage? http://libusb-win32.sourceforge.net/ "miki" wrote in message news:3580d70f-3b11-4a56-abeb-9284b4012...@f1g2000prb.googlegroups.com... On Mar 26, 3:43 pm, "alejandro" wrote:

Is there any library for COREL or ILLUSTRATOR?

2009-03-19 Thread alejandro
I need to import cdr files to python and just make some calculations (surface size of some objects, perimeters..) Don't need to show them or manipulate with them... -- http://mail.python.org/mailman/listinfo/python-list

wxPython text alignment again

2009-03-09 Thread alejandro
I managed to align the text to the right but when I change it with a function it gets messy What is wrong now? class OpcijeFolija(wx.Dialog): def __init__(self, parent, id, title): wx.Dialog.__init__(self,parent, id, title, size=(300,300)) foli=cPickle.load(file("folije.d

Re: Problem with text alignment

2009-03-04 Thread alejandro
>> self.sirina = wx.StaticText(self,-1,'Some text that\n will be alignet >> \nat the right',(200,50),style=wx.ALIGN_RIGHT) #- this would be an example, the reason I didnt understand is that I used just one line of text I understand now. Can I align it on the right withot usi

Problem with text alignment

2009-03-04 Thread alejandro
I can't align the text on the right in my wxDialog. Everything else works fine self.sirina = wx.StaticText(self,-1,'',(200,50),style=wx.ALIGN_RIGHT) -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with text alignment

2009-03-04 Thread alejandro
Here is the whole dialog: class OpcijeFolija(wx.Dialog): def __init__(self, parent, id, title): wx.Dialog.__init__(self,parent, id, title, size=(300,300)) foli=cPickle.load(file("folije.data")) #-- dropdown self.combo = wx.ComboBox(self,

Re: wxPython and Croatian characters

2009-02-16 Thread alejandro
Provjeri da si nisi stavio ansii kada si instalirao wx.python. Mozes probat ubacit iznad svega u fajlu komentar u kojem pise da je fajl u UTF-8 i onda bi ti trebalo sljakat. Nadem sutra pa ti posaljem -- http://mail.python.org/mailman/listinfo/python-list

Re: Get thread pid

2009-02-02 Thread Alejandro
under Linux. I will keep this information in mind though. Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get thread pid

2009-02-01 Thread Alejandro
let me know. Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get thread pid

2009-02-01 Thread Alejandro
On Jan 30, 10:10 am, Jean-Paul Calderone wrote: >     >>> ctypes.CDLL('libc.so.6').syscall(224) Great! ctypes.CDLL('libc.so.6').syscall(224) does the trick. Thank you. Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get thread pid

2009-01-30 Thread Alejandro
ing to each thread? The reason I am interested is because one of my thread is hogging the CPU, and want to find which one is the culprit. Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Re: Get thread pid

2009-01-30 Thread Alejandro
" If you look at my original post, pstree does show different PIDs for the threads. Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Get thread pid

2009-01-29 Thread Alejandro
d() is get 9197. Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Finding multiple of a decimal number in a floating point list

2008-08-18 Thread Alejandro
;1e-13: print f # Do something else This code works, however, I found it a little ugly. Is there a better way to do the same? Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

exec and closures

2008-02-21 Thread Alejandro Dubrovsky
About a month ago, there was a thread on auto-assigning decorators for __init__. One by André Roberge is here: http://groups.google.com/group/comp.lang.python/browse_frm/ thread/32b421bbe6caaeed/0bcd17b1fa4fb07c?#0bcd17b1fa4fb07c This works well for simple cases, but doesn't take keyword argumen

How to modify the content of an email

2008-01-25 Thread alejandro . valdez
Hello, I'm trying to make a python script that take an email in (raw) text format, and add a footer to the text (or html) body of the email. I'm aware of the email and email.mime modules, but I can't figure out how to identify 'the main text (or html) content' from the email, and how to be sure th

Help search files

2007-07-04 Thread Alejandro Decchi
Hello Someone can help me how to search file in a directory. I need to do a form where the user write the word to search and if the file was found the user must could download the file making click in the link Sorry my english thz Alex -- http://mail.python.org/mailman/listinfo/python-list

help search file

2007-06-30 Thread Alejandro Decchi
Hello Python user. I am a newbie with python and i am interesting to do a web apliation to search file on the hard disk and give a link to download the file found. Someone can give a help ??? Thz Ale -- http://mail.python.org/mailman/listinfo/python-list

Re: wxpython: Redirect the stdout to a textctrl

2007-06-20 Thread Alejandro
On Jun 19, 5:07 pm, [EMAIL PROTECTED] wrote: > Give this a try: > > [good piece of code] > It worked like a charm! Thanks. I still don't understand why my initial aproach didn't work as expected. Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

wxpython: Redirect the stdout to a textctrl

2007-06-19 Thread Alejandro
Hi: I want to redirect stdout to a textctrl I have. From what I read in the wxpython documentation, I can use the wxLogTextCtrl class to do this. I am doing the following: class MyGui(gui.MyFrame): #gui.MyFrame generated by wxGlade def __init__(self, *args, **kwds): gui.MyFrame.__ini

Re: making objects with individual attributes!

2007-03-20 Thread Alejandro
Thanks to all!!! Now it works! -- http://mail.python.org/mailman/listinfo/python-list

making objects with individual attributes!

2007-03-20 Thread Alejandro
I have created a class: class document: titre = '' haveWords = set() def __init__(self, string): self.titre = string # doc1 = document('doc1') doc2 = document('doc2') doc1.haveWords.add(1) doc2.haveWords.add(2) print doc1.haveWords # i get set([1, 2]) doc1 an

Re: Regex Speed

2007-02-20 Thread Alejandro Dubrovsky
Steve Holden wrote: > John Machin wrote: > [...] >> >> To help you, we need either (a) basic information or (b) crystal >> balls. > [...] > > How on earth would having glass testicles help us help him? > John, of course, meant spheres of doped single crystal silicon on which we could simulate

Re: Regex Speed

2007-02-20 Thread Alejandro Dubrovsky
[EMAIL PROTECTED] wrote: > While creating a log parser for fairly large logs, we have run into an > issue where the time to process was relatively unacceptable (upwards > of 5 minutes for 1-2 million lines of logs). In contrast, using the > Linux tool grep would complete the same search in a matte

Re: Inheriting str object

2007-02-06 Thread Alejandro Barroso
On 5 feb, 11:48, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I want to have a str with custom methods, but I have this problem: > > class myStr(str): > def hello(self): > return 'hello '+self > > s=myStr('world') > print s.hello() # prints 'hello world' > s=s.upper() > print s.hell

Re: "Correct" db adapter

2007-02-01 Thread Alejandro Dubrovsky
Bruno Desthuilliers wrote: > king kikapu a écrit : >> Thanks for the replies. >> >> I think i do not need something like ORM, but just a db-module that i >> can "work" the database with it. > > FWIW, SQLAlchemy is not an ORM, but an higher-level API for SQL > integration. The ORM part is an opti

Re: How can I write code using FP

2007-01-16 Thread Alejandro Dubrovsky
kernel1983 wrote: > In Function Program?Language can use like this: > > define a function: > f = lambda x,y:x,y > > then we use f to define another function: > f2 = f(1) > the f2 should equal to: > f2=lambda y:1,y > > we should be able call f2 with one parameter:f2(2) > just return 1,2 > > but

Re: urllib2 through basic auth'ed proxy

2006-04-02 Thread Alejandro Dubrovsky
John J. Lee wrote: > [EMAIL PROTECTED] (John J. Lee) writes: > >> Alejandro Dubrovsky <[EMAIL PROTECTED]> writes: > [...Alejandro complains about non-working HTTP proxy auth in urllib2...] > > [...John notes urllib2 bug...] >> A workaround is to supply a s

Re: urllib2 through basic auth'ed proxy

2006-03-30 Thread Alejandro Dubrovsky
eases for 2.3 are no longer > happening, I believe. > "ah, yes, that works" on 2.3.4. Excellent. (I don't see what's so ugly about that code, but i'm mostly accustomed to my own) Thanks, alejandro -- http://mail.python.org/mailman/listinfo/python-list

Re: pySerial: write in a blocking mode

2006-03-29 Thread Alejandro
Peter Hansen wrote: > Alejandro wrote: > > > > Yes. The device is very simple (I made it). > > Perhaps a very simple change to it would make it as convenient as the > commercial products. I vaguely recall (not having checked for over a > decade) that all they do i

urllib2 through basic auth'ed proxy

2006-03-29 Thread Alejandro Dubrovsky
or even 'http://the.proxy.address:3128' form. The proxy is squid. Python version is 2.3.4 (I read that this version has a problem in that it introduces an extra return after the authorisation, but it isn't even getting to that bit). And yes, going through firefox, everything wor

Re: pySerial: write in a blocking mode

2006-03-28 Thread Alejandro
Peter Hansen wrote: > Alejandro wrote: > > I'm using pySerial to talk to a RS232 to RS485 converter. In order to > > control the converter, I need to control the DTR line to enable/disable > > de RS485 driver. > > This seems a little odd to me. We've used sev

pySerial: write in a blocking mode

2006-03-28 Thread Alejandro
ption. Does anybody know how to do a ser.write() in a blocking way? Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Re: micro-python - is it possible?

2005-08-30 Thread Alejandro Weinstein
uot;PyMite is a flyweight Python interpreter written from scratch to execute on 8-bit microcontrollers as well as desktop computers..." Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reaching the real world

2005-01-04 Thread Alejandro Weinstein
relay. There is also pySerial, (http://pyserial.sourceforge.net/) to control the serial port. If you know how to use a microcontroller (AVR, PIC, 8031, etc) you can communicate with it through the sereial port, and let the micro control the "real world". Regards, Alejandro. -- http:/

Re: Tkinter vs wxPython

2004-12-29 Thread Alejandro Weinstein
> Sure wxGlade/Boa/etc can help speed design and layout up, but what > happens when you want to do non standard things or just get stuck > because some thing just isn't working. Then you add the necesary hand crafted code to the automatic generated code. At least is what I did when I needed. --

Re: Tkinter vs wxPython

2004-12-28 Thread Alejandro Weinstein
und regarding GUIs comes from Delphi, so that might bias my opinion. In case you take the Tkinter route, I founded this tutorial useful : http://www.bembry.org/tech/python/notes/tkinter_1.php Regards, Alejandro. -- http://mail.python.org/mailman/listinfo/python-list

Re: Random number generation from functions

2004-11-30 Thread Alejandro López-Valencia
On Mon, 29 Nov 2004 20:51:50 GMT, "drs" <[EMAIL PROTECTED]> wrote: >Is there any way to generate random numbers based on arbitrary real valued >functions? I am looking for something like random.gauss() but with natural >log and exponential functions. Try with CRNG, it may have what you need, or b