Re: GTK for windows and Linux

2005-11-17 Thread Renato
You'll need to install the libglade/gtk/pygtk packages from:

http://www.pcpm.ucl.ac.be/~gustin/win32_ports/

When your app is complete you can package it with py2exe

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is there an equivalent to Java Webstart in Python?

2005-12-05 Thread Renato
What use is Java WebStart, exactly?

Just make a .exe installer with everything (for windows), using for
example py2exe and InnoSetup, and a distutils compliant package for the
others.

-- 
http://mail.python.org/mailman/listinfo/python-list


Problem importing libraries installed with PIP in Eclipse

2014-02-13 Thread Renato
Hi guys, I'm using Python 2.7.5 64 bits and I have a problem when importing 
libraries that were installed via PIP when importing them inside Eclipse 
(version 4.3.1). Outside Eclipse (directly in Python's shell) everything works 
fine, here is an example:

>>> import numpy # installed from repositories
>>> from numpy import array
>>> import pybrain   # installed via PIP
>>> from pybrain import Network
>>> 

Everything works outside Eclipse. But inside Eclipse I can't import libraries 
installed via PIP using "from x import y" format, it will give an error. The 
only way I can import libraries installed via PIP is using "import x" format. 
Here is an example:

import numpy # no errors (installed from 
repositories)
from numpy import array  # no errors
import pybrain   # no errors (installed via PIP)
from pybrain import Network  # gives the error below

Traceback (most recent call last):
  File "/media/arquivos/pybrain_import_test.py", line 4, in 
from pybrain import Network
ImportError: cannot import name Network

I suspected it could be related to virtualenv, but here is a print screen 
(http://imageshack.com/a/img534/4307/3x0m.png) of my Python's PATH. The 
directory /usr/lib/python2.7/site-packages where PyBrain is installed is 
already in Python's PATH inside Eclipse. Could someone help me, please?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem importing libraries installed with PIP in Eclipse

2014-02-16 Thread Renato
Em sexta-feira, 14 de fevereiro de 2014 01h30min05s UTC-2, Renato  escreveu:
> Hi guys, I'm using Python 2.7.5 64 bits and I have a problem when importing 
> libraries that were installed via PIP when importing them inside Eclipse 
> (version 4.3.1). Outside Eclipse (directly in Python's shell) everything 
> works fine, here is an example:
> 
> 
> 
> >>> import numpy # installed from repositories
> 
> >>> from numpy import array
> 
> >>> import pybrain   # installed via PIP
> 
> >>> from pybrain import Network
> 
> >>> 
> 
> 
> 
> Everything works outside Eclipse. But inside Eclipse I can't import libraries 
> installed via PIP using "from x import y" format, it will give an error. The 
> only way I can import libraries installed via PIP is using "import x" format. 
> Here is an example:
> 
> 
> 
> import numpy # no errors (installed from 
> repositories)
> 
> from numpy import array  # no errors
> 
> import pybrain   # no errors (installed via 
> PIP)
> 
> from pybrain import Network  # gives the error below
> 
> 
> 
> Traceback (most recent call last):
> 
>   File "/media/arquivos/pybrain_import_test.py", line 4, in 
> 
> from pybrain import Network
> 
> ImportError: cannot import name Network
> 
> 
> 
> I suspected it could be related to virtualenv, but here is a print screen 
> (http://imageshack.com/a/img534/4307/3x0m.png) of my Python's PATH. The 
> directory /usr/lib/python2.7/site-packages where PyBrain is installed is 
> already in Python's PATH inside Eclipse. Could someone help me, please?


Fabio, thanks for your reply. I'm using PyDev version 2.7.0.2013032300, the one 
who comes with Aptana Studio plugin for Eclipse. Here is Eclipse output:

/media/arquivos/Documentos/Programacao/Source/workspace_linux/Testes em 
Python/src
/media/arquivos/Documentos/Programacao/Source/workspace_linux/Testes em 
Python/src/pip_eclipse
/usr/lib/python2.7/site-packages
/usr/lib/python27.zip
/usr/lib64/python2.7
/usr/lib64/python2.7/lib-dynload
/usr/lib64/python2.7/lib-old
/usr/lib64/python2.7/lib-tk
/usr/lib64/python2.7/plat-linux2
/usr/lib64/python2.7/site-packages
/usr/lib64/python2.7/site-packages/PIL
/usr/lib64/python2.7/site-packages/gtk-2.0
/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode
/usr/local/lib/python2.7/site-packages
/usr/local/lib/python2.7/site-packages
/usr/local/lib64/python2.7/site-packages
/usr/local/lib64/python2.7/site-packages

And here is Python shell output:

/usr/lib/python2.7/site-packages
/usr/lib/python27.zip
/usr/lib64/python2.7
/usr/lib64/python2.7/lib-dynload
/usr/lib64/python2.7/lib-old
/usr/lib64/python2.7/lib-tk
/usr/lib64/python2.7/plat-linux2
/usr/lib64/python2.7/site-packages
/usr/lib64/python2.7/site-packages/PIL
/usr/lib64/python2.7/site-packages/gtk-2.0
/usr/lib64/python2.7/site-packages/wx-2.8-gtk2-unicode
/usr/local/lib/python2.7/site-packages
/usr/local/lib64/python2.7/site-packages

They are almost exactly the same, the only difference is that Eclipse includes 
the directory I'm running the script and print twice the last 2 directories.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problem importing libraries installed with PIP in Eclipse

2014-02-16 Thread Renato
It's solved now, oh my god I was so stupid! I created a package named "pybrain" 
for testing PyBrain module, so obviously when I tryed to import something from 
PyBrain library, Python would import all modules from this personal package I 
created. The problem was not being reproduced outside Eclipse because only 
within Eclipse my personal workstation directory (which contained the personal 
package "pybrain") was visible. The solution was simple: I just deleted the 
personal package named "pybrain" and now everything is working. Thank you very 
much for your help!
-- 
https://mail.python.org/mailman/listinfo/python-list


Password validation security issue

2014-03-01 Thread Renato
Hello everybody, I implemented a password validation with a Python 2.7.5 script 
in OpenSUSE 13.1. The user calls it passing 'login' and 'password' as 
arguments. I made a dictionary in the format hashtable = {'login':'password'} 
and I use this hash table to compare the 'login' and 'password' that were 
passed in order to validate them. The problem is that any user who can execute 
the script will be able to read it too (since it must be read by python's 
interpreter), and this is causing some security issues since any user can 
access all other users' passwords if he opens this script and reads the code.

My question is: is there a way of preventing the user from reading the script's 
content? Is there any strategy I could use to hide the passwords from the users?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Password validation security issue

2014-03-02 Thread Renato
I would like to thank every one who posted a reply. I learnt a lot from you, 
guys! I appreciate your attention and your help :)

I took a class on Computer Simulation last year. It was told that deterministic 
(pseudo-)random numbers are excellent for simulations, because they allow 
debugging and replication when using a seed(). But it was said that 
deterministic random numbers weren't indeed suitable for encryption and 
security issues in general. For this purpose, non-deterministc stochastic 
methods would be more indicated. I learnt a lot about deterministic random 
numbers generation in this course, like using Mersenne Twister algorithm, but I 
learnt nothing about encryption, since it wasn't in the scope of that course. 
Could you suggest some introductory material concerning encryption? I have an 
intermediate math background (calculus, linear algebra etc) and I'm willing to 
learn more about security matters.

One last thing, about my original question. So, the only way of encapsulating a 
Python script content is to code a simple binary program to call it?

Regards,
Renato


Em sábado, 1 de março de 2014 14h49min49s UTC-3, Renato  escreveu:
> Hello everybody, I implemented a password validation with a Python 2.7.5 
> script in OpenSUSE 13.1. The user calls it passing 'login' and 'password' as 
> arguments. I made a dictionary in the format hashtable = {'login':'password'} 
> and I use this hash table to compare the 'login' and 'password' that were 
> passed in order to validate them. The problem is that any user who can 
> execute the script will be able to read it too (since it must be read by 
> python's interpreter), and this is causing some security issues since any 
> user can access all other users' passwords if he opens this script and reads 
> the code.
> 
> 
> 
> My question is: is there a way of preventing the user from reading the 
> script's content? Is there any strategy I could use to hide the passwords 
> from the users?

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Guido at Google

2005-12-22 Thread Renato
For what is worth,
all of the native administration tools of RedHat (all versions) and
Fedora Core are written in python (system-config-* and/or
redhat-config-* ). And even more importantly, yum (the official
software package manager for Fedora and RHEL) and Anaconda (OS
installer) are written in Python, too.

So RedHat, too, has a big interest in Python :-)

-- 
Renato Ramonda

-- 
http://mail.python.org/mailman/listinfo/python-list


python, threading and a radio timer

2006-10-30 Thread Renato
Dear all,

I found this nifty article on how to record your favourite radio show
using cron and mplayer:
http://grimthing.com/archives/2004/05/20/recording-streaming-audio-with-mplayer/

Because I couldn't get the date in the filename (and was too lazy to
look into sh/bash manuals), I decided to use Python. It was a good
choice, because I decided to improve the timer - learning some more
Python along the way!

So, the idea is:
- cron runs the script at a specific time
- the script starts mplayer, and will keep checking the clock until
it's time to kill mplayer
- after mplayer has exited, oggenc is started to turn the raw WAV into
ogg
- and finally the remaining WAV is deleted

This basic setting is quite easy, and I used os.spawnvp(os.P_WAIT,...),
along with another CRON entry to kill mplayer.

But then I got more ambitious: I wanted the script to keep checking if
mplayer was alive - in case the connection goes down. Moreover, I would
rather have the script stop mplayer than cron.

At this point, I thought I should get some professional help... :) What
is the right way to go? Would threads be overkill? If so, where can I
go about looking for process control/management without delving into
complex daemon architectures?

So, rather than asking for code, I'm looking for guidance - this is a
didactic experience!

Cheers,

Renato

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: installing python on a server?

2006-02-10 Thread Renato
You mentioned using python for web apps: with which framework?
(TurboGears, CherryPy, Subway, Django, whatever) Or only for cgi?

With which web server? (Apache, Twisted, Zope, etc.)

On which linux platform? (Slackware, Debian, Fedora/RedHat, Suse, etc)

I think you'll have to think about other questions before.

On systems with package management (pretty much all of them, except
Slack) install is a matter of a few commands. And you can automate it,
obviously.

-- 
bye,
Renato

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Indentation Problems

2006-02-26 Thread Renato
If you use vi (vim, I hope), then place something like this in your
.vimrc

set ts=4
set sw=4
set expandtab
set ai

There are a lot more tricks for python in vim (and plugins, and
helpers, and so on), but this is the starting point: tabstops of 4
places, autoconverted in spaces. Also, when shifting text with < or >
it moves 4 spaces.

-- 
bye, 
Renato

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Java Developer Exploring Python

2006-04-18 Thread Renato
You don't actually *need* a libglade/pyGtk IDE: glade will be more than
enough :-)

By its very nature glade will enable you to design the GUI and define
the signals.

Then you'll load the glade file in python, and use whatever editor you
feel comfortable with.

-- 
Have fun,
Renato Ramonda

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: items in an array

2006-04-19 Thread Renato
>>> list_array = ['aaa','bbb','ccc']
>>> for item in list_array:
... print item + ',',
...
aaa, bbb, ccc,


(notice the comma at the end of the print statement: this causes the
suppression of the automatic newline)

Is this what you need?

-- 
Renato Ramonda

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Which GUI toolkit is THE best?

2006-03-22 Thread Renato
Hardly a showstopper: gtk works now (with X11), and will work even
better soon (native).

:-)

--
Ciao, Renato

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: help!

2005-06-24 Thread Renato Ramonda
Johannes Findeisen ha scritto:
> some filesystems do support that. From the ext2 specification
> ( http://e2fsprogs.sourceforge.net/ext2intro.html ):
> 
> "As a response to these problems, two new filesytems were released in
> Alpha version in January 1993: the Xia filesystem and the Second
> Extended File System. The Xia filesystem was heavily based on the Minix
> filesystem kernel code and only added a few improvements over this
> filesystem. Basically, it provided long file names, support for bigger
> partitions and support for the three timestamps."

That is, if it is mounted do do so. Just pass a "noatime" parameter to 
the mount command (or fstab line) and the atime (access time) will not 
be written.

Common when using very slow storage devices, or devices with somewhat 
limited read/write cycles (like old compactflash memories).

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to find Windows "Application data" directory??

2005-06-29 Thread Renato Ramonda
Trent Mick ha scritto:
> Note that the APPDATA environment variable is only there on *some* of
> the Windows flavours. It is there on Win2k and WinXP. It is not there on
> WinME. Dunno about Win95, Win98, WinNT... but you may not care about
> those old guys.

That's (I guess) because the DOS spawn (win9x family) was single user 
and did not really have concepts like home directories, profiles, 
separate settings for each user... hell, it did not even have users! :-D

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: debugger?

2005-07-03 Thread Renato Ramonda
Qiangning Hong ha scritto:
> Eric3 need pyqt so it is not free under windows platform.

Eric3 has had a free version for months now on windows, since the kde on 
win32 project recompiled the free versions on windows.

And qt4 now has a GPL version free on windows too.

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Folding in vim

2005-07-05 Thread Renato Ramonda
Sybren Stuvel ha scritto:
>>If using Vim it would be something like "set softtabstop=4".
> 
> 
> This gives you a mixture of tabs and spaces, which I don't like. I'd
> rather use real tabs for indenting. If you then use another tab width,
> you only see a wider indent, but the rest of the code is okay.


Why not use just spaces? Vim simplifies this immensely:

set tabstop=4
set shiftwidth=4
set expandtab
set smarttab
set autoindent

AFAICT this gives me all spaces, 4 spaces indent, tab inserts spaces and 
backspace over a block of 4 spaces deletes all of them (just like 
deleting a tab).


-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Folding in vim

2005-07-06 Thread Renato Ramonda
Terry Hancock ha scritto:

> 
> Yep, this is what I just set up in my .vimrc.  Works beautifully.

And (you probably already know, but it could be of use to others) you 
can bind the activation of some or all of those commands to au 
(autocommand) depending on the file extension.

That way you can have 8 spaces real tabs in C files, for examples, 
without touching your conf.

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Good starterbook for learning Python?

2005-07-06 Thread Renato Ramonda
Lennart ha scritto:

> Programming Python will I sell as a book that i read secondly, and use as a
> reference. 

I'd like to suggest also "Thinking like a CS in python": a schoolbook 
used in real classes to teach the basis of programming.

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Problem importing libraries installed with PIP in Eclipse

2014-02-17 Thread Renato Vernucio
Hi Fabio,

I wish I could use the latest PyDev, unfortunately I need Aptana studio.
It's a pity they won't let us install individual packages from their
bundle. If they did, I could install only the other packages and install
PyDev separately.

Thanks for your help once again.

Yours,
Renato


2014-02-17 16:07 GMT-03:00 Fabio Zadrozny :

>
> On Sun, Feb 16, 2014 at 11:52 AM, Renato  wrote:
>
>> It's solved now, oh my god I was so stupid! I created a package named
>> "pybrain" for testing PyBrain module, so obviously when I tryed to import
>> something from PyBrain library, Python would import all modules from this
>> personal package I created. The problem was not being reproduced outside
>> Eclipse because only within Eclipse my personal workstation directory
>> (which contained the personal package "pybrain") was visible. The solution
>> was simple: I just deleted the personal package named "pybrain" and now
>> everything is working. Thank you very much for your help!
>>
>
>
> Hi Renato,
>
> Nice that you got it working...
>
> Now, just as a heads up, that version of PyDev is quite old (the latest
> PyDev release: 3.3.3 is in many ways improved when comparing to older PyDev
> versions). I know Aptana Studio still has the older version, so, if you use
> mostly Python and you don't need the other features that Aptana Studio
> adds, it might be worth going to pure Eclipse + PyDev (or using LiClipse
> which also adds support for other languages -- besides being better
> configured out of the box, although it's a commercial counterpart of PyDev
> -- whose funds help to keep PyDev development going forward).
>
> Cheers,
>
> Fabio
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Python Brasil[10]

2014-06-13 Thread Renato Oliveira
Hi all!

My name is Renato Oliveira, I'm board member of Python Brazil Association
and co-chair of the next Python Brasil Conference
<http://loogi.ca/MKLEOHj31>. This year the conf is taking place in Porto de
Galinhas, Pernambuco <http://loogi.ca/0YqHyHj31> (for ten times in a row
elected the most beautiful Brazilian beach) on Nov 4 - Nov 8 with some
special activities (TBA) on November 9th.

The tickets will be available on Monday, and we just announced our first
keynote: Alex Gaynor  <http://loogi.ca/4pChizj31>

How can you help us? Attending, Spreading the word in your local groups and
sponsoring the conference. The prospectus is here
<https://pybr.s3.amazonaws.com/static/docs/python-brasil-10-prospectus-en.dbe24b34575b.pdf>
.

If you're planning to come to the conference and need help to find a place
to stay, just need some tips or have any kind of doubt, please let me know.

Best regards,

Renato Oliveira
@_renatooliveira <http://twitter.com/_renatooliveira>
Labcodes - www.labcodes.com.br
Renato Oliveira
@_renatooliveira <http://twitter.com/_renatooliveira>
Labcodes - www.labcodes.com.br
-- 
https://mail.python.org/mailman/listinfo/python-list


[Python Brasil 10] Registrations are now open!

2014-07-07 Thread Renato Oliveira
Hey everyone!
Registrations for Python Brasil are now open!

http://2014.pythonbrasil.org.br/register

Sadly the payment form is in portuguese, so if you have any trouble please
let me know (in private message).
The call for papers will open on Jul 10th as you can see here

http://2014.pythonbrasil.org.br/about

For now the announced keynotes are:
Alex Gaynor
http://2014.pythonbrasil.org.br/news/keynotes-alex-gaynor

Fernando Perez
http://2014.pythonbrasil.org.br/news/keynotes-fernando-perez

Lynn Root
http://2014.pythonbrasil.org.br/news/keynotes-lynn-root

And this beach is waiting for you:
http://2014.pythonbrasil.org.br/venue

Please, help us by spreading the word :)
Thanks
Renato Oliveira

@_renatooliveira <http://twitter.com/_renatooliveira>
Labcodes - www.labcodes.com.br
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Python Brasil 10] Registrations are now open!

2014-07-14 Thread Renato Oliveira
Hi all,

The call for papers are now open!

http://2014.pythonbrasil.org.br/dashboard/proposals/

We're going to hava an English Track, so feel free to submit your proposals!

See you at Python Brasil 10!

Renato Oliveira
@_renatooliveira <http://twitter.com/_renatooliveira>
Labcodes - www.labcodes.com.br



On Mon, Jul 7, 2014 at 11:16 AM, Renato Oliveira <
[email protected]> wrote:

> Hey everyone!
> Registrations for Python Brasil are now open!
>
> http://2014.pythonbrasil.org.br/register
>
> Sadly the payment form is in portuguese, so if you have any trouble please
> let me know (in private message).
> The call for papers will open on Jul 10th as you can see here
>
> http://2014.pythonbrasil.org.br/about
>
> For now the announced keynotes are:
> Alex Gaynor
> http://2014.pythonbrasil.org.br/news/keynotes-alex-gaynor
>
> Fernando Perez
> http://2014.pythonbrasil.org.br/news/keynotes-fernando-perez
>
> Lynn Root
> http://2014.pythonbrasil.org.br/news/keynotes-lynn-root
>
> And this beach is waiting for you:
> http://2014.pythonbrasil.org.br/venue
>
> Please, help us by spreading the word :)
> Thanks
> Renato Oliveira
>
> @_renatooliveira <http://twitter.com/_renatooliveira>
> Labcodes - www.labcodes.com.br
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [Python Brasil 10] Registrations are now open!

2014-07-14 Thread Renato Oliveira
have*

Renato Oliveira
@_renatooliveira <http://twitter.com/_renatooliveira>
Labcodes - www.labcodes.com.br



On Mon, Jul 14, 2014 at 11:53 PM, Renato Oliveira <
[email protected]> wrote:

> Hi all,
>
> The call for papers are now open!
>
> http://2014.pythonbrasil.org.br/dashboard/proposals/
>
> We're going to hava an English Track, so feel free to submit your
> proposals!
>
> See you at Python Brasil 10!
>
> Renato Oliveira
> @_renatooliveira <http://twitter.com/_renatooliveira>
> Labcodes - www.labcodes.com.br
>
>
>
> On Mon, Jul 7, 2014 at 11:16 AM, Renato Oliveira <
> [email protected]> wrote:
>
>> Hey everyone!
>> Registrations for Python Brasil are now open!
>>
>> http://2014.pythonbrasil.org.br/register
>>
>> Sadly the payment form is in portuguese, so if you have any trouble
>> please let me know (in private message).
>> The call for papers will open on Jul 10th as you can see here
>>
>> http://2014.pythonbrasil.org.br/about
>>
>> For now the announced keynotes are:
>> Alex Gaynor
>> http://2014.pythonbrasil.org.br/news/keynotes-alex-gaynor
>>
>> Fernando Perez
>> http://2014.pythonbrasil.org.br/news/keynotes-fernando-perez
>>
>> Lynn Root
>> http://2014.pythonbrasil.org.br/news/keynotes-lynn-root
>>
>> And this beach is waiting for you:
>> http://2014.pythonbrasil.org.br/venue
>>
>> Please, help us by spreading the word :)
>> Thanks
>> Renato Oliveira
>>
>> @_renatooliveira <http://twitter.com/_renatooliveira>
>> Labcodes - www.labcodes.com.br
>>
>>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Python Brasil [10] - Call for papers

2014-08-09 Thread Renato Oliveira
Hi all,

You have until tomorrow to submit your talk to Python Brasil [10].

http://2014.pythonbrasil.org.br/dashboard/proposals/

The conference will be amazing! See why:

Our Keynotes -> http://2014.pythonbrasil.org.br/speakers/

Our Venue -> http://2014.pythonbrasil.org.br/news/the-conference-venue/

And on November 9th were going to have some activities (TBA) like scuba
diving, standup paddle
<https://www.google.com.br/search?q=standup+paddle&safe=off&es_sm=93&source=lnms&tbm=isch&sa=X&ei=qC7mU-PGKKq-sQTC3oKgDQ&ved=0CAgQ_AUoAQ&biw=1325&bih=659>
and
others!

Thanks and see you in Porto de Galinhas!

Renato Oliveira
@_renatooliveira <http://twitter.com/_renatooliveira>
Labcodes - www.labcodes.com.br
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: anygui,anydb, any opinions?

2005-06-08 Thread Renato Ramonda
Thomas Bartkus ha scritto:
> The attractiveness of wxPython here is that it extends the platform
> neutrality of Python to GUI interfaces.  On a Windows platform, the work
> looks like any other Windows program.  On Gnome/Linux, the identical code
> fits right into the Gnome desktop scheme.  *Big* plus.

Maybe I'm just nitpicking, but please!

wxWidgets apps look ALMOST native on windows (combobox and similar 
widgets are emulated, and look really bad), and they sure _don't_ look 
like gnome apps on linux (gtk maybe, except for those custom widgets, 
but surely not gnome).

Besides, wx generally catches the look, but almost never the 'feel'.

wx is what you use if you really have no other choice, from my point of 
view... I'd honestly prefer to code a _good_ gui with gtk+glade and then 
bundle all the package together with py2exe and InnoSetup on windows. It 
will not look _native_, but it will look _GOOD_.

Last time I looked wx did not have spacers (vbox, hbox and the like)... 
this leads to ugly non resizable vb-style guis, in my experience (just 
look at aMule... plain ugly).

And that's not even starting to consider the version mess: try to 
install xCHM, Boa Constructor, aMule, VLC and some other app together... 
instant madness.

> Yes.  And I'm sorry to sound like I was complaining (but I was :-)
> I'm here because MS is well along it's declining years and I've jumped off
> the .NET bandwagon.  New/wonderful things are no longer forthcoming from

Then download gtk2.6 and glade for windows and then install pygtk and 
code away to your satisfaction! :-D

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: anygui,anydb, any opinions?

2005-06-08 Thread Renato Ramonda
Tim Roberts ha scritto:
> Renato Ramonda <[EMAIL PROTECTED]> wrote:
> 
>>wxWidgets apps look ALMOST native on windows (combobox and similar 
>>widgets are emulated, and look really bad),
> 
> 
> That just isn't true.  They use the standard combo box.


Then it has changed recently. Mind that most stable apps still use wx2.4

> wx uses "sizers" to do the same thing.  Same purpose, different philosophy.
> I find sizers more natural, but people should certainly stick to whatever
> makes them comfortable.

I like sizers too, but in my experience wx apps do not use them. Are 
they by chance something that came with the 2.5/2.6 development cycle?
That version is still pretty rare in real world applications.

>>And that's not even starting to consider the version mess: try to 
>>install xCHM, Boa Constructor, aMule, VLC and some other app together... 
>>instant madness.
> 
> 
> They why would you do it?  gvim and wxPython do the job for me.  No mess.


Because i USE a chm reader. And I USE aMule, and I USE a multimedia player.

I'm not talking about developing (don't get confused by my mention of 
Boa), I'm talking about using. Only very recently wx introduced a 
mechanism to keep different versions in parallel.

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: anygui,anydb, any opinions?

2005-06-09 Thread Renato Ramonda
Thomas Bartkus ha scritto:

>>Then download gtk2.6 and glade for windows and then install pygtk and
>>code away to your satisfaction! :-D
>>
> 
> 
> I *will* try that.

On linux you probably have everything installed or a command away, on 
windows use this:

http://gladewin32.sourceforge.net/

choosing the development package (that includes gtk _and_ glade), plus

http://www.pcpm.ucl.ac.be/~gustin/win32_ports/pygtk.html

for pygtk. Just choose the right python version, obviously.


-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fast text display?

2005-06-09 Thread Renato Ramonda
Riccardo Galli ha scritto:
> GUI cross platform need external support, in a OS or in another.

Sure, but using win32 versions of gtk and glade plus py2exe and 
InnoSetup (if you want to build a fancy installer) will give you a self 
contained gui program in windows.

Big, sure, but self contained :-D

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fast text display?

2005-06-09 Thread Renato Ramonda
Mike Meyer ha scritto:
> Then I can go do something useful while the package system downloads,
> compiles and installs all the required software. I don't know if
> Debian has a similar system for installing from source. Gentoo does if
> you want to stay with Linux.

Debian actually has such a mechanism, if you have deb-src repositories 
in your apt sources list. The real problem will come from conflicting 
versions of wx and/or gtk required by different (other) programs.

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Start application & continue after app exits

2005-06-09 Thread Renato Ramonda
guy lateur ha scritto:

> I see what you mean, but wouldn't a call to open(fn, 'w') on a filename 
> that's in use (for reading or writing) result in an error condition or 
> something? I'm a noob, btw.

Uh... no, not on linux.
Try this:

$ touch foo.txt

$ gedit foo.txt & (write something in it and save, but do not close gedit)

$ gvim foo.txt   (write something else in it and save, but do not close 
gvim)

$ rm foo.txt

All this without having "the file is in use" errors, because well... 
only windows has those :-)

Oh, and btw: you'll notice that gVim is smart enough to notice that the 
file is no longer there, or that it is there but is more recent than his 
working copy (if you re-edited with gedit, for example).

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fast text display?

2005-06-09 Thread Renato Ramonda
Paul Rubin ha scritto:
> The installer is going to download more stuff?  Yuccch, I'd rather not
> need a network connection to do an install.  Anyway, wxpython built ok
> on FC3.  The problem was wxwidgets, which needed an obsolete version
> of GTK.  I spent at least an hour or two messing around with it before
> deciding it wasn't worth the hassle.

AFAIR the linux package for wxpython does not require wxWidgets at all 
(it's embedded).

As for the obsolete gtk look for a "gtk+" package, not for the "gtk" 
which is the up-to-date gtk2 package. And good luck :-)

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: anygui,anydb, any opinions?

2005-06-11 Thread Renato Ramonda
Tim Roberts ha scritto:

> Hardly.  Sizers have been the primary method of placing multiple controls
> in wx for as long as I've been using it, which goes back to 2.3.  In fact,
> it's hard to create a non-trivial wx app WITHOUT using sizers.  All of the
> wx GUIs place controls in nested sets of sizers.

Dunno... I'll take your word on this. In my experience though wx apps 
have awfully ugly laid out interfaces, often non resizable ones. Maybe 
is't only bad luck :-)

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: What is different with Python ? (OT I guess)

2005-06-15 Thread Renato Ramonda
Terry Hancock ha scritto:
> 
> It's the reverse-translation from the French "Informatique".

Or maybe the italian Informatica...

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: extreme newbie

2005-06-18 Thread Renato Ramonda
cpunerd4 ha scritto:
> thanks all for the advice. The reason I was thinking about using java
> (or C or something) was that it is a little more secure than
> distributing the source code isn't it? 

As in "protecting your code from prying eyes"?

Then java is exactly like python: I can distribute a fully functional 
python program using only .pyc or .pyo files (unreadable) just as I can 
distribute only .class files (or jars) in java.

And reverse engineering ("de-compiling") both is damn easy. The produced 
code won't be beautiful, sure, but don't rely on it if you want to keep 
your code secret (for whatever reason).

> And also, from what I know, the
> Java virtual machine is more popular (and installed on more computers).

And it is also HUGE, so anyone NOT having it will think twice before 
downloading it only for your app. Python on the other hand is installed 
by default on all linux and OSX machines, and on windows you can use 
py2exe and produce packages of 2-3MBs (correct me if I'm wrong) with 
everything bundled.

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: extreme newbie

2005-06-18 Thread Renato Ramonda
cpunerd4 ha scritto:
>
> Another reason I was thinging java was because you can
> run it in the browser.

Bad idea in 99% of the cases: applets are evil.

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: extreme newbie

2005-06-18 Thread Renato Ramonda
Grant Edwards ha scritto:

> Python is required and Java is optional and not installed by
> default in the Linux distros I'm familiar with.
> 
> I don't know how many Windows systems have Java installed.
> I don't think any of mine do.

It's pretty much the other way round: java CANNOT be included by default 
in any (free) linux distro for license reasons, and it CANNOT be 
included by default in Windows as a consequence of court ruling: 
Microsoft is actually _not allowed_ to include Java.

The only system (apart from solaris, I guess) that has a JVM by default 
is OSX, and it's _NOT_ sun's one, but the internally developed one.

-- 
Renato

Usi Fedora? Fai un salto da noi:
http://www.fedoraitalia.org
-- 
http://mail.python.org/mailman/listinfo/python-list


v3.5.1 - msi download

2015-12-21 Thread Renato Emanuel Dysangco
hello

is an **.msi* version of your *Python 3.5.1 (32 bit)* in the pipeline soon?

thanks for your time
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Automation

2013-11-13 Thread renato . barbosa . pim . pereira
Thanks for all the help, I finished the program, follow the download link and a 
brief explanation of the same (in Portuguese, my native language), I apologize 
again for my bad english and any inconvenience that I have generated.

http://mundodacana.blogspot.com.br/2013/11/programa-para-calculo-de-constantes-pid.html

Python commands :D
-- 
https://mail.python.org/mailman/listinfo/python-list


Web framework

2013-11-21 Thread Renato Barbosa Pim Pereira
I'm thinking of porting a Python application that uses numpy for web,
basically would like to upload a user-defined data, perform the
calculations with numpy and plot charts with the general structure of a
site such as a blog for example, I have studied a bit of django and
web2py, but I wonder if there is some better framework? or how to choose
a particular framework over another?

Since now, thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Automation P-I-D

2013-11-23 Thread Renato Barbosa Pim Pereira
I mentioned some time ago about a program to calculate PID constants for
tuning controllers, follow the link to its online version algorithm for
anyone interested http://pastebin.com/wAqZmVnR
I thank you for the help I received from many here on the list. ;D
-- 
https://mail.python.org/mailman/listinfo/python-list


PID tuning.

2013-10-14 Thread Renato Barbosa Pim Pereira
I am looking for some software for PID tuning that would take the result of
a step response, and calculates Td, Ti, Kp, any suggestion or hint of where
to start?, thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Automation

2013-11-03 Thread Renato Barbosa Pim Pereira
I have one .xls file with the values of PV MV and SP, I wanna to calculate
Kp Ki Kd with python from this file, can anyone give me any suggestion
about how can I do this? From now, thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Automation

2013-11-03 Thread renato . barbosa . pim . pereira
http://pastebin.com/N9dgaHTx

With this program I can read a csv file with 3 columns, in one of these columns 
I need to read the value more high and multiply by 0.632 and with result, 
search in the same column by a value that aproximate with this result, and then 
return the vector position.
-- 
https://mail.python.org/mailman/listinfo/python-list


Tkinter

2013-04-02 Thread Renato Barbosa Pim Pereira
I need to create a button and a text box follows the text box to enter a
number, and this number is expected to create the same screen text boxes, and
these text boxes need to be referenced, ie if I enter 30 in the first text
box and click the button to be created 30 text boxes so that I can then "
call" each of the boxes, eg box1, box2, box3, etc. .. .

This all-in Tkinter.

I thank you all for understanding and help.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tkinter

2013-04-02 Thread Renato Barbosa Pim Pereira
Thanks for the advices, I need now one scrollbar to roll under screen, I
created the scrollbar but cant roll, please help me on this.

http://pastebin.com/L6XWY6cm


2013/4/2 Jason Swails 

> Please keep response replies to the Python list (e.g., use 'reply all' or
> just send the email to python-list).
>
> Also, you should tell people what Python version you are using. I assume
> you are using Python 2 since Tkinter was renamed to tkinter in Python 3.
>
> Finally, do not top-post.  Type your responses inside the body of the
> email you are responding to.  That gives people context for your responses.
>
> On Tue, Apr 2, 2013 at 11:48 AM, Renato Barbosa Pim Pereira <
> [email protected]> wrote:
>
>> Sorry for my inconsistence:
>>
>> I need a textbox to get one number and pass for variable called numero
>> with one click of button. Thanks .
>>
>> I have this:
>>
>> import numpy as np
>> import matplotlib.pyplot as plt
>> from Tkinter import *
>> import tkMessageBox
>>
>> prefixo = "vetor"
>> numero = 10
>> numeroVetores = 0
>>
>> def makeWidgets(numero):
>> global entries
>> window = Tk()
>> window.title('Vetores')
>> form = Frame(window)
>> form.pack()
>> entries = {}
>> for ix in range(numero):
>> label = "%s %s" % (prefixo , ix + 1)
>> lab = Label(form, text=label)
>> ent = Entry(form)
>> lab.grid(row=ix, column=0)
>> ent.grid(row=ix, column=1)
>> entries[label] = ent
>>
>>
>>
>>
>>
>> Button(window, text="Calcular",  command=calcular).pack(side=LEFT)
>> Button(window, text="Media",  command=media).pack(side=LEFT)
>>
>>
>>
>> return window
>>
>>
>>
>> def pegavalores():
>> valores = []
>> for chave, entrada in sorted(entries.items()):
>> valores.append(entrada.get())
>>
>> return valores
>>
>>
>> def calcular():
>> calcular = pegavalores()
>> plt.plot(calcular)
>> plt.show()
>>
>> def media():
>> media = pegavalores()
>> elementos = len(media)
>> media = np.asarray(media, dtype=np.float64)
>> valormedio = np.sum(media)/elementos
>> tkMessageBox.showinfo("Media", valormedio)
>>
>>
>> window = makeWidgets(numero)
>> window.mainloop()
>>
>
> I'm not sure exactly what you are trying to do.  My guess is that you want
> to get "numero" from user input.  Luckily, the tkSimpleDialog module
> contains a handy function that does just this: askinteger.  So add a call:
>
> numero = tkSimpleDialog.askinteger('Window Title', 'Please insert the
> number of input values you want')
> window = makeWidgets(numero)
> window.mainloop()
>
> I leave to you the task of bringing tkSimpleDialog into your namespace.
>
> Good luck,
> Jason
> --
> Jason M. Swails
> Quantum Theory Project,
> University of Florida
> Ph.D. Candidate
> 352-392-4032
>
-- 
http://mail.python.org/mailman/listinfo/python-list


IDE for GUI Designer

2013-04-04 Thread Renato Barbosa Pim Pereira
Guys, is this, I wonder if there is an IDE with native support for the
development of GUI's such as Netbeans with Swing, Visual Basic, etc.,
already tested the Boa Constructor, and PyQt, but did not like what I'm looking
for is an IDE "all in one", ie power encode and draw the screens of the
program, someone indicates some?, but what I would like to know everything
together with an IDE: Coding + GUI (via visual elements) without the need
to import or export anything, like so: I want a button, I click and drag it to
a window, give two clicks and encode their actions, understand?

Thanks for all.
-- 
http://mail.python.org/mailman/listinfo/python-list


Python with Apache

2013-04-15 Thread Renato Barbosa Pim Pereira
I am trying to execute cgi101.py:

#!/usr/bin/python

import cgi

form = cgi.FieldStorage() # parse form data
print('Content-type: text/html\n')# hdr plus blank line
print('Reply Page')# html reply page
if not 'user' in form:
print('Who are you?')
else:
print('Hello %s!' % cgi.escape(form['user'].value))

I have installed mod_python do apache2 and created one entry in
/etc/apache2/sites-available/default:

DocumentRoot /var/www

AddHandler mod_python .py
PythonHandler cgi101
PythonDebug On


What. happen is: when i call this file on browser I have the following
error:
Can someone help?

MOD_PYTHON ERROR

ProcessId:  2742
Interpreter:'127.0.1.1'

ServerName: '127.0.1.1'
DocumentRoot:   '/var/www'

URI:'/py/cgi101.py'
Location:   None
Directory:  '/var/www/py/'
Filename:   '/var/www/py/cgi101.py'
PathInfo:   ''

Phase:  'PythonHandler'
Handler:'cgi101'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.7/dist-packages/mod_python/importer.py", line
1206, in _process_target
object = apache.resolve_object(module, object_str, arg, silent=silent)

  File "/usr/lib/python2.7/dist-packages/mod_python/apache.py", line
696, in resolve_object
raise AttributeError, s

AttributeError: module '/var/www/py/cgi101.py' contains no 'handler'


MODULE CACHE DETAILS

Accessed:   Mon Apr 15 22:02:42 2013
Generation: 0

_mp_63ea7b6576c7d3a5f48ef8741e8048b0 {
  FileName: '/var/www/py/cgi101.py'
  Instance: 1 [IMPORT]
  Generation:   1
  Modified: Mon Apr 15 21:52:27 2013
  Imported: Mon Apr 15 22:02:42 2013
}
-- 
http://mail.python.org/mailman/listinfo/python-list


Tornado with cgi form

2013-04-17 Thread Renato Barbosa Pim Pereira
*I installed tornado and he is functional, but when I execute the following
script:*

import tornado.ioloop
import tornado.web
import cgi

class MainHandler(tornado.web.
RequestHandler):

form = cgi.FieldStorage() # parse form data
print('Content-type: text/html\n')# hdr plus blank line
print('Reply Page')# html reply page
if not 'user' in form:
print('Who are you?')
else:
print('Hello %s!' %
cgi.escape(form['user'].value))

application = tornado.web.Application([
(r"/", MainHandler),
])

if __name__ == "__main__":
application.listen()
tornado.ioloop.IOLoop.instance().start()

*In the terminal have these outputs:*

python test.py
Content-type: text/html

Reply Page
Who are you?

*When I call the browser on localhost:, the message is this:*

405: Method Not Allowed
*
**Please, can someone have a idea about why the error occurs? and what I
need to do to fix this?*
-- 
http://mail.python.org/mailman/listinfo/python-list