On 19/04/2013 10:42, Alister wrote:
On Thu, 18 Apr 2013 23:24:29 +0200, Tracubik wrote:
Hi all!
I'm trying to make a simple program that essentially do this:
1) open a html file (extracted epub file)
2) search for occurrences like "ita-ly"
3) put them on a simple GUI: 1 tex
On 18/04/2013 23:27, John Gordon wrote:
In <5170648d$0$1368$4fafb...@reader2.news.tin.it> Tracubik
writes:
i suppose i've to first generate the window and than populate it, but
where i've to put the "search for occurences" code? I don't think init()
is the r
Hi all!
I'm trying to make a simple program that essentially do this:
1) open a html file (extracted epub file)
2) search for occurrences like "ita-ly"
3) put them on a simple GUI: 1 text field and two buttons: keepy it and
correct it (i.e. it will become italy)
now this is quite simple but ho
Hi all,
I'would like to make a script that automatically change some text in a
html file.
I need to make some changes in the text of tags
My question is: there is a way to just "update/substitute" the text in
the html tags or do i have to make a new modified copy of the html file?
To be
Hi all!
I'm trying to create a map generator for c64's games
it's a simple script and it work properly, but i've problem if i try to
modify images before creating the map.
what i do is:
- take a 8 bit screenshoot with VICE emulator in gif or bmp format
- open shutter (screenshoot edit tool und
Il Wed, 25 Jan 2012 02:27:18 -0800, Chris Rebert ha scritto:
> On Wed, Jan 25, 2012 at 1:55 AM, Tracubik wrote:
>> Hi all,
>> i'ld like to make a simple program for searching images from python.
>> All it have to do is make a search in google images and return the
Hi all,
i'ld like to make a simple program for searching images from python.
All it have to do is make a search in google images and return the link
of the images (20 images is enough i think)
Is there any API or modules i can use?
Thanks a lot
Nico
--
http://mail.python.org/mailman/listinfo/py
Hi all,
i hope not to be too much OT with this request.
I'ld like to modify/contribute some open source in python, but first i've
to read and understand the code.
So, is there some guide lines / procedure to follow to help me in this
process.
I remember at school time there was some schema or som
Hi all,
i've found here (http://python-gtk-3-tutorial.readthedocs.org/en/latest/
layout.html#table) this code:
[quote]
If omitted, xoptions and yoptions defaults to
Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL.
[end quote]
xoptions have 3 flags: EXPAND, FILL, SHRINK
so, how it is supposed
Hi all,
i'm developing a new program.
Mission: learn a bit of database management
Idea: create a simple, 1 window program that show me a db of movies i've
seen with few (<10) fields (actors, name, year etc)
technologies i'll use: python + gtk
db: that's the question
since i'm mostly a new-bye fo
Il Fri, 26 Aug 2011 01:20:02 -0700, Chris Rebert ha scritto:
> On Fri, Aug 26, 2011 at 12:56 AM, Tracubik wrote:
>> Il Thu, 25 Aug 2011 01:52:25 -0700, Chris Rebert ha scritto:
>>> On Thu, Aug 25, 2011 at 1:25 AM, Tracubik wrote:
>>>> Hi all!
>>
>> cu
Il Thu, 25 Aug 2011 08:25:59 +, Tracubik ha scritto:
> Hi all!
> i'ld like to execute via Python this simple bash command:
>
> sudo las
>
> las is intended to be a typo for "ls"
>
> the point is that i want to see in the terminal the stderr message (t
Il Thu, 25 Aug 2011 01:52:25 -0700, Chris Rebert ha scritto:
> On Thu, Aug 25, 2011 at 1:25 AM, Tracubik wrote:
>> Hi all!
cut
> Untested:
>
> from subprocess import Popen, PIPE sudo = Popen("sudo las", shell=True,
> stderr=PIPE)
> tee = Popen(["tee"
Hi all!
i'ld like to execute via Python this simple bash command:
sudo las
las is intended to be a typo for "ls"
the point is that i want to see in the terminal the stderr message (that
is "sorry, try again" if i insert the wrong password or "sudo: las:
command not found" otherwise)
i can sim
Hi all,
newbie question here
how can i write code like this:
1 def foo():
2for index in ...
3for plsdoit in ...
4print "this is a very long string that i'm going to write 5
here, it'll be for sure longer than 80 columns"
the only way i've found is to use the "/", but
if you like, off course :)
I'm making a port in python of a program made of bash commands + zenity
for the GUI.
so, i've to re-create a GUI in pyGTK and associate the right bash commands
to the buttons.
Instead of executing the bash script i simply print they in the console.
so, here's my code
On 25/05/2011 10:44, Claudiu Nicolaie CISMARU wrote:
the two button are connected (when clicked) to infoButton(self,
widget,
data=None)
From documentation:
handler_id = object.connect(name, func, func_data)
So:
button1.connect(when is pressed, your_function, 1)
button2.connect(when is presse
Hi all,
i'm trying to write a simple windows with two button in GTK, i need a
way to identify wich button is pressed.
Consider that:
the two button are connected (when clicked) to infoButton(self, widget,
data=None)
infoButton() is something like this
infoButton(self, widget, data=None):
pls help me fixing this:
import re
s = "linka la baba"
re_s = re.compile(r'(link|l)a' , re.IGNORECASE)
print re_s.findall(s)
output:
['link', 'l']
why?
i want my re_s to find linka and la, he just find link and l and forget
about the ending a.
can anyone help me? trying the regular expressio
Hi all!
I've made a simple PyGTK program.
It's a window with a notebook, the notebook have 2 pages
When changing page, i'ld like to get the id of current page.
I've coded it, but i can get only the previously open page, not the
current one. This is not a big deal if i have only 2 pages, but it co
Hi all,
i'm reading a python tutorial in Ubuntu's Full Circle Magazine and i've
found this strange use of %s:
sql = "SELECT pkid,name,source,servings FROM Recipes WHERE name like '%%%s%
%'" %response
response is a string. I've newbie in sql.
why do the coder use %%%s%% instead of a simple %s?
w
Hi all!
i'm writing a notification program and i'm quite new to python.
The program have to check every 5 minutes a particular website and alert
me when a particular sentence ("user online") is in the html.
i've thinked to use a text browser (lynx) to retrieve the html and parse
the output in pyt
Hi all,
i remember i've found somewhere (i think here but i'm not sure) a
signature of a user with a strange python code that, if runned on
terminal, reveal the email of the contact
Can anyone help me finding it?
thanks
Nico
--
http://mail.python.org/mailman/listinfo/python-list
hi all,
i've this on python 2.6.6:
>>> def change_integer(int_value):
... int_value = 10
...
... def change_list(list):
... list[0] = 10
...
... a = 1
... l = [1,1,1]
...
... change_integer(a)
... change_list(l)
...
... print a
... print l
1
[10, 1, 1]
why the integer value do
Il Fri, 29 Oct 2010 19:18:41 -0700, John Yeung ha scritto:
> On Oct 29, 11:59 am, Tracubik wrote:
>> i've to convert integer x to string, but if x < 10, the string have to
>> be '0x' instead of simple 'x'
>>
>> for example:
>>
>&
Hi all,
i've to convert integer x to string, but if x < 10, the string have to be
'0x' instead of simple 'x'
for example:
x = 9
str(x) --> '09'
x = 32
str(x) --> '32'
x represent hour/minute/second.
I can easily add '0' with a if then block, but is there a built-in way to
add the '0' automat
Hi!
It seem that the new version of gnome 3.0 will dismiss pygtk support.
link:
[1] http://live.gnome.org/TwoPointNinetyone/ (search killing pygtk)
[2] http://live.gnome.org/GnomeGoals/PythonIntrospectionPorting
i'm studying pygtk right now, am i wasting my time considering that my
preferr
Hi all,
I'm studying PyGTK tutorial and i've found this strange form:
button = gtk.Button(("False,", "True,")[fill==True])
the label of button is True if fill==True, is False otherwise.
i have googled for this form but i haven't found nothing, so can any of
you pass me any reference/link to thi
Hi all,
i'ld like to create an gnome applet in python that, if left-clicked,
perform a particular operation using the text of the clipboard.
i've found this example:
import pygtk
pygtk.require('2.0')
import gtk
# get the clipboard
clipboard = gtk.clipboard_get()
# read the clipboard text data.
Hi all!
i'm giving away to a friend of mine that have a garage (he repair car) my
old computer. He will use it essentialy to create estimates of the work
via an ods file (i've made a simple ods file to be filled with the cost of
materials and a description of the work).
He's totally new with com
Il Wed, 03 Mar 2010 09:39:54 +0100, Peter Otten ha scritto:
> Tracubik wrote:
>
>> hi, i've to convert from Pascal this code:
>
> program loop;
>
> function generic_condition: boolean;
> begin
>generic_condition := random > 0.7
> end;
>
>
additional information:
when count=4 i haven't to change the m value, so i have to do nothing or
something like m = m
Nico
--
http://mail.python.org/mailman/listinfo/python-list
hi, i've to convert from Pascal this code:
iterations=0;
count=0;
REPEAT;
iterations = iterations+1;
...
IF (genericCondition) THEN count=count+1;
...
CASE count OF:
1: m = 1
2: m = 10
3: m = 100
UNTIL count = 4 OR iterations = 20
i do something like this:
itera
hi all, i've this sample code:
>>> n = 4.499
>>> str(round(n,2))
'4.5'
that's right, but what i want is '4.50' to be displayed instead of '4.5'.
Off course i know that 4.5 = 4.50, still i'ld like to have 4.50.
How can I solve this?
Thanks in advance
Nico
--
http://mail.python.org/mailman/listi
Il Sun, 31 Jan 2010 19:54:17 -0500, Benjamin Kaplan ha scritto:
> First of all, if you haven't read this before, please do. It will make
> this much clearer.
> http://www.joelonsoftware.com/articles/Unicode.html
i'm reading it right now, thanks :-)
[cut]
> Solution to your problem: in addition
Il Sun, 31 Jan 2010 13:46:16 +0100, Günther Dietrich ha
scritto:
> Maybe you might solve this if you decode your string to unicode.
> Example:
>
> |>>> euro = "€"
> |>>> len(euro)
> |3
> |>>> u_euro = euro.decode('utf_8')
> |>>> len(u_euro)
> |1
>
> Adapt the encoding ('utf_8' in my example) to
Hi all,
i want to print on linux console (terminal) a message like this one:
error message of variable lenght
to print the asterisks line i do this:
def StringOfAsterisks(myString):
asterisksString = "*"
for i in range(1,
37 matches
Mail list logo