Is there a Python function that works on all platforms (not just Win32)
to generate such in the DCE / Microsoft format?
If not present, this looks like it would be a very Pythonic addition
to the standard library. 5 3139
Jon Perez <jb********@wah oo.com> writes: Is there a Python function that works on all platforms (not just Win32) to generate such in the DCE / Microsoft format?
If not present, this looks like it would be a very Pythonic addition to the standard library.
Why do you say that adding Windows GUID generation to non-Windows
platforms would be Pythonic? Yeesh.
The DCE/OSF uuids I see in Linux ('uuidgen' command)and the Windows
guids look like they are the same format. They have the same number
of hex digits (although their generation methods may be different).
It would be good to have the same function interface for either.
Paul Rubin wrote: Why do you say that adding Windows GUID generation to non-Windows platforms would be Pythonic? Yeesh.
In article <2n************ @uni-berlin.de>,
Jon Perez <jb********@wah oo.com> wrote: Is there a Python function that works on all platforms (not just Win32) to generate such in the DCE / Microsoft format?
If not present, this looks like it would be a very Pythonic addition to the standard library.
Sure it would. Best way to start is to create a stand-alone third-party
library that implements the full DCE spec. Once it has proven its
utility and stability, send a note to python-dev suggesting that it be
added.
Keep in mind that UUID generation is a somewhat complex and tricky
business will likely require some kind of C library support (to get the
MAC address, to check if there's already a system-level UUID/GUID
generator present, to provide a "good" UUID if there's no network card,
and so on).
--
Aahz (aa**@pythoncra ft.com) <*> http://www.pythoncraft.com/
"To me vi is Zen. To use vi is to practice zen. Every command is a
koan. Profound to the user, unintelligible to the uninitiated. You
discover truth everytime you use it." --*****@lion.aust in.ibm.com aa**@pythoncraf t.com (Aahz) wrote in message news:<cf******* ***@panix1.pani x.com>... Sure it would. Best way to start is to create a stand-alone third-party library that implements the full DCE spec. Once it has proven its utility and stability, send a note to python-dev suggesting that it be added.
Keep in mind that UUID generation is a somewhat complex and tricky business will likely require some kind of C library support (to get the MAC address, to check if there's already a system-level UUID/GUID generator present, to provide a "good" UUID if there's no network card, and so on).
Aren't there already uuid generation routines in both Linux and
Windows and wouldn't all that's needed be to wrap them in Python?
In article <f5************ **************@ posting.google. com>,
Jonathan P. <jb********@yah oo.com> wrote: aa**@pythoncra ft.com (Aahz) wrote in message news:<cf******* ***@panix1.pani x.com>... Sure it would. Best way to start is to create a stand-alone third-party library that implements the full DCE spec. Once it has proven its utility and stability, send a note to python-dev suggesting that it be added.
Keep in mind that UUID generation is a somewhat complex and tricky business will likely require some kind of C library support (to get the MAC address, to check if there's already a system-level UUID/GUID generator present, to provide a "good" UUID if there's no network card, and so on).
Aren't there already uuid generation routines in both Linux and Windows and wouldn't all that's needed be to wrap them in Python?
Absolutely. However, I don't know if any of them are cross-platform,
and if you have any intention of getting this into the standard library,
it'll need to be readily available on any platform with an ANSI C
compiler. Packaging is *NOT* trivial, and that's precisely why it's
rare to see code added to the standard library until it has proven
itself.
If you can find a way to implement this in pure Python, that probably
gives the biggest boost to the likelihood of getting into the standard
library. Python 2.4 is too far along to add this; that gives you 12-18
months for working this into usable shape.
--
Aahz (aa**@pythoncra ft.com) <*> http://www.pythoncraft.com/
"To me vi is Zen. To use vi is to practice zen. Every command is a
koan. Profound to the user, unintelligible to the uninitiated. You
discover truth everytime you use it." --*****@lion.aust in.ibm.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Shaun Clark |
last post by:
Hello,
I am trying to bring my entire organization from a Microsoft
platform to a Linux one, starting with all of the servers we are
currently running. Sun ONE ASP allows me to run ASP on Linux through
Apache, Mono is working on .NET, but the one thing I can't migrate is
SQL and it's because products like mySQL and Postgres have no built-in
GUID support. We have 100 databases with GUIDs as primary keys across
all of them. It works great...
|
by: Mary |
last post by:
Hi, I need some assistance with a query. To be honest, I'm not even
sure it can be done.
I'll try to keep the information limited to only what's relevant to
what I have and what I am trying to achieve with this query.
I have a table that contains around 100,000 records. For the sake of
this discussion, assume just two columns:
ID Data
|
by: J.Marsch |
last post by:
I notice that when I generate various guids, they appear to have a mix of
upper and lowercase letters.
Is the uniqueness of a guid case-sensitive?
In other words, if I generate a guid, and then store it in a database that
is case insensitive (or if I convert the letters to upper), is it still
statistically unique?
|
by: vector |
last post by:
I've got an application that generates GUIDs. A lot of GUIDs. Lots
of GUIDs that end up in files on disk, taking up space. I'd like to
continue using the Guid.NewGuid() function as my unique tag generator,
but I'd also like to compress them to base 36 strings, which should
retain their uniqueness but save me disk space. I've looked at
various base conversion functions, and haven't found a suitable one.
Further, I don't need an AnyBase...
|
by: Jeff |
last post by:
Hi -
I'm experiencing a strange problem when comparing 2 guids. In my trial,
they're not equal. When I step through the (VB.NET) code, they are
evaluated as equal, and when I enter the comparison in the command window,
they're not equal. I'm pretty stumped on this one. Please help.
I've tried the following structures, all with the same result:
guid1.equals(guid2)
| |
by: Howard Kaikow |
last post by:
Being lazy, I sometimes copy a project to another directory, then tweak the
code.
A problem arises because then both projects have identical GUIDs in the .sln
file, and in the assembly file.
Is there any way to change the GUIDs, other than by overcoming my laziness
and creating a New Project instead of copying the files?
--
|
by: Steven D'Aprano |
last post by:
I have an application that will be producing many instances, using them
for a while, then tossing them away, and I want each one to have a unique
identifier that won't be re-used for the lifetime of the Python session.
I can't use the id() of the object, because that is only guaranteed to be
unique during the lifetime of the object.
For my application, it doesn't matter if the ids are predictable, so I
could do something as simple as...
|
by: GHUM |
last post by:
Hello,
I created lots of guids via pywintypes.CreateGuid() on windows.
Now I would like to run the same software on Linux / Solaris /
FreeBSD.
So I should produce "compatible" GUIDS on that systems. "compatible"
having the meaining: "Providing similiar likelehood of collisions".
|
by: Claire |
last post by:
Hi,
I can imagine this question has been brought up before but I've spent all
morning trying to find what I need on google without success.
My application sits on Mysql or MS sql server engines and to date I've just
been using auto-incremental int64 fields to generate my RecID field.
I know that in the future the database will need to support multiple sites,
so theres also a SiteID field in there too.
example table ABC
Primary Key =...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |