Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
5
Posts with Downvotes
5
Downvoting Members
2
0 Endorsements
~58.7K People Reached
Favorite Tags

50 Posted Topics

Member Avatar for acrocephalus

Hello, I need to create a PHP script that reads some of the fields of an RSForn and creates a QR code with them. I've been doing a little bit of research and I've found a PHP library that may suite my needs: http://phpqrcode.sourceforge.net/. Now the question is how do …

Member Avatar for diafol
0
1K
Member Avatar for acrocephalus

I have this PHP code that creates a QR code with the given data: <?php include(JPATH_LIBRARIES . '/phpqrcode/qrlib.php'); $tempDir = JPATH_SITE . '/images/'; $codeContents = 'This Goes From File'; $fileName = 'qr_'.md5($codeContents).'.png'; $pngAbsoluteFilePath = $tempDir.$fileName; $urlRelativeFilePath = JUri::root() .'images/' . $fileName; if (!file_exists($pngAbsoluteFilePath)) { QRcode::png($codeContents, $pngAbsoluteFilePath); } else { echo …

Member Avatar for almostbob
0
2K
Member Avatar for acrocephalus

Hello! I'm quite new with PHP and javascript, so apologize me if this is an easy question.I have a form with a dropdown box and a GO button, used to select documents (from the dropdown box) and navigate to them (GO button). What I would like to do is to …

Member Avatar for hericles
0
126
Member Avatar for acrocephalus

Hello, I am trying to get all the values (numeric) of the column Bruel_ID from database mpctz_rsform_bruels to display them in a RSForm dropdown box. I'm using this code: //<code> $db = JFactory::getDbo(); $db->setQuery("SELECT Bruel_ID FROM mpctz_rsform_bruels"); return $db->loadResult(); //</code> Howeve, I am only pulling the lowest value of the …

Member Avatar for diafol
0
151
Member Avatar for acrocephalus

Hello, I am building a web registration form using RSForms for Joomla. I need the form to create a QR code with some of the data provided in the form and store it with the user's data. I know this can be achieved using Javascript, but my knowledge on it …

Member Avatar for piers
0
232
Member Avatar for acrocephalus

Hello! I need some help. I have no idea on PHP and I need to set up a custom validation rule. I have a field which name is IBAN. It is composed of 24 characters, de first 4 are PPXX (2 letters and 2 numbers) and the rest are numeric. …

Member Avatar for pritaeas
0
209
Member Avatar for acrocephalus

Hello, I am trying to build a function that takes the input of the IBAN field (alphanumeric), counts them and compares the to the needed value (24). Then, if don't match it triggers an error message, if they match it does nothing. This is the code: <script type="text/javascript"> function checkIBAN(iban) …

Member Avatar for acrocephalus
0
174
Member Avatar for acrocephalus

Hello, I am generating batch qr codes using the qrcode 5.0.1 package and the following code: from qrcode import * import os,dateutil import pandas as pd from PIL import Image #Importar base de dades pathFile = ('E:\Usuarios\Daniel\Documents\APNAE\QR\Llistat_socis_alta.csv') socisAPNAE = pd.read_csv(pathFile, delimiter = ';', encoding='ISO-8859-1') #generar codi QR for i in …

0
113
Member Avatar for acrocephalus

Hello, I have a code which generates QR codes from a csv file: #Importar base de dades pathFile = ('E:\Usuarios\Daniel\Documents\APNAE\QR\Llistat_socis_alta.csv') socisAPNAE = pd.read_csv(pathFile, delimiter = ';', encoding='ISO-8859-1') #generar codi QR for i in range(0,len(socisAPNAE.index)): soci = socisAPNAE.iloc[i,1:6] nom = socisAPNAE.iloc[i,1] nom = nom.encode('latin-1') qr = QRCode(version=20, error_correction=ERROR_CORRECT_L) qr.add_data(soci) qr.make() im …

Member Avatar for acrocephalus
0
346
Member Avatar for acrocephalus

Hello! I have started experimenting with GUI programming using TkInter. Up to now, I have written this code: [CODE]import Tkinter, tkFileDialog, Tkconstants from Tkinter import * root = Tk() root.title('Watermark Image Processing 1.0b') #Options for buttons button_opt = {'fill': Tkconstants.BOTH, 'padx': 5, 'pady': 5} #Define asking directory button dirname = …

Member Avatar for ronkalycarlos
0
18K
Member Avatar for acrocephalus

Hello! I am trying to read multiple files from a folder (for example, spect1.txt, spect2.txt, ...) and store each file in different python objects objects (i.e. spect1, spect2, ...). Up to now, I have this code, which reads the file and stores it in a different file [CODE]import sys,os path …

Member Avatar for richieking
0
153
Member Avatar for acrocephalus

Hello! I'm just beginning to learn Python and I would like you to recommend me any good tutorial. I have started with the [URL="http://www.pythonlearn.com/"]http://www.pythonlearn.com/[/URL] and the [URL="http://hetland.org/writing/instant-python.html"]http://hetland.org/writing/instant-python.html[/URL]. I have found them very useful and I would like to continue learning. Furthermore, I would also like to start learning on programming …

Member Avatar for Dylan Solarsh
0
239
Member Avatar for acrocephalus

Hello, I am trying to use icons on my "File" menu using this code [CODE]fileMenu = wx.Menu() log = wx.MenuItem(fileMenu, ID_LOG, '&Login\tCtrl+L') fileMenu.AppendItem(log) self.Bind(wx.EVT_MENU, self.OnLog, id=ID_LOG) NewUser = wx.MenuItem(fileMenu, ID_NEWUSER, '&New User\tCtrl+N') self.Bind(wx.EVT_MENU, self.NewUserDlg, id=ID_NEWUSER) fileMenu.AppendItem(NewUser) quitIcon = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_MENU, (16, 16)) quit = wx.MenuItem(fileMenu, 1, '&Quit\tCtrl+Q') quit.SetBitmap(quitIcon) fileMenu.AppendItem(quit) self.Bind(wx.EVT_MENU, …

Member Avatar for acrocephalus
0
109
Member Avatar for acrocephalus

Hello! I have a problem which I don't know if it is related to MySQL or Python. I am writing a database using wx.Python and MySQLdb. My problem is that when I want to send some string which contains accents to the MySQL database (for instance, 'Empordà') it is inserted …

Member Avatar for acrocephalus
0
172
Member Avatar for acrocephalus

Hello! I have a problem which I think it is related to Python, however I may be wrong. I am writing a database using wx.Python and MySQLdb. My problem is that when I want to send some string which contains accents to the MySQL database (for instance, 'Empordà') it is …

Member Avatar for acrocephalus
0
415
Member Avatar for acrocephalus

Hello! I am trying to set up a masked combobox using wx.lib.masked.combobox.BaseMaskedComboBox with autocompletion. However, I've found a couple of problems. On one hand, if I run the code as I provide it (code at the end of the post), I get an error caused by the 'Antigua and Bermuda' …

Member Avatar for acrocephalus
0
166
Member Avatar for acrocephalus

Hello! I have a table with some rows and cells (code at the end), and created a function which searches for text inside the cells and returns the row number where the text is (to simplify the example, only English Name is working). Then, it should set the grid cursor …

Member Avatar for acrocephalus
0
159
Member Avatar for acrocephalus

Hello! How can I destroy a wx.MessageDialog after a given amount of time? I have tried EndModal without success. Cheers! Dani

Member Avatar for SoulMazer
0
85
Member Avatar for acrocephalus

Hello! I have a frame with some sizers in it (see code at th end for a running example). I would like to know how to repeat the sizers 2, 3 and 4 when pressing the add button. The sizers should be added before the submit button, and the control …

Member Avatar for acrocephalus
0
125
Member Avatar for acrocephalus

Hello, I have written this code, deleting those parts which are no needed to reproduce the error: [CODE]#! /usr/bin/env python # TestDialogs.py import wx, MySQLdb, wx.lib.intctrl, wx.grid ID_SPECIES=1 class SearchDlg(wx.Dialog): def __init__(self): wx.Dialog.__init__(self, None, -1, 'Search species', size=(400,400)) panel = wx.Panel(self, -1) vbox = wx.BoxSizer(wx.VERTICAL) hbox1 = wx.BoxSizer(wx.HORIZONTAL) hbox2 = …

Member Avatar for acrocephalus
0
242
Member Avatar for acrocephalus

Hello! I have designed a dialog that shows a wx.Grid with some data (full code at the end). Then, there is a search area. The other buttons are not working now. When you fill any search control with some data shown on the grid, it prints the index where the …

Member Avatar for acrocephalus
0
724
Member Avatar for acrocephalus

Hello! I have designed a dialog with a grid widget. I would like to populate it with data from a MySQL table which has 10396 rows and 5 columns, as the grid widget. How can I do it? Then, how can I select a row from the grid widget and …

Member Avatar for acrocephalus
-1
2K
Member Avatar for acrocephalus

Hello! I have created a control using the TimeCtrl widget using this code to insert an hour in a 24h format using the HH:MM format [CODE]self.EndingHour = masked.TimeCtrl(panel, -1, name='24 hour control', format = 'HHMM', fmt24hr = True)[/CODE] However, it keeps showing the time as a 12h clock (in the …

Member Avatar for acrocephalus
-1
196
Member Avatar for acrocephalus

Hello! I am using the wx.DatePickerCtrl to ask for the date using this code [CODE]wx.DatePickerCtrl(panel, -1, size=(110, -1), style=wx.DP_DROPDOWN | wx.DP_SHOWCENTURY) [/CODE] However, it returns the result as [CODE]Mon 30 Aug 2010 12:00:00 AM CEST[/CODE] but I meet them to be as YYYY/MM/DD. Is there any way to do it? …

Member Avatar for vegaseat
-1
486
Member Avatar for acrocephalus

Hello! How can I format a text control to show only the date in YYYY/MM/DD format using slashes? Furthermore, I would like to display a calendar icon beside it which opens an expandable calendar and sends the selected date to the text control field. This way, the user can enter …

Member Avatar for acrocephalus
-1
81
Member Avatar for acrocephalus

Hello! I am trying to edit a csv file. This is my original csv file [CODE]"TINAMIFORMES",,,, ,"Tinamidae",,, ,,"Tinamus",, ,,,"tao","Grey Tinamou" ,,,"solitarius","Solitary Tinamou" ,,,"osgoodi","Black Tinamou" ,,,"major","Great Tinamou" ,,,"guttatus","White-throated Tinamou" ,,"Nothocercus",, ,,,"bonapartei","Highland Tinamou" ,,,"julius","Tawny-breasted Tinamou" ,,,"nigrocapillus","Hooded Tinamou" ,,"Crypturellus",, ,,,"berlepschi","Berlepsch's Tinamou" ,,,"cinereus","Cinereous Tinamou" ,,,"soui","Little Tinamou" ,,,"ptaritepui","Tepui Tinamou" ,,,"obsoletus","Brown Tinamou" ,,,"undulatus","Undulated Tinamou" ,,,"transfasciatus","Pale-browed Tinamou" …

Member Avatar for acrocephalus
0
5K
Member Avatar for acrocephalus

Hello! I have a table with the structure you can check at [URL="http://spreadsheets.google.com/ccc?key=0Ahb705_66NMOdG5RM0stQU5wVC1JUmRBbWhLeDRyM2c&hl=ca"]http://spreadsheets.google.com/ccc?key=0Ahb705_66NMOdG5RM0stQU5wVC1JUmRBbWhLeDRyM2c&hl=ca[/URL]. The table has many more rows but no more columns. Is there a way to select the rows like select all the fields from Table from row where Family is Tinamidae to the next non empty row …

Member Avatar for danny4444
0
120
Member Avatar for acrocephalus

Hello! As a part of a database project, I need to find a way to send a MySQL table to wxpython and then select some of its records (using a Select/Remove button) to store them in another class of the database. Is there any kind of widget to do this? …

0
61
Member Avatar for acrocephalus

Hello! I am trying to update a MySQL table using a Python code but I am having some problems. I define the connection and the cursor in the Ornithobase (wx.Frame)class in the OnLof function as [CODE]self.db= MySQLdb.connect(host='localhost', user=self.Username , passwd=self.pwd, db='Ornithobase') self.cursor = self.db.cursor()[/CODE] Then, in the same class but …

Member Avatar for TrustyTony
0
290
Member Avatar for acrocephalus

Hello! I have been playing around with python and mysql, and I have started thinking about creating a database to record my bird sights. For connection purposes, I have programmed this class [CODE]class LoginDlg(wx.Dialog): def __init__(self): wx.Dialog.__init__(self, None, -1, 'Login to Ornithobase 1.0b', size=(250,150)) def comboLogin(): import MySQLdb db= MySQLdb.connect(host='localhost', …

Member Avatar for acrocephalus
0
192
Member Avatar for acrocephalus

Hello! I have defined a function to create a combo box to log into a database [CODE]def comboLogin(): import MySQLdb db= MySQLdb.connect(host='localhost', user='root' , passwd='acrsci00', db='Ornithobase') self.cursor = db.cursor() sql = '''select Username from Users''' self.cursor.execute(sql) result = self.cursor.fetchall() result2 = [] x = 0 for record in result: for …

Member Avatar for acrocephalus
0
75
Member Avatar for acrocephalus

Hello! I have this function that prompts a wx.MessageDialog [CODE]def DelUserDlg(self, event): dlg = wx.MessageDialog(None, 'Are you sure you want to delete your user?', 'Question', wx.OK | wx.CANCEL | wx.NO_DEFAULT | wx.ICON_QUESTION) dlg.ShowModal()[/CODE] I would like to assign an event to delete a mysql database user. How can I assign …

Member Avatar for Beat_Slayer
0
90
Member Avatar for acrocephalus

Hello! I have designed an initial frame for a database app using this code [CODE]#! /usr/bin/env python # OrnithobaseGUI.py import wx, MySQLdb, wx.lib.intctrl ID_HELP = 1 ID_ABOUT = 2 ID_LOG=3 class Ornithobase(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(750,225)) #Define menus menubar = wx.MenuBar() #Define file menu …

Member Avatar for acrocephalus
0
166
Member Avatar for acrocephalus

Hello! I have written this dialog to connect to a MySQL database. It asks for the Username and Password, and it should use this data to connect to the database. [CODE]#! /usr/bin/env python # pwd.py import wx, MySQLdb class LoginDlg(wx.Dialog): def __init__(self): wx.Dialog.__init__(self, None, -1, 'Login', size=(250,150)) # widgets userLbl …

Member Avatar for griswolf
0
209
Member Avatar for acrocephalus

Hello! I am trying to redirect the stdout following the example in [URL="http://www.blog.pythonlibrary.org/2009/01/01/wxpython-redirecting-stdout-stderr/"]http://www.blog.pythonlibrary.org/2009/01/01/wxpython-redirecting-stdout-stderr/[/URL]. My code has some loops, and I would like the function to redirect stdout each time the loop is repeated, as it happens when running the code with the command line. However, it seems that in this …

Member Avatar for TrustyTony
0
866
Member Avatar for acrocephalus

Hello! I would like to embed a terminal into a wxpython application where to print the outputs of the app (like Synaptic when installing Linux apps). I've been googling for a while but I found nothing. How can I do this with wxpython? Cheers! Dani

0
49
Member Avatar for acrocephalus

Hello! I am creating my first GUI with wxpython. It works right now, but I would like to tune it a little bit. My first issue is: how can I show the selected path/file beside browse button? I have uploaded the code, so you can figure out what I mean. …

0
66
Member Avatar for acrocephalus

Hello! I have created a dialog to select a file with wxpython and FileBrowseButton with this code. [CODE]fbb = wxfbb.FileBrowseButton(panel,labelText="Select an image file:", fileMask=mask, fileMode=wx.OPEN, size=(800,30)) markFile = fbb.GetValue()[/CODE] I need to use the selected file for further actions. How can I do it? I have tried [CODE]return markFile[/CODE] but …

Member Avatar for acrocephalus
0
594
Member Avatar for acrocephalus

Hello! I am trying to creat an "About box" with wxpython. I have defined this function [CODE]def OnAboutBox(self, event): info = wx.AboutDialogInfo() info.SetIcon(wx.Icon('icons/exit.png', wx.BITMAP_TYPE_PNG)) info.SetName('Watermark Image Processing') info.SetVersion('1.0b') info.SetDescription(info) info.SetCopyright('(C) 2010 Daniel Valverde') info.SetWebSite('http://www.acrocephalus.net') licenseFile = open('license.txt') info.SetLicence(license) info.AddDeveloper('Daniel Valverde') info.AddDocWriter('Daniel Valverde') info.AddArtist('Daniel Valverde') info.AddTranslator('Daniel Valverde') wx.AboutBox(info)[/CODE] I know that …

Member Avatar for acrocephalus
0
433
Member Avatar for acrocephalus

Hello! I am trying to write a function that looks for a desired string pattern within a table (Countries). Look at the code. [CODE]def selectCountry(): print 'Enter country:' country = raw_input('> ') sql = '''select idCountries,CountryEn from Countries where CountryEn REGEXP '%s'''' cursor.execute(sql,(country)) result = cursor.fetchall() rowHead = 'Country ID','Country …

Member Avatar for acrocephalus
0
360
Member Avatar for acrocephalus

Hello! I have this simple funcion [CODE]def newUser(): print 'Choose a username?' Username = raw_input('> ')[/CODE] The variable 'Username' has to be used by other functions. How can I do it? Cheers! Dani

Member Avatar for acrocephalus
0
10K
Member Avatar for acrocephalus

Hello! I have written a program where you have to give the path to directories and files as input. Is it possible to enable any kind of auto-completion when running the program? Cheers! Dani

Member Avatar for cronos4d
0
91
Member Avatar for acrocephalus

Hello! I am trying to run the code provided in the texttable module documentation ([URL="http://jefke.free.fr/coding/python/texttable/"]http://jefke.free.fr/coding/python/texttable/[/URL]) as shown in the code, but it returns a name error which tells that Texttable is not defined. [CODE]import texttable table = Texttable() table.set_cols_align(["l", "r", "c"]) table.set_cols_valign(["t", "m", "b"]) table.add_rows([ ["Name", "Age", "Nickname"], ["Mr\nXavier\nHuon", 32, …

Member Avatar for Gribouillis
0
2K
Member Avatar for acrocephalus

Hello! I have created a database named Ornithobase, which contains a Users table with Name, FamilyName, eMail and Username columns. I have already connected to the database with MySQLdb module. How can I print this table in the console from the Python script? Furthermore, how can I perform a search …

Member Avatar for acrocephalus
0
129
Member Avatar for acrocephalus

Hello! I have this funtion to delete a record from a MySQL table: [CODE]def delUser(): #Delete user #Ask for user to delete Username = raw_input('Which user would you like to delete? ') #Delete user delUser = '''DELETE FROM Users WHERE Username = %s''' cursor.execute(delUser,(Username)) db.commit()[/CODE] The problem is that it …

Member Avatar for gunbuster363
0
117
Member Avatar for acrocephalus

Hello! I have written a piece of code that creates 3 folders in the working directory, asking the user to proceed even if it may overwrite existing folders. The problem is that the more pictures there are the more time it needs to create the folders. Is there any way …

Member Avatar for TrustyTony
0
88
Member Avatar for acrocephalus

Hello! I am trying to write a piece of code to open a file using a 'while' loop. It should ask for the file name and, if it does not exist, ask for it again. This is the code: [CODE]while True: try: fhand = open(markFile) except: print 'File', markFile, 'cannot …

Member Avatar for acrocephalus
0
144
Member Avatar for acrocephalus

Hello! I have this piece of code, which asks the user to continue with the program even if it may overwrite some folders. [CODE]print w.fill('WIP will create Backup, Resized and Watermarked folders to store the original, resized and watermarked pictures. It will overwrite them if they already exists. Are you …

Member Avatar for TrustyTony
0
141
Member Avatar for acrocephalus

Hello! I am very new with Python, so it may be a stupid question. How can I get the height and the width of an image in pixels? Cheers! Dani

Member Avatar for Beat_Slayer
0
11K
Member Avatar for acrocephalus

Hello! I have just created a script (see it at the end of the message) to watermark images. If you want to, could you check it and suggest ways to improve it? Think of me as a very beginner ... Cheers! [CODE]#Import the required modules import os, shutil, fnmatch, Image, …

Member Avatar for acrocephalus
0
402

The End.