15,190 Topics

Member Avatar for
Member Avatar for Jovanni_1

Dears, Good day! Does anyone have experienced to use python code for mapinfo/mapbasic? br, Jovanni

0
90
Member Avatar for Slavi

Hey guys, I am looking into xbrl files and I need to extract certain data from each of them however, I can't find much information on the existing python-xbrl library, perhaps someone in here has an experience with it? Here's an xbrl file example [Click Here](http://regnskaber.virk.dk/14502803/eGJybHN0b3JlOi8vWC1GMDk4RkNDNi0yMDE0MTIzMV8wOTE2MjFfMDk1L3hicmw.xml) Any ideas/solutions on how …

Member Avatar for megaflo
0
2K
Member Avatar for sneekula

In the last couple of threads people have used the Python class, but really don't seem to know how to use them properly, or why to use them. Hence my question: "Why would you use a class in Python?" I though only Java forces you to use OOP.

Member Avatar for Vineetha_1
0
4K
Member Avatar for Steven N

Hello, for fun I have been learning both linux (Mint) and python3 as of late. I have finished a working code that scrapes yahoo for data and selects a series of stocks for me. Today I finished creating an apache2 server using linux. What I had hoped to do is …

Member Avatar for steven.rose.94
0
382
Member Avatar for Slavi

Hey guys, how is it going? I am wondering whether this my idea is possible to achieve .. I am looking at this search engine https://datacvr.virk.dk/data/ and it can take names,cvr number, address etc as input and return a facinating output. I think they are using elasticsearch to do all …

Member Avatar for Slavi
0
383
Member Avatar for Sumit_6

A sparse vector is a vector whose entries are almost all zero, like [1, 0, 0, 0, 0, 0, 0, 2, 0]. Storing all those zeros wastes memory and dictionaries are commonly used to keep track of just the nonzero entries. For example, the vector shown earlier can be represented …

Member Avatar for woooee
0
559
Member Avatar for Zeinab_1

Hi there, I have a file with unicode characters I used url decoder code below on a large file, but what is funny is that it doesn't decode some lines,but when I use the code on a file with just that line it decodes it correctly. import urllib.parse for lines …

Member Avatar for Zeinab_1
0
336
Member Avatar for jey1234

I'm not a programmer. I am doing a project for Biology where I will be conducting an experiment on reaction times. Briefly, the subject should click anywhere on the screen as soon as a dot or circle (some graphic) appears on the screen. Details: 1. Program must start at a …

Member Avatar for Tcll
0
1K
Member Avatar for Slass33

I'm doing a multi-line string saved to the variable str: str = """ This is a multiline string """ When I `print str` it works fine. But if I print a different multiline string: ` str = """ This is a multiline string """ print str # Works Fine str_2 …

Member Avatar for megaflo
0
185
Member Avatar for Niloofar24

Hello. This is my code: from bs4 import BeautifulSoup import urllib2 url = urllib2.urlopen('http://www.website_address.com') soup = BeautifulSoup(url) images = soup.find_all('img') Now how can I get the "src" of img tags?

Member Avatar for Gribouillis
0
17K
Member Avatar for DragonMastur

It could be simplifide more, I know. I was doing it as an exersise so its rough and skecthy. But it's workable, I tested it more then 50 times.

Member Avatar for Slass33
0
531
Member Avatar for misgee2001

#I'm begginer for python. I want a program which accept search phrase as raw_input and print search phrase with which document it exists in and line number of the document (file). for example, search phrase is found in file name at line 6. but my program displays 0 and 0 …

Member Avatar for megaflo
0
129
Member Avatar for Slass33

I created a hangman game but it isn't working. The code is here: import random import sys from string import whitespace uy = 'jrekghqegherwgbeuihrweig' choice = 'bhekvvvvvfaktgrwekubfhdbvbvdvbd' z = 'bqhjrfqfbrqkqbg' s = 'ksl' s_space = 'bhks' a4a = 'euwitrigqobehdbfbdjgks' a5a = 'jbfbqwkgnkwqnjg sdn n nmsdafbdjnfbfhskbkjsahjdbhak' a6a = 'qwertyuvdbgshnvdgshgfydss' a7a = …

Member Avatar for Gribouillis
0
305
Member Avatar for vegaseat

This is the updated version of the Tiny Tkinter Calculator. It has more power, since you can type in functions contained in the Python math module then press the equals key. You can then move the result into memory for other calculations. The code is written in OOP class style …

Member Avatar for vegaseat
4
2K
Member Avatar for Zeinab_1

I have wrote a simple code in python s = b'B1=A\xF1adir+al+carrito\n'.decode('latin-1') print(s) with open ('lat.txt','wb') as f: f.write(bytes(s,'latin-1')) the output is **B1=Añadir+al+carrito** and the content of the file is also the same. but when I try to read from a file (with this content B1=A\xF1adir+al+carrito ) for lines in open('mytxt1.txt','rb'): …

Member Avatar for vegaseat
0
265
Member Avatar for Saran_1

I have the CSV with the following column headers: "G","Association","Subset","Rank","First Name","Last Name","Middle Name","Date of Birth","SS","Drivers License Number","Address","Phone Number","A","CF","CM","I","F","J","CN","I","CN" The Output XML format is what I seek: <GIs> <GIR> <G></G> <GM> <FirstName></FirstName> <LastName></LastName> <MiddleName></MiddleName> <FullName></FullName> <DateofBirth></DateofBirth> <SS></SS> <DriversLicenseNumber></DriversLicenseNumber> <Address> <AddressText></AddressText> <Latitude></Latitude> <Longitude></Longitude> </Address> <PhoneNumber></PhoneNumber> <A></A> <CF></CF> <CM></CM> <Association></Association> <Subset></Subset> <Rank></Rank> <I></I> …

0
111
Member Avatar for Atul_4

Hi is here any one who can tell me that how can i generate the licence key or any other things for securing my client server program please help me

Member Avatar for snippsat
0
656
Member Avatar for vegaseat

The example shows how to establish a dictionary of (row, column):value pairs to mimic a two dimensional array. This can be easily expanded to more dimensions. Python3 has dictionary comprehension, making the process of creating a dictionary of this type easier.

Member Avatar for vegaseat
1
7K
Member Avatar for DragonMastur

I would like the widgets on the window to expand as you expand the window. I know you can do it with the pack method but I'm using the grid method to arange my widgets. Pack Method: label = Label(root, text="Some Text") label.pack(expand=1, fill=BOTH) Grid Method I'm using: self.inventoryLabel = …

Member Avatar for woooee
0
6K
Member Avatar for vegaseat

The idea of this thread is to help the beginning Python programmer with hints and helpful code. Please feel free to contribute! If you have any questions start your own thread! The creators of Python are very active, improving the language all the time. Here is a little of the …

Member Avatar for vegaseat
23
34K
Member Avatar for vegaseat

Just a simple password creator using Python code. The length of the password can be set and the characterset could be changed if you so desire.

0
573
Member Avatar for sbaw

Hi I am currently using pyinstaller 2.1 with python 2.7. I am making modifications to "TI's MSP430 Tools (Python scripts and library)" which allows the update of the MSP430 firmware over USB. Specifically, I have made some modifications to the top-level script and when I run the script it works …

Member Avatar for megaflo
0
1K
Member Avatar for BustACode

Note: In Python 2.7 use: `from __future__ import print_function` to use examples. In Python, by default, the key and value pairs in a dictionary are stored as hashes, therefore dictionaries do not retain the order in which values were added, and cannot be ordered. v_Dict ={} v_Dict["First"] = 99 v_Dict["Second"] …

Member Avatar for DragonMastur
1
479
Member Avatar for DragonMastur

I needed a calculator and I didn't want to use google since my internet is slow. So I made one! Here it is. Working with it is simple. Use the number and operation keys("c" for clear, "p" for pi, and "s" for sqrt) as well as the return and enter …

0
692
Member Avatar for vegaseat

After you got the basics of Python under your belt, the best way to get a good knowledge of the language and improve your coding skills is to start on a project you are interested in. Maybe an image viewer, a slide show, computer generated random or fractal art, a …

Member Avatar for vegaseat
20
18K
Member Avatar for Brandon500

Hello everybody I'm doing a program that finds the nth number in the fibonacci sequence. I actually already coded it. What I would like someone to do is maybe you could help me code it another way. The reason is the last assignment I turned in got a zero, because …

Member Avatar for woooee
0
234
Member Avatar for getanshub4u

Any good beginner books on python? I want to learn python easy and fast.I have coded some basic programs in c,c++,Java. Wanna learn python for scripting in linux.

Member Avatar for dewhales
0
445
Member Avatar for DragonMastur

karmstrong ask in the Python chat if any one was farmilar with converting a for loop in C to Python. Here is a program in python that will do it for you! Thank You!

Member Avatar for vegaseat
0
817
Member Avatar for vegaseat

This is a test to get the Python snippets going! For those of you who are scared of snakes, the language is named after the TV program, not the snake. Python is an interpreted language, but programs to compile/combine the code to an exe file are available (Py2Exe). The latest …

Member Avatar for vegaseat
2
3K
Member Avatar for Niloofar24

Hello. There is a text in my Python script that is in Persian language and the letters are from left to right, but in Persian language letters should be written from right to left. What should i do now to fix it and print it in UTF-8 format?

Member Avatar for megaflo
0
398

The End.